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/communication/init.go | sdk/go/azure/communication/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 communication
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:communication/emailService:EmailService":
r = &EmailService{}
case "azure:communication/emailServiceDomain:EmailServiceDomain":
r = &EmailServiceDomain{}
case "azure:communication/emailServiceDomainSenderUsername:EmailServiceDomainSenderUsername":
r = &EmailServiceDomainSenderUsername{}
case "azure:communication/service:Service":
r = &Service{}
case "azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation":
r = &ServiceEmailDomainAssociation{}
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",
"communication/emailService",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"communication/emailServiceDomain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"communication/emailServiceDomainSenderUsername",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"communication/service",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"communication/serviceEmailDomainAssociation",
&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/communication/pulumiTypes.go | sdk/go/azure/communication/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 communication
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 EmailServiceDomainVerificationRecord struct {
// (Optional) An `dkim2` block as defined below.
Dkim2s []EmailServiceDomainVerificationRecordDkim2 `pulumi:"dkim2s"`
// (Optional) An `dkim` block as defined below.
Dkims []EmailServiceDomainVerificationRecordDkim `pulumi:"dkims"`
// (Optional) An `dmarc` block as defined below.
Dmarcs []EmailServiceDomainVerificationRecordDmarc `pulumi:"dmarcs"`
// (Optional) An `domain` block as defined below.
Domains []EmailServiceDomainVerificationRecordDomain `pulumi:"domains"`
// (Optional) An `spf` block as defined below.
Spfs []EmailServiceDomainVerificationRecordSpf `pulumi:"spfs"`
}
// EmailServiceDomainVerificationRecordInput is an input type that accepts EmailServiceDomainVerificationRecordArgs and EmailServiceDomainVerificationRecordOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordInput` via:
//
// EmailServiceDomainVerificationRecordArgs{...}
type EmailServiceDomainVerificationRecordInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordOutput() EmailServiceDomainVerificationRecordOutput
ToEmailServiceDomainVerificationRecordOutputWithContext(context.Context) EmailServiceDomainVerificationRecordOutput
}
type EmailServiceDomainVerificationRecordArgs struct {
// (Optional) An `dkim2` block as defined below.
Dkim2s EmailServiceDomainVerificationRecordDkim2ArrayInput `pulumi:"dkim2s"`
// (Optional) An `dkim` block as defined below.
Dkims EmailServiceDomainVerificationRecordDkimArrayInput `pulumi:"dkims"`
// (Optional) An `dmarc` block as defined below.
Dmarcs EmailServiceDomainVerificationRecordDmarcArrayInput `pulumi:"dmarcs"`
// (Optional) An `domain` block as defined below.
Domains EmailServiceDomainVerificationRecordDomainArrayInput `pulumi:"domains"`
// (Optional) An `spf` block as defined below.
Spfs EmailServiceDomainVerificationRecordSpfArrayInput `pulumi:"spfs"`
}
func (EmailServiceDomainVerificationRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecord)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordArgs) ToEmailServiceDomainVerificationRecordOutput() EmailServiceDomainVerificationRecordOutput {
return i.ToEmailServiceDomainVerificationRecordOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordArgs) ToEmailServiceDomainVerificationRecordOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordOutput)
}
// EmailServiceDomainVerificationRecordArrayInput is an input type that accepts EmailServiceDomainVerificationRecordArray and EmailServiceDomainVerificationRecordArrayOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordArrayInput` via:
//
// EmailServiceDomainVerificationRecordArray{ EmailServiceDomainVerificationRecordArgs{...} }
type EmailServiceDomainVerificationRecordArrayInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordArrayOutput() EmailServiceDomainVerificationRecordArrayOutput
ToEmailServiceDomainVerificationRecordArrayOutputWithContext(context.Context) EmailServiceDomainVerificationRecordArrayOutput
}
type EmailServiceDomainVerificationRecordArray []EmailServiceDomainVerificationRecordInput
func (EmailServiceDomainVerificationRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecord)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordArray) ToEmailServiceDomainVerificationRecordArrayOutput() EmailServiceDomainVerificationRecordArrayOutput {
return i.ToEmailServiceDomainVerificationRecordArrayOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordArray) ToEmailServiceDomainVerificationRecordArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordArrayOutput)
}
type EmailServiceDomainVerificationRecordOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecord)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordOutput) ToEmailServiceDomainVerificationRecordOutput() EmailServiceDomainVerificationRecordOutput {
return o
}
func (o EmailServiceDomainVerificationRecordOutput) ToEmailServiceDomainVerificationRecordOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordOutput {
return o
}
// (Optional) An `dkim2` block as defined below.
func (o EmailServiceDomainVerificationRecordOutput) Dkim2s() EmailServiceDomainVerificationRecordDkim2ArrayOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecord) []EmailServiceDomainVerificationRecordDkim2 {
return v.Dkim2s
}).(EmailServiceDomainVerificationRecordDkim2ArrayOutput)
}
// (Optional) An `dkim` block as defined below.
func (o EmailServiceDomainVerificationRecordOutput) Dkims() EmailServiceDomainVerificationRecordDkimArrayOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecord) []EmailServiceDomainVerificationRecordDkim {
return v.Dkims
}).(EmailServiceDomainVerificationRecordDkimArrayOutput)
}
// (Optional) An `dmarc` block as defined below.
func (o EmailServiceDomainVerificationRecordOutput) Dmarcs() EmailServiceDomainVerificationRecordDmarcArrayOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecord) []EmailServiceDomainVerificationRecordDmarc {
return v.Dmarcs
}).(EmailServiceDomainVerificationRecordDmarcArrayOutput)
}
// (Optional) An `domain` block as defined below.
func (o EmailServiceDomainVerificationRecordOutput) Domains() EmailServiceDomainVerificationRecordDomainArrayOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecord) []EmailServiceDomainVerificationRecordDomain {
return v.Domains
}).(EmailServiceDomainVerificationRecordDomainArrayOutput)
}
// (Optional) An `spf` block as defined below.
func (o EmailServiceDomainVerificationRecordOutput) Spfs() EmailServiceDomainVerificationRecordSpfArrayOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecord) []EmailServiceDomainVerificationRecordSpf { return v.Spfs }).(EmailServiceDomainVerificationRecordSpfArrayOutput)
}
type EmailServiceDomainVerificationRecordArrayOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecord)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordArrayOutput) ToEmailServiceDomainVerificationRecordArrayOutput() EmailServiceDomainVerificationRecordArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordArrayOutput) ToEmailServiceDomainVerificationRecordArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordArrayOutput) Index(i pulumi.IntInput) EmailServiceDomainVerificationRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EmailServiceDomainVerificationRecord {
return vs[0].([]EmailServiceDomainVerificationRecord)[vs[1].(int)]
}).(EmailServiceDomainVerificationRecordOutput)
}
type EmailServiceDomainVerificationRecordDkim2 struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name *string `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl *int `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type *string `pulumi:"type"`
// Value of the DNS record.
Value *string `pulumi:"value"`
}
// EmailServiceDomainVerificationRecordDkim2Input is an input type that accepts EmailServiceDomainVerificationRecordDkim2Args and EmailServiceDomainVerificationRecordDkim2Output values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDkim2Input` via:
//
// EmailServiceDomainVerificationRecordDkim2Args{...}
type EmailServiceDomainVerificationRecordDkim2Input interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDkim2Output() EmailServiceDomainVerificationRecordDkim2Output
ToEmailServiceDomainVerificationRecordDkim2OutputWithContext(context.Context) EmailServiceDomainVerificationRecordDkim2Output
}
type EmailServiceDomainVerificationRecordDkim2Args struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl pulumi.IntPtrInput `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type pulumi.StringPtrInput `pulumi:"type"`
// Value of the DNS record.
Value pulumi.StringPtrInput `pulumi:"value"`
}
func (EmailServiceDomainVerificationRecordDkim2Args) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecordDkim2)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDkim2Args) ToEmailServiceDomainVerificationRecordDkim2Output() EmailServiceDomainVerificationRecordDkim2Output {
return i.ToEmailServiceDomainVerificationRecordDkim2OutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordDkim2Args) ToEmailServiceDomainVerificationRecordDkim2OutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkim2Output {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordDkim2Output)
}
// EmailServiceDomainVerificationRecordDkim2ArrayInput is an input type that accepts EmailServiceDomainVerificationRecordDkim2Array and EmailServiceDomainVerificationRecordDkim2ArrayOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDkim2ArrayInput` via:
//
// EmailServiceDomainVerificationRecordDkim2Array{ EmailServiceDomainVerificationRecordDkim2Args{...} }
type EmailServiceDomainVerificationRecordDkim2ArrayInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDkim2ArrayOutput() EmailServiceDomainVerificationRecordDkim2ArrayOutput
ToEmailServiceDomainVerificationRecordDkim2ArrayOutputWithContext(context.Context) EmailServiceDomainVerificationRecordDkim2ArrayOutput
}
type EmailServiceDomainVerificationRecordDkim2Array []EmailServiceDomainVerificationRecordDkim2Input
func (EmailServiceDomainVerificationRecordDkim2Array) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecordDkim2)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDkim2Array) ToEmailServiceDomainVerificationRecordDkim2ArrayOutput() EmailServiceDomainVerificationRecordDkim2ArrayOutput {
return i.ToEmailServiceDomainVerificationRecordDkim2ArrayOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordDkim2Array) ToEmailServiceDomainVerificationRecordDkim2ArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkim2ArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordDkim2ArrayOutput)
}
type EmailServiceDomainVerificationRecordDkim2Output struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordDkim2Output) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecordDkim2)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordDkim2Output) ToEmailServiceDomainVerificationRecordDkim2Output() EmailServiceDomainVerificationRecordDkim2Output {
return o
}
func (o EmailServiceDomainVerificationRecordDkim2Output) ToEmailServiceDomainVerificationRecordDkim2OutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkim2Output {
return o
}
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
func (o EmailServiceDomainVerificationRecordDkim2Output) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim2) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
func (o EmailServiceDomainVerificationRecordDkim2Output) Ttl() pulumi.IntPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim2) *int { return v.Ttl }).(pulumi.IntPtrOutput)
}
// Type of the DNS record. Example: TXT
func (o EmailServiceDomainVerificationRecordDkim2Output) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim2) *string { return v.Type }).(pulumi.StringPtrOutput)
}
// Value of the DNS record.
func (o EmailServiceDomainVerificationRecordDkim2Output) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim2) *string { return v.Value }).(pulumi.StringPtrOutput)
}
type EmailServiceDomainVerificationRecordDkim2ArrayOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordDkim2ArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecordDkim2)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordDkim2ArrayOutput) ToEmailServiceDomainVerificationRecordDkim2ArrayOutput() EmailServiceDomainVerificationRecordDkim2ArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDkim2ArrayOutput) ToEmailServiceDomainVerificationRecordDkim2ArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkim2ArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDkim2ArrayOutput) Index(i pulumi.IntInput) EmailServiceDomainVerificationRecordDkim2Output {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EmailServiceDomainVerificationRecordDkim2 {
return vs[0].([]EmailServiceDomainVerificationRecordDkim2)[vs[1].(int)]
}).(EmailServiceDomainVerificationRecordDkim2Output)
}
type EmailServiceDomainVerificationRecordDkim struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name *string `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl *int `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type *string `pulumi:"type"`
// Value of the DNS record.
Value *string `pulumi:"value"`
}
// EmailServiceDomainVerificationRecordDkimInput is an input type that accepts EmailServiceDomainVerificationRecordDkimArgs and EmailServiceDomainVerificationRecordDkimOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDkimInput` via:
//
// EmailServiceDomainVerificationRecordDkimArgs{...}
type EmailServiceDomainVerificationRecordDkimInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDkimOutput() EmailServiceDomainVerificationRecordDkimOutput
ToEmailServiceDomainVerificationRecordDkimOutputWithContext(context.Context) EmailServiceDomainVerificationRecordDkimOutput
}
type EmailServiceDomainVerificationRecordDkimArgs struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl pulumi.IntPtrInput `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type pulumi.StringPtrInput `pulumi:"type"`
// Value of the DNS record.
Value pulumi.StringPtrInput `pulumi:"value"`
}
func (EmailServiceDomainVerificationRecordDkimArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecordDkim)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDkimArgs) ToEmailServiceDomainVerificationRecordDkimOutput() EmailServiceDomainVerificationRecordDkimOutput {
return i.ToEmailServiceDomainVerificationRecordDkimOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordDkimArgs) ToEmailServiceDomainVerificationRecordDkimOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkimOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordDkimOutput)
}
// EmailServiceDomainVerificationRecordDkimArrayInput is an input type that accepts EmailServiceDomainVerificationRecordDkimArray and EmailServiceDomainVerificationRecordDkimArrayOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDkimArrayInput` via:
//
// EmailServiceDomainVerificationRecordDkimArray{ EmailServiceDomainVerificationRecordDkimArgs{...} }
type EmailServiceDomainVerificationRecordDkimArrayInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDkimArrayOutput() EmailServiceDomainVerificationRecordDkimArrayOutput
ToEmailServiceDomainVerificationRecordDkimArrayOutputWithContext(context.Context) EmailServiceDomainVerificationRecordDkimArrayOutput
}
type EmailServiceDomainVerificationRecordDkimArray []EmailServiceDomainVerificationRecordDkimInput
func (EmailServiceDomainVerificationRecordDkimArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecordDkim)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDkimArray) ToEmailServiceDomainVerificationRecordDkimArrayOutput() EmailServiceDomainVerificationRecordDkimArrayOutput {
return i.ToEmailServiceDomainVerificationRecordDkimArrayOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordDkimArray) ToEmailServiceDomainVerificationRecordDkimArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkimArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordDkimArrayOutput)
}
type EmailServiceDomainVerificationRecordDkimOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordDkimOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecordDkim)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordDkimOutput) ToEmailServiceDomainVerificationRecordDkimOutput() EmailServiceDomainVerificationRecordDkimOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDkimOutput) ToEmailServiceDomainVerificationRecordDkimOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkimOutput {
return o
}
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
func (o EmailServiceDomainVerificationRecordDkimOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
func (o EmailServiceDomainVerificationRecordDkimOutput) Ttl() pulumi.IntPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim) *int { return v.Ttl }).(pulumi.IntPtrOutput)
}
// Type of the DNS record. Example: TXT
func (o EmailServiceDomainVerificationRecordDkimOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim) *string { return v.Type }).(pulumi.StringPtrOutput)
}
// Value of the DNS record.
func (o EmailServiceDomainVerificationRecordDkimOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDkim) *string { return v.Value }).(pulumi.StringPtrOutput)
}
type EmailServiceDomainVerificationRecordDkimArrayOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordDkimArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecordDkim)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordDkimArrayOutput) ToEmailServiceDomainVerificationRecordDkimArrayOutput() EmailServiceDomainVerificationRecordDkimArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDkimArrayOutput) ToEmailServiceDomainVerificationRecordDkimArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDkimArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDkimArrayOutput) Index(i pulumi.IntInput) EmailServiceDomainVerificationRecordDkimOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EmailServiceDomainVerificationRecordDkim {
return vs[0].([]EmailServiceDomainVerificationRecordDkim)[vs[1].(int)]
}).(EmailServiceDomainVerificationRecordDkimOutput)
}
type EmailServiceDomainVerificationRecordDmarc struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name *string `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl *int `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type *string `pulumi:"type"`
// Value of the DNS record.
Value *string `pulumi:"value"`
}
// EmailServiceDomainVerificationRecordDmarcInput is an input type that accepts EmailServiceDomainVerificationRecordDmarcArgs and EmailServiceDomainVerificationRecordDmarcOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDmarcInput` via:
//
// EmailServiceDomainVerificationRecordDmarcArgs{...}
type EmailServiceDomainVerificationRecordDmarcInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDmarcOutput() EmailServiceDomainVerificationRecordDmarcOutput
ToEmailServiceDomainVerificationRecordDmarcOutputWithContext(context.Context) EmailServiceDomainVerificationRecordDmarcOutput
}
type EmailServiceDomainVerificationRecordDmarcArgs struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl pulumi.IntPtrInput `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type pulumi.StringPtrInput `pulumi:"type"`
// Value of the DNS record.
Value pulumi.StringPtrInput `pulumi:"value"`
}
func (EmailServiceDomainVerificationRecordDmarcArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecordDmarc)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDmarcArgs) ToEmailServiceDomainVerificationRecordDmarcOutput() EmailServiceDomainVerificationRecordDmarcOutput {
return i.ToEmailServiceDomainVerificationRecordDmarcOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordDmarcArgs) ToEmailServiceDomainVerificationRecordDmarcOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDmarcOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordDmarcOutput)
}
// EmailServiceDomainVerificationRecordDmarcArrayInput is an input type that accepts EmailServiceDomainVerificationRecordDmarcArray and EmailServiceDomainVerificationRecordDmarcArrayOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDmarcArrayInput` via:
//
// EmailServiceDomainVerificationRecordDmarcArray{ EmailServiceDomainVerificationRecordDmarcArgs{...} }
type EmailServiceDomainVerificationRecordDmarcArrayInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDmarcArrayOutput() EmailServiceDomainVerificationRecordDmarcArrayOutput
ToEmailServiceDomainVerificationRecordDmarcArrayOutputWithContext(context.Context) EmailServiceDomainVerificationRecordDmarcArrayOutput
}
type EmailServiceDomainVerificationRecordDmarcArray []EmailServiceDomainVerificationRecordDmarcInput
func (EmailServiceDomainVerificationRecordDmarcArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecordDmarc)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDmarcArray) ToEmailServiceDomainVerificationRecordDmarcArrayOutput() EmailServiceDomainVerificationRecordDmarcArrayOutput {
return i.ToEmailServiceDomainVerificationRecordDmarcArrayOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordDmarcArray) ToEmailServiceDomainVerificationRecordDmarcArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDmarcArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordDmarcArrayOutput)
}
type EmailServiceDomainVerificationRecordDmarcOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordDmarcOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecordDmarc)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordDmarcOutput) ToEmailServiceDomainVerificationRecordDmarcOutput() EmailServiceDomainVerificationRecordDmarcOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDmarcOutput) ToEmailServiceDomainVerificationRecordDmarcOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDmarcOutput {
return o
}
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
func (o EmailServiceDomainVerificationRecordDmarcOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDmarc) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
func (o EmailServiceDomainVerificationRecordDmarcOutput) Ttl() pulumi.IntPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDmarc) *int { return v.Ttl }).(pulumi.IntPtrOutput)
}
// Type of the DNS record. Example: TXT
func (o EmailServiceDomainVerificationRecordDmarcOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDmarc) *string { return v.Type }).(pulumi.StringPtrOutput)
}
// Value of the DNS record.
func (o EmailServiceDomainVerificationRecordDmarcOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v EmailServiceDomainVerificationRecordDmarc) *string { return v.Value }).(pulumi.StringPtrOutput)
}
type EmailServiceDomainVerificationRecordDmarcArrayOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainVerificationRecordDmarcArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecordDmarc)(nil)).Elem()
}
func (o EmailServiceDomainVerificationRecordDmarcArrayOutput) ToEmailServiceDomainVerificationRecordDmarcArrayOutput() EmailServiceDomainVerificationRecordDmarcArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDmarcArrayOutput) ToEmailServiceDomainVerificationRecordDmarcArrayOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDmarcArrayOutput {
return o
}
func (o EmailServiceDomainVerificationRecordDmarcArrayOutput) Index(i pulumi.IntInput) EmailServiceDomainVerificationRecordDmarcOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EmailServiceDomainVerificationRecordDmarc {
return vs[0].([]EmailServiceDomainVerificationRecordDmarc)[vs[1].(int)]
}).(EmailServiceDomainVerificationRecordDmarcOutput)
}
type EmailServiceDomainVerificationRecordDomain struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name *string `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl *int `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type *string `pulumi:"type"`
// Value of the DNS record.
Value *string `pulumi:"value"`
}
// EmailServiceDomainVerificationRecordDomainInput is an input type that accepts EmailServiceDomainVerificationRecordDomainArgs and EmailServiceDomainVerificationRecordDomainOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDomainInput` via:
//
// EmailServiceDomainVerificationRecordDomainArgs{...}
type EmailServiceDomainVerificationRecordDomainInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDomainOutput() EmailServiceDomainVerificationRecordDomainOutput
ToEmailServiceDomainVerificationRecordDomainOutputWithContext(context.Context) EmailServiceDomainVerificationRecordDomainOutput
}
type EmailServiceDomainVerificationRecordDomainArgs struct {
// The name of the Email Communication Service resource. If `domainManagement` is `AzureManaged`, the name must be `AzureManagedDomain`. Changing this forces a new Email Communication Service to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
// Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.
Ttl pulumi.IntPtrInput `pulumi:"ttl"`
// Type of the DNS record. Example: TXT
Type pulumi.StringPtrInput `pulumi:"type"`
// Value of the DNS record.
Value pulumi.StringPtrInput `pulumi:"value"`
}
func (EmailServiceDomainVerificationRecordDomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EmailServiceDomainVerificationRecordDomain)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDomainArgs) ToEmailServiceDomainVerificationRecordDomainOutput() EmailServiceDomainVerificationRecordDomainOutput {
return i.ToEmailServiceDomainVerificationRecordDomainOutputWithContext(context.Background())
}
func (i EmailServiceDomainVerificationRecordDomainArgs) ToEmailServiceDomainVerificationRecordDomainOutputWithContext(ctx context.Context) EmailServiceDomainVerificationRecordDomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainVerificationRecordDomainOutput)
}
// EmailServiceDomainVerificationRecordDomainArrayInput is an input type that accepts EmailServiceDomainVerificationRecordDomainArray and EmailServiceDomainVerificationRecordDomainArrayOutput values.
// You can construct a concrete instance of `EmailServiceDomainVerificationRecordDomainArrayInput` via:
//
// EmailServiceDomainVerificationRecordDomainArray{ EmailServiceDomainVerificationRecordDomainArgs{...} }
type EmailServiceDomainVerificationRecordDomainArrayInput interface {
pulumi.Input
ToEmailServiceDomainVerificationRecordDomainArrayOutput() EmailServiceDomainVerificationRecordDomainArrayOutput
ToEmailServiceDomainVerificationRecordDomainArrayOutputWithContext(context.Context) EmailServiceDomainVerificationRecordDomainArrayOutput
}
type EmailServiceDomainVerificationRecordDomainArray []EmailServiceDomainVerificationRecordDomainInput
func (EmailServiceDomainVerificationRecordDomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EmailServiceDomainVerificationRecordDomain)(nil)).Elem()
}
func (i EmailServiceDomainVerificationRecordDomainArray) ToEmailServiceDomainVerificationRecordDomainArrayOutput() EmailServiceDomainVerificationRecordDomainArrayOutput {
return i.ToEmailServiceDomainVerificationRecordDomainArrayOutputWithContext(context.Background())
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/communication/serviceEmailDomainAssociation.go | sdk/go/azure/communication/serviceEmailDomainAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package communication
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a communication service email domain association.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/communication"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("group1"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := communication.NewService(ctx, "example", &communication.ServiceArgs{
// Name: pulumi.String("CommunicationService1"),
// ResourceGroupName: example.Name,
// DataLocation: pulumi.String("United States"),
// })
// if err != nil {
// return err
// }
// exampleEmailService, err := communication.NewEmailService(ctx, "example", &communication.EmailServiceArgs{
// Name: pulumi.String("emailCommunicationService1"),
// ResourceGroupName: example.Name,
// DataLocation: pulumi.String("United States"),
// })
// if err != nil {
// return err
// }
// exampleEmailServiceDomain, err := communication.NewEmailServiceDomain(ctx, "example", &communication.EmailServiceDomainArgs{
// Name: pulumi.String("AzureManagedDomain"),
// EmailServiceId: exampleEmailService.ID(),
// DomainManagement: pulumi.String("AzureManaged"),
// })
// if err != nil {
// return err
// }
// _, err = communication.NewServiceEmailDomainAssociation(ctx, "example", &communication.ServiceEmailDomainAssociationArgs{
// CommunicationServiceId: exampleService.ID(),
// EmailServiceDomainId: exampleEmailServiceDomain.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.Communication` - 2023-03-31
//
// ## Import
//
// Communication service email domain association can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/communicationServices/communicationService1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/emailServices/emailCommunicationService1/domains/domain1"
// ```
type ServiceEmailDomainAssociation struct {
pulumi.CustomResourceState
// The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
CommunicationServiceId pulumi.StringOutput `pulumi:"communicationServiceId"`
// The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
EmailServiceDomainId pulumi.StringOutput `pulumi:"emailServiceDomainId"`
}
// NewServiceEmailDomainAssociation registers a new resource with the given unique name, arguments, and options.
func NewServiceEmailDomainAssociation(ctx *pulumi.Context,
name string, args *ServiceEmailDomainAssociationArgs, opts ...pulumi.ResourceOption) (*ServiceEmailDomainAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CommunicationServiceId == nil {
return nil, errors.New("invalid value for required argument 'CommunicationServiceId'")
}
if args.EmailServiceDomainId == nil {
return nil, errors.New("invalid value for required argument 'EmailServiceDomainId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServiceEmailDomainAssociation
err := ctx.RegisterResource("azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceEmailDomainAssociation gets an existing ServiceEmailDomainAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServiceEmailDomainAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceEmailDomainAssociationState, opts ...pulumi.ResourceOption) (*ServiceEmailDomainAssociation, error) {
var resource ServiceEmailDomainAssociation
err := ctx.ReadResource("azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceEmailDomainAssociation resources.
type serviceEmailDomainAssociationState struct {
// The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
CommunicationServiceId *string `pulumi:"communicationServiceId"`
// The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
EmailServiceDomainId *string `pulumi:"emailServiceDomainId"`
}
type ServiceEmailDomainAssociationState struct {
// The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
CommunicationServiceId pulumi.StringPtrInput
// The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
EmailServiceDomainId pulumi.StringPtrInput
}
func (ServiceEmailDomainAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceEmailDomainAssociationState)(nil)).Elem()
}
type serviceEmailDomainAssociationArgs struct {
// The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
CommunicationServiceId string `pulumi:"communicationServiceId"`
// The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
EmailServiceDomainId string `pulumi:"emailServiceDomainId"`
}
// The set of arguments for constructing a ServiceEmailDomainAssociation resource.
type ServiceEmailDomainAssociationArgs struct {
// The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
CommunicationServiceId pulumi.StringInput
// The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
EmailServiceDomainId pulumi.StringInput
}
func (ServiceEmailDomainAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceEmailDomainAssociationArgs)(nil)).Elem()
}
type ServiceEmailDomainAssociationInput interface {
pulumi.Input
ToServiceEmailDomainAssociationOutput() ServiceEmailDomainAssociationOutput
ToServiceEmailDomainAssociationOutputWithContext(ctx context.Context) ServiceEmailDomainAssociationOutput
}
func (*ServiceEmailDomainAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceEmailDomainAssociation)(nil)).Elem()
}
func (i *ServiceEmailDomainAssociation) ToServiceEmailDomainAssociationOutput() ServiceEmailDomainAssociationOutput {
return i.ToServiceEmailDomainAssociationOutputWithContext(context.Background())
}
func (i *ServiceEmailDomainAssociation) ToServiceEmailDomainAssociationOutputWithContext(ctx context.Context) ServiceEmailDomainAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceEmailDomainAssociationOutput)
}
// ServiceEmailDomainAssociationArrayInput is an input type that accepts ServiceEmailDomainAssociationArray and ServiceEmailDomainAssociationArrayOutput values.
// You can construct a concrete instance of `ServiceEmailDomainAssociationArrayInput` via:
//
// ServiceEmailDomainAssociationArray{ ServiceEmailDomainAssociationArgs{...} }
type ServiceEmailDomainAssociationArrayInput interface {
pulumi.Input
ToServiceEmailDomainAssociationArrayOutput() ServiceEmailDomainAssociationArrayOutput
ToServiceEmailDomainAssociationArrayOutputWithContext(context.Context) ServiceEmailDomainAssociationArrayOutput
}
type ServiceEmailDomainAssociationArray []ServiceEmailDomainAssociationInput
func (ServiceEmailDomainAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceEmailDomainAssociation)(nil)).Elem()
}
func (i ServiceEmailDomainAssociationArray) ToServiceEmailDomainAssociationArrayOutput() ServiceEmailDomainAssociationArrayOutput {
return i.ToServiceEmailDomainAssociationArrayOutputWithContext(context.Background())
}
func (i ServiceEmailDomainAssociationArray) ToServiceEmailDomainAssociationArrayOutputWithContext(ctx context.Context) ServiceEmailDomainAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceEmailDomainAssociationArrayOutput)
}
// ServiceEmailDomainAssociationMapInput is an input type that accepts ServiceEmailDomainAssociationMap and ServiceEmailDomainAssociationMapOutput values.
// You can construct a concrete instance of `ServiceEmailDomainAssociationMapInput` via:
//
// ServiceEmailDomainAssociationMap{ "key": ServiceEmailDomainAssociationArgs{...} }
type ServiceEmailDomainAssociationMapInput interface {
pulumi.Input
ToServiceEmailDomainAssociationMapOutput() ServiceEmailDomainAssociationMapOutput
ToServiceEmailDomainAssociationMapOutputWithContext(context.Context) ServiceEmailDomainAssociationMapOutput
}
type ServiceEmailDomainAssociationMap map[string]ServiceEmailDomainAssociationInput
func (ServiceEmailDomainAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceEmailDomainAssociation)(nil)).Elem()
}
func (i ServiceEmailDomainAssociationMap) ToServiceEmailDomainAssociationMapOutput() ServiceEmailDomainAssociationMapOutput {
return i.ToServiceEmailDomainAssociationMapOutputWithContext(context.Background())
}
func (i ServiceEmailDomainAssociationMap) ToServiceEmailDomainAssociationMapOutputWithContext(ctx context.Context) ServiceEmailDomainAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceEmailDomainAssociationMapOutput)
}
type ServiceEmailDomainAssociationOutput struct{ *pulumi.OutputState }
func (ServiceEmailDomainAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceEmailDomainAssociation)(nil)).Elem()
}
func (o ServiceEmailDomainAssociationOutput) ToServiceEmailDomainAssociationOutput() ServiceEmailDomainAssociationOutput {
return o
}
func (o ServiceEmailDomainAssociationOutput) ToServiceEmailDomainAssociationOutputWithContext(ctx context.Context) ServiceEmailDomainAssociationOutput {
return o
}
// The ID of the Communication Service. Changing this forces a new communication service email domain association to be created.
func (o ServiceEmailDomainAssociationOutput) CommunicationServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceEmailDomainAssociation) pulumi.StringOutput { return v.CommunicationServiceId }).(pulumi.StringOutput)
}
// The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created.
func (o ServiceEmailDomainAssociationOutput) EmailServiceDomainId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceEmailDomainAssociation) pulumi.StringOutput { return v.EmailServiceDomainId }).(pulumi.StringOutput)
}
type ServiceEmailDomainAssociationArrayOutput struct{ *pulumi.OutputState }
func (ServiceEmailDomainAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceEmailDomainAssociation)(nil)).Elem()
}
func (o ServiceEmailDomainAssociationArrayOutput) ToServiceEmailDomainAssociationArrayOutput() ServiceEmailDomainAssociationArrayOutput {
return o
}
func (o ServiceEmailDomainAssociationArrayOutput) ToServiceEmailDomainAssociationArrayOutputWithContext(ctx context.Context) ServiceEmailDomainAssociationArrayOutput {
return o
}
func (o ServiceEmailDomainAssociationArrayOutput) Index(i pulumi.IntInput) ServiceEmailDomainAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServiceEmailDomainAssociation {
return vs[0].([]*ServiceEmailDomainAssociation)[vs[1].(int)]
}).(ServiceEmailDomainAssociationOutput)
}
type ServiceEmailDomainAssociationMapOutput struct{ *pulumi.OutputState }
func (ServiceEmailDomainAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceEmailDomainAssociation)(nil)).Elem()
}
func (o ServiceEmailDomainAssociationMapOutput) ToServiceEmailDomainAssociationMapOutput() ServiceEmailDomainAssociationMapOutput {
return o
}
func (o ServiceEmailDomainAssociationMapOutput) ToServiceEmailDomainAssociationMapOutputWithContext(ctx context.Context) ServiceEmailDomainAssociationMapOutput {
return o
}
func (o ServiceEmailDomainAssociationMapOutput) MapIndex(k pulumi.StringInput) ServiceEmailDomainAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServiceEmailDomainAssociation {
return vs[0].(map[string]*ServiceEmailDomainAssociation)[vs[1].(string)]
}).(ServiceEmailDomainAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceEmailDomainAssociationInput)(nil)).Elem(), &ServiceEmailDomainAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceEmailDomainAssociationArrayInput)(nil)).Elem(), ServiceEmailDomainAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceEmailDomainAssociationMapInput)(nil)).Elem(), ServiceEmailDomainAssociationMap{})
pulumi.RegisterOutputType(ServiceEmailDomainAssociationOutput{})
pulumi.RegisterOutputType(ServiceEmailDomainAssociationArrayOutput{})
pulumi.RegisterOutputType(ServiceEmailDomainAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/communication/service.go | sdk/go/azure/communication/service.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package communication
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Communication Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/communication"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = communication.NewService(ctx, "example", &communication.ServiceArgs{
// Name: pulumi.String("example-communicationservice"),
// ResourceGroupName: example.Name,
// DataLocation: pulumi.String("United States"),
// })
// 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.Communication` - 2023-03-31
//
// ## Import
//
// Communication Services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:communication/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/communicationServices/communicationService1
// ```
type Service struct {
pulumi.CustomResourceState
// The location where the Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK`, `usgov` and `United States`. Defaults to `United States`. Changing this forces a new Communication Service to be created.
DataLocation pulumi.StringPtrOutput `pulumi:"dataLocation"`
// The hostname of the Communication Service
Hostname pulumi.StringOutput `pulumi:"hostname"`
// The name of the Communication Service resource. Changing this forces a new Communication Service to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The primary connection string of the Communication Service.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The primary key of the Communication Service.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The name of the Resource Group where the Communication Service should exist. Changing this forces a new Communication Service to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary connection string of the Communication Service.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The secondary key of the Communication Service.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// A mapping of tags which should be assigned to the Communication Service.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewService registers a new resource with the given unique name, arguments, and options.
func NewService(ctx *pulumi.Context,
name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryKey",
"secondaryConnectionString",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Service
err := ctx.RegisterResource("azure:communication/service:Service", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetService gets an existing Service resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceState, opts ...pulumi.ResourceOption) (*Service, error) {
var resource Service
err := ctx.ReadResource("azure:communication/service:Service", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Service resources.
type serviceState struct {
// The location where the Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK`, `usgov` and `United States`. Defaults to `United States`. Changing this forces a new Communication Service to be created.
DataLocation *string `pulumi:"dataLocation"`
// The hostname of the Communication Service
Hostname *string `pulumi:"hostname"`
// The name of the Communication Service resource. Changing this forces a new Communication Service to be created.
Name *string `pulumi:"name"`
// The primary connection string of the Communication Service.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The primary key of the Communication Service.
PrimaryKey *string `pulumi:"primaryKey"`
// The name of the Resource Group where the Communication Service should exist. Changing this forces a new Communication Service to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary connection string of the Communication Service.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The secondary key of the Communication Service.
SecondaryKey *string `pulumi:"secondaryKey"`
// A mapping of tags which should be assigned to the Communication Service.
Tags map[string]string `pulumi:"tags"`
}
type ServiceState struct {
// The location where the Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK`, `usgov` and `United States`. Defaults to `United States`. Changing this forces a new Communication Service to be created.
DataLocation pulumi.StringPtrInput
// The hostname of the Communication Service
Hostname pulumi.StringPtrInput
// The name of the Communication Service resource. Changing this forces a new Communication Service to be created.
Name pulumi.StringPtrInput
// The primary connection string of the Communication Service.
PrimaryConnectionString pulumi.StringPtrInput
// The primary key of the Communication Service.
PrimaryKey pulumi.StringPtrInput
// The name of the Resource Group where the Communication Service should exist. Changing this forces a new Communication Service to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary connection string of the Communication Service.
SecondaryConnectionString pulumi.StringPtrInput
// The secondary key of the Communication Service.
SecondaryKey pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Communication Service.
Tags pulumi.StringMapInput
}
func (ServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceState)(nil)).Elem()
}
type serviceArgs struct {
// The location where the Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK`, `usgov` and `United States`. Defaults to `United States`. Changing this forces a new Communication Service to be created.
DataLocation *string `pulumi:"dataLocation"`
// The name of the Communication Service resource. Changing this forces a new Communication Service to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Communication Service should exist. Changing this forces a new Communication Service to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Communication Service.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Service resource.
type ServiceArgs struct {
// The location where the Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK`, `usgov` and `United States`. Defaults to `United States`. Changing this forces a new Communication Service to be created.
DataLocation pulumi.StringPtrInput
// The name of the Communication Service resource. Changing this forces a new Communication Service to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Communication Service should exist. Changing this forces a new Communication Service to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Communication Service.
Tags pulumi.StringMapInput
}
func (ServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceArgs)(nil)).Elem()
}
type ServiceInput interface {
pulumi.Input
ToServiceOutput() ServiceOutput
ToServiceOutputWithContext(ctx context.Context) ServiceOutput
}
func (*Service) ElementType() reflect.Type {
return reflect.TypeOf((**Service)(nil)).Elem()
}
func (i *Service) ToServiceOutput() ServiceOutput {
return i.ToServiceOutputWithContext(context.Background())
}
func (i *Service) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceOutput)
}
// ServiceArrayInput is an input type that accepts ServiceArray and ServiceArrayOutput values.
// You can construct a concrete instance of `ServiceArrayInput` via:
//
// ServiceArray{ ServiceArgs{...} }
type ServiceArrayInput interface {
pulumi.Input
ToServiceArrayOutput() ServiceArrayOutput
ToServiceArrayOutputWithContext(context.Context) ServiceArrayOutput
}
type ServiceArray []ServiceInput
func (ServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Service)(nil)).Elem()
}
func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput {
return i.ToServiceArrayOutputWithContext(context.Background())
}
func (i ServiceArray) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceArrayOutput)
}
// ServiceMapInput is an input type that accepts ServiceMap and ServiceMapOutput values.
// You can construct a concrete instance of `ServiceMapInput` via:
//
// ServiceMap{ "key": ServiceArgs{...} }
type ServiceMapInput interface {
pulumi.Input
ToServiceMapOutput() ServiceMapOutput
ToServiceMapOutputWithContext(context.Context) ServiceMapOutput
}
type ServiceMap map[string]ServiceInput
func (ServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Service)(nil)).Elem()
}
func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput {
return i.ToServiceMapOutputWithContext(context.Background())
}
func (i ServiceMap) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceMapOutput)
}
type ServiceOutput struct{ *pulumi.OutputState }
func (ServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Service)(nil)).Elem()
}
func (o ServiceOutput) ToServiceOutput() ServiceOutput {
return o
}
func (o ServiceOutput) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
return o
}
// The location where the Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK`, `usgov` and `United States`. Defaults to `United States`. Changing this forces a new Communication Service to be created.
func (o ServiceOutput) DataLocation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Service) pulumi.StringPtrOutput { return v.DataLocation }).(pulumi.StringPtrOutput)
}
// The hostname of the Communication Service
func (o ServiceOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput)
}
// The name of the Communication Service resource. Changing this forces a new Communication Service to be created.
func (o ServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The primary connection string of the Communication Service.
func (o ServiceOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary key of the Communication Service.
func (o ServiceOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Communication Service should exist. Changing this forces a new Communication Service to be created.
func (o ServiceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary connection string of the Communication Service.
func (o ServiceOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary key of the Communication Service.
func (o ServiceOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Communication Service.
func (o ServiceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Service) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ServiceArrayOutput struct{ *pulumi.OutputState }
func (ServiceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Service)(nil)).Elem()
}
func (o ServiceArrayOutput) ToServiceArrayOutput() ServiceArrayOutput {
return o
}
func (o ServiceArrayOutput) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput {
return o
}
func (o ServiceArrayOutput) Index(i pulumi.IntInput) ServiceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Service {
return vs[0].([]*Service)[vs[1].(int)]
}).(ServiceOutput)
}
type ServiceMapOutput struct{ *pulumi.OutputState }
func (ServiceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Service)(nil)).Elem()
}
func (o ServiceMapOutput) ToServiceMapOutput() ServiceMapOutput {
return o
}
func (o ServiceMapOutput) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput {
return o
}
func (o ServiceMapOutput) MapIndex(k pulumi.StringInput) ServiceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Service {
return vs[0].(map[string]*Service)[vs[1].(string)]
}).(ServiceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceInput)(nil)).Elem(), &Service{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceArrayInput)(nil)).Elem(), ServiceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceMapInput)(nil)).Elem(), ServiceMap{})
pulumi.RegisterOutputType(ServiceOutput{})
pulumi.RegisterOutputType(ServiceArrayOutput{})
pulumi.RegisterOutputType(ServiceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/communication/emailService.go | sdk/go/azure/communication/emailService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package communication
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Email Communication Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/communication"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = communication.NewEmailService(ctx, "example", &communication.EmailServiceArgs{
// Name: pulumi.String("example-emailcommunicationservice"),
// ResourceGroupName: example.Name,
// DataLocation: pulumi.String("United States"),
// })
// 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.Communication` - 2023-03-31
//
// ## Import
//
// Communication Services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:communication/emailService:EmailService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/emailServices/emailCommunicationService1
// ```
type EmailService struct {
pulumi.CustomResourceState
// The location where the Email Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK` `usgov` and `United States`. Changing this forces a new Email Communication Service to be created.
DataLocation pulumi.StringOutput `pulumi:"dataLocation"`
// The name of the Email Communication Service resource. Changing this forces a new Email Communication Service to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Email Communication Service should exist. Changing this forces a new Email Communication Service to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Email Communication Service.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewEmailService registers a new resource with the given unique name, arguments, and options.
func NewEmailService(ctx *pulumi.Context,
name string, args *EmailServiceArgs, opts ...pulumi.ResourceOption) (*EmailService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DataLocation == nil {
return nil, errors.New("invalid value for required argument 'DataLocation'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EmailService
err := ctx.RegisterResource("azure:communication/emailService:EmailService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEmailService gets an existing EmailService resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEmailService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EmailServiceState, opts ...pulumi.ResourceOption) (*EmailService, error) {
var resource EmailService
err := ctx.ReadResource("azure:communication/emailService:EmailService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EmailService resources.
type emailServiceState struct {
// The location where the Email Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK` `usgov` and `United States`. Changing this forces a new Email Communication Service to be created.
DataLocation *string `pulumi:"dataLocation"`
// The name of the Email Communication Service resource. Changing this forces a new Email Communication Service to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Email Communication Service should exist. Changing this forces a new Email Communication Service to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Email Communication Service.
Tags map[string]string `pulumi:"tags"`
}
type EmailServiceState struct {
// The location where the Email Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK` `usgov` and `United States`. Changing this forces a new Email Communication Service to be created.
DataLocation pulumi.StringPtrInput
// The name of the Email Communication Service resource. Changing this forces a new Email Communication Service to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Email Communication Service should exist. Changing this forces a new Email Communication Service to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Email Communication Service.
Tags pulumi.StringMapInput
}
func (EmailServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*emailServiceState)(nil)).Elem()
}
type emailServiceArgs struct {
// The location where the Email Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK` `usgov` and `United States`. Changing this forces a new Email Communication Service to be created.
DataLocation string `pulumi:"dataLocation"`
// The name of the Email Communication Service resource. Changing this forces a new Email Communication Service to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Email Communication Service should exist. Changing this forces a new Email Communication Service to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Email Communication Service.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a EmailService resource.
type EmailServiceArgs struct {
// The location where the Email Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK` `usgov` and `United States`. Changing this forces a new Email Communication Service to be created.
DataLocation pulumi.StringInput
// The name of the Email Communication Service resource. Changing this forces a new Email Communication Service to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Email Communication Service should exist. Changing this forces a new Email Communication Service to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Email Communication Service.
Tags pulumi.StringMapInput
}
func (EmailServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*emailServiceArgs)(nil)).Elem()
}
type EmailServiceInput interface {
pulumi.Input
ToEmailServiceOutput() EmailServiceOutput
ToEmailServiceOutputWithContext(ctx context.Context) EmailServiceOutput
}
func (*EmailService) ElementType() reflect.Type {
return reflect.TypeOf((**EmailService)(nil)).Elem()
}
func (i *EmailService) ToEmailServiceOutput() EmailServiceOutput {
return i.ToEmailServiceOutputWithContext(context.Background())
}
func (i *EmailService) ToEmailServiceOutputWithContext(ctx context.Context) EmailServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceOutput)
}
// EmailServiceArrayInput is an input type that accepts EmailServiceArray and EmailServiceArrayOutput values.
// You can construct a concrete instance of `EmailServiceArrayInput` via:
//
// EmailServiceArray{ EmailServiceArgs{...} }
type EmailServiceArrayInput interface {
pulumi.Input
ToEmailServiceArrayOutput() EmailServiceArrayOutput
ToEmailServiceArrayOutputWithContext(context.Context) EmailServiceArrayOutput
}
type EmailServiceArray []EmailServiceInput
func (EmailServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EmailService)(nil)).Elem()
}
func (i EmailServiceArray) ToEmailServiceArrayOutput() EmailServiceArrayOutput {
return i.ToEmailServiceArrayOutputWithContext(context.Background())
}
func (i EmailServiceArray) ToEmailServiceArrayOutputWithContext(ctx context.Context) EmailServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceArrayOutput)
}
// EmailServiceMapInput is an input type that accepts EmailServiceMap and EmailServiceMapOutput values.
// You can construct a concrete instance of `EmailServiceMapInput` via:
//
// EmailServiceMap{ "key": EmailServiceArgs{...} }
type EmailServiceMapInput interface {
pulumi.Input
ToEmailServiceMapOutput() EmailServiceMapOutput
ToEmailServiceMapOutputWithContext(context.Context) EmailServiceMapOutput
}
type EmailServiceMap map[string]EmailServiceInput
func (EmailServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EmailService)(nil)).Elem()
}
func (i EmailServiceMap) ToEmailServiceMapOutput() EmailServiceMapOutput {
return i.ToEmailServiceMapOutputWithContext(context.Background())
}
func (i EmailServiceMap) ToEmailServiceMapOutputWithContext(ctx context.Context) EmailServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceMapOutput)
}
type EmailServiceOutput struct{ *pulumi.OutputState }
func (EmailServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EmailService)(nil)).Elem()
}
func (o EmailServiceOutput) ToEmailServiceOutput() EmailServiceOutput {
return o
}
func (o EmailServiceOutput) ToEmailServiceOutputWithContext(ctx context.Context) EmailServiceOutput {
return o
}
// The location where the Email Communication service stores its data at rest. Possible values are `Africa`, `Asia Pacific`, `Australia`, `Brazil`, `Canada`, `Europe`, `France`, `Germany`, `India`, `Japan`, `Korea`, `Norway`, `Switzerland`, `UAE`, `UK` `usgov` and `United States`. Changing this forces a new Email Communication Service to be created.
func (o EmailServiceOutput) DataLocation() pulumi.StringOutput {
return o.ApplyT(func(v *EmailService) pulumi.StringOutput { return v.DataLocation }).(pulumi.StringOutput)
}
// The name of the Email Communication Service resource. Changing this forces a new Email Communication Service to be created.
func (o EmailServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EmailService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Email Communication Service should exist. Changing this forces a new Email Communication Service to be created.
func (o EmailServiceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EmailService) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Email Communication Service.
func (o EmailServiceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *EmailService) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type EmailServiceArrayOutput struct{ *pulumi.OutputState }
func (EmailServiceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EmailService)(nil)).Elem()
}
func (o EmailServiceArrayOutput) ToEmailServiceArrayOutput() EmailServiceArrayOutput {
return o
}
func (o EmailServiceArrayOutput) ToEmailServiceArrayOutputWithContext(ctx context.Context) EmailServiceArrayOutput {
return o
}
func (o EmailServiceArrayOutput) Index(i pulumi.IntInput) EmailServiceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EmailService {
return vs[0].([]*EmailService)[vs[1].(int)]
}).(EmailServiceOutput)
}
type EmailServiceMapOutput struct{ *pulumi.OutputState }
func (EmailServiceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EmailService)(nil)).Elem()
}
func (o EmailServiceMapOutput) ToEmailServiceMapOutput() EmailServiceMapOutput {
return o
}
func (o EmailServiceMapOutput) ToEmailServiceMapOutputWithContext(ctx context.Context) EmailServiceMapOutput {
return o
}
func (o EmailServiceMapOutput) MapIndex(k pulumi.StringInput) EmailServiceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EmailService {
return vs[0].(map[string]*EmailService)[vs[1].(string)]
}).(EmailServiceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EmailServiceInput)(nil)).Elem(), &EmailService{})
pulumi.RegisterInputType(reflect.TypeOf((*EmailServiceArrayInput)(nil)).Elem(), EmailServiceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EmailServiceMapInput)(nil)).Elem(), EmailServiceMap{})
pulumi.RegisterOutputType(EmailServiceOutput{})
pulumi.RegisterOutputType(EmailServiceArrayOutput{})
pulumi.RegisterOutputType(EmailServiceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/communication/emailServiceDomainSenderUsername.go | sdk/go/azure/communication/emailServiceDomainSenderUsername.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package communication
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Email Communication Service Domain Sender Username.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/communication"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleEmailService, err := communication.NewEmailService(ctx, "example", &communication.EmailServiceArgs{
// Name: pulumi.String("example-emailcommunicationservice"),
// ResourceGroupName: example.Name,
// DataLocation: pulumi.String("United States"),
// })
// if err != nil {
// return err
// }
// exampleEmailServiceDomain, err := communication.NewEmailServiceDomain(ctx, "example", &communication.EmailServiceDomainArgs{
// Name: pulumi.String("AzureManagedDomain"),
// EmailServiceId: exampleEmailService.ID(),
// DomainManagement: pulumi.String("AzureManaged"),
// })
// if err != nil {
// return err
// }
// _, err = communication.NewEmailServiceDomainSenderUsername(ctx, "example", &communication.EmailServiceDomainSenderUsernameArgs{
// Name: pulumi.String("example-su"),
// EmailServiceDomainId: exampleEmailServiceDomain.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.Communication` - 2023-03-31
//
// ## Import
//
// Communication Service Domain Sender Usernames can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:communication/emailServiceDomainSenderUsername:EmailServiceDomainSenderUsername example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/emailServices/service1/domains/domain1/senderUsernames/username1
// ```
type EmailServiceDomainSenderUsername struct {
pulumi.CustomResourceState
// The display name for the Email Communication Service Domain Sender Username resource.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// The ID of the Email Communication Service Domain resource. Changing this forces a new resource to be created.
EmailServiceDomainId pulumi.StringOutput `pulumi:"emailServiceDomainId"`
// The name of the Email Communication Service Domain Sender Username resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewEmailServiceDomainSenderUsername registers a new resource with the given unique name, arguments, and options.
func NewEmailServiceDomainSenderUsername(ctx *pulumi.Context,
name string, args *EmailServiceDomainSenderUsernameArgs, opts ...pulumi.ResourceOption) (*EmailServiceDomainSenderUsername, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EmailServiceDomainId == nil {
return nil, errors.New("invalid value for required argument 'EmailServiceDomainId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EmailServiceDomainSenderUsername
err := ctx.RegisterResource("azure:communication/emailServiceDomainSenderUsername:EmailServiceDomainSenderUsername", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEmailServiceDomainSenderUsername gets an existing EmailServiceDomainSenderUsername resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEmailServiceDomainSenderUsername(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EmailServiceDomainSenderUsernameState, opts ...pulumi.ResourceOption) (*EmailServiceDomainSenderUsername, error) {
var resource EmailServiceDomainSenderUsername
err := ctx.ReadResource("azure:communication/emailServiceDomainSenderUsername:EmailServiceDomainSenderUsername", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EmailServiceDomainSenderUsername resources.
type emailServiceDomainSenderUsernameState struct {
// The display name for the Email Communication Service Domain Sender Username resource.
DisplayName *string `pulumi:"displayName"`
// The ID of the Email Communication Service Domain resource. Changing this forces a new resource to be created.
EmailServiceDomainId *string `pulumi:"emailServiceDomainId"`
// The name of the Email Communication Service Domain Sender Username resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
}
type EmailServiceDomainSenderUsernameState struct {
// The display name for the Email Communication Service Domain Sender Username resource.
DisplayName pulumi.StringPtrInput
// The ID of the Email Communication Service Domain resource. Changing this forces a new resource to be created.
EmailServiceDomainId pulumi.StringPtrInput
// The name of the Email Communication Service Domain Sender Username resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
}
func (EmailServiceDomainSenderUsernameState) ElementType() reflect.Type {
return reflect.TypeOf((*emailServiceDomainSenderUsernameState)(nil)).Elem()
}
type emailServiceDomainSenderUsernameArgs struct {
// The display name for the Email Communication Service Domain Sender Username resource.
DisplayName *string `pulumi:"displayName"`
// The ID of the Email Communication Service Domain resource. Changing this forces a new resource to be created.
EmailServiceDomainId string `pulumi:"emailServiceDomainId"`
// The name of the Email Communication Service Domain Sender Username resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a EmailServiceDomainSenderUsername resource.
type EmailServiceDomainSenderUsernameArgs struct {
// The display name for the Email Communication Service Domain Sender Username resource.
DisplayName pulumi.StringPtrInput
// The ID of the Email Communication Service Domain resource. Changing this forces a new resource to be created.
EmailServiceDomainId pulumi.StringInput
// The name of the Email Communication Service Domain Sender Username resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
}
func (EmailServiceDomainSenderUsernameArgs) ElementType() reflect.Type {
return reflect.TypeOf((*emailServiceDomainSenderUsernameArgs)(nil)).Elem()
}
type EmailServiceDomainSenderUsernameInput interface {
pulumi.Input
ToEmailServiceDomainSenderUsernameOutput() EmailServiceDomainSenderUsernameOutput
ToEmailServiceDomainSenderUsernameOutputWithContext(ctx context.Context) EmailServiceDomainSenderUsernameOutput
}
func (*EmailServiceDomainSenderUsername) ElementType() reflect.Type {
return reflect.TypeOf((**EmailServiceDomainSenderUsername)(nil)).Elem()
}
func (i *EmailServiceDomainSenderUsername) ToEmailServiceDomainSenderUsernameOutput() EmailServiceDomainSenderUsernameOutput {
return i.ToEmailServiceDomainSenderUsernameOutputWithContext(context.Background())
}
func (i *EmailServiceDomainSenderUsername) ToEmailServiceDomainSenderUsernameOutputWithContext(ctx context.Context) EmailServiceDomainSenderUsernameOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainSenderUsernameOutput)
}
// EmailServiceDomainSenderUsernameArrayInput is an input type that accepts EmailServiceDomainSenderUsernameArray and EmailServiceDomainSenderUsernameArrayOutput values.
// You can construct a concrete instance of `EmailServiceDomainSenderUsernameArrayInput` via:
//
// EmailServiceDomainSenderUsernameArray{ EmailServiceDomainSenderUsernameArgs{...} }
type EmailServiceDomainSenderUsernameArrayInput interface {
pulumi.Input
ToEmailServiceDomainSenderUsernameArrayOutput() EmailServiceDomainSenderUsernameArrayOutput
ToEmailServiceDomainSenderUsernameArrayOutputWithContext(context.Context) EmailServiceDomainSenderUsernameArrayOutput
}
type EmailServiceDomainSenderUsernameArray []EmailServiceDomainSenderUsernameInput
func (EmailServiceDomainSenderUsernameArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EmailServiceDomainSenderUsername)(nil)).Elem()
}
func (i EmailServiceDomainSenderUsernameArray) ToEmailServiceDomainSenderUsernameArrayOutput() EmailServiceDomainSenderUsernameArrayOutput {
return i.ToEmailServiceDomainSenderUsernameArrayOutputWithContext(context.Background())
}
func (i EmailServiceDomainSenderUsernameArray) ToEmailServiceDomainSenderUsernameArrayOutputWithContext(ctx context.Context) EmailServiceDomainSenderUsernameArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainSenderUsernameArrayOutput)
}
// EmailServiceDomainSenderUsernameMapInput is an input type that accepts EmailServiceDomainSenderUsernameMap and EmailServiceDomainSenderUsernameMapOutput values.
// You can construct a concrete instance of `EmailServiceDomainSenderUsernameMapInput` via:
//
// EmailServiceDomainSenderUsernameMap{ "key": EmailServiceDomainSenderUsernameArgs{...} }
type EmailServiceDomainSenderUsernameMapInput interface {
pulumi.Input
ToEmailServiceDomainSenderUsernameMapOutput() EmailServiceDomainSenderUsernameMapOutput
ToEmailServiceDomainSenderUsernameMapOutputWithContext(context.Context) EmailServiceDomainSenderUsernameMapOutput
}
type EmailServiceDomainSenderUsernameMap map[string]EmailServiceDomainSenderUsernameInput
func (EmailServiceDomainSenderUsernameMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EmailServiceDomainSenderUsername)(nil)).Elem()
}
func (i EmailServiceDomainSenderUsernameMap) ToEmailServiceDomainSenderUsernameMapOutput() EmailServiceDomainSenderUsernameMapOutput {
return i.ToEmailServiceDomainSenderUsernameMapOutputWithContext(context.Background())
}
func (i EmailServiceDomainSenderUsernameMap) ToEmailServiceDomainSenderUsernameMapOutputWithContext(ctx context.Context) EmailServiceDomainSenderUsernameMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailServiceDomainSenderUsernameMapOutput)
}
type EmailServiceDomainSenderUsernameOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainSenderUsernameOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EmailServiceDomainSenderUsername)(nil)).Elem()
}
func (o EmailServiceDomainSenderUsernameOutput) ToEmailServiceDomainSenderUsernameOutput() EmailServiceDomainSenderUsernameOutput {
return o
}
func (o EmailServiceDomainSenderUsernameOutput) ToEmailServiceDomainSenderUsernameOutputWithContext(ctx context.Context) EmailServiceDomainSenderUsernameOutput {
return o
}
// The display name for the Email Communication Service Domain Sender Username resource.
func (o EmailServiceDomainSenderUsernameOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EmailServiceDomainSenderUsername) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// The ID of the Email Communication Service Domain resource. Changing this forces a new resource to be created.
func (o EmailServiceDomainSenderUsernameOutput) EmailServiceDomainId() pulumi.StringOutput {
return o.ApplyT(func(v *EmailServiceDomainSenderUsername) pulumi.StringOutput { return v.EmailServiceDomainId }).(pulumi.StringOutput)
}
// The name of the Email Communication Service Domain Sender Username resource. Changing this forces a new resource to be created.
func (o EmailServiceDomainSenderUsernameOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EmailServiceDomainSenderUsername) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type EmailServiceDomainSenderUsernameArrayOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainSenderUsernameArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EmailServiceDomainSenderUsername)(nil)).Elem()
}
func (o EmailServiceDomainSenderUsernameArrayOutput) ToEmailServiceDomainSenderUsernameArrayOutput() EmailServiceDomainSenderUsernameArrayOutput {
return o
}
func (o EmailServiceDomainSenderUsernameArrayOutput) ToEmailServiceDomainSenderUsernameArrayOutputWithContext(ctx context.Context) EmailServiceDomainSenderUsernameArrayOutput {
return o
}
func (o EmailServiceDomainSenderUsernameArrayOutput) Index(i pulumi.IntInput) EmailServiceDomainSenderUsernameOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EmailServiceDomainSenderUsername {
return vs[0].([]*EmailServiceDomainSenderUsername)[vs[1].(int)]
}).(EmailServiceDomainSenderUsernameOutput)
}
type EmailServiceDomainSenderUsernameMapOutput struct{ *pulumi.OutputState }
func (EmailServiceDomainSenderUsernameMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EmailServiceDomainSenderUsername)(nil)).Elem()
}
func (o EmailServiceDomainSenderUsernameMapOutput) ToEmailServiceDomainSenderUsernameMapOutput() EmailServiceDomainSenderUsernameMapOutput {
return o
}
func (o EmailServiceDomainSenderUsernameMapOutput) ToEmailServiceDomainSenderUsernameMapOutputWithContext(ctx context.Context) EmailServiceDomainSenderUsernameMapOutput {
return o
}
func (o EmailServiceDomainSenderUsernameMapOutput) MapIndex(k pulumi.StringInput) EmailServiceDomainSenderUsernameOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EmailServiceDomainSenderUsername {
return vs[0].(map[string]*EmailServiceDomainSenderUsername)[vs[1].(string)]
}).(EmailServiceDomainSenderUsernameOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EmailServiceDomainSenderUsernameInput)(nil)).Elem(), &EmailServiceDomainSenderUsername{})
pulumi.RegisterInputType(reflect.TypeOf((*EmailServiceDomainSenderUsernameArrayInput)(nil)).Elem(), EmailServiceDomainSenderUsernameArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EmailServiceDomainSenderUsernameMapInput)(nil)).Elem(), EmailServiceDomainSenderUsernameMap{})
pulumi.RegisterOutputType(EmailServiceDomainSenderUsernameOutput{})
pulumi.RegisterOutputType(EmailServiceDomainSenderUsernameArrayOutput{})
pulumi.RegisterOutputType(EmailServiceDomainSenderUsernameMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/communication/getService.go | sdk/go/azure/communication/getService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package communication
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 Communication Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/communication"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := communication.LookupService(ctx, &communication.LookupServiceArgs{
// 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.Communication` - 2023-03-31
func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupServiceResult
err := ctx.Invoke("azure:communication/getService:getService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getService.
type LookupServiceArgs struct {
// The name of this Communication Service.
// *
Name string `pulumi:"name"`
// The name of the Resource Group where the Communication Service exists.
// *
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getService.
type LookupServiceResult struct {
// The location where the Communication service stores its data at rest.
DataLocation string `pulumi:"dataLocation"`
// The hostname of the Communication Service.
Hostname string `pulumi:"hostname"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The immutable resource id of the Communication Service.
ImmutableResourceId string `pulumi:"immutableResourceId"`
Name string `pulumi:"name"`
// The primary connection string of the Communication Service.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The primary key of the Communication Service.
PrimaryKey string `pulumi:"primaryKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary connection string of the Communication Service.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The secondary key of the Communication Service.
SecondaryKey string `pulumi:"secondaryKey"`
// A mapping of tags assigned to the Communication Service.
Tags map[string]string `pulumi:"tags"`
}
func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupServiceResultOutput, error) {
args := v.(LookupServiceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:communication/getService:getService", args, LookupServiceResultOutput{}, options).(LookupServiceResultOutput), nil
}).(LookupServiceResultOutput)
}
// A collection of arguments for invoking getService.
type LookupServiceOutputArgs struct {
// The name of this Communication Service.
// *
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Communication Service exists.
// *
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem()
}
// A collection of values returned by getService.
type LookupServiceResultOutput struct{ *pulumi.OutputState }
func (LookupServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceResult)(nil)).Elem()
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput {
return o
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput {
return o
}
// The location where the Communication service stores its data at rest.
func (o LookupServiceResultOutput) DataLocation() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.DataLocation }).(pulumi.StringOutput)
}
// The hostname of the Communication Service.
func (o LookupServiceResultOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Hostname }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupServiceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The immutable resource id of the Communication Service.
func (o LookupServiceResultOutput) ImmutableResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ImmutableResourceId }).(pulumi.StringOutput)
}
func (o LookupServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The primary connection string of the Communication Service.
func (o LookupServiceResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary key of the Communication Service.
func (o LookupServiceResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupServiceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary connection string of the Communication Service.
func (o LookupServiceResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary key of the Communication Service.
func (o LookupServiceResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Communication Service.
func (o LookupServiceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServiceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/voice/init.go | sdk/go/azure/voice/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 voice
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:voice/servicesCommunicationsGateway:ServicesCommunicationsGateway":
r = &ServicesCommunicationsGateway{}
case "azure:voice/servicesCommunicationsGatewayTestLine:ServicesCommunicationsGatewayTestLine":
r = &ServicesCommunicationsGatewayTestLine{}
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",
"voice/servicesCommunicationsGateway",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"voice/servicesCommunicationsGatewayTestLine",
&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/voice/pulumiTypes.go | sdk/go/azure/voice/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 voice
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 ServicesCommunicationsGatewayServiceLocation struct {
// Specifies the allowed source IP address or CIDR ranges for media.
AllowedMediaSourceAddressPrefixes []string `pulumi:"allowedMediaSourceAddressPrefixes"`
// Specifies the allowed source IP address or CIDR ranges for signaling.
AllowedSignalingSourceAddressPrefixes []string `pulumi:"allowedSignalingSourceAddressPrefixes"`
// IP address to use to contact the ESRP from this region.
//
// !> **Note:** The `esrpAddresses` must be specified for each `serviceLocation` when the`e911Type` is set to `DirectToEsrp`. The `esrpAddresses` must not be specified for each `serviceLocation` when the`e911Type` is set to `Standard`.
EsrpAddresses []string `pulumi:"esrpAddresses"`
// Specifies the region in which the resources needed for Teams Calling will be deployed.
Location string `pulumi:"location"`
// IP address to use to contact the operator network from this region.
OperatorAddresses []string `pulumi:"operatorAddresses"`
}
// ServicesCommunicationsGatewayServiceLocationInput is an input type that accepts ServicesCommunicationsGatewayServiceLocationArgs and ServicesCommunicationsGatewayServiceLocationOutput values.
// You can construct a concrete instance of `ServicesCommunicationsGatewayServiceLocationInput` via:
//
// ServicesCommunicationsGatewayServiceLocationArgs{...}
type ServicesCommunicationsGatewayServiceLocationInput interface {
pulumi.Input
ToServicesCommunicationsGatewayServiceLocationOutput() ServicesCommunicationsGatewayServiceLocationOutput
ToServicesCommunicationsGatewayServiceLocationOutputWithContext(context.Context) ServicesCommunicationsGatewayServiceLocationOutput
}
type ServicesCommunicationsGatewayServiceLocationArgs struct {
// Specifies the allowed source IP address or CIDR ranges for media.
AllowedMediaSourceAddressPrefixes pulumi.StringArrayInput `pulumi:"allowedMediaSourceAddressPrefixes"`
// Specifies the allowed source IP address or CIDR ranges for signaling.
AllowedSignalingSourceAddressPrefixes pulumi.StringArrayInput `pulumi:"allowedSignalingSourceAddressPrefixes"`
// IP address to use to contact the ESRP from this region.
//
// !> **Note:** The `esrpAddresses` must be specified for each `serviceLocation` when the`e911Type` is set to `DirectToEsrp`. The `esrpAddresses` must not be specified for each `serviceLocation` when the`e911Type` is set to `Standard`.
EsrpAddresses pulumi.StringArrayInput `pulumi:"esrpAddresses"`
// Specifies the region in which the resources needed for Teams Calling will be deployed.
Location pulumi.StringInput `pulumi:"location"`
// IP address to use to contact the operator network from this region.
OperatorAddresses pulumi.StringArrayInput `pulumi:"operatorAddresses"`
}
func (ServicesCommunicationsGatewayServiceLocationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServicesCommunicationsGatewayServiceLocation)(nil)).Elem()
}
func (i ServicesCommunicationsGatewayServiceLocationArgs) ToServicesCommunicationsGatewayServiceLocationOutput() ServicesCommunicationsGatewayServiceLocationOutput {
return i.ToServicesCommunicationsGatewayServiceLocationOutputWithContext(context.Background())
}
func (i ServicesCommunicationsGatewayServiceLocationArgs) ToServicesCommunicationsGatewayServiceLocationOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayServiceLocationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayServiceLocationOutput)
}
// ServicesCommunicationsGatewayServiceLocationArrayInput is an input type that accepts ServicesCommunicationsGatewayServiceLocationArray and ServicesCommunicationsGatewayServiceLocationArrayOutput values.
// You can construct a concrete instance of `ServicesCommunicationsGatewayServiceLocationArrayInput` via:
//
// ServicesCommunicationsGatewayServiceLocationArray{ ServicesCommunicationsGatewayServiceLocationArgs{...} }
type ServicesCommunicationsGatewayServiceLocationArrayInput interface {
pulumi.Input
ToServicesCommunicationsGatewayServiceLocationArrayOutput() ServicesCommunicationsGatewayServiceLocationArrayOutput
ToServicesCommunicationsGatewayServiceLocationArrayOutputWithContext(context.Context) ServicesCommunicationsGatewayServiceLocationArrayOutput
}
type ServicesCommunicationsGatewayServiceLocationArray []ServicesCommunicationsGatewayServiceLocationInput
func (ServicesCommunicationsGatewayServiceLocationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServicesCommunicationsGatewayServiceLocation)(nil)).Elem()
}
func (i ServicesCommunicationsGatewayServiceLocationArray) ToServicesCommunicationsGatewayServiceLocationArrayOutput() ServicesCommunicationsGatewayServiceLocationArrayOutput {
return i.ToServicesCommunicationsGatewayServiceLocationArrayOutputWithContext(context.Background())
}
func (i ServicesCommunicationsGatewayServiceLocationArray) ToServicesCommunicationsGatewayServiceLocationArrayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayServiceLocationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayServiceLocationArrayOutput)
}
type ServicesCommunicationsGatewayServiceLocationOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayServiceLocationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServicesCommunicationsGatewayServiceLocation)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayServiceLocationOutput) ToServicesCommunicationsGatewayServiceLocationOutput() ServicesCommunicationsGatewayServiceLocationOutput {
return o
}
func (o ServicesCommunicationsGatewayServiceLocationOutput) ToServicesCommunicationsGatewayServiceLocationOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayServiceLocationOutput {
return o
}
// Specifies the allowed source IP address or CIDR ranges for media.
func (o ServicesCommunicationsGatewayServiceLocationOutput) AllowedMediaSourceAddressPrefixes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServicesCommunicationsGatewayServiceLocation) []string {
return v.AllowedMediaSourceAddressPrefixes
}).(pulumi.StringArrayOutput)
}
// Specifies the allowed source IP address or CIDR ranges for signaling.
func (o ServicesCommunicationsGatewayServiceLocationOutput) AllowedSignalingSourceAddressPrefixes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServicesCommunicationsGatewayServiceLocation) []string {
return v.AllowedSignalingSourceAddressPrefixes
}).(pulumi.StringArrayOutput)
}
// IP address to use to contact the ESRP from this region.
//
// !> **Note:** The `esrpAddresses` must be specified for each `serviceLocation` when the`e911Type` is set to `DirectToEsrp`. The `esrpAddresses` must not be specified for each `serviceLocation` when the`e911Type` is set to `Standard`.
func (o ServicesCommunicationsGatewayServiceLocationOutput) EsrpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServicesCommunicationsGatewayServiceLocation) []string { return v.EsrpAddresses }).(pulumi.StringArrayOutput)
}
// Specifies the region in which the resources needed for Teams Calling will be deployed.
func (o ServicesCommunicationsGatewayServiceLocationOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v ServicesCommunicationsGatewayServiceLocation) string { return v.Location }).(pulumi.StringOutput)
}
// IP address to use to contact the operator network from this region.
func (o ServicesCommunicationsGatewayServiceLocationOutput) OperatorAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServicesCommunicationsGatewayServiceLocation) []string { return v.OperatorAddresses }).(pulumi.StringArrayOutput)
}
type ServicesCommunicationsGatewayServiceLocationArrayOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayServiceLocationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServicesCommunicationsGatewayServiceLocation)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayServiceLocationArrayOutput) ToServicesCommunicationsGatewayServiceLocationArrayOutput() ServicesCommunicationsGatewayServiceLocationArrayOutput {
return o
}
func (o ServicesCommunicationsGatewayServiceLocationArrayOutput) ToServicesCommunicationsGatewayServiceLocationArrayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayServiceLocationArrayOutput {
return o
}
func (o ServicesCommunicationsGatewayServiceLocationArrayOutput) Index(i pulumi.IntInput) ServicesCommunicationsGatewayServiceLocationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ServicesCommunicationsGatewayServiceLocation {
return vs[0].([]ServicesCommunicationsGatewayServiceLocation)[vs[1].(int)]
}).(ServicesCommunicationsGatewayServiceLocationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayServiceLocationInput)(nil)).Elem(), ServicesCommunicationsGatewayServiceLocationArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayServiceLocationArrayInput)(nil)).Elem(), ServicesCommunicationsGatewayServiceLocationArray{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayServiceLocationOutput{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayServiceLocationArrayOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/voice/servicesCommunicationsGatewayTestLine.go | sdk/go/azure/voice/servicesCommunicationsGatewayTestLine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package voice
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Voice Services Communications Gateway Test Line.
//
// ## 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/voice"
// "github.com/pulumi/pulumi/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 Central US"),
// })
// if err != nil {
// return err
// }
// exampleServicesCommunicationsGateway, err := voice.NewServicesCommunicationsGateway(ctx, "example", &voice.ServicesCommunicationsGatewayArgs{
// Name: pulumi.String("example-vcg"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = voice.NewServicesCommunicationsGatewayTestLine(ctx, "example", &voice.ServicesCommunicationsGatewayTestLineArgs{
// Name: pulumi.String("example-vtl"),
// Location: pulumi.String("West Central US"),
// VoiceServicesCommunicationsGatewayId: exampleServicesCommunicationsGateway.ID(),
// PhoneNumber: pulumi.String("123456789"),
// Purpose: pulumi.String("Automated"),
// 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.VoiceServices` - 2023-04-03
//
// ## Import
//
// Voice Services Communications Gateway Test Line can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:voice/servicesCommunicationsGatewayTestLine:ServicesCommunicationsGatewayTestLine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.VoiceServices/communicationsGateways/communicationsGateway1/testLines/testLine1
// ```
type ServicesCommunicationsGatewayTestLine struct {
pulumi.CustomResourceState
// Specifies the Azure Region where the Voice Services Communications Gateway Test Line should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the phone number.
PhoneNumber pulumi.StringOutput `pulumi:"phoneNumber"`
// The purpose of the Voice Services Communications Gateway Test Line. Possible values are `Automated` or `Manual`.
Purpose pulumi.StringOutput `pulumi:"purpose"`
// A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created.
VoiceServicesCommunicationsGatewayId pulumi.StringOutput `pulumi:"voiceServicesCommunicationsGatewayId"`
}
// NewServicesCommunicationsGatewayTestLine registers a new resource with the given unique name, arguments, and options.
func NewServicesCommunicationsGatewayTestLine(ctx *pulumi.Context,
name string, args *ServicesCommunicationsGatewayTestLineArgs, opts ...pulumi.ResourceOption) (*ServicesCommunicationsGatewayTestLine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PhoneNumber == nil {
return nil, errors.New("invalid value for required argument 'PhoneNumber'")
}
if args.Purpose == nil {
return nil, errors.New("invalid value for required argument 'Purpose'")
}
if args.VoiceServicesCommunicationsGatewayId == nil {
return nil, errors.New("invalid value for required argument 'VoiceServicesCommunicationsGatewayId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServicesCommunicationsGatewayTestLine
err := ctx.RegisterResource("azure:voice/servicesCommunicationsGatewayTestLine:ServicesCommunicationsGatewayTestLine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServicesCommunicationsGatewayTestLine gets an existing ServicesCommunicationsGatewayTestLine resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServicesCommunicationsGatewayTestLine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServicesCommunicationsGatewayTestLineState, opts ...pulumi.ResourceOption) (*ServicesCommunicationsGatewayTestLine, error) {
var resource ServicesCommunicationsGatewayTestLine
err := ctx.ReadResource("azure:voice/servicesCommunicationsGatewayTestLine:ServicesCommunicationsGatewayTestLine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServicesCommunicationsGatewayTestLine resources.
type servicesCommunicationsGatewayTestLineState struct {
// Specifies the Azure Region where the Voice Services Communications Gateway Test Line should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the phone number.
PhoneNumber *string `pulumi:"phoneNumber"`
// The purpose of the Voice Services Communications Gateway Test Line. Possible values are `Automated` or `Manual`.
Purpose *string `pulumi:"purpose"`
// A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line.
Tags map[string]string `pulumi:"tags"`
// Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created.
VoiceServicesCommunicationsGatewayId *string `pulumi:"voiceServicesCommunicationsGatewayId"`
}
type ServicesCommunicationsGatewayTestLineState struct {
// Specifies the Azure Region where the Voice Services Communications Gateway Test Line should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the phone number.
PhoneNumber pulumi.StringPtrInput
// The purpose of the Voice Services Communications Gateway Test Line. Possible values are `Automated` or `Manual`.
Purpose pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line.
Tags pulumi.StringMapInput
// Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created.
VoiceServicesCommunicationsGatewayId pulumi.StringPtrInput
}
func (ServicesCommunicationsGatewayTestLineState) ElementType() reflect.Type {
return reflect.TypeOf((*servicesCommunicationsGatewayTestLineState)(nil)).Elem()
}
type servicesCommunicationsGatewayTestLineArgs struct {
// Specifies the Azure Region where the Voice Services Communications Gateway Test Line should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the phone number.
PhoneNumber string `pulumi:"phoneNumber"`
// The purpose of the Voice Services Communications Gateway Test Line. Possible values are `Automated` or `Manual`.
Purpose string `pulumi:"purpose"`
// A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line.
Tags map[string]string `pulumi:"tags"`
// Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created.
VoiceServicesCommunicationsGatewayId string `pulumi:"voiceServicesCommunicationsGatewayId"`
}
// The set of arguments for constructing a ServicesCommunicationsGatewayTestLine resource.
type ServicesCommunicationsGatewayTestLineArgs struct {
// Specifies the Azure Region where the Voice Services Communications Gateway Test Line should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the phone number.
PhoneNumber pulumi.StringInput
// The purpose of the Voice Services Communications Gateway Test Line. Possible values are `Automated` or `Manual`.
Purpose pulumi.StringInput
// A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line.
Tags pulumi.StringMapInput
// Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created.
VoiceServicesCommunicationsGatewayId pulumi.StringInput
}
func (ServicesCommunicationsGatewayTestLineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*servicesCommunicationsGatewayTestLineArgs)(nil)).Elem()
}
type ServicesCommunicationsGatewayTestLineInput interface {
pulumi.Input
ToServicesCommunicationsGatewayTestLineOutput() ServicesCommunicationsGatewayTestLineOutput
ToServicesCommunicationsGatewayTestLineOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayTestLineOutput
}
func (*ServicesCommunicationsGatewayTestLine) ElementType() reflect.Type {
return reflect.TypeOf((**ServicesCommunicationsGatewayTestLine)(nil)).Elem()
}
func (i *ServicesCommunicationsGatewayTestLine) ToServicesCommunicationsGatewayTestLineOutput() ServicesCommunicationsGatewayTestLineOutput {
return i.ToServicesCommunicationsGatewayTestLineOutputWithContext(context.Background())
}
func (i *ServicesCommunicationsGatewayTestLine) ToServicesCommunicationsGatewayTestLineOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayTestLineOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayTestLineOutput)
}
// ServicesCommunicationsGatewayTestLineArrayInput is an input type that accepts ServicesCommunicationsGatewayTestLineArray and ServicesCommunicationsGatewayTestLineArrayOutput values.
// You can construct a concrete instance of `ServicesCommunicationsGatewayTestLineArrayInput` via:
//
// ServicesCommunicationsGatewayTestLineArray{ ServicesCommunicationsGatewayTestLineArgs{...} }
type ServicesCommunicationsGatewayTestLineArrayInput interface {
pulumi.Input
ToServicesCommunicationsGatewayTestLineArrayOutput() ServicesCommunicationsGatewayTestLineArrayOutput
ToServicesCommunicationsGatewayTestLineArrayOutputWithContext(context.Context) ServicesCommunicationsGatewayTestLineArrayOutput
}
type ServicesCommunicationsGatewayTestLineArray []ServicesCommunicationsGatewayTestLineInput
func (ServicesCommunicationsGatewayTestLineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServicesCommunicationsGatewayTestLine)(nil)).Elem()
}
func (i ServicesCommunicationsGatewayTestLineArray) ToServicesCommunicationsGatewayTestLineArrayOutput() ServicesCommunicationsGatewayTestLineArrayOutput {
return i.ToServicesCommunicationsGatewayTestLineArrayOutputWithContext(context.Background())
}
func (i ServicesCommunicationsGatewayTestLineArray) ToServicesCommunicationsGatewayTestLineArrayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayTestLineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayTestLineArrayOutput)
}
// ServicesCommunicationsGatewayTestLineMapInput is an input type that accepts ServicesCommunicationsGatewayTestLineMap and ServicesCommunicationsGatewayTestLineMapOutput values.
// You can construct a concrete instance of `ServicesCommunicationsGatewayTestLineMapInput` via:
//
// ServicesCommunicationsGatewayTestLineMap{ "key": ServicesCommunicationsGatewayTestLineArgs{...} }
type ServicesCommunicationsGatewayTestLineMapInput interface {
pulumi.Input
ToServicesCommunicationsGatewayTestLineMapOutput() ServicesCommunicationsGatewayTestLineMapOutput
ToServicesCommunicationsGatewayTestLineMapOutputWithContext(context.Context) ServicesCommunicationsGatewayTestLineMapOutput
}
type ServicesCommunicationsGatewayTestLineMap map[string]ServicesCommunicationsGatewayTestLineInput
func (ServicesCommunicationsGatewayTestLineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServicesCommunicationsGatewayTestLine)(nil)).Elem()
}
func (i ServicesCommunicationsGatewayTestLineMap) ToServicesCommunicationsGatewayTestLineMapOutput() ServicesCommunicationsGatewayTestLineMapOutput {
return i.ToServicesCommunicationsGatewayTestLineMapOutputWithContext(context.Background())
}
func (i ServicesCommunicationsGatewayTestLineMap) ToServicesCommunicationsGatewayTestLineMapOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayTestLineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayTestLineMapOutput)
}
type ServicesCommunicationsGatewayTestLineOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayTestLineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServicesCommunicationsGatewayTestLine)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayTestLineOutput) ToServicesCommunicationsGatewayTestLineOutput() ServicesCommunicationsGatewayTestLineOutput {
return o
}
func (o ServicesCommunicationsGatewayTestLineOutput) ToServicesCommunicationsGatewayTestLineOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayTestLineOutput {
return o
}
// Specifies the Azure Region where the Voice Services Communications Gateway Test Line should exist. Changing this forces a new resource to be created.
func (o ServicesCommunicationsGatewayTestLineOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGatewayTestLine) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created.
func (o ServicesCommunicationsGatewayTestLineOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGatewayTestLine) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the phone number.
func (o ServicesCommunicationsGatewayTestLineOutput) PhoneNumber() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGatewayTestLine) pulumi.StringOutput { return v.PhoneNumber }).(pulumi.StringOutput)
}
// The purpose of the Voice Services Communications Gateway Test Line. Possible values are `Automated` or `Manual`.
func (o ServicesCommunicationsGatewayTestLineOutput) Purpose() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGatewayTestLine) pulumi.StringOutput { return v.Purpose }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line.
func (o ServicesCommunicationsGatewayTestLineOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ServicesCommunicationsGatewayTestLine) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created.
func (o ServicesCommunicationsGatewayTestLineOutput) VoiceServicesCommunicationsGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGatewayTestLine) pulumi.StringOutput {
return v.VoiceServicesCommunicationsGatewayId
}).(pulumi.StringOutput)
}
type ServicesCommunicationsGatewayTestLineArrayOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayTestLineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServicesCommunicationsGatewayTestLine)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayTestLineArrayOutput) ToServicesCommunicationsGatewayTestLineArrayOutput() ServicesCommunicationsGatewayTestLineArrayOutput {
return o
}
func (o ServicesCommunicationsGatewayTestLineArrayOutput) ToServicesCommunicationsGatewayTestLineArrayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayTestLineArrayOutput {
return o
}
func (o ServicesCommunicationsGatewayTestLineArrayOutput) Index(i pulumi.IntInput) ServicesCommunicationsGatewayTestLineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServicesCommunicationsGatewayTestLine {
return vs[0].([]*ServicesCommunicationsGatewayTestLine)[vs[1].(int)]
}).(ServicesCommunicationsGatewayTestLineOutput)
}
type ServicesCommunicationsGatewayTestLineMapOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayTestLineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServicesCommunicationsGatewayTestLine)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayTestLineMapOutput) ToServicesCommunicationsGatewayTestLineMapOutput() ServicesCommunicationsGatewayTestLineMapOutput {
return o
}
func (o ServicesCommunicationsGatewayTestLineMapOutput) ToServicesCommunicationsGatewayTestLineMapOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayTestLineMapOutput {
return o
}
func (o ServicesCommunicationsGatewayTestLineMapOutput) MapIndex(k pulumi.StringInput) ServicesCommunicationsGatewayTestLineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServicesCommunicationsGatewayTestLine {
return vs[0].(map[string]*ServicesCommunicationsGatewayTestLine)[vs[1].(string)]
}).(ServicesCommunicationsGatewayTestLineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayTestLineInput)(nil)).Elem(), &ServicesCommunicationsGatewayTestLine{})
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayTestLineArrayInput)(nil)).Elem(), ServicesCommunicationsGatewayTestLineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayTestLineMapInput)(nil)).Elem(), ServicesCommunicationsGatewayTestLineMap{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayTestLineOutput{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayTestLineArrayOutput{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayTestLineMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/voice/servicesCommunicationsGateway.go | sdk/go/azure/voice/servicesCommunicationsGateway.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package voice
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Voice Services Communications Gateways.
//
// !> **Note:** You must have signed an Operator Connect agreement with Microsoft to use this resource. For more information, see [`Prerequisites`](https://learn.microsoft.com/en-us/azure/communications-gateway/prepare-to-deploy#prerequisites).
//
// !> **Note:** Access to Azure Communications Gateway is restricted, see [`Get access to Azure Communications Gateway for your Azure subscription`](https://learn.microsoft.com/en-us/azure/communications-gateway/prepare-to-deploy#9-get-access-to-azure-communications-gateway-for-your-azure-subscription) for details.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "encoding/json"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/voice"
// "github.com/pulumi/pulumi/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
// }
// tmpJSON0, err := json.Marshal(map[string]interface{}{})
// if err != nil {
// return err
// }
// json0 := string(tmpJSON0)
// _, err = voice.NewServicesCommunicationsGateway(ctx, "example", &voice.ServicesCommunicationsGatewayArgs{
// Name: pulumi.String("example-vcg"),
// Location: pulumi.String("West Europe"),
// ResourceGroupName: example.Name,
// Connectivity: pulumi.String("PublicAddress"),
// Codecs: pulumi.String("PCMA"),
// E911Type: pulumi.String("DirectToEsrp"),
// Platforms: pulumi.StringArray{
// pulumi.String("OperatorConnect"),
// pulumi.String("TeamsPhoneMobile"),
// },
// ServiceLocations: voice.ServicesCommunicationsGatewayServiceLocationArray{
// &voice.ServicesCommunicationsGatewayServiceLocationArgs{
// Location: pulumi.String("eastus"),
// AllowedMediaSourceAddressPrefixes: pulumi.StringArray{
// pulumi.String("10.1.2.0/24"),
// },
// AllowedSignalingSourceAddressPrefixes: pulumi.StringArray{
// pulumi.String("10.1.1.0/24"),
// },
// EsrpAddresses: pulumi.StringArray{
// pulumi.String("198.51.100.3"),
// },
// OperatorAddresses: pulumi.StringArray{
// pulumi.String("198.51.100.1"),
// },
// },
// &voice.ServicesCommunicationsGatewayServiceLocationArgs{
// Location: pulumi.String("eastus2"),
// AllowedMediaSourceAddressPrefixes: pulumi.StringArray{
// pulumi.String("10.2.2.0/24"),
// },
// AllowedSignalingSourceAddressPrefixes: pulumi.StringArray{
// pulumi.String("10.2.1.0/24"),
// },
// EsrpAddresses: pulumi.StringArray{
// pulumi.String("198.51.100.4"),
// },
// OperatorAddresses: pulumi.StringArray{
// pulumi.String("198.51.100.2"),
// },
// },
// },
// AutoGeneratedDomainNameLabelScope: pulumi.String("SubscriptionReuse"),
// ApiBridge: pulumi.String(json0),
// EmergencyDialStrings: pulumi.StringArray{
// pulumi.String("911"),
// pulumi.String("933"),
// },
// OnPremMcpEnabled: pulumi.Bool(false),
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// MicrosoftTeamsVoicemailPilotNumber: pulumi.String("1"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.VoiceServices` - 2023-04-03
//
// ## Import
//
// Voice Services Communications Gateways can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:voice/servicesCommunicationsGateway:ServicesCommunicationsGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.VoiceServices/communicationsGateways/communicationsGateway1
// ```
type ServicesCommunicationsGateway struct {
pulumi.CustomResourceState
// Details of API bridge functionality, if required.
ApiBridge pulumi.StringPtrOutput `pulumi:"apiBridge"`
// Specifies the scope at which the auto-generated domain name can be re-used. Possible values are `TenantReuse`, `SubscriptionReuse`, `ResourceGroupReuse` and `NoReuse` . Changing this forces a new resource to be created. Defaults to `TenantReuse`.
AutoGeneratedDomainNameLabelScope pulumi.StringPtrOutput `pulumi:"autoGeneratedDomainNameLabelScope"`
// The voice codecs expected for communication with Teams. Possible values are `PCMA`, `PCMU`,`G722`,`G722_2`,`SILK_8` and `SILK_16`.
Codecs pulumi.StringOutput `pulumi:"codecs"`
// How to connect back to the operator network, e.g. MAPS. Possible values is `PublicAddress`. Changing this forces a new Voice Services Communications Gateways to be created.
Connectivity pulumi.StringOutput `pulumi:"connectivity"`
// How to handle 911 calls. Possible values are `Standard` and `DirectToEsrp`.
E911Type pulumi.StringOutput `pulumi:"e911Type"`
// A list of dial strings used for emergency calling.
EmergencyDialStrings pulumi.StringArrayOutput `pulumi:"emergencyDialStrings"`
// Specifies the Azure Region where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.
MicrosoftTeamsVoicemailPilotNumber pulumi.StringPtrOutput `pulumi:"microsoftTeamsVoicemailPilotNumber"`
// Specifies the name which should be used for this Voice Services Communications Gateways. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether an on-premises Mobile Control Point is in use.
OnPremMcpEnabled pulumi.BoolPtrOutput `pulumi:"onPremMcpEnabled"`
// The Voice Services Communications GatewaysAvailable supports platform types. Possible values are `OperatorConnect`, `TeamsPhoneMobile`.
Platforms pulumi.StringArrayOutput `pulumi:"platforms"`
// Specifies the name of the Resource Group where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `serviceLocation` block as defined below.
ServiceLocations ServicesCommunicationsGatewayServiceLocationArrayOutput `pulumi:"serviceLocations"`
// A mapping of tags which should be assigned to the Voice Services Communications Gateways.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewServicesCommunicationsGateway registers a new resource with the given unique name, arguments, and options.
func NewServicesCommunicationsGateway(ctx *pulumi.Context,
name string, args *ServicesCommunicationsGatewayArgs, opts ...pulumi.ResourceOption) (*ServicesCommunicationsGateway, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Codecs == nil {
return nil, errors.New("invalid value for required argument 'Codecs'")
}
if args.Connectivity == nil {
return nil, errors.New("invalid value for required argument 'Connectivity'")
}
if args.E911Type == nil {
return nil, errors.New("invalid value for required argument 'E911Type'")
}
if args.Platforms == nil {
return nil, errors.New("invalid value for required argument 'Platforms'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ServiceLocations == nil {
return nil, errors.New("invalid value for required argument 'ServiceLocations'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServicesCommunicationsGateway
err := ctx.RegisterResource("azure:voice/servicesCommunicationsGateway:ServicesCommunicationsGateway", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServicesCommunicationsGateway gets an existing ServicesCommunicationsGateway resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServicesCommunicationsGateway(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServicesCommunicationsGatewayState, opts ...pulumi.ResourceOption) (*ServicesCommunicationsGateway, error) {
var resource ServicesCommunicationsGateway
err := ctx.ReadResource("azure:voice/servicesCommunicationsGateway:ServicesCommunicationsGateway", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServicesCommunicationsGateway resources.
type servicesCommunicationsGatewayState struct {
// Details of API bridge functionality, if required.
ApiBridge *string `pulumi:"apiBridge"`
// Specifies the scope at which the auto-generated domain name can be re-used. Possible values are `TenantReuse`, `SubscriptionReuse`, `ResourceGroupReuse` and `NoReuse` . Changing this forces a new resource to be created. Defaults to `TenantReuse`.
AutoGeneratedDomainNameLabelScope *string `pulumi:"autoGeneratedDomainNameLabelScope"`
// The voice codecs expected for communication with Teams. Possible values are `PCMA`, `PCMU`,`G722`,`G722_2`,`SILK_8` and `SILK_16`.
Codecs *string `pulumi:"codecs"`
// How to connect back to the operator network, e.g. MAPS. Possible values is `PublicAddress`. Changing this forces a new Voice Services Communications Gateways to be created.
Connectivity *string `pulumi:"connectivity"`
// How to handle 911 calls. Possible values are `Standard` and `DirectToEsrp`.
E911Type *string `pulumi:"e911Type"`
// A list of dial strings used for emergency calling.
EmergencyDialStrings []string `pulumi:"emergencyDialStrings"`
// Specifies the Azure Region where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.
MicrosoftTeamsVoicemailPilotNumber *string `pulumi:"microsoftTeamsVoicemailPilotNumber"`
// Specifies the name which should be used for this Voice Services Communications Gateways. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether an on-premises Mobile Control Point is in use.
OnPremMcpEnabled *bool `pulumi:"onPremMcpEnabled"`
// The Voice Services Communications GatewaysAvailable supports platform types. Possible values are `OperatorConnect`, `TeamsPhoneMobile`.
Platforms []string `pulumi:"platforms"`
// Specifies the name of the Resource Group where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `serviceLocation` block as defined below.
ServiceLocations []ServicesCommunicationsGatewayServiceLocation `pulumi:"serviceLocations"`
// A mapping of tags which should be assigned to the Voice Services Communications Gateways.
Tags map[string]string `pulumi:"tags"`
}
type ServicesCommunicationsGatewayState struct {
// Details of API bridge functionality, if required.
ApiBridge pulumi.StringPtrInput
// Specifies the scope at which the auto-generated domain name can be re-used. Possible values are `TenantReuse`, `SubscriptionReuse`, `ResourceGroupReuse` and `NoReuse` . Changing this forces a new resource to be created. Defaults to `TenantReuse`.
AutoGeneratedDomainNameLabelScope pulumi.StringPtrInput
// The voice codecs expected for communication with Teams. Possible values are `PCMA`, `PCMU`,`G722`,`G722_2`,`SILK_8` and `SILK_16`.
Codecs pulumi.StringPtrInput
// How to connect back to the operator network, e.g. MAPS. Possible values is `PublicAddress`. Changing this forces a new Voice Services Communications Gateways to be created.
Connectivity pulumi.StringPtrInput
// How to handle 911 calls. Possible values are `Standard` and `DirectToEsrp`.
E911Type pulumi.StringPtrInput
// A list of dial strings used for emergency calling.
EmergencyDialStrings pulumi.StringArrayInput
// Specifies the Azure Region where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.
MicrosoftTeamsVoicemailPilotNumber pulumi.StringPtrInput
// Specifies the name which should be used for this Voice Services Communications Gateways. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether an on-premises Mobile Control Point is in use.
OnPremMcpEnabled pulumi.BoolPtrInput
// The Voice Services Communications GatewaysAvailable supports platform types. Possible values are `OperatorConnect`, `TeamsPhoneMobile`.
Platforms pulumi.StringArrayInput
// Specifies the name of the Resource Group where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `serviceLocation` block as defined below.
ServiceLocations ServicesCommunicationsGatewayServiceLocationArrayInput
// A mapping of tags which should be assigned to the Voice Services Communications Gateways.
Tags pulumi.StringMapInput
}
func (ServicesCommunicationsGatewayState) ElementType() reflect.Type {
return reflect.TypeOf((*servicesCommunicationsGatewayState)(nil)).Elem()
}
type servicesCommunicationsGatewayArgs struct {
// Details of API bridge functionality, if required.
ApiBridge *string `pulumi:"apiBridge"`
// Specifies the scope at which the auto-generated domain name can be re-used. Possible values are `TenantReuse`, `SubscriptionReuse`, `ResourceGroupReuse` and `NoReuse` . Changing this forces a new resource to be created. Defaults to `TenantReuse`.
AutoGeneratedDomainNameLabelScope *string `pulumi:"autoGeneratedDomainNameLabelScope"`
// The voice codecs expected for communication with Teams. Possible values are `PCMA`, `PCMU`,`G722`,`G722_2`,`SILK_8` and `SILK_16`.
Codecs string `pulumi:"codecs"`
// How to connect back to the operator network, e.g. MAPS. Possible values is `PublicAddress`. Changing this forces a new Voice Services Communications Gateways to be created.
Connectivity string `pulumi:"connectivity"`
// How to handle 911 calls. Possible values are `Standard` and `DirectToEsrp`.
E911Type string `pulumi:"e911Type"`
// A list of dial strings used for emergency calling.
EmergencyDialStrings []string `pulumi:"emergencyDialStrings"`
// Specifies the Azure Region where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.
MicrosoftTeamsVoicemailPilotNumber *string `pulumi:"microsoftTeamsVoicemailPilotNumber"`
// Specifies the name which should be used for this Voice Services Communications Gateways. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether an on-premises Mobile Control Point is in use.
OnPremMcpEnabled *bool `pulumi:"onPremMcpEnabled"`
// The Voice Services Communications GatewaysAvailable supports platform types. Possible values are `OperatorConnect`, `TeamsPhoneMobile`.
Platforms []string `pulumi:"platforms"`
// Specifies the name of the Resource Group where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `serviceLocation` block as defined below.
ServiceLocations []ServicesCommunicationsGatewayServiceLocation `pulumi:"serviceLocations"`
// A mapping of tags which should be assigned to the Voice Services Communications Gateways.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ServicesCommunicationsGateway resource.
type ServicesCommunicationsGatewayArgs struct {
// Details of API bridge functionality, if required.
ApiBridge pulumi.StringPtrInput
// Specifies the scope at which the auto-generated domain name can be re-used. Possible values are `TenantReuse`, `SubscriptionReuse`, `ResourceGroupReuse` and `NoReuse` . Changing this forces a new resource to be created. Defaults to `TenantReuse`.
AutoGeneratedDomainNameLabelScope pulumi.StringPtrInput
// The voice codecs expected for communication with Teams. Possible values are `PCMA`, `PCMU`,`G722`,`G722_2`,`SILK_8` and `SILK_16`.
Codecs pulumi.StringInput
// How to connect back to the operator network, e.g. MAPS. Possible values is `PublicAddress`. Changing this forces a new Voice Services Communications Gateways to be created.
Connectivity pulumi.StringInput
// How to handle 911 calls. Possible values are `Standard` and `DirectToEsrp`.
E911Type pulumi.StringInput
// A list of dial strings used for emergency calling.
EmergencyDialStrings pulumi.StringArrayInput
// Specifies the Azure Region where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.
MicrosoftTeamsVoicemailPilotNumber pulumi.StringPtrInput
// Specifies the name which should be used for this Voice Services Communications Gateways. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether an on-premises Mobile Control Point is in use.
OnPremMcpEnabled pulumi.BoolPtrInput
// The Voice Services Communications GatewaysAvailable supports platform types. Possible values are `OperatorConnect`, `TeamsPhoneMobile`.
Platforms pulumi.StringArrayInput
// Specifies the name of the Resource Group where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `serviceLocation` block as defined below.
ServiceLocations ServicesCommunicationsGatewayServiceLocationArrayInput
// A mapping of tags which should be assigned to the Voice Services Communications Gateways.
Tags pulumi.StringMapInput
}
func (ServicesCommunicationsGatewayArgs) ElementType() reflect.Type {
return reflect.TypeOf((*servicesCommunicationsGatewayArgs)(nil)).Elem()
}
type ServicesCommunicationsGatewayInput interface {
pulumi.Input
ToServicesCommunicationsGatewayOutput() ServicesCommunicationsGatewayOutput
ToServicesCommunicationsGatewayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayOutput
}
func (*ServicesCommunicationsGateway) ElementType() reflect.Type {
return reflect.TypeOf((**ServicesCommunicationsGateway)(nil)).Elem()
}
func (i *ServicesCommunicationsGateway) ToServicesCommunicationsGatewayOutput() ServicesCommunicationsGatewayOutput {
return i.ToServicesCommunicationsGatewayOutputWithContext(context.Background())
}
func (i *ServicesCommunicationsGateway) ToServicesCommunicationsGatewayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayOutput)
}
// ServicesCommunicationsGatewayArrayInput is an input type that accepts ServicesCommunicationsGatewayArray and ServicesCommunicationsGatewayArrayOutput values.
// You can construct a concrete instance of `ServicesCommunicationsGatewayArrayInput` via:
//
// ServicesCommunicationsGatewayArray{ ServicesCommunicationsGatewayArgs{...} }
type ServicesCommunicationsGatewayArrayInput interface {
pulumi.Input
ToServicesCommunicationsGatewayArrayOutput() ServicesCommunicationsGatewayArrayOutput
ToServicesCommunicationsGatewayArrayOutputWithContext(context.Context) ServicesCommunicationsGatewayArrayOutput
}
type ServicesCommunicationsGatewayArray []ServicesCommunicationsGatewayInput
func (ServicesCommunicationsGatewayArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServicesCommunicationsGateway)(nil)).Elem()
}
func (i ServicesCommunicationsGatewayArray) ToServicesCommunicationsGatewayArrayOutput() ServicesCommunicationsGatewayArrayOutput {
return i.ToServicesCommunicationsGatewayArrayOutputWithContext(context.Background())
}
func (i ServicesCommunicationsGatewayArray) ToServicesCommunicationsGatewayArrayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayArrayOutput)
}
// ServicesCommunicationsGatewayMapInput is an input type that accepts ServicesCommunicationsGatewayMap and ServicesCommunicationsGatewayMapOutput values.
// You can construct a concrete instance of `ServicesCommunicationsGatewayMapInput` via:
//
// ServicesCommunicationsGatewayMap{ "key": ServicesCommunicationsGatewayArgs{...} }
type ServicesCommunicationsGatewayMapInput interface {
pulumi.Input
ToServicesCommunicationsGatewayMapOutput() ServicesCommunicationsGatewayMapOutput
ToServicesCommunicationsGatewayMapOutputWithContext(context.Context) ServicesCommunicationsGatewayMapOutput
}
type ServicesCommunicationsGatewayMap map[string]ServicesCommunicationsGatewayInput
func (ServicesCommunicationsGatewayMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServicesCommunicationsGateway)(nil)).Elem()
}
func (i ServicesCommunicationsGatewayMap) ToServicesCommunicationsGatewayMapOutput() ServicesCommunicationsGatewayMapOutput {
return i.ToServicesCommunicationsGatewayMapOutputWithContext(context.Background())
}
func (i ServicesCommunicationsGatewayMap) ToServicesCommunicationsGatewayMapOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServicesCommunicationsGatewayMapOutput)
}
type ServicesCommunicationsGatewayOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServicesCommunicationsGateway)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayOutput) ToServicesCommunicationsGatewayOutput() ServicesCommunicationsGatewayOutput {
return o
}
func (o ServicesCommunicationsGatewayOutput) ToServicesCommunicationsGatewayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayOutput {
return o
}
// Details of API bridge functionality, if required.
func (o ServicesCommunicationsGatewayOutput) ApiBridge() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringPtrOutput { return v.ApiBridge }).(pulumi.StringPtrOutput)
}
// Specifies the scope at which the auto-generated domain name can be re-used. Possible values are `TenantReuse`, `SubscriptionReuse`, `ResourceGroupReuse` and `NoReuse` . Changing this forces a new resource to be created. Defaults to `TenantReuse`.
func (o ServicesCommunicationsGatewayOutput) AutoGeneratedDomainNameLabelScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringPtrOutput {
return v.AutoGeneratedDomainNameLabelScope
}).(pulumi.StringPtrOutput)
}
// The voice codecs expected for communication with Teams. Possible values are `PCMA`, `PCMU`,`G722`,`G722_2`,`SILK_8` and `SILK_16`.
func (o ServicesCommunicationsGatewayOutput) Codecs() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringOutput { return v.Codecs }).(pulumi.StringOutput)
}
// How to connect back to the operator network, e.g. MAPS. Possible values is `PublicAddress`. Changing this forces a new Voice Services Communications Gateways to be created.
func (o ServicesCommunicationsGatewayOutput) Connectivity() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringOutput { return v.Connectivity }).(pulumi.StringOutput)
}
// How to handle 911 calls. Possible values are `Standard` and `DirectToEsrp`.
func (o ServicesCommunicationsGatewayOutput) E911Type() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringOutput { return v.E911Type }).(pulumi.StringOutput)
}
// A list of dial strings used for emergency calling.
func (o ServicesCommunicationsGatewayOutput) EmergencyDialStrings() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringArrayOutput { return v.EmergencyDialStrings }).(pulumi.StringArrayOutput)
}
// Specifies the Azure Region where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
func (o ServicesCommunicationsGatewayOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.
func (o ServicesCommunicationsGatewayOutput) MicrosoftTeamsVoicemailPilotNumber() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringPtrOutput {
return v.MicrosoftTeamsVoicemailPilotNumber
}).(pulumi.StringPtrOutput)
}
// Specifies the name which should be used for this Voice Services Communications Gateways. Changing this forces a new resource to be created.
func (o ServicesCommunicationsGatewayOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether an on-premises Mobile Control Point is in use.
func (o ServicesCommunicationsGatewayOutput) OnPremMcpEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.BoolPtrOutput { return v.OnPremMcpEnabled }).(pulumi.BoolPtrOutput)
}
// The Voice Services Communications GatewaysAvailable supports platform types. Possible values are `OperatorConnect`, `TeamsPhoneMobile`.
func (o ServicesCommunicationsGatewayOutput) Platforms() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringArrayOutput { return v.Platforms }).(pulumi.StringArrayOutput)
}
// Specifies the name of the Resource Group where the Voice Services Communications Gateways should exist. Changing this forces a new resource to be created.
func (o ServicesCommunicationsGatewayOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `serviceLocation` block as defined below.
func (o ServicesCommunicationsGatewayOutput) ServiceLocations() ServicesCommunicationsGatewayServiceLocationArrayOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) ServicesCommunicationsGatewayServiceLocationArrayOutput {
return v.ServiceLocations
}).(ServicesCommunicationsGatewayServiceLocationArrayOutput)
}
// A mapping of tags which should be assigned to the Voice Services Communications Gateways.
func (o ServicesCommunicationsGatewayOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ServicesCommunicationsGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ServicesCommunicationsGatewayArrayOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServicesCommunicationsGateway)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayArrayOutput) ToServicesCommunicationsGatewayArrayOutput() ServicesCommunicationsGatewayArrayOutput {
return o
}
func (o ServicesCommunicationsGatewayArrayOutput) ToServicesCommunicationsGatewayArrayOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayArrayOutput {
return o
}
func (o ServicesCommunicationsGatewayArrayOutput) Index(i pulumi.IntInput) ServicesCommunicationsGatewayOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServicesCommunicationsGateway {
return vs[0].([]*ServicesCommunicationsGateway)[vs[1].(int)]
}).(ServicesCommunicationsGatewayOutput)
}
type ServicesCommunicationsGatewayMapOutput struct{ *pulumi.OutputState }
func (ServicesCommunicationsGatewayMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServicesCommunicationsGateway)(nil)).Elem()
}
func (o ServicesCommunicationsGatewayMapOutput) ToServicesCommunicationsGatewayMapOutput() ServicesCommunicationsGatewayMapOutput {
return o
}
func (o ServicesCommunicationsGatewayMapOutput) ToServicesCommunicationsGatewayMapOutputWithContext(ctx context.Context) ServicesCommunicationsGatewayMapOutput {
return o
}
func (o ServicesCommunicationsGatewayMapOutput) MapIndex(k pulumi.StringInput) ServicesCommunicationsGatewayOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServicesCommunicationsGateway {
return vs[0].(map[string]*ServicesCommunicationsGateway)[vs[1].(string)]
}).(ServicesCommunicationsGatewayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayInput)(nil)).Elem(), &ServicesCommunicationsGateway{})
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayArrayInput)(nil)).Elem(), ServicesCommunicationsGatewayArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServicesCommunicationsGatewayMapInput)(nil)).Elem(), ServicesCommunicationsGatewayMap{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayOutput{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayArrayOutput{})
pulumi.RegisterOutputType(ServicesCommunicationsGatewayMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/getDeployment.go | sdk/go/azure/nginx/getDeployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
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 NGINX Deployment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := nginx.LookupDeployment(ctx, &nginx.LookupDeploymentArgs{
// 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:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
func LookupDeployment(ctx *pulumi.Context, args *LookupDeploymentArgs, opts ...pulumi.InvokeOption) (*LookupDeploymentResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDeploymentResult
err := ctx.Invoke("azure:nginx/getDeployment:getDeployment", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDeployment.
type LookupDeploymentArgs struct {
// The name of this NGINX Deployment.
Name string `pulumi:"name"`
// The name of the Resource Group where the NGINX Deployment exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDeployment.
type LookupDeploymentResult struct {
// An `autoScaleProfile` block as defined below.
AutoScaleProfiles []GetDeploymentAutoScaleProfile `pulumi:"autoScaleProfiles"`
// The automatic upgrade channel for this NGINX deployment.
AutomaticUpgradeChannel string `pulumi:"automaticUpgradeChannel"`
// The number of NGINX capacity units for this NGINX Deployment.
Capacity int `pulumi:"capacity"`
// The dataplane API endpoint of the NGINX Deployment.
DataplaneApiEndpoint string `pulumi:"dataplaneApiEndpoint"`
// Whether metrics are exported to Azure Monitor.
DiagnoseSupportEnabled bool `pulumi:"diagnoseSupportEnabled"`
// Preferred email associated with the NGINX Deployment.
Email string `pulumi:"email"`
// A `frontendPrivate` block as defined below.
FrontendPrivates []GetDeploymentFrontendPrivate `pulumi:"frontendPrivates"`
// A `frontendPublic` block as defined below.
FrontendPublics []GetDeploymentFrontendPublic `pulumi:"frontendPublics"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `identity` block as defined below.
Identities []GetDeploymentIdentity `pulumi:"identities"`
// The list of Public IP Resource IDs for this NGINX Deployment.
IpAddress string `pulumi:"ipAddress"`
// The Azure Region where the NGINX Deployment exists.
Location string `pulumi:"location"`
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider.
LoggingStorageAccounts []GetDeploymentLoggingStorageAccount `pulumi:"loggingStorageAccounts"`
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
ManagedResourceGroup string `pulumi:"managedResourceGroup"`
// Name of the autoscaling profile.
Name string `pulumi:"name"`
// A `networkInterface` block as defined below.
NetworkInterfaces []GetDeploymentNetworkInterface `pulumi:"networkInterfaces"`
// NGINX version of the Deployment.
NginxVersion string `pulumi:"nginxVersion"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The NGINX Deployment SKU.
Sku string `pulumi:"sku"`
// A mapping of tags assigned to the NGINX Deployment.
Tags map[string]string `pulumi:"tags"`
// A `webApplicationFirewall` block as defined below.
WebApplicationFirewalls []GetDeploymentWebApplicationFirewall `pulumi:"webApplicationFirewalls"`
}
func LookupDeploymentOutput(ctx *pulumi.Context, args LookupDeploymentOutputArgs, opts ...pulumi.InvokeOption) LookupDeploymentResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDeploymentResultOutput, error) {
args := v.(LookupDeploymentArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:nginx/getDeployment:getDeployment", args, LookupDeploymentResultOutput{}, options).(LookupDeploymentResultOutput), nil
}).(LookupDeploymentResultOutput)
}
// A collection of arguments for invoking getDeployment.
type LookupDeploymentOutputArgs struct {
// The name of this NGINX Deployment.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the NGINX Deployment exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDeploymentOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeploymentArgs)(nil)).Elem()
}
// A collection of values returned by getDeployment.
type LookupDeploymentResultOutput struct{ *pulumi.OutputState }
func (LookupDeploymentResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeploymentResult)(nil)).Elem()
}
func (o LookupDeploymentResultOutput) ToLookupDeploymentResultOutput() LookupDeploymentResultOutput {
return o
}
func (o LookupDeploymentResultOutput) ToLookupDeploymentResultOutputWithContext(ctx context.Context) LookupDeploymentResultOutput {
return o
}
// An `autoScaleProfile` block as defined below.
func (o LookupDeploymentResultOutput) AutoScaleProfiles() GetDeploymentAutoScaleProfileArrayOutput {
return o.ApplyT(func(v LookupDeploymentResult) []GetDeploymentAutoScaleProfile { return v.AutoScaleProfiles }).(GetDeploymentAutoScaleProfileArrayOutput)
}
// The automatic upgrade channel for this NGINX deployment.
func (o LookupDeploymentResultOutput) AutomaticUpgradeChannel() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.AutomaticUpgradeChannel }).(pulumi.StringOutput)
}
// The number of NGINX capacity units for this NGINX Deployment.
func (o LookupDeploymentResultOutput) Capacity() pulumi.IntOutput {
return o.ApplyT(func(v LookupDeploymentResult) int { return v.Capacity }).(pulumi.IntOutput)
}
// The dataplane API endpoint of the NGINX Deployment.
func (o LookupDeploymentResultOutput) DataplaneApiEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.DataplaneApiEndpoint }).(pulumi.StringOutput)
}
// Whether metrics are exported to Azure Monitor.
func (o LookupDeploymentResultOutput) DiagnoseSupportEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDeploymentResult) bool { return v.DiagnoseSupportEnabled }).(pulumi.BoolOutput)
}
// Preferred email associated with the NGINX Deployment.
func (o LookupDeploymentResultOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.Email }).(pulumi.StringOutput)
}
// A `frontendPrivate` block as defined below.
func (o LookupDeploymentResultOutput) FrontendPrivates() GetDeploymentFrontendPrivateArrayOutput {
return o.ApplyT(func(v LookupDeploymentResult) []GetDeploymentFrontendPrivate { return v.FrontendPrivates }).(GetDeploymentFrontendPrivateArrayOutput)
}
// A `frontendPublic` block as defined below.
func (o LookupDeploymentResultOutput) FrontendPublics() GetDeploymentFrontendPublicArrayOutput {
return o.ApplyT(func(v LookupDeploymentResult) []GetDeploymentFrontendPublic { return v.FrontendPublics }).(GetDeploymentFrontendPublicArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDeploymentResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `identity` block as defined below.
func (o LookupDeploymentResultOutput) Identities() GetDeploymentIdentityArrayOutput {
return o.ApplyT(func(v LookupDeploymentResult) []GetDeploymentIdentity { return v.Identities }).(GetDeploymentIdentityArrayOutput)
}
// The list of Public IP Resource IDs for this NGINX Deployment.
func (o LookupDeploymentResultOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.IpAddress }).(pulumi.StringOutput)
}
// The Azure Region where the NGINX Deployment exists.
func (o LookupDeploymentResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.Location }).(pulumi.StringOutput)
}
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider.
func (o LookupDeploymentResultOutput) LoggingStorageAccounts() GetDeploymentLoggingStorageAccountArrayOutput {
return o.ApplyT(func(v LookupDeploymentResult) []GetDeploymentLoggingStorageAccount { return v.LoggingStorageAccounts }).(GetDeploymentLoggingStorageAccountArrayOutput)
}
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
func (o LookupDeploymentResultOutput) ManagedResourceGroup() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.ManagedResourceGroup }).(pulumi.StringOutput)
}
// Name of the autoscaling profile.
func (o LookupDeploymentResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `networkInterface` block as defined below.
func (o LookupDeploymentResultOutput) NetworkInterfaces() GetDeploymentNetworkInterfaceArrayOutput {
return o.ApplyT(func(v LookupDeploymentResult) []GetDeploymentNetworkInterface { return v.NetworkInterfaces }).(GetDeploymentNetworkInterfaceArrayOutput)
}
// NGINX version of the Deployment.
func (o LookupDeploymentResultOutput) NginxVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.NginxVersion }).(pulumi.StringOutput)
}
func (o LookupDeploymentResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The NGINX Deployment SKU.
func (o LookupDeploymentResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeploymentResult) string { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the NGINX Deployment.
func (o LookupDeploymentResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDeploymentResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// A `webApplicationFirewall` block as defined below.
func (o LookupDeploymentResultOutput) WebApplicationFirewalls() GetDeploymentWebApplicationFirewallArrayOutput {
return o.ApplyT(func(v LookupDeploymentResult) []GetDeploymentWebApplicationFirewall { return v.WebApplicationFirewalls }).(GetDeploymentWebApplicationFirewallArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDeploymentResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/init.go | sdk/go/azure/nginx/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 nginx
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:nginx/apiKey:ApiKey":
r = &ApiKey{}
case "azure:nginx/certificate:Certificate":
r = &Certificate{}
case "azure:nginx/configuration:Configuration":
r = &Configuration{}
case "azure:nginx/deployment:Deployment":
r = &Deployment{}
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",
"nginx/apiKey",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"nginx/certificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"nginx/configuration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"nginx/deployment",
&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/nginx/pulumiTypes.go | sdk/go/azure/nginx/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 nginx
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 ConfigurationConfigFile struct {
// Specifies the base-64 encoded contents of this config file.
Content string `pulumi:"content"`
// Specifies the path of this config file.
VirtualPath string `pulumi:"virtualPath"`
}
// ConfigurationConfigFileInput is an input type that accepts ConfigurationConfigFileArgs and ConfigurationConfigFileOutput values.
// You can construct a concrete instance of `ConfigurationConfigFileInput` via:
//
// ConfigurationConfigFileArgs{...}
type ConfigurationConfigFileInput interface {
pulumi.Input
ToConfigurationConfigFileOutput() ConfigurationConfigFileOutput
ToConfigurationConfigFileOutputWithContext(context.Context) ConfigurationConfigFileOutput
}
type ConfigurationConfigFileArgs struct {
// Specifies the base-64 encoded contents of this config file.
Content pulumi.StringInput `pulumi:"content"`
// Specifies the path of this config file.
VirtualPath pulumi.StringInput `pulumi:"virtualPath"`
}
func (ConfigurationConfigFileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationConfigFile)(nil)).Elem()
}
func (i ConfigurationConfigFileArgs) ToConfigurationConfigFileOutput() ConfigurationConfigFileOutput {
return i.ToConfigurationConfigFileOutputWithContext(context.Background())
}
func (i ConfigurationConfigFileArgs) ToConfigurationConfigFileOutputWithContext(ctx context.Context) ConfigurationConfigFileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationConfigFileOutput)
}
// ConfigurationConfigFileArrayInput is an input type that accepts ConfigurationConfigFileArray and ConfigurationConfigFileArrayOutput values.
// You can construct a concrete instance of `ConfigurationConfigFileArrayInput` via:
//
// ConfigurationConfigFileArray{ ConfigurationConfigFileArgs{...} }
type ConfigurationConfigFileArrayInput interface {
pulumi.Input
ToConfigurationConfigFileArrayOutput() ConfigurationConfigFileArrayOutput
ToConfigurationConfigFileArrayOutputWithContext(context.Context) ConfigurationConfigFileArrayOutput
}
type ConfigurationConfigFileArray []ConfigurationConfigFileInput
func (ConfigurationConfigFileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConfigurationConfigFile)(nil)).Elem()
}
func (i ConfigurationConfigFileArray) ToConfigurationConfigFileArrayOutput() ConfigurationConfigFileArrayOutput {
return i.ToConfigurationConfigFileArrayOutputWithContext(context.Background())
}
func (i ConfigurationConfigFileArray) ToConfigurationConfigFileArrayOutputWithContext(ctx context.Context) ConfigurationConfigFileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationConfigFileArrayOutput)
}
type ConfigurationConfigFileOutput struct{ *pulumi.OutputState }
func (ConfigurationConfigFileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationConfigFile)(nil)).Elem()
}
func (o ConfigurationConfigFileOutput) ToConfigurationConfigFileOutput() ConfigurationConfigFileOutput {
return o
}
func (o ConfigurationConfigFileOutput) ToConfigurationConfigFileOutputWithContext(ctx context.Context) ConfigurationConfigFileOutput {
return o
}
// Specifies the base-64 encoded contents of this config file.
func (o ConfigurationConfigFileOutput) Content() pulumi.StringOutput {
return o.ApplyT(func(v ConfigurationConfigFile) string { return v.Content }).(pulumi.StringOutput)
}
// Specifies the path of this config file.
func (o ConfigurationConfigFileOutput) VirtualPath() pulumi.StringOutput {
return o.ApplyT(func(v ConfigurationConfigFile) string { return v.VirtualPath }).(pulumi.StringOutput)
}
type ConfigurationConfigFileArrayOutput struct{ *pulumi.OutputState }
func (ConfigurationConfigFileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConfigurationConfigFile)(nil)).Elem()
}
func (o ConfigurationConfigFileArrayOutput) ToConfigurationConfigFileArrayOutput() ConfigurationConfigFileArrayOutput {
return o
}
func (o ConfigurationConfigFileArrayOutput) ToConfigurationConfigFileArrayOutputWithContext(ctx context.Context) ConfigurationConfigFileArrayOutput {
return o
}
func (o ConfigurationConfigFileArrayOutput) Index(i pulumi.IntInput) ConfigurationConfigFileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ConfigurationConfigFile {
return vs[0].([]ConfigurationConfigFile)[vs[1].(int)]
}).(ConfigurationConfigFileOutput)
}
type ConfigurationProtectedFile struct {
// Specifies the base-64 encoded contents of this config file (Sensitive).
Content string `pulumi:"content"`
// The hash of the contents of this configuration file prefixed by the algorithm used.
ContentHash *string `pulumi:"contentHash"`
// Specifies the path of this config file.
VirtualPath string `pulumi:"virtualPath"`
}
// ConfigurationProtectedFileInput is an input type that accepts ConfigurationProtectedFileArgs and ConfigurationProtectedFileOutput values.
// You can construct a concrete instance of `ConfigurationProtectedFileInput` via:
//
// ConfigurationProtectedFileArgs{...}
type ConfigurationProtectedFileInput interface {
pulumi.Input
ToConfigurationProtectedFileOutput() ConfigurationProtectedFileOutput
ToConfigurationProtectedFileOutputWithContext(context.Context) ConfigurationProtectedFileOutput
}
type ConfigurationProtectedFileArgs struct {
// Specifies the base-64 encoded contents of this config file (Sensitive).
Content pulumi.StringInput `pulumi:"content"`
// The hash of the contents of this configuration file prefixed by the algorithm used.
ContentHash pulumi.StringPtrInput `pulumi:"contentHash"`
// Specifies the path of this config file.
VirtualPath pulumi.StringInput `pulumi:"virtualPath"`
}
func (ConfigurationProtectedFileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationProtectedFile)(nil)).Elem()
}
func (i ConfigurationProtectedFileArgs) ToConfigurationProtectedFileOutput() ConfigurationProtectedFileOutput {
return i.ToConfigurationProtectedFileOutputWithContext(context.Background())
}
func (i ConfigurationProtectedFileArgs) ToConfigurationProtectedFileOutputWithContext(ctx context.Context) ConfigurationProtectedFileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationProtectedFileOutput)
}
// ConfigurationProtectedFileArrayInput is an input type that accepts ConfigurationProtectedFileArray and ConfigurationProtectedFileArrayOutput values.
// You can construct a concrete instance of `ConfigurationProtectedFileArrayInput` via:
//
// ConfigurationProtectedFileArray{ ConfigurationProtectedFileArgs{...} }
type ConfigurationProtectedFileArrayInput interface {
pulumi.Input
ToConfigurationProtectedFileArrayOutput() ConfigurationProtectedFileArrayOutput
ToConfigurationProtectedFileArrayOutputWithContext(context.Context) ConfigurationProtectedFileArrayOutput
}
type ConfigurationProtectedFileArray []ConfigurationProtectedFileInput
func (ConfigurationProtectedFileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConfigurationProtectedFile)(nil)).Elem()
}
func (i ConfigurationProtectedFileArray) ToConfigurationProtectedFileArrayOutput() ConfigurationProtectedFileArrayOutput {
return i.ToConfigurationProtectedFileArrayOutputWithContext(context.Background())
}
func (i ConfigurationProtectedFileArray) ToConfigurationProtectedFileArrayOutputWithContext(ctx context.Context) ConfigurationProtectedFileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationProtectedFileArrayOutput)
}
type ConfigurationProtectedFileOutput struct{ *pulumi.OutputState }
func (ConfigurationProtectedFileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationProtectedFile)(nil)).Elem()
}
func (o ConfigurationProtectedFileOutput) ToConfigurationProtectedFileOutput() ConfigurationProtectedFileOutput {
return o
}
func (o ConfigurationProtectedFileOutput) ToConfigurationProtectedFileOutputWithContext(ctx context.Context) ConfigurationProtectedFileOutput {
return o
}
// Specifies the base-64 encoded contents of this config file (Sensitive).
func (o ConfigurationProtectedFileOutput) Content() pulumi.StringOutput {
return o.ApplyT(func(v ConfigurationProtectedFile) string { return v.Content }).(pulumi.StringOutput)
}
// The hash of the contents of this configuration file prefixed by the algorithm used.
func (o ConfigurationProtectedFileOutput) ContentHash() pulumi.StringPtrOutput {
return o.ApplyT(func(v ConfigurationProtectedFile) *string { return v.ContentHash }).(pulumi.StringPtrOutput)
}
// Specifies the path of this config file.
func (o ConfigurationProtectedFileOutput) VirtualPath() pulumi.StringOutput {
return o.ApplyT(func(v ConfigurationProtectedFile) string { return v.VirtualPath }).(pulumi.StringOutput)
}
type ConfigurationProtectedFileArrayOutput struct{ *pulumi.OutputState }
func (ConfigurationProtectedFileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConfigurationProtectedFile)(nil)).Elem()
}
func (o ConfigurationProtectedFileArrayOutput) ToConfigurationProtectedFileArrayOutput() ConfigurationProtectedFileArrayOutput {
return o
}
func (o ConfigurationProtectedFileArrayOutput) ToConfigurationProtectedFileArrayOutputWithContext(ctx context.Context) ConfigurationProtectedFileArrayOutput {
return o
}
func (o ConfigurationProtectedFileArrayOutput) Index(i pulumi.IntInput) ConfigurationProtectedFileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ConfigurationProtectedFile {
return vs[0].([]ConfigurationProtectedFile)[vs[1].(int)]
}).(ConfigurationProtectedFileOutput)
}
type DeploymentAutoScaleProfile struct {
MaxCapacity int `pulumi:"maxCapacity"`
// Specify the minimum number of NGINX capacity units for this NGINX Deployment.
MinCapacity int `pulumi:"minCapacity"`
// Specify the name of the autoscaling profile.
Name string `pulumi:"name"`
}
// DeploymentAutoScaleProfileInput is an input type that accepts DeploymentAutoScaleProfileArgs and DeploymentAutoScaleProfileOutput values.
// You can construct a concrete instance of `DeploymentAutoScaleProfileInput` via:
//
// DeploymentAutoScaleProfileArgs{...}
type DeploymentAutoScaleProfileInput interface {
pulumi.Input
ToDeploymentAutoScaleProfileOutput() DeploymentAutoScaleProfileOutput
ToDeploymentAutoScaleProfileOutputWithContext(context.Context) DeploymentAutoScaleProfileOutput
}
type DeploymentAutoScaleProfileArgs struct {
MaxCapacity pulumi.IntInput `pulumi:"maxCapacity"`
// Specify the minimum number of NGINX capacity units for this NGINX Deployment.
MinCapacity pulumi.IntInput `pulumi:"minCapacity"`
// Specify the name of the autoscaling profile.
Name pulumi.StringInput `pulumi:"name"`
}
func (DeploymentAutoScaleProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentAutoScaleProfile)(nil)).Elem()
}
func (i DeploymentAutoScaleProfileArgs) ToDeploymentAutoScaleProfileOutput() DeploymentAutoScaleProfileOutput {
return i.ToDeploymentAutoScaleProfileOutputWithContext(context.Background())
}
func (i DeploymentAutoScaleProfileArgs) ToDeploymentAutoScaleProfileOutputWithContext(ctx context.Context) DeploymentAutoScaleProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentAutoScaleProfileOutput)
}
// DeploymentAutoScaleProfileArrayInput is an input type that accepts DeploymentAutoScaleProfileArray and DeploymentAutoScaleProfileArrayOutput values.
// You can construct a concrete instance of `DeploymentAutoScaleProfileArrayInput` via:
//
// DeploymentAutoScaleProfileArray{ DeploymentAutoScaleProfileArgs{...} }
type DeploymentAutoScaleProfileArrayInput interface {
pulumi.Input
ToDeploymentAutoScaleProfileArrayOutput() DeploymentAutoScaleProfileArrayOutput
ToDeploymentAutoScaleProfileArrayOutputWithContext(context.Context) DeploymentAutoScaleProfileArrayOutput
}
type DeploymentAutoScaleProfileArray []DeploymentAutoScaleProfileInput
func (DeploymentAutoScaleProfileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]DeploymentAutoScaleProfile)(nil)).Elem()
}
func (i DeploymentAutoScaleProfileArray) ToDeploymentAutoScaleProfileArrayOutput() DeploymentAutoScaleProfileArrayOutput {
return i.ToDeploymentAutoScaleProfileArrayOutputWithContext(context.Background())
}
func (i DeploymentAutoScaleProfileArray) ToDeploymentAutoScaleProfileArrayOutputWithContext(ctx context.Context) DeploymentAutoScaleProfileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentAutoScaleProfileArrayOutput)
}
type DeploymentAutoScaleProfileOutput struct{ *pulumi.OutputState }
func (DeploymentAutoScaleProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentAutoScaleProfile)(nil)).Elem()
}
func (o DeploymentAutoScaleProfileOutput) ToDeploymentAutoScaleProfileOutput() DeploymentAutoScaleProfileOutput {
return o
}
func (o DeploymentAutoScaleProfileOutput) ToDeploymentAutoScaleProfileOutputWithContext(ctx context.Context) DeploymentAutoScaleProfileOutput {
return o
}
func (o DeploymentAutoScaleProfileOutput) MaxCapacity() pulumi.IntOutput {
return o.ApplyT(func(v DeploymentAutoScaleProfile) int { return v.MaxCapacity }).(pulumi.IntOutput)
}
// Specify the minimum number of NGINX capacity units for this NGINX Deployment.
func (o DeploymentAutoScaleProfileOutput) MinCapacity() pulumi.IntOutput {
return o.ApplyT(func(v DeploymentAutoScaleProfile) int { return v.MinCapacity }).(pulumi.IntOutput)
}
// Specify the name of the autoscaling profile.
func (o DeploymentAutoScaleProfileOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v DeploymentAutoScaleProfile) string { return v.Name }).(pulumi.StringOutput)
}
type DeploymentAutoScaleProfileArrayOutput struct{ *pulumi.OutputState }
func (DeploymentAutoScaleProfileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]DeploymentAutoScaleProfile)(nil)).Elem()
}
func (o DeploymentAutoScaleProfileArrayOutput) ToDeploymentAutoScaleProfileArrayOutput() DeploymentAutoScaleProfileArrayOutput {
return o
}
func (o DeploymentAutoScaleProfileArrayOutput) ToDeploymentAutoScaleProfileArrayOutputWithContext(ctx context.Context) DeploymentAutoScaleProfileArrayOutput {
return o
}
func (o DeploymentAutoScaleProfileArrayOutput) Index(i pulumi.IntInput) DeploymentAutoScaleProfileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) DeploymentAutoScaleProfile {
return vs[0].([]DeploymentAutoScaleProfile)[vs[1].(int)]
}).(DeploymentAutoScaleProfileOutput)
}
type DeploymentFrontendPrivate struct {
// Specify the method for allocating the private IP. Possible values are `Static` and `Dynamic`.
AllocationMethod string `pulumi:"allocationMethod"`
// Specify the private IP Address.
IpAddress string `pulumi:"ipAddress"`
// Specify the Subnet Resource ID for this NGINX Deployment.
SubnetId string `pulumi:"subnetId"`
}
// DeploymentFrontendPrivateInput is an input type that accepts DeploymentFrontendPrivateArgs and DeploymentFrontendPrivateOutput values.
// You can construct a concrete instance of `DeploymentFrontendPrivateInput` via:
//
// DeploymentFrontendPrivateArgs{...}
type DeploymentFrontendPrivateInput interface {
pulumi.Input
ToDeploymentFrontendPrivateOutput() DeploymentFrontendPrivateOutput
ToDeploymentFrontendPrivateOutputWithContext(context.Context) DeploymentFrontendPrivateOutput
}
type DeploymentFrontendPrivateArgs struct {
// Specify the method for allocating the private IP. Possible values are `Static` and `Dynamic`.
AllocationMethod pulumi.StringInput `pulumi:"allocationMethod"`
// Specify the private IP Address.
IpAddress pulumi.StringInput `pulumi:"ipAddress"`
// Specify the Subnet Resource ID for this NGINX Deployment.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
}
func (DeploymentFrontendPrivateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentFrontendPrivate)(nil)).Elem()
}
func (i DeploymentFrontendPrivateArgs) ToDeploymentFrontendPrivateOutput() DeploymentFrontendPrivateOutput {
return i.ToDeploymentFrontendPrivateOutputWithContext(context.Background())
}
func (i DeploymentFrontendPrivateArgs) ToDeploymentFrontendPrivateOutputWithContext(ctx context.Context) DeploymentFrontendPrivateOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentFrontendPrivateOutput)
}
// DeploymentFrontendPrivateArrayInput is an input type that accepts DeploymentFrontendPrivateArray and DeploymentFrontendPrivateArrayOutput values.
// You can construct a concrete instance of `DeploymentFrontendPrivateArrayInput` via:
//
// DeploymentFrontendPrivateArray{ DeploymentFrontendPrivateArgs{...} }
type DeploymentFrontendPrivateArrayInput interface {
pulumi.Input
ToDeploymentFrontendPrivateArrayOutput() DeploymentFrontendPrivateArrayOutput
ToDeploymentFrontendPrivateArrayOutputWithContext(context.Context) DeploymentFrontendPrivateArrayOutput
}
type DeploymentFrontendPrivateArray []DeploymentFrontendPrivateInput
func (DeploymentFrontendPrivateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]DeploymentFrontendPrivate)(nil)).Elem()
}
func (i DeploymentFrontendPrivateArray) ToDeploymentFrontendPrivateArrayOutput() DeploymentFrontendPrivateArrayOutput {
return i.ToDeploymentFrontendPrivateArrayOutputWithContext(context.Background())
}
func (i DeploymentFrontendPrivateArray) ToDeploymentFrontendPrivateArrayOutputWithContext(ctx context.Context) DeploymentFrontendPrivateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentFrontendPrivateArrayOutput)
}
type DeploymentFrontendPrivateOutput struct{ *pulumi.OutputState }
func (DeploymentFrontendPrivateOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentFrontendPrivate)(nil)).Elem()
}
func (o DeploymentFrontendPrivateOutput) ToDeploymentFrontendPrivateOutput() DeploymentFrontendPrivateOutput {
return o
}
func (o DeploymentFrontendPrivateOutput) ToDeploymentFrontendPrivateOutputWithContext(ctx context.Context) DeploymentFrontendPrivateOutput {
return o
}
// Specify the method for allocating the private IP. Possible values are `Static` and `Dynamic`.
func (o DeploymentFrontendPrivateOutput) AllocationMethod() pulumi.StringOutput {
return o.ApplyT(func(v DeploymentFrontendPrivate) string { return v.AllocationMethod }).(pulumi.StringOutput)
}
// Specify the private IP Address.
func (o DeploymentFrontendPrivateOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v DeploymentFrontendPrivate) string { return v.IpAddress }).(pulumi.StringOutput)
}
// Specify the Subnet Resource ID for this NGINX Deployment.
func (o DeploymentFrontendPrivateOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v DeploymentFrontendPrivate) string { return v.SubnetId }).(pulumi.StringOutput)
}
type DeploymentFrontendPrivateArrayOutput struct{ *pulumi.OutputState }
func (DeploymentFrontendPrivateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]DeploymentFrontendPrivate)(nil)).Elem()
}
func (o DeploymentFrontendPrivateArrayOutput) ToDeploymentFrontendPrivateArrayOutput() DeploymentFrontendPrivateArrayOutput {
return o
}
func (o DeploymentFrontendPrivateArrayOutput) ToDeploymentFrontendPrivateArrayOutputWithContext(ctx context.Context) DeploymentFrontendPrivateArrayOutput {
return o
}
func (o DeploymentFrontendPrivateArrayOutput) Index(i pulumi.IntInput) DeploymentFrontendPrivateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) DeploymentFrontendPrivate {
return vs[0].([]DeploymentFrontendPrivate)[vs[1].(int)]
}).(DeploymentFrontendPrivateOutput)
}
type DeploymentFrontendPublic struct {
// Specifies a list of Public IP Resource ID to this NGINX Deployment.
IpAddresses []string `pulumi:"ipAddresses"`
}
// DeploymentFrontendPublicInput is an input type that accepts DeploymentFrontendPublicArgs and DeploymentFrontendPublicOutput values.
// You can construct a concrete instance of `DeploymentFrontendPublicInput` via:
//
// DeploymentFrontendPublicArgs{...}
type DeploymentFrontendPublicInput interface {
pulumi.Input
ToDeploymentFrontendPublicOutput() DeploymentFrontendPublicOutput
ToDeploymentFrontendPublicOutputWithContext(context.Context) DeploymentFrontendPublicOutput
}
type DeploymentFrontendPublicArgs struct {
// Specifies a list of Public IP Resource ID to this NGINX Deployment.
IpAddresses pulumi.StringArrayInput `pulumi:"ipAddresses"`
}
func (DeploymentFrontendPublicArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentFrontendPublic)(nil)).Elem()
}
func (i DeploymentFrontendPublicArgs) ToDeploymentFrontendPublicOutput() DeploymentFrontendPublicOutput {
return i.ToDeploymentFrontendPublicOutputWithContext(context.Background())
}
func (i DeploymentFrontendPublicArgs) ToDeploymentFrontendPublicOutputWithContext(ctx context.Context) DeploymentFrontendPublicOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentFrontendPublicOutput)
}
func (i DeploymentFrontendPublicArgs) ToDeploymentFrontendPublicPtrOutput() DeploymentFrontendPublicPtrOutput {
return i.ToDeploymentFrontendPublicPtrOutputWithContext(context.Background())
}
func (i DeploymentFrontendPublicArgs) ToDeploymentFrontendPublicPtrOutputWithContext(ctx context.Context) DeploymentFrontendPublicPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentFrontendPublicOutput).ToDeploymentFrontendPublicPtrOutputWithContext(ctx)
}
// DeploymentFrontendPublicPtrInput is an input type that accepts DeploymentFrontendPublicArgs, DeploymentFrontendPublicPtr and DeploymentFrontendPublicPtrOutput values.
// You can construct a concrete instance of `DeploymentFrontendPublicPtrInput` via:
//
// DeploymentFrontendPublicArgs{...}
//
// or:
//
// nil
type DeploymentFrontendPublicPtrInput interface {
pulumi.Input
ToDeploymentFrontendPublicPtrOutput() DeploymentFrontendPublicPtrOutput
ToDeploymentFrontendPublicPtrOutputWithContext(context.Context) DeploymentFrontendPublicPtrOutput
}
type deploymentFrontendPublicPtrType DeploymentFrontendPublicArgs
func DeploymentFrontendPublicPtr(v *DeploymentFrontendPublicArgs) DeploymentFrontendPublicPtrInput {
return (*deploymentFrontendPublicPtrType)(v)
}
func (*deploymentFrontendPublicPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DeploymentFrontendPublic)(nil)).Elem()
}
func (i *deploymentFrontendPublicPtrType) ToDeploymentFrontendPublicPtrOutput() DeploymentFrontendPublicPtrOutput {
return i.ToDeploymentFrontendPublicPtrOutputWithContext(context.Background())
}
func (i *deploymentFrontendPublicPtrType) ToDeploymentFrontendPublicPtrOutputWithContext(ctx context.Context) DeploymentFrontendPublicPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentFrontendPublicPtrOutput)
}
type DeploymentFrontendPublicOutput struct{ *pulumi.OutputState }
func (DeploymentFrontendPublicOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentFrontendPublic)(nil)).Elem()
}
func (o DeploymentFrontendPublicOutput) ToDeploymentFrontendPublicOutput() DeploymentFrontendPublicOutput {
return o
}
func (o DeploymentFrontendPublicOutput) ToDeploymentFrontendPublicOutputWithContext(ctx context.Context) DeploymentFrontendPublicOutput {
return o
}
func (o DeploymentFrontendPublicOutput) ToDeploymentFrontendPublicPtrOutput() DeploymentFrontendPublicPtrOutput {
return o.ToDeploymentFrontendPublicPtrOutputWithContext(context.Background())
}
func (o DeploymentFrontendPublicOutput) ToDeploymentFrontendPublicPtrOutputWithContext(ctx context.Context) DeploymentFrontendPublicPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DeploymentFrontendPublic) *DeploymentFrontendPublic {
return &v
}).(DeploymentFrontendPublicPtrOutput)
}
// Specifies a list of Public IP Resource ID to this NGINX Deployment.
func (o DeploymentFrontendPublicOutput) IpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v DeploymentFrontendPublic) []string { return v.IpAddresses }).(pulumi.StringArrayOutput)
}
type DeploymentFrontendPublicPtrOutput struct{ *pulumi.OutputState }
func (DeploymentFrontendPublicPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DeploymentFrontendPublic)(nil)).Elem()
}
func (o DeploymentFrontendPublicPtrOutput) ToDeploymentFrontendPublicPtrOutput() DeploymentFrontendPublicPtrOutput {
return o
}
func (o DeploymentFrontendPublicPtrOutput) ToDeploymentFrontendPublicPtrOutputWithContext(ctx context.Context) DeploymentFrontendPublicPtrOutput {
return o
}
func (o DeploymentFrontendPublicPtrOutput) Elem() DeploymentFrontendPublicOutput {
return o.ApplyT(func(v *DeploymentFrontendPublic) DeploymentFrontendPublic {
if v != nil {
return *v
}
var ret DeploymentFrontendPublic
return ret
}).(DeploymentFrontendPublicOutput)
}
// Specifies a list of Public IP Resource ID to this NGINX Deployment.
func (o DeploymentFrontendPublicPtrOutput) IpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DeploymentFrontendPublic) []string {
if v == nil {
return nil
}
return v.IpAddresses
}).(pulumi.StringArrayOutput)
}
type DeploymentIdentity struct {
// Specifies a list of user managed identity ids to be assigned.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
PrincipalId *string `pulumi:"principalId"`
TenantId *string `pulumi:"tenantId"`
// Specifies the identity type of the NGINX Deployment. Possible values are `SystemAssigned`, `UserAssigned` or `SystemAssigned, UserAssigned`.
Type string `pulumi:"type"`
}
// DeploymentIdentityInput is an input type that accepts DeploymentIdentityArgs and DeploymentIdentityOutput values.
// You can construct a concrete instance of `DeploymentIdentityInput` via:
//
// DeploymentIdentityArgs{...}
type DeploymentIdentityInput interface {
pulumi.Input
ToDeploymentIdentityOutput() DeploymentIdentityOutput
ToDeploymentIdentityOutputWithContext(context.Context) DeploymentIdentityOutput
}
type DeploymentIdentityArgs struct {
// Specifies a list of user managed identity ids to be assigned.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the identity type of the NGINX Deployment. Possible values are `SystemAssigned`, `UserAssigned` or `SystemAssigned, UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (DeploymentIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentIdentity)(nil)).Elem()
}
func (i DeploymentIdentityArgs) ToDeploymentIdentityOutput() DeploymentIdentityOutput {
return i.ToDeploymentIdentityOutputWithContext(context.Background())
}
func (i DeploymentIdentityArgs) ToDeploymentIdentityOutputWithContext(ctx context.Context) DeploymentIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentIdentityOutput)
}
func (i DeploymentIdentityArgs) ToDeploymentIdentityPtrOutput() DeploymentIdentityPtrOutput {
return i.ToDeploymentIdentityPtrOutputWithContext(context.Background())
}
func (i DeploymentIdentityArgs) ToDeploymentIdentityPtrOutputWithContext(ctx context.Context) DeploymentIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentIdentityOutput).ToDeploymentIdentityPtrOutputWithContext(ctx)
}
// DeploymentIdentityPtrInput is an input type that accepts DeploymentIdentityArgs, DeploymentIdentityPtr and DeploymentIdentityPtrOutput values.
// You can construct a concrete instance of `DeploymentIdentityPtrInput` via:
//
// DeploymentIdentityArgs{...}
//
// or:
//
// nil
type DeploymentIdentityPtrInput interface {
pulumi.Input
ToDeploymentIdentityPtrOutput() DeploymentIdentityPtrOutput
ToDeploymentIdentityPtrOutputWithContext(context.Context) DeploymentIdentityPtrOutput
}
type deploymentIdentityPtrType DeploymentIdentityArgs
func DeploymentIdentityPtr(v *DeploymentIdentityArgs) DeploymentIdentityPtrInput {
return (*deploymentIdentityPtrType)(v)
}
func (*deploymentIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DeploymentIdentity)(nil)).Elem()
}
func (i *deploymentIdentityPtrType) ToDeploymentIdentityPtrOutput() DeploymentIdentityPtrOutput {
return i.ToDeploymentIdentityPtrOutputWithContext(context.Background())
}
func (i *deploymentIdentityPtrType) ToDeploymentIdentityPtrOutputWithContext(ctx context.Context) DeploymentIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentIdentityPtrOutput)
}
type DeploymentIdentityOutput struct{ *pulumi.OutputState }
func (DeploymentIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DeploymentIdentity)(nil)).Elem()
}
func (o DeploymentIdentityOutput) ToDeploymentIdentityOutput() DeploymentIdentityOutput {
return o
}
func (o DeploymentIdentityOutput) ToDeploymentIdentityOutputWithContext(ctx context.Context) DeploymentIdentityOutput {
return o
}
func (o DeploymentIdentityOutput) ToDeploymentIdentityPtrOutput() DeploymentIdentityPtrOutput {
return o.ToDeploymentIdentityPtrOutputWithContext(context.Background())
}
func (o DeploymentIdentityOutput) ToDeploymentIdentityPtrOutputWithContext(ctx context.Context) DeploymentIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DeploymentIdentity) *DeploymentIdentity {
return &v
}).(DeploymentIdentityPtrOutput)
}
// Specifies a list of user managed identity ids to be assigned.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o DeploymentIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v DeploymentIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
func (o DeploymentIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeploymentIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
func (o DeploymentIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeploymentIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the identity type of the NGINX Deployment. Possible values are `SystemAssigned`, `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o DeploymentIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v DeploymentIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type DeploymentIdentityPtrOutput struct{ *pulumi.OutputState }
func (DeploymentIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DeploymentIdentity)(nil)).Elem()
}
func (o DeploymentIdentityPtrOutput) ToDeploymentIdentityPtrOutput() DeploymentIdentityPtrOutput {
return o
}
func (o DeploymentIdentityPtrOutput) ToDeploymentIdentityPtrOutputWithContext(ctx context.Context) DeploymentIdentityPtrOutput {
return o
}
func (o DeploymentIdentityPtrOutput) Elem() DeploymentIdentityOutput {
return o.ApplyT(func(v *DeploymentIdentity) DeploymentIdentity {
if v != nil {
return *v
}
var ret DeploymentIdentity
return ret
}).(DeploymentIdentityOutput)
}
// Specifies a list of user managed identity ids to be assigned.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o DeploymentIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DeploymentIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
func (o DeploymentIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DeploymentIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
func (o DeploymentIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DeploymentIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the identity type of the NGINX Deployment. Possible values are `SystemAssigned`, `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o DeploymentIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DeploymentIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type DeploymentLoggingStorageAccount struct {
ContainerName *string `pulumi:"containerName"`
// The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created.
Name *string `pulumi:"name"`
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/getConfiguration.go | sdk/go/azure/nginx/getConfiguration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
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 Nginx Configuration.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := nginx.LookupConfiguration(ctx, &nginx.LookupConfigurationArgs{
// NginxDeploymentId: exampleAzurermNginxDeployment.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:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
func LookupConfiguration(ctx *pulumi.Context, args *LookupConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupConfigurationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupConfigurationResult
err := ctx.Invoke("azure:nginx/getConfiguration:getConfiguration", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getConfiguration.
type LookupConfigurationArgs struct {
// The ID of the Nginx Deployment.
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
}
// A collection of values returned by getConfiguration.
type LookupConfigurationResult struct {
// A `configFile` block as defined below.
ConfigFiles []GetConfigurationConfigFile `pulumi:"configFiles"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
// The package data for this configuration.
PackageData string `pulumi:"packageData"`
// A `protectedFile` block as defined below.
ProtectedFiles []GetConfigurationProtectedFile `pulumi:"protectedFiles"`
// The root file path of this Nginx Configuration.
RootFile string `pulumi:"rootFile"`
}
func LookupConfigurationOutput(ctx *pulumi.Context, args LookupConfigurationOutputArgs, opts ...pulumi.InvokeOption) LookupConfigurationResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupConfigurationResultOutput, error) {
args := v.(LookupConfigurationArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:nginx/getConfiguration:getConfiguration", args, LookupConfigurationResultOutput{}, options).(LookupConfigurationResultOutput), nil
}).(LookupConfigurationResultOutput)
}
// A collection of arguments for invoking getConfiguration.
type LookupConfigurationOutputArgs struct {
// The ID of the Nginx Deployment.
NginxDeploymentId pulumi.StringInput `pulumi:"nginxDeploymentId"`
}
func (LookupConfigurationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConfigurationArgs)(nil)).Elem()
}
// A collection of values returned by getConfiguration.
type LookupConfigurationResultOutput struct{ *pulumi.OutputState }
func (LookupConfigurationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConfigurationResult)(nil)).Elem()
}
func (o LookupConfigurationResultOutput) ToLookupConfigurationResultOutput() LookupConfigurationResultOutput {
return o
}
func (o LookupConfigurationResultOutput) ToLookupConfigurationResultOutputWithContext(ctx context.Context) LookupConfigurationResultOutput {
return o
}
// A `configFile` block as defined below.
func (o LookupConfigurationResultOutput) ConfigFiles() GetConfigurationConfigFileArrayOutput {
return o.ApplyT(func(v LookupConfigurationResult) []GetConfigurationConfigFile { return v.ConfigFiles }).(GetConfigurationConfigFileArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupConfigurationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupConfigurationResultOutput) NginxDeploymentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.NginxDeploymentId }).(pulumi.StringOutput)
}
// The package data for this configuration.
func (o LookupConfigurationResultOutput) PackageData() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.PackageData }).(pulumi.StringOutput)
}
// A `protectedFile` block as defined below.
func (o LookupConfigurationResultOutput) ProtectedFiles() GetConfigurationProtectedFileArrayOutput {
return o.ApplyT(func(v LookupConfigurationResult) []GetConfigurationProtectedFile { return v.ProtectedFiles }).(GetConfigurationProtectedFileArrayOutput)
}
// The root file path of this Nginx Configuration.
func (o LookupConfigurationResultOutput) RootFile() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.RootFile }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupConfigurationResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/apiKey.go | sdk/go/azure/nginx/apiKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Dataplane API Key for an Nginx Deployment.
//
// ## 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/nginx"
// "github.com/pulumi/pulumi/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
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationMethod: pulumi.String("Static"),
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// 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"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("NGINX.NGINXPLUS/nginxDeployments"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleDeployment, err := nginx.NewDeployment(ctx, "example", &nginx.DeploymentArgs{
// Name: pulumi.String("example-nginx"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("standardv2_Monthly"),
// Location: example.Location,
// AutomaticUpgradeChannel: pulumi.String("stable"),
// FrontendPublic: &nginx.DeploymentFrontendPublicArgs{
// IpAddresses: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// },
// NetworkInterfaces: nginx.DeploymentNetworkInterfaceArray{
// &nginx.DeploymentNetworkInterfaceArgs{
// SubnetId: exampleSubnet.ID(),
// },
// },
// Capacity: pulumi.Int(20),
// Email: pulumi.String("user@test.com"),
// })
// if err != nil {
// return err
// }
// _, err = nginx.NewApiKey(ctx, "example", &nginx.ApiKeyArgs{
// Name: pulumi.String("example-api-key"),
// NginxDeploymentId: exampleDeployment.ID(),
// SecretText: pulumi.String("727c8642-6807-4254-9d02-ae93bfad21de"),
// EndDateTime: pulumi.String("2027-01-01T00:00:00Z"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
//
// ## Import
//
// An NGINX Dataplane API Key can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:nginx/apiKey:ApiKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Nginx.NginxPlus/nginxDeployments/deploy1/apiKeys/key1
// ```
type ApiKey struct {
pulumi.CustomResourceState
// The RFC3339 formatted date-time after which this Dataplane API Key is no longer valid. The maximum value is now+2y.
EndDateTime pulumi.StringOutput `pulumi:"endDateTime"`
// The first three characters of the secret text to help identify it in use.
Hint pulumi.StringOutput `pulumi:"hint"`
// The name of the NGINX Dataplane API Key. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the NGINX Deployment that the API key is associated with. Changing this forces a new resource to be created.
NginxDeploymentId pulumi.StringOutput `pulumi:"nginxDeploymentId"`
// The value used as the Dataplane API Key. The API key requirements can be found in the [NGINXaaS Documentation](https://docs.nginx.com/nginxaas/azure/quickstart/loadbalancer-kubernetes/#create-an-nginxaas-data-plane-api-key).
SecretText pulumi.StringOutput `pulumi:"secretText"`
}
// NewApiKey registers a new resource with the given unique name, arguments, and options.
func NewApiKey(ctx *pulumi.Context,
name string, args *ApiKeyArgs, opts ...pulumi.ResourceOption) (*ApiKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EndDateTime == nil {
return nil, errors.New("invalid value for required argument 'EndDateTime'")
}
if args.NginxDeploymentId == nil {
return nil, errors.New("invalid value for required argument 'NginxDeploymentId'")
}
if args.SecretText == nil {
return nil, errors.New("invalid value for required argument 'SecretText'")
}
if args.SecretText != nil {
args.SecretText = pulumi.ToSecret(args.SecretText).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"secretText",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiKey
err := ctx.RegisterResource("azure:nginx/apiKey:ApiKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiKey gets an existing ApiKey resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiKeyState, opts ...pulumi.ResourceOption) (*ApiKey, error) {
var resource ApiKey
err := ctx.ReadResource("azure:nginx/apiKey:ApiKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiKey resources.
type apiKeyState struct {
// The RFC3339 formatted date-time after which this Dataplane API Key is no longer valid. The maximum value is now+2y.
EndDateTime *string `pulumi:"endDateTime"`
// The first three characters of the secret text to help identify it in use.
Hint *string `pulumi:"hint"`
// The name of the NGINX Dataplane API Key. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the NGINX Deployment that the API key is associated with. Changing this forces a new resource to be created.
NginxDeploymentId *string `pulumi:"nginxDeploymentId"`
// The value used as the Dataplane API Key. The API key requirements can be found in the [NGINXaaS Documentation](https://docs.nginx.com/nginxaas/azure/quickstart/loadbalancer-kubernetes/#create-an-nginxaas-data-plane-api-key).
SecretText *string `pulumi:"secretText"`
}
type ApiKeyState struct {
// The RFC3339 formatted date-time after which this Dataplane API Key is no longer valid. The maximum value is now+2y.
EndDateTime pulumi.StringPtrInput
// The first three characters of the secret text to help identify it in use.
Hint pulumi.StringPtrInput
// The name of the NGINX Dataplane API Key. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the NGINX Deployment that the API key is associated with. Changing this forces a new resource to be created.
NginxDeploymentId pulumi.StringPtrInput
// The value used as the Dataplane API Key. The API key requirements can be found in the [NGINXaaS Documentation](https://docs.nginx.com/nginxaas/azure/quickstart/loadbalancer-kubernetes/#create-an-nginxaas-data-plane-api-key).
SecretText pulumi.StringPtrInput
}
func (ApiKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*apiKeyState)(nil)).Elem()
}
type apiKeyArgs struct {
// The RFC3339 formatted date-time after which this Dataplane API Key is no longer valid. The maximum value is now+2y.
EndDateTime string `pulumi:"endDateTime"`
// The name of the NGINX Dataplane API Key. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the NGINX Deployment that the API key is associated with. Changing this forces a new resource to be created.
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
// The value used as the Dataplane API Key. The API key requirements can be found in the [NGINXaaS Documentation](https://docs.nginx.com/nginxaas/azure/quickstart/loadbalancer-kubernetes/#create-an-nginxaas-data-plane-api-key).
SecretText string `pulumi:"secretText"`
}
// The set of arguments for constructing a ApiKey resource.
type ApiKeyArgs struct {
// The RFC3339 formatted date-time after which this Dataplane API Key is no longer valid. The maximum value is now+2y.
EndDateTime pulumi.StringInput
// The name of the NGINX Dataplane API Key. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the NGINX Deployment that the API key is associated with. Changing this forces a new resource to be created.
NginxDeploymentId pulumi.StringInput
// The value used as the Dataplane API Key. The API key requirements can be found in the [NGINXaaS Documentation](https://docs.nginx.com/nginxaas/azure/quickstart/loadbalancer-kubernetes/#create-an-nginxaas-data-plane-api-key).
SecretText pulumi.StringInput
}
func (ApiKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiKeyArgs)(nil)).Elem()
}
type ApiKeyInput interface {
pulumi.Input
ToApiKeyOutput() ApiKeyOutput
ToApiKeyOutputWithContext(ctx context.Context) ApiKeyOutput
}
func (*ApiKey) ElementType() reflect.Type {
return reflect.TypeOf((**ApiKey)(nil)).Elem()
}
func (i *ApiKey) ToApiKeyOutput() ApiKeyOutput {
return i.ToApiKeyOutputWithContext(context.Background())
}
func (i *ApiKey) ToApiKeyOutputWithContext(ctx context.Context) ApiKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiKeyOutput)
}
// ApiKeyArrayInput is an input type that accepts ApiKeyArray and ApiKeyArrayOutput values.
// You can construct a concrete instance of `ApiKeyArrayInput` via:
//
// ApiKeyArray{ ApiKeyArgs{...} }
type ApiKeyArrayInput interface {
pulumi.Input
ToApiKeyArrayOutput() ApiKeyArrayOutput
ToApiKeyArrayOutputWithContext(context.Context) ApiKeyArrayOutput
}
type ApiKeyArray []ApiKeyInput
func (ApiKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiKey)(nil)).Elem()
}
func (i ApiKeyArray) ToApiKeyArrayOutput() ApiKeyArrayOutput {
return i.ToApiKeyArrayOutputWithContext(context.Background())
}
func (i ApiKeyArray) ToApiKeyArrayOutputWithContext(ctx context.Context) ApiKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiKeyArrayOutput)
}
// ApiKeyMapInput is an input type that accepts ApiKeyMap and ApiKeyMapOutput values.
// You can construct a concrete instance of `ApiKeyMapInput` via:
//
// ApiKeyMap{ "key": ApiKeyArgs{...} }
type ApiKeyMapInput interface {
pulumi.Input
ToApiKeyMapOutput() ApiKeyMapOutput
ToApiKeyMapOutputWithContext(context.Context) ApiKeyMapOutput
}
type ApiKeyMap map[string]ApiKeyInput
func (ApiKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiKey)(nil)).Elem()
}
func (i ApiKeyMap) ToApiKeyMapOutput() ApiKeyMapOutput {
return i.ToApiKeyMapOutputWithContext(context.Background())
}
func (i ApiKeyMap) ToApiKeyMapOutputWithContext(ctx context.Context) ApiKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiKeyMapOutput)
}
type ApiKeyOutput struct{ *pulumi.OutputState }
func (ApiKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiKey)(nil)).Elem()
}
func (o ApiKeyOutput) ToApiKeyOutput() ApiKeyOutput {
return o
}
func (o ApiKeyOutput) ToApiKeyOutputWithContext(ctx context.Context) ApiKeyOutput {
return o
}
// The RFC3339 formatted date-time after which this Dataplane API Key is no longer valid. The maximum value is now+2y.
func (o ApiKeyOutput) EndDateTime() pulumi.StringOutput {
return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.EndDateTime }).(pulumi.StringOutput)
}
// The first three characters of the secret text to help identify it in use.
func (o ApiKeyOutput) Hint() pulumi.StringOutput {
return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.Hint }).(pulumi.StringOutput)
}
// The name of the NGINX Dataplane API Key. Changing this forces a new resource to be created.
func (o ApiKeyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the NGINX Deployment that the API key is associated with. Changing this forces a new resource to be created.
func (o ApiKeyOutput) NginxDeploymentId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.NginxDeploymentId }).(pulumi.StringOutput)
}
// The value used as the Dataplane API Key. The API key requirements can be found in the [NGINXaaS Documentation](https://docs.nginx.com/nginxaas/azure/quickstart/loadbalancer-kubernetes/#create-an-nginxaas-data-plane-api-key).
func (o ApiKeyOutput) SecretText() pulumi.StringOutput {
return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.SecretText }).(pulumi.StringOutput)
}
type ApiKeyArrayOutput struct{ *pulumi.OutputState }
func (ApiKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiKey)(nil)).Elem()
}
func (o ApiKeyArrayOutput) ToApiKeyArrayOutput() ApiKeyArrayOutput {
return o
}
func (o ApiKeyArrayOutput) ToApiKeyArrayOutputWithContext(ctx context.Context) ApiKeyArrayOutput {
return o
}
func (o ApiKeyArrayOutput) Index(i pulumi.IntInput) ApiKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiKey {
return vs[0].([]*ApiKey)[vs[1].(int)]
}).(ApiKeyOutput)
}
type ApiKeyMapOutput struct{ *pulumi.OutputState }
func (ApiKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiKey)(nil)).Elem()
}
func (o ApiKeyMapOutput) ToApiKeyMapOutput() ApiKeyMapOutput {
return o
}
func (o ApiKeyMapOutput) ToApiKeyMapOutputWithContext(ctx context.Context) ApiKeyMapOutput {
return o
}
func (o ApiKeyMapOutput) MapIndex(k pulumi.StringInput) ApiKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiKey {
return vs[0].(map[string]*ApiKey)[vs[1].(string)]
}).(ApiKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiKeyInput)(nil)).Elem(), &ApiKey{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiKeyArrayInput)(nil)).Elem(), ApiKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiKeyMapInput)(nil)).Elem(), ApiKeyMap{})
pulumi.RegisterOutputType(ApiKeyOutput{})
pulumi.RegisterOutputType(ApiKeyArrayOutput{})
pulumi.RegisterOutputType(ApiKeyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/configuration.go | sdk/go/azure/nginx/configuration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the configuration for a Nginx Deployment.
//
// ## 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/nginx"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationMethod: pulumi.String("Static"),
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// 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"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("NGINX.NGINXPLUS/nginxDeployments"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleDeployment, err := nginx.NewDeployment(ctx, "example", &nginx.DeploymentArgs{
// Name: pulumi.String("example-nginx"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("publicpreview_Monthly_gmz7xq9ge3py"),
// Location: example.Location,
// DiagnoseSupportEnabled: pulumi.Bool(true),
// FrontendPublic: &nginx.DeploymentFrontendPublicArgs{
// IpAddresses: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// },
// NetworkInterfaces: nginx.DeploymentNetworkInterfaceArray{
// &nginx.DeploymentNetworkInterfaceArgs{
// SubnetId: exampleSubnet.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
// Input: `http {
// server {
// listen 80;
// location / {
// default_type text/html;
// return 200 '<!doctype html><html lang=\"en\"><head></head><body>
// <div>this one will be updated</div>
// <div>at 10:38 am</div>
// </body></html>';
// }
// include site/*.conf;
// }
// }
//
// `,
//
// }, nil)
// if err != nil {
// return err
// }
// invokeBase64encode1, err := std.Base64encode(ctx, &std.Base64encodeArgs{
// Input: `location /bbb {
// default_type text/html;
// return 200 '<!doctype html><html lang=\"en\"><head></head><body>
// <div>this one will be updated</div>
// <div>at 10:38 am</div>
// </body></html>';
// }
//
// `,
//
// }, nil)
// if err != nil {
// return err
// }
// _, err = nginx.NewConfiguration(ctx, "example", &nginx.ConfigurationArgs{
// NginxDeploymentId: exampleDeployment.ID(),
// RootFile: pulumi.String("/etc/nginx/nginx.conf"),
// ConfigFiles: nginx.ConfigurationConfigFileArray{
// &nginx.ConfigurationConfigFileArgs{
// Content: pulumi.String(invokeBase64encode.Result),
// VirtualPath: pulumi.String("/etc/nginx/nginx.conf"),
// },
// &nginx.ConfigurationConfigFileArgs{
// Content: pulumi.String(invokeBase64encode1.Result),
// VirtualPath: pulumi.String("/etc/nginx/site/b.conf"),
// },
// },
// })
// 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:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
//
// ## Import
//
// An Nginx Configuration can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:nginx/configuration:Configuration example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Nginx.NginxPlus/nginxDeployments/dep1/configurations/default
// ```
type Configuration struct {
pulumi.CustomResourceState
// One or more `configFile` blocks as defined below.
ConfigFiles ConfigurationConfigFileArrayOutput `pulumi:"configFiles"`
// The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
NginxDeploymentId pulumi.StringOutput `pulumi:"nginxDeploymentId"`
// Specifies the package data for this configuration.
PackageData pulumi.StringPtrOutput `pulumi:"packageData"`
// One or more `protectedFile` blocks with sensitive information as defined below. If specified `configFile` must also be specified.
ProtectedFiles ConfigurationProtectedFileArrayOutput `pulumi:"protectedFiles"`
// Specifies the root file path of this Nginx Configuration.
RootFile pulumi.StringOutput `pulumi:"rootFile"`
}
// NewConfiguration registers a new resource with the given unique name, arguments, and options.
func NewConfiguration(ctx *pulumi.Context,
name string, args *ConfigurationArgs, opts ...pulumi.ResourceOption) (*Configuration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NginxDeploymentId == nil {
return nil, errors.New("invalid value for required argument 'NginxDeploymentId'")
}
if args.RootFile == nil {
return nil, errors.New("invalid value for required argument 'RootFile'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Configuration
err := ctx.RegisterResource("azure:nginx/configuration:Configuration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConfiguration gets an existing Configuration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConfigurationState, opts ...pulumi.ResourceOption) (*Configuration, error) {
var resource Configuration
err := ctx.ReadResource("azure:nginx/configuration:Configuration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Configuration resources.
type configurationState struct {
// One or more `configFile` blocks as defined below.
ConfigFiles []ConfigurationConfigFile `pulumi:"configFiles"`
// The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
NginxDeploymentId *string `pulumi:"nginxDeploymentId"`
// Specifies the package data for this configuration.
PackageData *string `pulumi:"packageData"`
// One or more `protectedFile` blocks with sensitive information as defined below. If specified `configFile` must also be specified.
ProtectedFiles []ConfigurationProtectedFile `pulumi:"protectedFiles"`
// Specifies the root file path of this Nginx Configuration.
RootFile *string `pulumi:"rootFile"`
}
type ConfigurationState struct {
// One or more `configFile` blocks as defined below.
ConfigFiles ConfigurationConfigFileArrayInput
// The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
NginxDeploymentId pulumi.StringPtrInput
// Specifies the package data for this configuration.
PackageData pulumi.StringPtrInput
// One or more `protectedFile` blocks with sensitive information as defined below. If specified `configFile` must also be specified.
ProtectedFiles ConfigurationProtectedFileArrayInput
// Specifies the root file path of this Nginx Configuration.
RootFile pulumi.StringPtrInput
}
func (ConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*configurationState)(nil)).Elem()
}
type configurationArgs struct {
// One or more `configFile` blocks as defined below.
ConfigFiles []ConfigurationConfigFile `pulumi:"configFiles"`
// The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
// Specifies the package data for this configuration.
PackageData *string `pulumi:"packageData"`
// One or more `protectedFile` blocks with sensitive information as defined below. If specified `configFile` must also be specified.
ProtectedFiles []ConfigurationProtectedFile `pulumi:"protectedFiles"`
// Specifies the root file path of this Nginx Configuration.
RootFile string `pulumi:"rootFile"`
}
// The set of arguments for constructing a Configuration resource.
type ConfigurationArgs struct {
// One or more `configFile` blocks as defined below.
ConfigFiles ConfigurationConfigFileArrayInput
// The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
NginxDeploymentId pulumi.StringInput
// Specifies the package data for this configuration.
PackageData pulumi.StringPtrInput
// One or more `protectedFile` blocks with sensitive information as defined below. If specified `configFile` must also be specified.
ProtectedFiles ConfigurationProtectedFileArrayInput
// Specifies the root file path of this Nginx Configuration.
RootFile pulumi.StringInput
}
func (ConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*configurationArgs)(nil)).Elem()
}
type ConfigurationInput interface {
pulumi.Input
ToConfigurationOutput() ConfigurationOutput
ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput
}
func (*Configuration) ElementType() reflect.Type {
return reflect.TypeOf((**Configuration)(nil)).Elem()
}
func (i *Configuration) ToConfigurationOutput() ConfigurationOutput {
return i.ToConfigurationOutputWithContext(context.Background())
}
func (i *Configuration) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationOutput)
}
// ConfigurationArrayInput is an input type that accepts ConfigurationArray and ConfigurationArrayOutput values.
// You can construct a concrete instance of `ConfigurationArrayInput` via:
//
// ConfigurationArray{ ConfigurationArgs{...} }
type ConfigurationArrayInput interface {
pulumi.Input
ToConfigurationArrayOutput() ConfigurationArrayOutput
ToConfigurationArrayOutputWithContext(context.Context) ConfigurationArrayOutput
}
type ConfigurationArray []ConfigurationInput
func (ConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Configuration)(nil)).Elem()
}
func (i ConfigurationArray) ToConfigurationArrayOutput() ConfigurationArrayOutput {
return i.ToConfigurationArrayOutputWithContext(context.Background())
}
func (i ConfigurationArray) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationArrayOutput)
}
// ConfigurationMapInput is an input type that accepts ConfigurationMap and ConfigurationMapOutput values.
// You can construct a concrete instance of `ConfigurationMapInput` via:
//
// ConfigurationMap{ "key": ConfigurationArgs{...} }
type ConfigurationMapInput interface {
pulumi.Input
ToConfigurationMapOutput() ConfigurationMapOutput
ToConfigurationMapOutputWithContext(context.Context) ConfigurationMapOutput
}
type ConfigurationMap map[string]ConfigurationInput
func (ConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem()
}
func (i ConfigurationMap) ToConfigurationMapOutput() ConfigurationMapOutput {
return i.ToConfigurationMapOutputWithContext(context.Background())
}
func (i ConfigurationMap) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationMapOutput)
}
type ConfigurationOutput struct{ *pulumi.OutputState }
func (ConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Configuration)(nil)).Elem()
}
func (o ConfigurationOutput) ToConfigurationOutput() ConfigurationOutput {
return o
}
func (o ConfigurationOutput) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput {
return o
}
// One or more `configFile` blocks as defined below.
func (o ConfigurationOutput) ConfigFiles() ConfigurationConfigFileArrayOutput {
return o.ApplyT(func(v *Configuration) ConfigurationConfigFileArrayOutput { return v.ConfigFiles }).(ConfigurationConfigFileArrayOutput)
}
// The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
func (o ConfigurationOutput) NginxDeploymentId() pulumi.StringOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.NginxDeploymentId }).(pulumi.StringOutput)
}
// Specifies the package data for this configuration.
func (o ConfigurationOutput) PackageData() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringPtrOutput { return v.PackageData }).(pulumi.StringPtrOutput)
}
// One or more `protectedFile` blocks with sensitive information as defined below. If specified `configFile` must also be specified.
func (o ConfigurationOutput) ProtectedFiles() ConfigurationProtectedFileArrayOutput {
return o.ApplyT(func(v *Configuration) ConfigurationProtectedFileArrayOutput { return v.ProtectedFiles }).(ConfigurationProtectedFileArrayOutput)
}
// Specifies the root file path of this Nginx Configuration.
func (o ConfigurationOutput) RootFile() pulumi.StringOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.RootFile }).(pulumi.StringOutput)
}
type ConfigurationArrayOutput struct{ *pulumi.OutputState }
func (ConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Configuration)(nil)).Elem()
}
func (o ConfigurationArrayOutput) ToConfigurationArrayOutput() ConfigurationArrayOutput {
return o
}
func (o ConfigurationArrayOutput) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput {
return o
}
func (o ConfigurationArrayOutput) Index(i pulumi.IntInput) ConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Configuration {
return vs[0].([]*Configuration)[vs[1].(int)]
}).(ConfigurationOutput)
}
type ConfigurationMapOutput struct{ *pulumi.OutputState }
func (ConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem()
}
func (o ConfigurationMapOutput) ToConfigurationMapOutput() ConfigurationMapOutput {
return o
}
func (o ConfigurationMapOutput) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput {
return o
}
func (o ConfigurationMapOutput) MapIndex(k pulumi.StringInput) ConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Configuration {
return vs[0].(map[string]*Configuration)[vs[1].(string)]
}).(ConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationInput)(nil)).Elem(), &Configuration{})
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationArrayInput)(nil)).Elem(), ConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationMapInput)(nil)).Elem(), ConfigurationMap{})
pulumi.RegisterOutputType(ConfigurationOutput{})
pulumi.RegisterOutputType(ConfigurationArrayOutput{})
pulumi.RegisterOutputType(ConfigurationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/getApiKey.go | sdk/go/azure/nginx/getApiKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
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 NGINX Dataplane API Key.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := nginx.LookupApiKey(ctx, &nginx.LookupApiKeyArgs{
// Name: "existing",
// NginxDeploymentId: exampleAzurermNginxDeployment.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:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
func LookupApiKey(ctx *pulumi.Context, args *LookupApiKeyArgs, opts ...pulumi.InvokeOption) (*LookupApiKeyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupApiKeyResult
err := ctx.Invoke("azure:nginx/getApiKey:getApiKey", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApiKey.
type LookupApiKeyArgs struct {
// The name of the NGINX Dataplane API Key.
Name string `pulumi:"name"`
// The ID of the NGINX Deployment that the API key is associated with.
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
}
// A collection of values returned by getApiKey.
type LookupApiKeyResult struct {
// The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
EndDateTime string `pulumi:"endDateTime"`
// The first three characters of the secret text to help identify it in use.
Hint string `pulumi:"hint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
}
func LookupApiKeyOutput(ctx *pulumi.Context, args LookupApiKeyOutputArgs, opts ...pulumi.InvokeOption) LookupApiKeyResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupApiKeyResultOutput, error) {
args := v.(LookupApiKeyArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:nginx/getApiKey:getApiKey", args, LookupApiKeyResultOutput{}, options).(LookupApiKeyResultOutput), nil
}).(LookupApiKeyResultOutput)
}
// A collection of arguments for invoking getApiKey.
type LookupApiKeyOutputArgs struct {
// The name of the NGINX Dataplane API Key.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the NGINX Deployment that the API key is associated with.
NginxDeploymentId pulumi.StringInput `pulumi:"nginxDeploymentId"`
}
func (LookupApiKeyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApiKeyArgs)(nil)).Elem()
}
// A collection of values returned by getApiKey.
type LookupApiKeyResultOutput struct{ *pulumi.OutputState }
func (LookupApiKeyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApiKeyResult)(nil)).Elem()
}
func (o LookupApiKeyResultOutput) ToLookupApiKeyResultOutput() LookupApiKeyResultOutput {
return o
}
func (o LookupApiKeyResultOutput) ToLookupApiKeyResultOutputWithContext(ctx context.Context) LookupApiKeyResultOutput {
return o
}
// The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
func (o LookupApiKeyResultOutput) EndDateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiKeyResult) string { return v.EndDateTime }).(pulumi.StringOutput)
}
// The first three characters of the secret text to help identify it in use.
func (o LookupApiKeyResultOutput) Hint() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiKeyResult) string { return v.Hint }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupApiKeyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiKeyResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupApiKeyResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiKeyResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupApiKeyResultOutput) NginxDeploymentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiKeyResult) string { return v.NginxDeploymentId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupApiKeyResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/certificate.go | sdk/go/azure/nginx/certificate.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Certificate for an NGINX Deployment.
//
// ## 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/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationMethod: pulumi.String("Static"),
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// 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"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("NGINX.NGINXPLUS/nginxDeployments"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleDeployment, err := nginx.NewDeployment(ctx, "example", &nginx.DeploymentArgs{
// Name: pulumi.String("example-nginx"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("publicpreview_Monthly_gmz7xq9ge3py"),
// Location: example.Location,
// ManagedResourceGroup: pulumi.String("example"),
// DiagnoseSupportEnabled: pulumi.Bool(true),
// FrontendPublic: &nginx.DeploymentFrontendPublicArgs{
// IpAddresses: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// },
// NetworkInterfaces: nginx.DeploymentNetworkInterfaceArray{
// &nginx.DeploymentNetworkInterfaceArgs{
// SubnetId: exampleSubnet.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("examplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// CertificatePermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("DeleteIssuers"),
// pulumi.String("Get"),
// pulumi.String("GetIssuers"),
// pulumi.String("Import"),
// pulumi.String("List"),
// pulumi.String("ListIssuers"),
// pulumi.String("ManageContacts"),
// pulumi.String("ManageIssuers"),
// pulumi.String("SetIssuers"),
// pulumi.String("Update"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "certificate-to-import.pfx",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{
// Name: pulumi.String("imported-cert"),
// KeyVaultId: exampleKeyVault.ID(),
// Certificate: &keyvault.CertificateCertificateArgs{
// Contents: pulumi.String(invokeFilebase64.Result),
// Password: pulumi.String(""),
// },
// })
// if err != nil {
// return err
// }
// _, err = nginx.NewCertificate(ctx, "example", &nginx.CertificateArgs{
// Name: pulumi.String("examplecert"),
// NginxDeploymentId: exampleDeployment.ID(),
// KeyVirtualPath: pulumi.String("/src/cert/soservermekey.key"),
// CertificateVirtualPath: pulumi.String("/src/cert/server.cert"),
// KeyVaultSecretId: exampleCertificate.SecretId,
// })
// 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:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
//
// ## Import
//
// An NGINX Certificate can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:nginx/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Nginx.NginxPlus/nginxDeployments/deploy1/certificates/cer1
// ```
type Certificate struct {
pulumi.CustomResourceState
// Specify the path to the certificate file of this certificate.
CertificateVirtualPath pulumi.StringOutput `pulumi:"certificateVirtualPath"`
// Specify the ID of the Key Vault Secret for this certificate.
KeyVaultSecretId pulumi.StringOutput `pulumi:"keyVaultSecretId"`
// Specify the path to the key file of this certificate.
KeyVirtualPath pulumi.StringOutput `pulumi:"keyVirtualPath"`
// The name which should be used for this NGINX Certificate. Changing this forces a new NGINX Certificate to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the NGINX Deployment that this Certificate should be associated with. Changing this forces a new NGINX Certificate to be created.
NginxDeploymentId pulumi.StringOutput `pulumi:"nginxDeploymentId"`
}
// NewCertificate registers a new resource with the given unique name, arguments, and options.
func NewCertificate(ctx *pulumi.Context,
name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CertificateVirtualPath == nil {
return nil, errors.New("invalid value for required argument 'CertificateVirtualPath'")
}
if args.KeyVaultSecretId == nil {
return nil, errors.New("invalid value for required argument 'KeyVaultSecretId'")
}
if args.KeyVirtualPath == nil {
return nil, errors.New("invalid value for required argument 'KeyVirtualPath'")
}
if args.NginxDeploymentId == nil {
return nil, errors.New("invalid value for required argument 'NginxDeploymentId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Certificate
err := ctx.RegisterResource("azure:nginx/certificate:Certificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCertificate gets an existing Certificate resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error) {
var resource Certificate
err := ctx.ReadResource("azure:nginx/certificate:Certificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Certificate resources.
type certificateState struct {
// Specify the path to the certificate file of this certificate.
CertificateVirtualPath *string `pulumi:"certificateVirtualPath"`
// Specify the ID of the Key Vault Secret for this certificate.
KeyVaultSecretId *string `pulumi:"keyVaultSecretId"`
// Specify the path to the key file of this certificate.
KeyVirtualPath *string `pulumi:"keyVirtualPath"`
// The name which should be used for this NGINX Certificate. Changing this forces a new NGINX Certificate to be created.
Name *string `pulumi:"name"`
// The ID of the NGINX Deployment that this Certificate should be associated with. Changing this forces a new NGINX Certificate to be created.
NginxDeploymentId *string `pulumi:"nginxDeploymentId"`
}
type CertificateState struct {
// Specify the path to the certificate file of this certificate.
CertificateVirtualPath pulumi.StringPtrInput
// Specify the ID of the Key Vault Secret for this certificate.
KeyVaultSecretId pulumi.StringPtrInput
// Specify the path to the key file of this certificate.
KeyVirtualPath pulumi.StringPtrInput
// The name which should be used for this NGINX Certificate. Changing this forces a new NGINX Certificate to be created.
Name pulumi.StringPtrInput
// The ID of the NGINX Deployment that this Certificate should be associated with. Changing this forces a new NGINX Certificate to be created.
NginxDeploymentId pulumi.StringPtrInput
}
func (CertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*certificateState)(nil)).Elem()
}
type certificateArgs struct {
// Specify the path to the certificate file of this certificate.
CertificateVirtualPath string `pulumi:"certificateVirtualPath"`
// Specify the ID of the Key Vault Secret for this certificate.
KeyVaultSecretId string `pulumi:"keyVaultSecretId"`
// Specify the path to the key file of this certificate.
KeyVirtualPath string `pulumi:"keyVirtualPath"`
// The name which should be used for this NGINX Certificate. Changing this forces a new NGINX Certificate to be created.
Name *string `pulumi:"name"`
// The ID of the NGINX Deployment that this Certificate should be associated with. Changing this forces a new NGINX Certificate to be created.
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
}
// The set of arguments for constructing a Certificate resource.
type CertificateArgs struct {
// Specify the path to the certificate file of this certificate.
CertificateVirtualPath pulumi.StringInput
// Specify the ID of the Key Vault Secret for this certificate.
KeyVaultSecretId pulumi.StringInput
// Specify the path to the key file of this certificate.
KeyVirtualPath pulumi.StringInput
// The name which should be used for this NGINX Certificate. Changing this forces a new NGINX Certificate to be created.
Name pulumi.StringPtrInput
// The ID of the NGINX Deployment that this Certificate should be associated with. Changing this forces a new NGINX Certificate to be created.
NginxDeploymentId pulumi.StringInput
}
func (CertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*certificateArgs)(nil)).Elem()
}
type CertificateInput interface {
pulumi.Input
ToCertificateOutput() CertificateOutput
ToCertificateOutputWithContext(ctx context.Context) CertificateOutput
}
func (*Certificate) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (i *Certificate) ToCertificateOutput() CertificateOutput {
return i.ToCertificateOutputWithContext(context.Background())
}
func (i *Certificate) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateOutput)
}
// CertificateArrayInput is an input type that accepts CertificateArray and CertificateArrayOutput values.
// You can construct a concrete instance of `CertificateArrayInput` via:
//
// CertificateArray{ CertificateArgs{...} }
type CertificateArrayInput interface {
pulumi.Input
ToCertificateArrayOutput() CertificateArrayOutput
ToCertificateArrayOutputWithContext(context.Context) CertificateArrayOutput
}
type CertificateArray []CertificateInput
func (CertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (i CertificateArray) ToCertificateArrayOutput() CertificateArrayOutput {
return i.ToCertificateArrayOutputWithContext(context.Background())
}
func (i CertificateArray) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateArrayOutput)
}
// CertificateMapInput is an input type that accepts CertificateMap and CertificateMapOutput values.
// You can construct a concrete instance of `CertificateMapInput` via:
//
// CertificateMap{ "key": CertificateArgs{...} }
type CertificateMapInput interface {
pulumi.Input
ToCertificateMapOutput() CertificateMapOutput
ToCertificateMapOutputWithContext(context.Context) CertificateMapOutput
}
type CertificateMap map[string]CertificateInput
func (CertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (i CertificateMap) ToCertificateMapOutput() CertificateMapOutput {
return i.ToCertificateMapOutputWithContext(context.Background())
}
func (i CertificateMap) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateMapOutput)
}
type CertificateOutput struct{ *pulumi.OutputState }
func (CertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (o CertificateOutput) ToCertificateOutput() CertificateOutput {
return o
}
func (o CertificateOutput) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return o
}
// Specify the path to the certificate file of this certificate.
func (o CertificateOutput) CertificateVirtualPath() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.CertificateVirtualPath }).(pulumi.StringOutput)
}
// Specify the ID of the Key Vault Secret for this certificate.
func (o CertificateOutput) KeyVaultSecretId() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.KeyVaultSecretId }).(pulumi.StringOutput)
}
// Specify the path to the key file of this certificate.
func (o CertificateOutput) KeyVirtualPath() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.KeyVirtualPath }).(pulumi.StringOutput)
}
// The name which should be used for this NGINX Certificate. Changing this forces a new NGINX Certificate to be created.
func (o CertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the NGINX Deployment that this Certificate should be associated with. Changing this forces a new NGINX Certificate to be created.
func (o CertificateOutput) NginxDeploymentId() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.NginxDeploymentId }).(pulumi.StringOutput)
}
type CertificateArrayOutput struct{ *pulumi.OutputState }
func (CertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (o CertificateArrayOutput) ToCertificateArrayOutput() CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) Index(i pulumi.IntInput) CertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].([]*Certificate)[vs[1].(int)]
}).(CertificateOutput)
}
type CertificateMapOutput struct{ *pulumi.OutputState }
func (CertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (o CertificateMapOutput) ToCertificateMapOutput() CertificateMapOutput {
return o
}
func (o CertificateMapOutput) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return o
}
func (o CertificateMapOutput) MapIndex(k pulumi.StringInput) CertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].(map[string]*Certificate)[vs[1].(string)]
}).(CertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CertificateInput)(nil)).Elem(), &Certificate{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateArrayInput)(nil)).Elem(), CertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateMapInput)(nil)).Elem(), CertificateMap{})
pulumi.RegisterOutputType(CertificateOutput{})
pulumi.RegisterOutputType(CertificateArrayOutput{})
pulumi.RegisterOutputType(CertificateMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/deployment.go | sdk/go/azure/nginx/deployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an NGINX Deployment.
//
// ## 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/nginx"
// "github.com/pulumi/pulumi/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
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationMethod: pulumi.String("Static"),
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// 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"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("NGINX.NGINXPLUS/nginxDeployments"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = nginx.NewDeployment(ctx, "example", &nginx.DeploymentArgs{
// Name: pulumi.String("example-nginx"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("standardv2_Monthly"),
// Location: example.Location,
// DiagnoseSupportEnabled: pulumi.Bool(true),
// AutomaticUpgradeChannel: pulumi.String("stable"),
// FrontendPublic: &nginx.DeploymentFrontendPublicArgs{
// IpAddresses: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// },
// NetworkInterfaces: nginx.DeploymentNetworkInterfaceArray{
// &nginx.DeploymentNetworkInterfaceArgs{
// SubnetId: exampleSubnet.ID(),
// },
// },
// Capacity: pulumi.Int(20),
// Email: pulumi.String("user@test.com"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
//
// ## Import
//
// NGINX Deployments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:nginx/deployment:Deployment example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Nginx.NginxPlus/nginxDeployments/dep1
// ```
type Deployment struct {
pulumi.CustomResourceState
// An `autoScaleProfile` block as defined below.
AutoScaleProfiles DeploymentAutoScaleProfileArrayOutput `pulumi:"autoScaleProfiles"`
// Specify the automatic upgrade channel for the NGINX deployment. Defaults to `stable`. The possible values are `stable` and `preview`.
AutomaticUpgradeChannel pulumi.StringPtrOutput `pulumi:"automaticUpgradeChannel"`
// Specify the number of NGINX capacity units for this NGINX deployment.
//
// > **Note:** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/)
Capacity pulumi.IntPtrOutput `pulumi:"capacity"`
// The dataplane API endpoint of the NGINX Deployment.
DataplaneApiEndpoint pulumi.StringOutput `pulumi:"dataplaneApiEndpoint"`
// Should the metrics be exported to Azure Monitor?
DiagnoseSupportEnabled pulumi.BoolPtrOutput `pulumi:"diagnoseSupportEnabled"`
// Specify the preferred support contact email address for receiving alerts and notifications.
Email pulumi.StringPtrOutput `pulumi:"email"`
// One or more `frontendPrivate` blocks as defined below.
FrontendPrivates DeploymentFrontendPrivateArrayOutput `pulumi:"frontendPrivates"`
// A `frontendPublic` block as defined below.
FrontendPublic DeploymentFrontendPublicPtrOutput `pulumi:"frontendPublic"`
// An `identity` block as defined below.
Identity DeploymentIdentityPtrOutput `pulumi:"identity"`
// The IP address of the NGINX Deployment.
IpAddress pulumi.StringOutput `pulumi:"ipAddress"`
// The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider. To enable logs, use the `monitoring.DiagnosticSetting` resource instead.
LoggingStorageAccounts DeploymentLoggingStorageAccountArrayOutput `pulumi:"loggingStorageAccounts"`
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
ManagedResourceGroup pulumi.StringOutput `pulumi:"managedResourceGroup"`
// The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `networkInterface` blocks as defined below.
NetworkInterfaces DeploymentNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"`
// The version of the NGINX Deployment.
NginxVersion pulumi.StringOutput `pulumi:"nginxVersion"`
// The name of the Resource Group where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
Sku pulumi.StringOutput `pulumi:"sku"`
// A mapping of tags which should be assigned to the NGINX Deployment.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `webApplicationFirewall` blocks as defined below.
WebApplicationFirewall DeploymentWebApplicationFirewallPtrOutput `pulumi:"webApplicationFirewall"`
}
// NewDeployment registers a new resource with the given unique name, arguments, and options.
func NewDeployment(ctx *pulumi.Context,
name string, args *DeploymentArgs, opts ...pulumi.ResourceOption) (*Deployment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Deployment
err := ctx.RegisterResource("azure:nginx/deployment:Deployment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDeployment gets an existing Deployment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDeployment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DeploymentState, opts ...pulumi.ResourceOption) (*Deployment, error) {
var resource Deployment
err := ctx.ReadResource("azure:nginx/deployment:Deployment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Deployment resources.
type deploymentState struct {
// An `autoScaleProfile` block as defined below.
AutoScaleProfiles []DeploymentAutoScaleProfile `pulumi:"autoScaleProfiles"`
// Specify the automatic upgrade channel for the NGINX deployment. Defaults to `stable`. The possible values are `stable` and `preview`.
AutomaticUpgradeChannel *string `pulumi:"automaticUpgradeChannel"`
// Specify the number of NGINX capacity units for this NGINX deployment.
//
// > **Note:** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/)
Capacity *int `pulumi:"capacity"`
// The dataplane API endpoint of the NGINX Deployment.
DataplaneApiEndpoint *string `pulumi:"dataplaneApiEndpoint"`
// Should the metrics be exported to Azure Monitor?
DiagnoseSupportEnabled *bool `pulumi:"diagnoseSupportEnabled"`
// Specify the preferred support contact email address for receiving alerts and notifications.
Email *string `pulumi:"email"`
// One or more `frontendPrivate` blocks as defined below.
FrontendPrivates []DeploymentFrontendPrivate `pulumi:"frontendPrivates"`
// A `frontendPublic` block as defined below.
FrontendPublic *DeploymentFrontendPublic `pulumi:"frontendPublic"`
// An `identity` block as defined below.
Identity *DeploymentIdentity `pulumi:"identity"`
// The IP address of the NGINX Deployment.
IpAddress *string `pulumi:"ipAddress"`
// The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
Location *string `pulumi:"location"`
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider. To enable logs, use the `monitoring.DiagnosticSetting` resource instead.
LoggingStorageAccounts []DeploymentLoggingStorageAccount `pulumi:"loggingStorageAccounts"`
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
ManagedResourceGroup *string `pulumi:"managedResourceGroup"`
// The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created.
Name *string `pulumi:"name"`
// One or more `networkInterface` blocks as defined below.
NetworkInterfaces []DeploymentNetworkInterface `pulumi:"networkInterfaces"`
// The version of the NGINX Deployment.
NginxVersion *string `pulumi:"nginxVersion"`
// The name of the Resource Group where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
Sku *string `pulumi:"sku"`
// A mapping of tags which should be assigned to the NGINX Deployment.
Tags map[string]string `pulumi:"tags"`
// A `webApplicationFirewall` blocks as defined below.
WebApplicationFirewall *DeploymentWebApplicationFirewall `pulumi:"webApplicationFirewall"`
}
type DeploymentState struct {
// An `autoScaleProfile` block as defined below.
AutoScaleProfiles DeploymentAutoScaleProfileArrayInput
// Specify the automatic upgrade channel for the NGINX deployment. Defaults to `stable`. The possible values are `stable` and `preview`.
AutomaticUpgradeChannel pulumi.StringPtrInput
// Specify the number of NGINX capacity units for this NGINX deployment.
//
// > **Note:** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/)
Capacity pulumi.IntPtrInput
// The dataplane API endpoint of the NGINX Deployment.
DataplaneApiEndpoint pulumi.StringPtrInput
// Should the metrics be exported to Azure Monitor?
DiagnoseSupportEnabled pulumi.BoolPtrInput
// Specify the preferred support contact email address for receiving alerts and notifications.
Email pulumi.StringPtrInput
// One or more `frontendPrivate` blocks as defined below.
FrontendPrivates DeploymentFrontendPrivateArrayInput
// A `frontendPublic` block as defined below.
FrontendPublic DeploymentFrontendPublicPtrInput
// An `identity` block as defined below.
Identity DeploymentIdentityPtrInput
// The IP address of the NGINX Deployment.
IpAddress pulumi.StringPtrInput
// The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
Location pulumi.StringPtrInput
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider. To enable logs, use the `monitoring.DiagnosticSetting` resource instead.
LoggingStorageAccounts DeploymentLoggingStorageAccountArrayInput
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
ManagedResourceGroup pulumi.StringPtrInput
// The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created.
Name pulumi.StringPtrInput
// One or more `networkInterface` blocks as defined below.
NetworkInterfaces DeploymentNetworkInterfaceArrayInput
// The version of the NGINX Deployment.
NginxVersion pulumi.StringPtrInput
// The name of the Resource Group where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
ResourceGroupName pulumi.StringPtrInput
Sku pulumi.StringPtrInput
// A mapping of tags which should be assigned to the NGINX Deployment.
Tags pulumi.StringMapInput
// A `webApplicationFirewall` blocks as defined below.
WebApplicationFirewall DeploymentWebApplicationFirewallPtrInput
}
func (DeploymentState) ElementType() reflect.Type {
return reflect.TypeOf((*deploymentState)(nil)).Elem()
}
type deploymentArgs struct {
// An `autoScaleProfile` block as defined below.
AutoScaleProfiles []DeploymentAutoScaleProfile `pulumi:"autoScaleProfiles"`
// Specify the automatic upgrade channel for the NGINX deployment. Defaults to `stable`. The possible values are `stable` and `preview`.
AutomaticUpgradeChannel *string `pulumi:"automaticUpgradeChannel"`
// Specify the number of NGINX capacity units for this NGINX deployment.
//
// > **Note:** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/)
Capacity *int `pulumi:"capacity"`
// Should the metrics be exported to Azure Monitor?
DiagnoseSupportEnabled *bool `pulumi:"diagnoseSupportEnabled"`
// Specify the preferred support contact email address for receiving alerts and notifications.
Email *string `pulumi:"email"`
// One or more `frontendPrivate` blocks as defined below.
FrontendPrivates []DeploymentFrontendPrivate `pulumi:"frontendPrivates"`
// A `frontendPublic` block as defined below.
FrontendPublic *DeploymentFrontendPublic `pulumi:"frontendPublic"`
// An `identity` block as defined below.
Identity *DeploymentIdentity `pulumi:"identity"`
// The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
Location *string `pulumi:"location"`
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider. To enable logs, use the `monitoring.DiagnosticSetting` resource instead.
LoggingStorageAccounts []DeploymentLoggingStorageAccount `pulumi:"loggingStorageAccounts"`
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
ManagedResourceGroup *string `pulumi:"managedResourceGroup"`
// The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created.
Name *string `pulumi:"name"`
// One or more `networkInterface` blocks as defined below.
NetworkInterfaces []DeploymentNetworkInterface `pulumi:"networkInterfaces"`
// The name of the Resource Group where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
Sku string `pulumi:"sku"`
// A mapping of tags which should be assigned to the NGINX Deployment.
Tags map[string]string `pulumi:"tags"`
// A `webApplicationFirewall` blocks as defined below.
WebApplicationFirewall *DeploymentWebApplicationFirewall `pulumi:"webApplicationFirewall"`
}
// The set of arguments for constructing a Deployment resource.
type DeploymentArgs struct {
// An `autoScaleProfile` block as defined below.
AutoScaleProfiles DeploymentAutoScaleProfileArrayInput
// Specify the automatic upgrade channel for the NGINX deployment. Defaults to `stable`. The possible values are `stable` and `preview`.
AutomaticUpgradeChannel pulumi.StringPtrInput
// Specify the number of NGINX capacity units for this NGINX deployment.
//
// > **Note:** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/)
Capacity pulumi.IntPtrInput
// Should the metrics be exported to Azure Monitor?
DiagnoseSupportEnabled pulumi.BoolPtrInput
// Specify the preferred support contact email address for receiving alerts and notifications.
Email pulumi.StringPtrInput
// One or more `frontendPrivate` blocks as defined below.
FrontendPrivates DeploymentFrontendPrivateArrayInput
// A `frontendPublic` block as defined below.
FrontendPublic DeploymentFrontendPublicPtrInput
// An `identity` block as defined below.
Identity DeploymentIdentityPtrInput
// The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
Location pulumi.StringPtrInput
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider. To enable logs, use the `monitoring.DiagnosticSetting` resource instead.
LoggingStorageAccounts DeploymentLoggingStorageAccountArrayInput
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
ManagedResourceGroup pulumi.StringPtrInput
// The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created.
Name pulumi.StringPtrInput
// One or more `networkInterface` blocks as defined below.
NetworkInterfaces DeploymentNetworkInterfaceArrayInput
// The name of the Resource Group where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
ResourceGroupName pulumi.StringInput
Sku pulumi.StringInput
// A mapping of tags which should be assigned to the NGINX Deployment.
Tags pulumi.StringMapInput
// A `webApplicationFirewall` blocks as defined below.
WebApplicationFirewall DeploymentWebApplicationFirewallPtrInput
}
func (DeploymentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*deploymentArgs)(nil)).Elem()
}
type DeploymentInput interface {
pulumi.Input
ToDeploymentOutput() DeploymentOutput
ToDeploymentOutputWithContext(ctx context.Context) DeploymentOutput
}
func (*Deployment) ElementType() reflect.Type {
return reflect.TypeOf((**Deployment)(nil)).Elem()
}
func (i *Deployment) ToDeploymentOutput() DeploymentOutput {
return i.ToDeploymentOutputWithContext(context.Background())
}
func (i *Deployment) ToDeploymentOutputWithContext(ctx context.Context) DeploymentOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentOutput)
}
// DeploymentArrayInput is an input type that accepts DeploymentArray and DeploymentArrayOutput values.
// You can construct a concrete instance of `DeploymentArrayInput` via:
//
// DeploymentArray{ DeploymentArgs{...} }
type DeploymentArrayInput interface {
pulumi.Input
ToDeploymentArrayOutput() DeploymentArrayOutput
ToDeploymentArrayOutputWithContext(context.Context) DeploymentArrayOutput
}
type DeploymentArray []DeploymentInput
func (DeploymentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Deployment)(nil)).Elem()
}
func (i DeploymentArray) ToDeploymentArrayOutput() DeploymentArrayOutput {
return i.ToDeploymentArrayOutputWithContext(context.Background())
}
func (i DeploymentArray) ToDeploymentArrayOutputWithContext(ctx context.Context) DeploymentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentArrayOutput)
}
// DeploymentMapInput is an input type that accepts DeploymentMap and DeploymentMapOutput values.
// You can construct a concrete instance of `DeploymentMapInput` via:
//
// DeploymentMap{ "key": DeploymentArgs{...} }
type DeploymentMapInput interface {
pulumi.Input
ToDeploymentMapOutput() DeploymentMapOutput
ToDeploymentMapOutputWithContext(context.Context) DeploymentMapOutput
}
type DeploymentMap map[string]DeploymentInput
func (DeploymentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Deployment)(nil)).Elem()
}
func (i DeploymentMap) ToDeploymentMapOutput() DeploymentMapOutput {
return i.ToDeploymentMapOutputWithContext(context.Background())
}
func (i DeploymentMap) ToDeploymentMapOutputWithContext(ctx context.Context) DeploymentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentMapOutput)
}
type DeploymentOutput struct{ *pulumi.OutputState }
func (DeploymentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Deployment)(nil)).Elem()
}
func (o DeploymentOutput) ToDeploymentOutput() DeploymentOutput {
return o
}
func (o DeploymentOutput) ToDeploymentOutputWithContext(ctx context.Context) DeploymentOutput {
return o
}
// An `autoScaleProfile` block as defined below.
func (o DeploymentOutput) AutoScaleProfiles() DeploymentAutoScaleProfileArrayOutput {
return o.ApplyT(func(v *Deployment) DeploymentAutoScaleProfileArrayOutput { return v.AutoScaleProfiles }).(DeploymentAutoScaleProfileArrayOutput)
}
// Specify the automatic upgrade channel for the NGINX deployment. Defaults to `stable`. The possible values are `stable` and `preview`.
func (o DeploymentOutput) AutomaticUpgradeChannel() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringPtrOutput { return v.AutomaticUpgradeChannel }).(pulumi.StringPtrOutput)
}
// Specify the number of NGINX capacity units for this NGINX deployment.
//
// > **Note:** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/)
func (o DeploymentOutput) Capacity() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Deployment) pulumi.IntPtrOutput { return v.Capacity }).(pulumi.IntPtrOutput)
}
// The dataplane API endpoint of the NGINX Deployment.
func (o DeploymentOutput) DataplaneApiEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.DataplaneApiEndpoint }).(pulumi.StringOutput)
}
// Should the metrics be exported to Azure Monitor?
func (o DeploymentOutput) DiagnoseSupportEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Deployment) pulumi.BoolPtrOutput { return v.DiagnoseSupportEnabled }).(pulumi.BoolPtrOutput)
}
// Specify the preferred support contact email address for receiving alerts and notifications.
func (o DeploymentOutput) Email() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringPtrOutput { return v.Email }).(pulumi.StringPtrOutput)
}
// One or more `frontendPrivate` blocks as defined below.
func (o DeploymentOutput) FrontendPrivates() DeploymentFrontendPrivateArrayOutput {
return o.ApplyT(func(v *Deployment) DeploymentFrontendPrivateArrayOutput { return v.FrontendPrivates }).(DeploymentFrontendPrivateArrayOutput)
}
// A `frontendPublic` block as defined below.
func (o DeploymentOutput) FrontendPublic() DeploymentFrontendPublicPtrOutput {
return o.ApplyT(func(v *Deployment) DeploymentFrontendPublicPtrOutput { return v.FrontendPublic }).(DeploymentFrontendPublicPtrOutput)
}
// An `identity` block as defined below.
func (o DeploymentOutput) Identity() DeploymentIdentityPtrOutput {
return o.ApplyT(func(v *Deployment) DeploymentIdentityPtrOutput { return v.Identity }).(DeploymentIdentityPtrOutput)
}
// The IP address of the NGINX Deployment.
func (o DeploymentOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.IpAddress }).(pulumi.StringOutput)
}
// The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
func (o DeploymentOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Deprecated: The `loggingStorageAccount` block has been deprecated and will be removed in v5.0 of the AzureRM Provider. To enable logs, use the `monitoring.DiagnosticSetting` resource instead.
func (o DeploymentOutput) LoggingStorageAccounts() DeploymentLoggingStorageAccountArrayOutput {
return o.ApplyT(func(v *Deployment) DeploymentLoggingStorageAccountArrayOutput { return v.LoggingStorageAccounts }).(DeploymentLoggingStorageAccountArrayOutput)
}
// Deprecated: The `managedResourceGroup` field isn't supported by the API anymore and has been deprecated and will be removed in v5.0 of the AzureRM Provider.
func (o DeploymentOutput) ManagedResourceGroup() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.ManagedResourceGroup }).(pulumi.StringOutput)
}
// The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created.
func (o DeploymentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `networkInterface` blocks as defined below.
func (o DeploymentOutput) NetworkInterfaces() DeploymentNetworkInterfaceArrayOutput {
return o.ApplyT(func(v *Deployment) DeploymentNetworkInterfaceArrayOutput { return v.NetworkInterfaces }).(DeploymentNetworkInterfaceArrayOutput)
}
// The version of the NGINX Deployment.
func (o DeploymentOutput) NginxVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.NginxVersion }).(pulumi.StringOutput)
}
// The name of the Resource Group where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created.
func (o DeploymentOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o DeploymentOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the NGINX Deployment.
func (o DeploymentOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A `webApplicationFirewall` blocks as defined below.
func (o DeploymentOutput) WebApplicationFirewall() DeploymentWebApplicationFirewallPtrOutput {
return o.ApplyT(func(v *Deployment) DeploymentWebApplicationFirewallPtrOutput { return v.WebApplicationFirewall }).(DeploymentWebApplicationFirewallPtrOutput)
}
type DeploymentArrayOutput struct{ *pulumi.OutputState }
func (DeploymentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Deployment)(nil)).Elem()
}
func (o DeploymentArrayOutput) ToDeploymentArrayOutput() DeploymentArrayOutput {
return o
}
func (o DeploymentArrayOutput) ToDeploymentArrayOutputWithContext(ctx context.Context) DeploymentArrayOutput {
return o
}
func (o DeploymentArrayOutput) Index(i pulumi.IntInput) DeploymentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Deployment {
return vs[0].([]*Deployment)[vs[1].(int)]
}).(DeploymentOutput)
}
type DeploymentMapOutput struct{ *pulumi.OutputState }
func (DeploymentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Deployment)(nil)).Elem()
}
func (o DeploymentMapOutput) ToDeploymentMapOutput() DeploymentMapOutput {
return o
}
func (o DeploymentMapOutput) ToDeploymentMapOutputWithContext(ctx context.Context) DeploymentMapOutput {
return o
}
func (o DeploymentMapOutput) MapIndex(k pulumi.StringInput) DeploymentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Deployment {
return vs[0].(map[string]*Deployment)[vs[1].(string)]
}).(DeploymentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DeploymentInput)(nil)).Elem(), &Deployment{})
pulumi.RegisterInputType(reflect.TypeOf((*DeploymentArrayInput)(nil)).Elem(), DeploymentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DeploymentMapInput)(nil)).Elem(), DeploymentMap{})
pulumi.RegisterOutputType(DeploymentOutput{})
pulumi.RegisterOutputType(DeploymentArrayOutput{})
pulumi.RegisterOutputType(DeploymentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/nginx/getCertificate.go | sdk/go/azure/nginx/getCertificate.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nginx
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 NGINX Certificate.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := nginx.LookupCertificate(ctx, &nginx.LookupCertificateArgs{
// Name: "existing",
// NginxDeploymentId: exampleAzurermNginxDeployment.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:
//
// * `Nginx.NginxPlus` - 2024-11-01-preview
func LookupCertificate(ctx *pulumi.Context, args *LookupCertificateArgs, opts ...pulumi.InvokeOption) (*LookupCertificateResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupCertificateResult
err := ctx.Invoke("azure:nginx/getCertificate:getCertificate", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCertificate.
type LookupCertificateArgs struct {
// The name of the NGINX Certificate.
Name string `pulumi:"name"`
// The ID of the NGINX Deployment that the certificate is associated with.
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
}
// A collection of values returned by getCertificate.
type LookupCertificateResult struct {
// The path to the certificate file of the certificate.
CertificateVirtualPath string `pulumi:"certificateVirtualPath"`
// The error code of the certificate error, if any.
ErrorCode string `pulumi:"errorCode"`
// The error message of the certificate error, if any.
ErrorMessage string `pulumi:"errorMessage"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The date/time the certificate was created in Azure Key Vault.
KeyVaultSecretCreationDate string `pulumi:"keyVaultSecretCreationDate"`
// The ID of the Key Vault Secret for the certificate.
KeyVaultSecretId string `pulumi:"keyVaultSecretId"`
// The version of the certificate.
KeyVaultSecretVersion string `pulumi:"keyVaultSecretVersion"`
// The path to the key file of the certificate.
KeyVirtualPath string `pulumi:"keyVirtualPath"`
Name string `pulumi:"name"`
NginxDeploymentId string `pulumi:"nginxDeploymentId"`
// The SHA-1 thumbprint of the certificate.
Sha1Thumbprint string `pulumi:"sha1Thumbprint"`
}
func LookupCertificateOutput(ctx *pulumi.Context, args LookupCertificateOutputArgs, opts ...pulumi.InvokeOption) LookupCertificateResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupCertificateResultOutput, error) {
args := v.(LookupCertificateArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:nginx/getCertificate:getCertificate", args, LookupCertificateResultOutput{}, options).(LookupCertificateResultOutput), nil
}).(LookupCertificateResultOutput)
}
// A collection of arguments for invoking getCertificate.
type LookupCertificateOutputArgs struct {
// The name of the NGINX Certificate.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the NGINX Deployment that the certificate is associated with.
NginxDeploymentId pulumi.StringInput `pulumi:"nginxDeploymentId"`
}
func (LookupCertificateOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCertificateArgs)(nil)).Elem()
}
// A collection of values returned by getCertificate.
type LookupCertificateResultOutput struct{ *pulumi.OutputState }
func (LookupCertificateResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCertificateResult)(nil)).Elem()
}
func (o LookupCertificateResultOutput) ToLookupCertificateResultOutput() LookupCertificateResultOutput {
return o
}
func (o LookupCertificateResultOutput) ToLookupCertificateResultOutputWithContext(ctx context.Context) LookupCertificateResultOutput {
return o
}
// The path to the certificate file of the certificate.
func (o LookupCertificateResultOutput) CertificateVirtualPath() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateVirtualPath }).(pulumi.StringOutput)
}
// The error code of the certificate error, if any.
func (o LookupCertificateResultOutput) ErrorCode() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.ErrorCode }).(pulumi.StringOutput)
}
// The error message of the certificate error, if any.
func (o LookupCertificateResultOutput) ErrorMessage() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.ErrorMessage }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupCertificateResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.Id }).(pulumi.StringOutput)
}
// The date/time the certificate was created in Azure Key Vault.
func (o LookupCertificateResultOutput) KeyVaultSecretCreationDate() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.KeyVaultSecretCreationDate }).(pulumi.StringOutput)
}
// The ID of the Key Vault Secret for the certificate.
func (o LookupCertificateResultOutput) KeyVaultSecretId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.KeyVaultSecretId }).(pulumi.StringOutput)
}
// The version of the certificate.
func (o LookupCertificateResultOutput) KeyVaultSecretVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.KeyVaultSecretVersion }).(pulumi.StringOutput)
}
// The path to the key file of the certificate.
func (o LookupCertificateResultOutput) KeyVirtualPath() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.KeyVirtualPath }).(pulumi.StringOutput)
}
func (o LookupCertificateResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupCertificateResultOutput) NginxDeploymentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.NginxDeploymentId }).(pulumi.StringOutput)
}
// The SHA-1 thumbprint of the certificate.
func (o LookupCertificateResultOutput) Sha1Thumbprint() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.Sha1Thumbprint }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupCertificateResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/hpc/init.go | sdk/go/azure/hpc/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 hpc
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:hpc/cache:Cache":
r = &Cache{}
case "azure:hpc/cacheAccessPolicy:CacheAccessPolicy":
r = &CacheAccessPolicy{}
case "azure:hpc/cacheBlobNfsTarget:CacheBlobNfsTarget":
r = &CacheBlobNfsTarget{}
case "azure:hpc/cacheBlobTarget:CacheBlobTarget":
r = &CacheBlobTarget{}
case "azure:hpc/cacheNfsTarget:CacheNfsTarget":
r = &CacheNfsTarget{}
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",
"hpc/cache",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"hpc/cacheAccessPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"hpc/cacheBlobNfsTarget",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"hpc/cacheBlobTarget",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"hpc/cacheNfsTarget",
&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/hpc/cacheBlobNfsTarget.go | sdk/go/azure/hpc/cacheBlobNfsTarget.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package hpc
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 NFSv3 Target within a HPC Cache.
//
// !> **Note:** The `hpc.CacheBlobNfsTarget` resource has been deprecated because the service is retiring on 2025-09-30. This resource will be removed in v5.0 of the AzureRM Provider. See https://aka.ms/hpccacheretirement for more information.
//
// > **Note:** By request of the service team the provider no longer automatically registers the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace 'Microsoft.StorageCache'`.
//
// > **Note:** This resource depends on the NFSv3 enabled Storage Account, which has some prerequisites need to meet. Please checkout: <https://docs.microsoft.com/azure/storage/blobs/network-file-system-protocol-support-how-to?tabs=azure-powershell>.
//
// ## Import
//
// HPC Cache Blob NFS Targets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:hpc/cacheBlobNfsTarget:CacheBlobNfsTarget example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/storageTargets/target1
// ```
type CacheBlobNfsTarget struct {
pulumi.CustomResourceState
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName pulumi.StringPtrOutput `pulumi:"accessPolicyName"`
// The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
CacheName pulumi.StringOutput `pulumi:"cacheName"`
// The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The client-facing file path of the HPC Cache Blob NFS Target.
NamespacePath pulumi.StringOutput `pulumi:"namespacePath"`
// The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId pulumi.StringOutput `pulumi:"storageContainerId"`
// The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel pulumi.StringOutput `pulumi:"usageModel"`
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds pulumi.IntPtrOutput `pulumi:"verificationTimerInSeconds"`
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds pulumi.IntPtrOutput `pulumi:"writeBackTimerInSeconds"`
}
// NewCacheBlobNfsTarget registers a new resource with the given unique name, arguments, and options.
func NewCacheBlobNfsTarget(ctx *pulumi.Context,
name string, args *CacheBlobNfsTargetArgs, opts ...pulumi.ResourceOption) (*CacheBlobNfsTarget, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CacheName == nil {
return nil, errors.New("invalid value for required argument 'CacheName'")
}
if args.NamespacePath == nil {
return nil, errors.New("invalid value for required argument 'NamespacePath'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageContainerId == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerId'")
}
if args.UsageModel == nil {
return nil, errors.New("invalid value for required argument 'UsageModel'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CacheBlobNfsTarget
err := ctx.RegisterResource("azure:hpc/cacheBlobNfsTarget:CacheBlobNfsTarget", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCacheBlobNfsTarget gets an existing CacheBlobNfsTarget resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCacheBlobNfsTarget(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CacheBlobNfsTargetState, opts ...pulumi.ResourceOption) (*CacheBlobNfsTarget, error) {
var resource CacheBlobNfsTarget
err := ctx.ReadResource("azure:hpc/cacheBlobNfsTarget:CacheBlobNfsTarget", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CacheBlobNfsTarget resources.
type cacheBlobNfsTargetState struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName *string `pulumi:"accessPolicyName"`
// The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
CacheName *string `pulumi:"cacheName"`
// The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
Name *string `pulumi:"name"`
// The client-facing file path of the HPC Cache Blob NFS Target.
NamespacePath *string `pulumi:"namespacePath"`
// The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId *string `pulumi:"storageContainerId"`
// The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel *string `pulumi:"usageModel"`
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds *int `pulumi:"verificationTimerInSeconds"`
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds *int `pulumi:"writeBackTimerInSeconds"`
}
type CacheBlobNfsTargetState struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName pulumi.StringPtrInput
// The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
CacheName pulumi.StringPtrInput
// The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
Name pulumi.StringPtrInput
// The client-facing file path of the HPC Cache Blob NFS Target.
NamespacePath pulumi.StringPtrInput
// The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
ResourceGroupName pulumi.StringPtrInput
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId pulumi.StringPtrInput
// The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel pulumi.StringPtrInput
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds pulumi.IntPtrInput
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds pulumi.IntPtrInput
}
func (CacheBlobNfsTargetState) ElementType() reflect.Type {
return reflect.TypeOf((*cacheBlobNfsTargetState)(nil)).Elem()
}
type cacheBlobNfsTargetArgs struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName *string `pulumi:"accessPolicyName"`
// The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
CacheName string `pulumi:"cacheName"`
// The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
Name *string `pulumi:"name"`
// The client-facing file path of the HPC Cache Blob NFS Target.
NamespacePath string `pulumi:"namespacePath"`
// The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId string `pulumi:"storageContainerId"`
// The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel string `pulumi:"usageModel"`
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds *int `pulumi:"verificationTimerInSeconds"`
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds *int `pulumi:"writeBackTimerInSeconds"`
}
// The set of arguments for constructing a CacheBlobNfsTarget resource.
type CacheBlobNfsTargetArgs struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName pulumi.StringPtrInput
// The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
CacheName pulumi.StringInput
// The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
Name pulumi.StringPtrInput
// The client-facing file path of the HPC Cache Blob NFS Target.
NamespacePath pulumi.StringInput
// The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
ResourceGroupName pulumi.StringInput
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId pulumi.StringInput
// The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel pulumi.StringInput
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds pulumi.IntPtrInput
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds pulumi.IntPtrInput
}
func (CacheBlobNfsTargetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*cacheBlobNfsTargetArgs)(nil)).Elem()
}
type CacheBlobNfsTargetInput interface {
pulumi.Input
ToCacheBlobNfsTargetOutput() CacheBlobNfsTargetOutput
ToCacheBlobNfsTargetOutputWithContext(ctx context.Context) CacheBlobNfsTargetOutput
}
func (*CacheBlobNfsTarget) ElementType() reflect.Type {
return reflect.TypeOf((**CacheBlobNfsTarget)(nil)).Elem()
}
func (i *CacheBlobNfsTarget) ToCacheBlobNfsTargetOutput() CacheBlobNfsTargetOutput {
return i.ToCacheBlobNfsTargetOutputWithContext(context.Background())
}
func (i *CacheBlobNfsTarget) ToCacheBlobNfsTargetOutputWithContext(ctx context.Context) CacheBlobNfsTargetOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheBlobNfsTargetOutput)
}
// CacheBlobNfsTargetArrayInput is an input type that accepts CacheBlobNfsTargetArray and CacheBlobNfsTargetArrayOutput values.
// You can construct a concrete instance of `CacheBlobNfsTargetArrayInput` via:
//
// CacheBlobNfsTargetArray{ CacheBlobNfsTargetArgs{...} }
type CacheBlobNfsTargetArrayInput interface {
pulumi.Input
ToCacheBlobNfsTargetArrayOutput() CacheBlobNfsTargetArrayOutput
ToCacheBlobNfsTargetArrayOutputWithContext(context.Context) CacheBlobNfsTargetArrayOutput
}
type CacheBlobNfsTargetArray []CacheBlobNfsTargetInput
func (CacheBlobNfsTargetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheBlobNfsTarget)(nil)).Elem()
}
func (i CacheBlobNfsTargetArray) ToCacheBlobNfsTargetArrayOutput() CacheBlobNfsTargetArrayOutput {
return i.ToCacheBlobNfsTargetArrayOutputWithContext(context.Background())
}
func (i CacheBlobNfsTargetArray) ToCacheBlobNfsTargetArrayOutputWithContext(ctx context.Context) CacheBlobNfsTargetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheBlobNfsTargetArrayOutput)
}
// CacheBlobNfsTargetMapInput is an input type that accepts CacheBlobNfsTargetMap and CacheBlobNfsTargetMapOutput values.
// You can construct a concrete instance of `CacheBlobNfsTargetMapInput` via:
//
// CacheBlobNfsTargetMap{ "key": CacheBlobNfsTargetArgs{...} }
type CacheBlobNfsTargetMapInput interface {
pulumi.Input
ToCacheBlobNfsTargetMapOutput() CacheBlobNfsTargetMapOutput
ToCacheBlobNfsTargetMapOutputWithContext(context.Context) CacheBlobNfsTargetMapOutput
}
type CacheBlobNfsTargetMap map[string]CacheBlobNfsTargetInput
func (CacheBlobNfsTargetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheBlobNfsTarget)(nil)).Elem()
}
func (i CacheBlobNfsTargetMap) ToCacheBlobNfsTargetMapOutput() CacheBlobNfsTargetMapOutput {
return i.ToCacheBlobNfsTargetMapOutputWithContext(context.Background())
}
func (i CacheBlobNfsTargetMap) ToCacheBlobNfsTargetMapOutputWithContext(ctx context.Context) CacheBlobNfsTargetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheBlobNfsTargetMapOutput)
}
type CacheBlobNfsTargetOutput struct{ *pulumi.OutputState }
func (CacheBlobNfsTargetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CacheBlobNfsTarget)(nil)).Elem()
}
func (o CacheBlobNfsTargetOutput) ToCacheBlobNfsTargetOutput() CacheBlobNfsTargetOutput {
return o
}
func (o CacheBlobNfsTargetOutput) ToCacheBlobNfsTargetOutputWithContext(ctx context.Context) CacheBlobNfsTargetOutput {
return o
}
// The name of the access policy applied to this target. Defaults to `default`.
func (o CacheBlobNfsTargetOutput) AccessPolicyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.StringPtrOutput { return v.AccessPolicyName }).(pulumi.StringPtrOutput)
}
// The name of the HPC Cache, which the HPC Cache Blob NFS Target will be added to. Changing this forces a new HPC Cache Blob NFS Target to be created.
func (o CacheBlobNfsTargetOutput) CacheName() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.StringOutput { return v.CacheName }).(pulumi.StringOutput)
}
// The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created.
func (o CacheBlobNfsTargetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The client-facing file path of the HPC Cache Blob NFS Target.
func (o CacheBlobNfsTargetOutput) NamespacePath() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.StringOutput { return v.NamespacePath }).(pulumi.StringOutput)
}
// The name of the Resource Group where the HPC Cache Blob NFS Target should exist. Changing this forces a new HPC Cache Blob NFS Target to be created.
func (o CacheBlobNfsTargetOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob NFS Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
func (o CacheBlobNfsTargetOutput) StorageContainerId() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.StringOutput { return v.StorageContainerId }).(pulumi.StringOutput)
}
// The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
func (o CacheBlobNfsTargetOutput) UsageModel() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.StringOutput { return v.UsageModel }).(pulumi.StringOutput)
}
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
func (o CacheBlobNfsTargetOutput) VerificationTimerInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.IntPtrOutput { return v.VerificationTimerInSeconds }).(pulumi.IntPtrOutput)
}
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
func (o CacheBlobNfsTargetOutput) WriteBackTimerInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *CacheBlobNfsTarget) pulumi.IntPtrOutput { return v.WriteBackTimerInSeconds }).(pulumi.IntPtrOutput)
}
type CacheBlobNfsTargetArrayOutput struct{ *pulumi.OutputState }
func (CacheBlobNfsTargetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheBlobNfsTarget)(nil)).Elem()
}
func (o CacheBlobNfsTargetArrayOutput) ToCacheBlobNfsTargetArrayOutput() CacheBlobNfsTargetArrayOutput {
return o
}
func (o CacheBlobNfsTargetArrayOutput) ToCacheBlobNfsTargetArrayOutputWithContext(ctx context.Context) CacheBlobNfsTargetArrayOutput {
return o
}
func (o CacheBlobNfsTargetArrayOutput) Index(i pulumi.IntInput) CacheBlobNfsTargetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CacheBlobNfsTarget {
return vs[0].([]*CacheBlobNfsTarget)[vs[1].(int)]
}).(CacheBlobNfsTargetOutput)
}
type CacheBlobNfsTargetMapOutput struct{ *pulumi.OutputState }
func (CacheBlobNfsTargetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheBlobNfsTarget)(nil)).Elem()
}
func (o CacheBlobNfsTargetMapOutput) ToCacheBlobNfsTargetMapOutput() CacheBlobNfsTargetMapOutput {
return o
}
func (o CacheBlobNfsTargetMapOutput) ToCacheBlobNfsTargetMapOutputWithContext(ctx context.Context) CacheBlobNfsTargetMapOutput {
return o
}
func (o CacheBlobNfsTargetMapOutput) MapIndex(k pulumi.StringInput) CacheBlobNfsTargetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CacheBlobNfsTarget {
return vs[0].(map[string]*CacheBlobNfsTarget)[vs[1].(string)]
}).(CacheBlobNfsTargetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CacheBlobNfsTargetInput)(nil)).Elem(), &CacheBlobNfsTarget{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheBlobNfsTargetArrayInput)(nil)).Elem(), CacheBlobNfsTargetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheBlobNfsTargetMapInput)(nil)).Elem(), CacheBlobNfsTargetMap{})
pulumi.RegisterOutputType(CacheBlobNfsTargetOutput{})
pulumi.RegisterOutputType(CacheBlobNfsTargetArrayOutput{})
pulumi.RegisterOutputType(CacheBlobNfsTargetMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/hpc/pulumiTypes.go | sdk/go/azure/hpc/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 hpc
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 CacheAccessPolicyAccessRule struct {
// The access level for this rule. Possible values are: `rw`, `ro`, `no`.
Access string `pulumi:"access"`
// The anonymous GID used when `rootSquashEnabled` is `true`.
AnonymousGid *int `pulumi:"anonymousGid"`
// The anonymous UID used when `rootSquashEnabled` is `true`.
AnonymousUid *int `pulumi:"anonymousUid"`
// The filter applied to the `scope` for this rule. The filter's format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
Filter *string `pulumi:"filter"`
// Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
RootSquashEnabled *bool `pulumi:"rootSquashEnabled"`
// The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
//
// > **Note:** Each `accessRule` should set a unique `scope`.
Scope string `pulumi:"scope"`
// Whether allow access to subdirectories under the root export?
SubmountAccessEnabled *bool `pulumi:"submountAccessEnabled"`
// Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
SuidEnabled *bool `pulumi:"suidEnabled"`
}
// CacheAccessPolicyAccessRuleInput is an input type that accepts CacheAccessPolicyAccessRuleArgs and CacheAccessPolicyAccessRuleOutput values.
// You can construct a concrete instance of `CacheAccessPolicyAccessRuleInput` via:
//
// CacheAccessPolicyAccessRuleArgs{...}
type CacheAccessPolicyAccessRuleInput interface {
pulumi.Input
ToCacheAccessPolicyAccessRuleOutput() CacheAccessPolicyAccessRuleOutput
ToCacheAccessPolicyAccessRuleOutputWithContext(context.Context) CacheAccessPolicyAccessRuleOutput
}
type CacheAccessPolicyAccessRuleArgs struct {
// The access level for this rule. Possible values are: `rw`, `ro`, `no`.
Access pulumi.StringInput `pulumi:"access"`
// The anonymous GID used when `rootSquashEnabled` is `true`.
AnonymousGid pulumi.IntPtrInput `pulumi:"anonymousGid"`
// The anonymous UID used when `rootSquashEnabled` is `true`.
AnonymousUid pulumi.IntPtrInput `pulumi:"anonymousUid"`
// The filter applied to the `scope` for this rule. The filter's format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
Filter pulumi.StringPtrInput `pulumi:"filter"`
// Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
RootSquashEnabled pulumi.BoolPtrInput `pulumi:"rootSquashEnabled"`
// The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
//
// > **Note:** Each `accessRule` should set a unique `scope`.
Scope pulumi.StringInput `pulumi:"scope"`
// Whether allow access to subdirectories under the root export?
SubmountAccessEnabled pulumi.BoolPtrInput `pulumi:"submountAccessEnabled"`
// Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
SuidEnabled pulumi.BoolPtrInput `pulumi:"suidEnabled"`
}
func (CacheAccessPolicyAccessRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CacheAccessPolicyAccessRule)(nil)).Elem()
}
func (i CacheAccessPolicyAccessRuleArgs) ToCacheAccessPolicyAccessRuleOutput() CacheAccessPolicyAccessRuleOutput {
return i.ToCacheAccessPolicyAccessRuleOutputWithContext(context.Background())
}
func (i CacheAccessPolicyAccessRuleArgs) ToCacheAccessPolicyAccessRuleOutputWithContext(ctx context.Context) CacheAccessPolicyAccessRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyAccessRuleOutput)
}
// CacheAccessPolicyAccessRuleArrayInput is an input type that accepts CacheAccessPolicyAccessRuleArray and CacheAccessPolicyAccessRuleArrayOutput values.
// You can construct a concrete instance of `CacheAccessPolicyAccessRuleArrayInput` via:
//
// CacheAccessPolicyAccessRuleArray{ CacheAccessPolicyAccessRuleArgs{...} }
type CacheAccessPolicyAccessRuleArrayInput interface {
pulumi.Input
ToCacheAccessPolicyAccessRuleArrayOutput() CacheAccessPolicyAccessRuleArrayOutput
ToCacheAccessPolicyAccessRuleArrayOutputWithContext(context.Context) CacheAccessPolicyAccessRuleArrayOutput
}
type CacheAccessPolicyAccessRuleArray []CacheAccessPolicyAccessRuleInput
func (CacheAccessPolicyAccessRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]CacheAccessPolicyAccessRule)(nil)).Elem()
}
func (i CacheAccessPolicyAccessRuleArray) ToCacheAccessPolicyAccessRuleArrayOutput() CacheAccessPolicyAccessRuleArrayOutput {
return i.ToCacheAccessPolicyAccessRuleArrayOutputWithContext(context.Background())
}
func (i CacheAccessPolicyAccessRuleArray) ToCacheAccessPolicyAccessRuleArrayOutputWithContext(ctx context.Context) CacheAccessPolicyAccessRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyAccessRuleArrayOutput)
}
type CacheAccessPolicyAccessRuleOutput struct{ *pulumi.OutputState }
func (CacheAccessPolicyAccessRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CacheAccessPolicyAccessRule)(nil)).Elem()
}
func (o CacheAccessPolicyAccessRuleOutput) ToCacheAccessPolicyAccessRuleOutput() CacheAccessPolicyAccessRuleOutput {
return o
}
func (o CacheAccessPolicyAccessRuleOutput) ToCacheAccessPolicyAccessRuleOutputWithContext(ctx context.Context) CacheAccessPolicyAccessRuleOutput {
return o
}
// The access level for this rule. Possible values are: `rw`, `ro`, `no`.
func (o CacheAccessPolicyAccessRuleOutput) Access() pulumi.StringOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) string { return v.Access }).(pulumi.StringOutput)
}
// The anonymous GID used when `rootSquashEnabled` is `true`.
func (o CacheAccessPolicyAccessRuleOutput) AnonymousGid() pulumi.IntPtrOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) *int { return v.AnonymousGid }).(pulumi.IntPtrOutput)
}
// The anonymous UID used when `rootSquashEnabled` is `true`.
func (o CacheAccessPolicyAccessRuleOutput) AnonymousUid() pulumi.IntPtrOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) *int { return v.AnonymousUid }).(pulumi.IntPtrOutput)
}
// The filter applied to the `scope` for this rule. The filter's format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
func (o CacheAccessPolicyAccessRuleOutput) Filter() pulumi.StringPtrOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) *string { return v.Filter }).(pulumi.StringPtrOutput)
}
// Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
func (o CacheAccessPolicyAccessRuleOutput) RootSquashEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) *bool { return v.RootSquashEnabled }).(pulumi.BoolPtrOutput)
}
// The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
//
// > **Note:** Each `accessRule` should set a unique `scope`.
func (o CacheAccessPolicyAccessRuleOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) string { return v.Scope }).(pulumi.StringOutput)
}
// Whether allow access to subdirectories under the root export?
func (o CacheAccessPolicyAccessRuleOutput) SubmountAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) *bool { return v.SubmountAccessEnabled }).(pulumi.BoolPtrOutput)
}
// Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
func (o CacheAccessPolicyAccessRuleOutput) SuidEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CacheAccessPolicyAccessRule) *bool { return v.SuidEnabled }).(pulumi.BoolPtrOutput)
}
type CacheAccessPolicyAccessRuleArrayOutput struct{ *pulumi.OutputState }
func (CacheAccessPolicyAccessRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]CacheAccessPolicyAccessRule)(nil)).Elem()
}
func (o CacheAccessPolicyAccessRuleArrayOutput) ToCacheAccessPolicyAccessRuleArrayOutput() CacheAccessPolicyAccessRuleArrayOutput {
return o
}
func (o CacheAccessPolicyAccessRuleArrayOutput) ToCacheAccessPolicyAccessRuleArrayOutputWithContext(ctx context.Context) CacheAccessPolicyAccessRuleArrayOutput {
return o
}
func (o CacheAccessPolicyAccessRuleArrayOutput) Index(i pulumi.IntInput) CacheAccessPolicyAccessRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) CacheAccessPolicyAccessRule {
return vs[0].([]CacheAccessPolicyAccessRule)[vs[1].(int)]
}).(CacheAccessPolicyAccessRuleOutput)
}
type CacheDefaultAccessPolicy struct {
// One or more `accessRule` blocks (up to three) as defined above.
AccessRules []CacheDefaultAccessPolicyAccessRule `pulumi:"accessRules"`
}
// CacheDefaultAccessPolicyInput is an input type that accepts CacheDefaultAccessPolicyArgs and CacheDefaultAccessPolicyOutput values.
// You can construct a concrete instance of `CacheDefaultAccessPolicyInput` via:
//
// CacheDefaultAccessPolicyArgs{...}
type CacheDefaultAccessPolicyInput interface {
pulumi.Input
ToCacheDefaultAccessPolicyOutput() CacheDefaultAccessPolicyOutput
ToCacheDefaultAccessPolicyOutputWithContext(context.Context) CacheDefaultAccessPolicyOutput
}
type CacheDefaultAccessPolicyArgs struct {
// One or more `accessRule` blocks (up to three) as defined above.
AccessRules CacheDefaultAccessPolicyAccessRuleArrayInput `pulumi:"accessRules"`
}
func (CacheDefaultAccessPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CacheDefaultAccessPolicy)(nil)).Elem()
}
func (i CacheDefaultAccessPolicyArgs) ToCacheDefaultAccessPolicyOutput() CacheDefaultAccessPolicyOutput {
return i.ToCacheDefaultAccessPolicyOutputWithContext(context.Background())
}
func (i CacheDefaultAccessPolicyArgs) ToCacheDefaultAccessPolicyOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDefaultAccessPolicyOutput)
}
func (i CacheDefaultAccessPolicyArgs) ToCacheDefaultAccessPolicyPtrOutput() CacheDefaultAccessPolicyPtrOutput {
return i.ToCacheDefaultAccessPolicyPtrOutputWithContext(context.Background())
}
func (i CacheDefaultAccessPolicyArgs) ToCacheDefaultAccessPolicyPtrOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDefaultAccessPolicyOutput).ToCacheDefaultAccessPolicyPtrOutputWithContext(ctx)
}
// CacheDefaultAccessPolicyPtrInput is an input type that accepts CacheDefaultAccessPolicyArgs, CacheDefaultAccessPolicyPtr and CacheDefaultAccessPolicyPtrOutput values.
// You can construct a concrete instance of `CacheDefaultAccessPolicyPtrInput` via:
//
// CacheDefaultAccessPolicyArgs{...}
//
// or:
//
// nil
type CacheDefaultAccessPolicyPtrInput interface {
pulumi.Input
ToCacheDefaultAccessPolicyPtrOutput() CacheDefaultAccessPolicyPtrOutput
ToCacheDefaultAccessPolicyPtrOutputWithContext(context.Context) CacheDefaultAccessPolicyPtrOutput
}
type cacheDefaultAccessPolicyPtrType CacheDefaultAccessPolicyArgs
func CacheDefaultAccessPolicyPtr(v *CacheDefaultAccessPolicyArgs) CacheDefaultAccessPolicyPtrInput {
return (*cacheDefaultAccessPolicyPtrType)(v)
}
func (*cacheDefaultAccessPolicyPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**CacheDefaultAccessPolicy)(nil)).Elem()
}
func (i *cacheDefaultAccessPolicyPtrType) ToCacheDefaultAccessPolicyPtrOutput() CacheDefaultAccessPolicyPtrOutput {
return i.ToCacheDefaultAccessPolicyPtrOutputWithContext(context.Background())
}
func (i *cacheDefaultAccessPolicyPtrType) ToCacheDefaultAccessPolicyPtrOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDefaultAccessPolicyPtrOutput)
}
type CacheDefaultAccessPolicyOutput struct{ *pulumi.OutputState }
func (CacheDefaultAccessPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CacheDefaultAccessPolicy)(nil)).Elem()
}
func (o CacheDefaultAccessPolicyOutput) ToCacheDefaultAccessPolicyOutput() CacheDefaultAccessPolicyOutput {
return o
}
func (o CacheDefaultAccessPolicyOutput) ToCacheDefaultAccessPolicyOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyOutput {
return o
}
func (o CacheDefaultAccessPolicyOutput) ToCacheDefaultAccessPolicyPtrOutput() CacheDefaultAccessPolicyPtrOutput {
return o.ToCacheDefaultAccessPolicyPtrOutputWithContext(context.Background())
}
func (o CacheDefaultAccessPolicyOutput) ToCacheDefaultAccessPolicyPtrOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheDefaultAccessPolicy) *CacheDefaultAccessPolicy {
return &v
}).(CacheDefaultAccessPolicyPtrOutput)
}
// One or more `accessRule` blocks (up to three) as defined above.
func (o CacheDefaultAccessPolicyOutput) AccessRules() CacheDefaultAccessPolicyAccessRuleArrayOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicy) []CacheDefaultAccessPolicyAccessRule { return v.AccessRules }).(CacheDefaultAccessPolicyAccessRuleArrayOutput)
}
type CacheDefaultAccessPolicyPtrOutput struct{ *pulumi.OutputState }
func (CacheDefaultAccessPolicyPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CacheDefaultAccessPolicy)(nil)).Elem()
}
func (o CacheDefaultAccessPolicyPtrOutput) ToCacheDefaultAccessPolicyPtrOutput() CacheDefaultAccessPolicyPtrOutput {
return o
}
func (o CacheDefaultAccessPolicyPtrOutput) ToCacheDefaultAccessPolicyPtrOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyPtrOutput {
return o
}
func (o CacheDefaultAccessPolicyPtrOutput) Elem() CacheDefaultAccessPolicyOutput {
return o.ApplyT(func(v *CacheDefaultAccessPolicy) CacheDefaultAccessPolicy {
if v != nil {
return *v
}
var ret CacheDefaultAccessPolicy
return ret
}).(CacheDefaultAccessPolicyOutput)
}
// One or more `accessRule` blocks (up to three) as defined above.
func (o CacheDefaultAccessPolicyPtrOutput) AccessRules() CacheDefaultAccessPolicyAccessRuleArrayOutput {
return o.ApplyT(func(v *CacheDefaultAccessPolicy) []CacheDefaultAccessPolicyAccessRule {
if v == nil {
return nil
}
return v.AccessRules
}).(CacheDefaultAccessPolicyAccessRuleArrayOutput)
}
type CacheDefaultAccessPolicyAccessRule struct {
// The access level for this rule. Possible values are: `rw`, `ro`, `no`.
Access string `pulumi:"access"`
// The anonymous GID used when `rootSquashEnabled` is `true`.
AnonymousGid *int `pulumi:"anonymousGid"`
// The anonymous UID used when `rootSquashEnabled` is `true`.
AnonymousUid *int `pulumi:"anonymousUid"`
// The filter applied to the `scope` for this rule. The filter's format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
Filter *string `pulumi:"filter"`
// Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
RootSquashEnabled *bool `pulumi:"rootSquashEnabled"`
// The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
//
// > **Note:** Each `accessRule` should set a unique `scope`.
Scope string `pulumi:"scope"`
// Whether allow access to subdirectories under the root export?
SubmountAccessEnabled *bool `pulumi:"submountAccessEnabled"`
// Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
SuidEnabled *bool `pulumi:"suidEnabled"`
}
// CacheDefaultAccessPolicyAccessRuleInput is an input type that accepts CacheDefaultAccessPolicyAccessRuleArgs and CacheDefaultAccessPolicyAccessRuleOutput values.
// You can construct a concrete instance of `CacheDefaultAccessPolicyAccessRuleInput` via:
//
// CacheDefaultAccessPolicyAccessRuleArgs{...}
type CacheDefaultAccessPolicyAccessRuleInput interface {
pulumi.Input
ToCacheDefaultAccessPolicyAccessRuleOutput() CacheDefaultAccessPolicyAccessRuleOutput
ToCacheDefaultAccessPolicyAccessRuleOutputWithContext(context.Context) CacheDefaultAccessPolicyAccessRuleOutput
}
type CacheDefaultAccessPolicyAccessRuleArgs struct {
// The access level for this rule. Possible values are: `rw`, `ro`, `no`.
Access pulumi.StringInput `pulumi:"access"`
// The anonymous GID used when `rootSquashEnabled` is `true`.
AnonymousGid pulumi.IntPtrInput `pulumi:"anonymousGid"`
// The anonymous UID used when `rootSquashEnabled` is `true`.
AnonymousUid pulumi.IntPtrInput `pulumi:"anonymousUid"`
// The filter applied to the `scope` for this rule. The filter's format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
Filter pulumi.StringPtrInput `pulumi:"filter"`
// Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
RootSquashEnabled pulumi.BoolPtrInput `pulumi:"rootSquashEnabled"`
// The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
//
// > **Note:** Each `accessRule` should set a unique `scope`.
Scope pulumi.StringInput `pulumi:"scope"`
// Whether allow access to subdirectories under the root export?
SubmountAccessEnabled pulumi.BoolPtrInput `pulumi:"submountAccessEnabled"`
// Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
SuidEnabled pulumi.BoolPtrInput `pulumi:"suidEnabled"`
}
func (CacheDefaultAccessPolicyAccessRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CacheDefaultAccessPolicyAccessRule)(nil)).Elem()
}
func (i CacheDefaultAccessPolicyAccessRuleArgs) ToCacheDefaultAccessPolicyAccessRuleOutput() CacheDefaultAccessPolicyAccessRuleOutput {
return i.ToCacheDefaultAccessPolicyAccessRuleOutputWithContext(context.Background())
}
func (i CacheDefaultAccessPolicyAccessRuleArgs) ToCacheDefaultAccessPolicyAccessRuleOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyAccessRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDefaultAccessPolicyAccessRuleOutput)
}
// CacheDefaultAccessPolicyAccessRuleArrayInput is an input type that accepts CacheDefaultAccessPolicyAccessRuleArray and CacheDefaultAccessPolicyAccessRuleArrayOutput values.
// You can construct a concrete instance of `CacheDefaultAccessPolicyAccessRuleArrayInput` via:
//
// CacheDefaultAccessPolicyAccessRuleArray{ CacheDefaultAccessPolicyAccessRuleArgs{...} }
type CacheDefaultAccessPolicyAccessRuleArrayInput interface {
pulumi.Input
ToCacheDefaultAccessPolicyAccessRuleArrayOutput() CacheDefaultAccessPolicyAccessRuleArrayOutput
ToCacheDefaultAccessPolicyAccessRuleArrayOutputWithContext(context.Context) CacheDefaultAccessPolicyAccessRuleArrayOutput
}
type CacheDefaultAccessPolicyAccessRuleArray []CacheDefaultAccessPolicyAccessRuleInput
func (CacheDefaultAccessPolicyAccessRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]CacheDefaultAccessPolicyAccessRule)(nil)).Elem()
}
func (i CacheDefaultAccessPolicyAccessRuleArray) ToCacheDefaultAccessPolicyAccessRuleArrayOutput() CacheDefaultAccessPolicyAccessRuleArrayOutput {
return i.ToCacheDefaultAccessPolicyAccessRuleArrayOutputWithContext(context.Background())
}
func (i CacheDefaultAccessPolicyAccessRuleArray) ToCacheDefaultAccessPolicyAccessRuleArrayOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyAccessRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDefaultAccessPolicyAccessRuleArrayOutput)
}
type CacheDefaultAccessPolicyAccessRuleOutput struct{ *pulumi.OutputState }
func (CacheDefaultAccessPolicyAccessRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CacheDefaultAccessPolicyAccessRule)(nil)).Elem()
}
func (o CacheDefaultAccessPolicyAccessRuleOutput) ToCacheDefaultAccessPolicyAccessRuleOutput() CacheDefaultAccessPolicyAccessRuleOutput {
return o
}
func (o CacheDefaultAccessPolicyAccessRuleOutput) ToCacheDefaultAccessPolicyAccessRuleOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyAccessRuleOutput {
return o
}
// The access level for this rule. Possible values are: `rw`, `ro`, `no`.
func (o CacheDefaultAccessPolicyAccessRuleOutput) Access() pulumi.StringOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) string { return v.Access }).(pulumi.StringOutput)
}
// The anonymous GID used when `rootSquashEnabled` is `true`.
func (o CacheDefaultAccessPolicyAccessRuleOutput) AnonymousGid() pulumi.IntPtrOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) *int { return v.AnonymousGid }).(pulumi.IntPtrOutput)
}
// The anonymous UID used when `rootSquashEnabled` is `true`.
func (o CacheDefaultAccessPolicyAccessRuleOutput) AnonymousUid() pulumi.IntPtrOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) *int { return v.AnonymousUid }).(pulumi.IntPtrOutput)
}
// The filter applied to the `scope` for this rule. The filter's format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
func (o CacheDefaultAccessPolicyAccessRuleOutput) Filter() pulumi.StringPtrOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) *string { return v.Filter }).(pulumi.StringPtrOutput)
}
// Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
func (o CacheDefaultAccessPolicyAccessRuleOutput) RootSquashEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) *bool { return v.RootSquashEnabled }).(pulumi.BoolPtrOutput)
}
// The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
//
// > **Note:** Each `accessRule` should set a unique `scope`.
func (o CacheDefaultAccessPolicyAccessRuleOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) string { return v.Scope }).(pulumi.StringOutput)
}
// Whether allow access to subdirectories under the root export?
func (o CacheDefaultAccessPolicyAccessRuleOutput) SubmountAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) *bool { return v.SubmountAccessEnabled }).(pulumi.BoolPtrOutput)
}
// Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
func (o CacheDefaultAccessPolicyAccessRuleOutput) SuidEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CacheDefaultAccessPolicyAccessRule) *bool { return v.SuidEnabled }).(pulumi.BoolPtrOutput)
}
type CacheDefaultAccessPolicyAccessRuleArrayOutput struct{ *pulumi.OutputState }
func (CacheDefaultAccessPolicyAccessRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]CacheDefaultAccessPolicyAccessRule)(nil)).Elem()
}
func (o CacheDefaultAccessPolicyAccessRuleArrayOutput) ToCacheDefaultAccessPolicyAccessRuleArrayOutput() CacheDefaultAccessPolicyAccessRuleArrayOutput {
return o
}
func (o CacheDefaultAccessPolicyAccessRuleArrayOutput) ToCacheDefaultAccessPolicyAccessRuleArrayOutputWithContext(ctx context.Context) CacheDefaultAccessPolicyAccessRuleArrayOutput {
return o
}
func (o CacheDefaultAccessPolicyAccessRuleArrayOutput) Index(i pulumi.IntInput) CacheDefaultAccessPolicyAccessRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) CacheDefaultAccessPolicyAccessRule {
return vs[0].([]CacheDefaultAccessPolicyAccessRule)[vs[1].(int)]
}).(CacheDefaultAccessPolicyAccessRuleOutput)
}
type CacheDirectoryActiveDirectory struct {
// The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server.
CacheNetbiosName string `pulumi:"cacheNetbiosName"`
// The primary DNS IP address used to resolve the Active Directory domain controller's FQDN.
DnsPrimaryIp string `pulumi:"dnsPrimaryIp"`
// The secondary DNS IP address used to resolve the Active Directory domain controller's FQDN.
DnsSecondaryIp *string `pulumi:"dnsSecondaryIp"`
// The fully qualified domain name of the Active Directory domain controller.
DomainName string `pulumi:"domainName"`
// The Active Directory domain's NetBIOS name.
DomainNetbiosName string `pulumi:"domainNetbiosName"`
// The password of the Active Directory domain administrator.
Password string `pulumi:"password"`
// The username of the Active Directory domain administrator.
Username string `pulumi:"username"`
}
// CacheDirectoryActiveDirectoryInput is an input type that accepts CacheDirectoryActiveDirectoryArgs and CacheDirectoryActiveDirectoryOutput values.
// You can construct a concrete instance of `CacheDirectoryActiveDirectoryInput` via:
//
// CacheDirectoryActiveDirectoryArgs{...}
type CacheDirectoryActiveDirectoryInput interface {
pulumi.Input
ToCacheDirectoryActiveDirectoryOutput() CacheDirectoryActiveDirectoryOutput
ToCacheDirectoryActiveDirectoryOutputWithContext(context.Context) CacheDirectoryActiveDirectoryOutput
}
type CacheDirectoryActiveDirectoryArgs struct {
// The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server.
CacheNetbiosName pulumi.StringInput `pulumi:"cacheNetbiosName"`
// The primary DNS IP address used to resolve the Active Directory domain controller's FQDN.
DnsPrimaryIp pulumi.StringInput `pulumi:"dnsPrimaryIp"`
// The secondary DNS IP address used to resolve the Active Directory domain controller's FQDN.
DnsSecondaryIp pulumi.StringPtrInput `pulumi:"dnsSecondaryIp"`
// The fully qualified domain name of the Active Directory domain controller.
DomainName pulumi.StringInput `pulumi:"domainName"`
// The Active Directory domain's NetBIOS name.
DomainNetbiosName pulumi.StringInput `pulumi:"domainNetbiosName"`
// The password of the Active Directory domain administrator.
Password pulumi.StringInput `pulumi:"password"`
// The username of the Active Directory domain administrator.
Username pulumi.StringInput `pulumi:"username"`
}
func (CacheDirectoryActiveDirectoryArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CacheDirectoryActiveDirectory)(nil)).Elem()
}
func (i CacheDirectoryActiveDirectoryArgs) ToCacheDirectoryActiveDirectoryOutput() CacheDirectoryActiveDirectoryOutput {
return i.ToCacheDirectoryActiveDirectoryOutputWithContext(context.Background())
}
func (i CacheDirectoryActiveDirectoryArgs) ToCacheDirectoryActiveDirectoryOutputWithContext(ctx context.Context) CacheDirectoryActiveDirectoryOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDirectoryActiveDirectoryOutput)
}
func (i CacheDirectoryActiveDirectoryArgs) ToCacheDirectoryActiveDirectoryPtrOutput() CacheDirectoryActiveDirectoryPtrOutput {
return i.ToCacheDirectoryActiveDirectoryPtrOutputWithContext(context.Background())
}
func (i CacheDirectoryActiveDirectoryArgs) ToCacheDirectoryActiveDirectoryPtrOutputWithContext(ctx context.Context) CacheDirectoryActiveDirectoryPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDirectoryActiveDirectoryOutput).ToCacheDirectoryActiveDirectoryPtrOutputWithContext(ctx)
}
// CacheDirectoryActiveDirectoryPtrInput is an input type that accepts CacheDirectoryActiveDirectoryArgs, CacheDirectoryActiveDirectoryPtr and CacheDirectoryActiveDirectoryPtrOutput values.
// You can construct a concrete instance of `CacheDirectoryActiveDirectoryPtrInput` via:
//
// CacheDirectoryActiveDirectoryArgs{...}
//
// or:
//
// nil
type CacheDirectoryActiveDirectoryPtrInput interface {
pulumi.Input
ToCacheDirectoryActiveDirectoryPtrOutput() CacheDirectoryActiveDirectoryPtrOutput
ToCacheDirectoryActiveDirectoryPtrOutputWithContext(context.Context) CacheDirectoryActiveDirectoryPtrOutput
}
type cacheDirectoryActiveDirectoryPtrType CacheDirectoryActiveDirectoryArgs
func CacheDirectoryActiveDirectoryPtr(v *CacheDirectoryActiveDirectoryArgs) CacheDirectoryActiveDirectoryPtrInput {
return (*cacheDirectoryActiveDirectoryPtrType)(v)
}
func (*cacheDirectoryActiveDirectoryPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**CacheDirectoryActiveDirectory)(nil)).Elem()
}
func (i *cacheDirectoryActiveDirectoryPtrType) ToCacheDirectoryActiveDirectoryPtrOutput() CacheDirectoryActiveDirectoryPtrOutput {
return i.ToCacheDirectoryActiveDirectoryPtrOutputWithContext(context.Background())
}
func (i *cacheDirectoryActiveDirectoryPtrType) ToCacheDirectoryActiveDirectoryPtrOutputWithContext(ctx context.Context) CacheDirectoryActiveDirectoryPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheDirectoryActiveDirectoryPtrOutput)
}
type CacheDirectoryActiveDirectoryOutput struct{ *pulumi.OutputState }
func (CacheDirectoryActiveDirectoryOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CacheDirectoryActiveDirectory)(nil)).Elem()
}
func (o CacheDirectoryActiveDirectoryOutput) ToCacheDirectoryActiveDirectoryOutput() CacheDirectoryActiveDirectoryOutput {
return o
}
func (o CacheDirectoryActiveDirectoryOutput) ToCacheDirectoryActiveDirectoryOutputWithContext(ctx context.Context) CacheDirectoryActiveDirectoryOutput {
return o
}
func (o CacheDirectoryActiveDirectoryOutput) ToCacheDirectoryActiveDirectoryPtrOutput() CacheDirectoryActiveDirectoryPtrOutput {
return o.ToCacheDirectoryActiveDirectoryPtrOutputWithContext(context.Background())
}
func (o CacheDirectoryActiveDirectoryOutput) ToCacheDirectoryActiveDirectoryPtrOutputWithContext(ctx context.Context) CacheDirectoryActiveDirectoryPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheDirectoryActiveDirectory) *CacheDirectoryActiveDirectory {
return &v
}).(CacheDirectoryActiveDirectoryPtrOutput)
}
// The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server.
func (o CacheDirectoryActiveDirectoryOutput) CacheNetbiosName() pulumi.StringOutput {
return o.ApplyT(func(v CacheDirectoryActiveDirectory) string { return v.CacheNetbiosName }).(pulumi.StringOutput)
}
// The primary DNS IP address used to resolve the Active Directory domain controller's FQDN.
func (o CacheDirectoryActiveDirectoryOutput) DnsPrimaryIp() pulumi.StringOutput {
return o.ApplyT(func(v CacheDirectoryActiveDirectory) string { return v.DnsPrimaryIp }).(pulumi.StringOutput)
}
// The secondary DNS IP address used to resolve the Active Directory domain controller's FQDN.
func (o CacheDirectoryActiveDirectoryOutput) DnsSecondaryIp() pulumi.StringPtrOutput {
return o.ApplyT(func(v CacheDirectoryActiveDirectory) *string { return v.DnsSecondaryIp }).(pulumi.StringPtrOutput)
}
// The fully qualified domain name of the Active Directory domain controller.
func (o CacheDirectoryActiveDirectoryOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v CacheDirectoryActiveDirectory) string { return v.DomainName }).(pulumi.StringOutput)
}
// The Active Directory domain's NetBIOS name.
func (o CacheDirectoryActiveDirectoryOutput) DomainNetbiosName() pulumi.StringOutput {
return o.ApplyT(func(v CacheDirectoryActiveDirectory) string { return v.DomainNetbiosName }).(pulumi.StringOutput)
}
// The password of the Active Directory domain administrator.
func (o CacheDirectoryActiveDirectoryOutput) Password() 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/hpc/cache.go | sdk/go/azure/hpc/cache.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package hpc
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a HPC Cache.
//
// !> **Note:** The `hpc.Cache` resource has been deprecated because the service is retiring on 2025-09-30. This resource will be removed in v5.0 of the AzureRM Provider. See https://aka.ms/hpccacheretirement for more information.
//
// > **Note:** By request of the service team the provider no longer automatically registers the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace 'Microsoft.StorageCache'`.
//
// ## 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/hpc"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("examplevn"),
// 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("examplesubnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// })
// if err != nil {
// return err
// }
// _, err = hpc.NewCache(ctx, "example", &hpc.CacheArgs{
// Name: pulumi.String("examplehpccache"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// CacheSizeInGb: pulumi.Int(3072),
// SubnetId: exampleSubnet.ID(),
// SkuName: pulumi.String("Standard_2G"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.StorageCache` - 2023-05-01
//
// ## Import
//
// HPC Caches can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:hpc/cache:Cache example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.StorageCache/caches/cacheName
// ```
type Cache struct {
pulumi.CustomResourceState
// Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
AutomaticallyRotateKeyToLatestEnabled pulumi.BoolPtrOutput `pulumi:"automaticallyRotateKeyToLatestEnabled"`
// The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
//
// > **Note:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
CacheSizeInGb pulumi.IntOutput `pulumi:"cacheSizeInGb"`
// A `defaultAccessPolicy` block as defined below.
DefaultAccessPolicy CacheDefaultAccessPolicyOutput `pulumi:"defaultAccessPolicy"`
// A `directoryActiveDirectory` block as defined below.
DirectoryActiveDirectory CacheDirectoryActiveDirectoryPtrOutput `pulumi:"directoryActiveDirectory"`
// A `directoryFlatFile` block as defined below.
DirectoryFlatFile CacheDirectoryFlatFilePtrOutput `pulumi:"directoryFlatFile"`
// A `directoryLdap` block as defined below.
//
// > **Note:** Only one of `directoryActiveDirectory`, `directoryFlatFile` and `directoryLdap` can be set.
DirectoryLdap CacheDirectoryLdapPtrOutput `pulumi:"directoryLdap"`
// A `dns` block as defined below.
Dns CacheDnsPtrOutput `pulumi:"dns"`
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity CacheIdentityPtrOutput `pulumi:"identity"`
// The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
KeyVaultKeyId pulumi.StringPtrOutput `pulumi:"keyVaultKeyId"`
// Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A list of IP Addresses where the HPC Cache can be mounted.
MountAddresses pulumi.StringArrayOutput `pulumi:"mountAddresses"`
// The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
Mtu pulumi.IntPtrOutput `pulumi:"mtu"`
// The name of the HPC Cache. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
NtpServer pulumi.StringPtrOutput `pulumi:"ntpServer"`
// The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
//
// > **Note:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// A mapping of tags to assign to the HPC Cache.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewCache registers a new resource with the given unique name, arguments, and options.
func NewCache(ctx *pulumi.Context,
name string, args *CacheArgs, opts ...pulumi.ResourceOption) (*Cache, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CacheSizeInGb == nil {
return nil, errors.New("invalid value for required argument 'CacheSizeInGb'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Cache
err := ctx.RegisterResource("azure:hpc/cache:Cache", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCache gets an existing Cache resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCache(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CacheState, opts ...pulumi.ResourceOption) (*Cache, error) {
var resource Cache
err := ctx.ReadResource("azure:hpc/cache:Cache", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Cache resources.
type cacheState struct {
// Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
AutomaticallyRotateKeyToLatestEnabled *bool `pulumi:"automaticallyRotateKeyToLatestEnabled"`
// The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
//
// > **Note:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
CacheSizeInGb *int `pulumi:"cacheSizeInGb"`
// A `defaultAccessPolicy` block as defined below.
DefaultAccessPolicy *CacheDefaultAccessPolicy `pulumi:"defaultAccessPolicy"`
// A `directoryActiveDirectory` block as defined below.
DirectoryActiveDirectory *CacheDirectoryActiveDirectory `pulumi:"directoryActiveDirectory"`
// A `directoryFlatFile` block as defined below.
DirectoryFlatFile *CacheDirectoryFlatFile `pulumi:"directoryFlatFile"`
// A `directoryLdap` block as defined below.
//
// > **Note:** Only one of `directoryActiveDirectory`, `directoryFlatFile` and `directoryLdap` can be set.
DirectoryLdap *CacheDirectoryLdap `pulumi:"directoryLdap"`
// A `dns` block as defined below.
Dns *CacheDns `pulumi:"dns"`
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity *CacheIdentity `pulumi:"identity"`
// The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A list of IP Addresses where the HPC Cache can be mounted.
MountAddresses []string `pulumi:"mountAddresses"`
// The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
Mtu *int `pulumi:"mtu"`
// The name of the HPC Cache. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
NtpServer *string `pulumi:"ntpServer"`
// The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
//
// > **Note:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
SkuName *string `pulumi:"skuName"`
// The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the HPC Cache.
Tags map[string]string `pulumi:"tags"`
}
type CacheState struct {
// Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
AutomaticallyRotateKeyToLatestEnabled pulumi.BoolPtrInput
// The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
//
// > **Note:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
CacheSizeInGb pulumi.IntPtrInput
// A `defaultAccessPolicy` block as defined below.
DefaultAccessPolicy CacheDefaultAccessPolicyPtrInput
// A `directoryActiveDirectory` block as defined below.
DirectoryActiveDirectory CacheDirectoryActiveDirectoryPtrInput
// A `directoryFlatFile` block as defined below.
DirectoryFlatFile CacheDirectoryFlatFilePtrInput
// A `directoryLdap` block as defined below.
//
// > **Note:** Only one of `directoryActiveDirectory`, `directoryFlatFile` and `directoryLdap` can be set.
DirectoryLdap CacheDirectoryLdapPtrInput
// A `dns` block as defined below.
Dns CacheDnsPtrInput
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity CacheIdentityPtrInput
// The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
KeyVaultKeyId pulumi.StringPtrInput
// Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A list of IP Addresses where the HPC Cache can be mounted.
MountAddresses pulumi.StringArrayInput
// The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
Mtu pulumi.IntPtrInput
// The name of the HPC Cache. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
NtpServer pulumi.StringPtrInput
// The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
//
// > **Note:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
SkuName pulumi.StringPtrInput
// The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
SubnetId pulumi.StringPtrInput
// A mapping of tags to assign to the HPC Cache.
Tags pulumi.StringMapInput
}
func (CacheState) ElementType() reflect.Type {
return reflect.TypeOf((*cacheState)(nil)).Elem()
}
type cacheArgs struct {
// Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
AutomaticallyRotateKeyToLatestEnabled *bool `pulumi:"automaticallyRotateKeyToLatestEnabled"`
// The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
//
// > **Note:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
CacheSizeInGb int `pulumi:"cacheSizeInGb"`
// A `defaultAccessPolicy` block as defined below.
DefaultAccessPolicy *CacheDefaultAccessPolicy `pulumi:"defaultAccessPolicy"`
// A `directoryActiveDirectory` block as defined below.
DirectoryActiveDirectory *CacheDirectoryActiveDirectory `pulumi:"directoryActiveDirectory"`
// A `directoryFlatFile` block as defined below.
DirectoryFlatFile *CacheDirectoryFlatFile `pulumi:"directoryFlatFile"`
// A `directoryLdap` block as defined below.
//
// > **Note:** Only one of `directoryActiveDirectory`, `directoryFlatFile` and `directoryLdap` can be set.
DirectoryLdap *CacheDirectoryLdap `pulumi:"directoryLdap"`
// A `dns` block as defined below.
Dns *CacheDns `pulumi:"dns"`
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity *CacheIdentity `pulumi:"identity"`
// The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
Mtu *int `pulumi:"mtu"`
// The name of the HPC Cache. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
NtpServer *string `pulumi:"ntpServer"`
// The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
//
// > **Note:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
SkuName string `pulumi:"skuName"`
// The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
SubnetId string `pulumi:"subnetId"`
// A mapping of tags to assign to the HPC Cache.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Cache resource.
type CacheArgs struct {
// Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
AutomaticallyRotateKeyToLatestEnabled pulumi.BoolPtrInput
// The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
//
// > **Note:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
CacheSizeInGb pulumi.IntInput
// A `defaultAccessPolicy` block as defined below.
DefaultAccessPolicy CacheDefaultAccessPolicyPtrInput
// A `directoryActiveDirectory` block as defined below.
DirectoryActiveDirectory CacheDirectoryActiveDirectoryPtrInput
// A `directoryFlatFile` block as defined below.
DirectoryFlatFile CacheDirectoryFlatFilePtrInput
// A `directoryLdap` block as defined below.
//
// > **Note:** Only one of `directoryActiveDirectory`, `directoryFlatFile` and `directoryLdap` can be set.
DirectoryLdap CacheDirectoryLdapPtrInput
// A `dns` block as defined below.
Dns CacheDnsPtrInput
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity CacheIdentityPtrInput
// The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
KeyVaultKeyId pulumi.StringPtrInput
// Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
Mtu pulumi.IntPtrInput
// The name of the HPC Cache. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
NtpServer pulumi.StringPtrInput
// The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
//
// > **Note:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
SkuName pulumi.StringInput
// The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
SubnetId pulumi.StringInput
// A mapping of tags to assign to the HPC Cache.
Tags pulumi.StringMapInput
}
func (CacheArgs) ElementType() reflect.Type {
return reflect.TypeOf((*cacheArgs)(nil)).Elem()
}
type CacheInput interface {
pulumi.Input
ToCacheOutput() CacheOutput
ToCacheOutputWithContext(ctx context.Context) CacheOutput
}
func (*Cache) ElementType() reflect.Type {
return reflect.TypeOf((**Cache)(nil)).Elem()
}
func (i *Cache) ToCacheOutput() CacheOutput {
return i.ToCacheOutputWithContext(context.Background())
}
func (i *Cache) ToCacheOutputWithContext(ctx context.Context) CacheOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheOutput)
}
// CacheArrayInput is an input type that accepts CacheArray and CacheArrayOutput values.
// You can construct a concrete instance of `CacheArrayInput` via:
//
// CacheArray{ CacheArgs{...} }
type CacheArrayInput interface {
pulumi.Input
ToCacheArrayOutput() CacheArrayOutput
ToCacheArrayOutputWithContext(context.Context) CacheArrayOutput
}
type CacheArray []CacheInput
func (CacheArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cache)(nil)).Elem()
}
func (i CacheArray) ToCacheArrayOutput() CacheArrayOutput {
return i.ToCacheArrayOutputWithContext(context.Background())
}
func (i CacheArray) ToCacheArrayOutputWithContext(ctx context.Context) CacheArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheArrayOutput)
}
// CacheMapInput is an input type that accepts CacheMap and CacheMapOutput values.
// You can construct a concrete instance of `CacheMapInput` via:
//
// CacheMap{ "key": CacheArgs{...} }
type CacheMapInput interface {
pulumi.Input
ToCacheMapOutput() CacheMapOutput
ToCacheMapOutputWithContext(context.Context) CacheMapOutput
}
type CacheMap map[string]CacheInput
func (CacheMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cache)(nil)).Elem()
}
func (i CacheMap) ToCacheMapOutput() CacheMapOutput {
return i.ToCacheMapOutputWithContext(context.Background())
}
func (i CacheMap) ToCacheMapOutputWithContext(ctx context.Context) CacheMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheMapOutput)
}
type CacheOutput struct{ *pulumi.OutputState }
func (CacheOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Cache)(nil)).Elem()
}
func (o CacheOutput) ToCacheOutput() CacheOutput {
return o
}
func (o CacheOutput) ToCacheOutputWithContext(ctx context.Context) CacheOutput {
return o
}
// Specifies whether the HPC Cache automatically rotates Encryption Key to the latest version.
func (o CacheOutput) AutomaticallyRotateKeyToLatestEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Cache) pulumi.BoolPtrOutput { return v.AutomaticallyRotateKeyToLatestEnabled }).(pulumi.BoolPtrOutput)
}
// The size of the HPC Cache, in GB. Possible values are `3072`, `6144`, `12288`, `21623`, `24576`, `43246`, `49152` and `86491`. Changing this forces a new resource to be created.
//
// > **Note:** The `21623`, `43246` and `86491` sizes are restricted to read only resources.
func (o CacheOutput) CacheSizeInGb() pulumi.IntOutput {
return o.ApplyT(func(v *Cache) pulumi.IntOutput { return v.CacheSizeInGb }).(pulumi.IntOutput)
}
// A `defaultAccessPolicy` block as defined below.
func (o CacheOutput) DefaultAccessPolicy() CacheDefaultAccessPolicyOutput {
return o.ApplyT(func(v *Cache) CacheDefaultAccessPolicyOutput { return v.DefaultAccessPolicy }).(CacheDefaultAccessPolicyOutput)
}
// A `directoryActiveDirectory` block as defined below.
func (o CacheOutput) DirectoryActiveDirectory() CacheDirectoryActiveDirectoryPtrOutput {
return o.ApplyT(func(v *Cache) CacheDirectoryActiveDirectoryPtrOutput { return v.DirectoryActiveDirectory }).(CacheDirectoryActiveDirectoryPtrOutput)
}
// A `directoryFlatFile` block as defined below.
func (o CacheOutput) DirectoryFlatFile() CacheDirectoryFlatFilePtrOutput {
return o.ApplyT(func(v *Cache) CacheDirectoryFlatFilePtrOutput { return v.DirectoryFlatFile }).(CacheDirectoryFlatFilePtrOutput)
}
// A `directoryLdap` block as defined below.
//
// > **Note:** Only one of `directoryActiveDirectory`, `directoryFlatFile` and `directoryLdap` can be set.
func (o CacheOutput) DirectoryLdap() CacheDirectoryLdapPtrOutput {
return o.ApplyT(func(v *Cache) CacheDirectoryLdapPtrOutput { return v.DirectoryLdap }).(CacheDirectoryLdapPtrOutput)
}
// A `dns` block as defined below.
func (o CacheOutput) Dns() CacheDnsPtrOutput {
return o.ApplyT(func(v *Cache) CacheDnsPtrOutput { return v.Dns }).(CacheDnsPtrOutput)
}
// An `identity` block as defined below. Changing this forces a new resource to be created.
func (o CacheOutput) Identity() CacheIdentityPtrOutput {
return o.ApplyT(func(v *Cache) CacheIdentityPtrOutput { return v.Identity }).(CacheIdentityPtrOutput)
}
// The ID of the Key Vault Key which should be used to encrypt the data in this HPC Cache.
func (o CacheOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Cache) pulumi.StringPtrOutput { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput)
}
// Specifies the supported Azure Region where the HPC Cache should be created. Changing this forces a new resource to be created.
func (o CacheOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A list of IP Addresses where the HPC Cache can be mounted.
func (o CacheOutput) MountAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Cache) pulumi.StringArrayOutput { return v.MountAddresses }).(pulumi.StringArrayOutput)
}
// The IPv4 maximum transmission unit configured for the subnet of the HPC Cache. Possible values range from 576 - 1500. Defaults to `1500`.
func (o CacheOutput) Mtu() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Cache) pulumi.IntPtrOutput { return v.Mtu }).(pulumi.IntPtrOutput)
}
// The name of the HPC Cache. Changing this forces a new resource to be created.
func (o CacheOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`.
func (o CacheOutput) NtpServer() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Cache) pulumi.StringPtrOutput { return v.NtpServer }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group in which to create the HPC Cache. Changing this forces a new resource to be created.
func (o CacheOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The SKU of HPC Cache to use. Possible values are (ReadWrite) - `Standard_2G`, `Standard_4G` `Standard_8G` or (ReadOnly) - `Standard_L4_5G`, `Standard_L9G`, and `Standard_L16G`. Changing this forces a new resource to be created.
//
// > **Note:** The read-only SKUs have restricted cache sizes. `Standard_L4_5G` must be set to `21623`. `Standard_L9G` to `43246` and `Standard_L16G` to `86491`.
func (o CacheOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput)
}
// The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created.
func (o CacheOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the HPC Cache.
func (o CacheOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Cache) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type CacheArrayOutput struct{ *pulumi.OutputState }
func (CacheArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cache)(nil)).Elem()
}
func (o CacheArrayOutput) ToCacheArrayOutput() CacheArrayOutput {
return o
}
func (o CacheArrayOutput) ToCacheArrayOutputWithContext(ctx context.Context) CacheArrayOutput {
return o
}
func (o CacheArrayOutput) Index(i pulumi.IntInput) CacheOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cache {
return vs[0].([]*Cache)[vs[1].(int)]
}).(CacheOutput)
}
type CacheMapOutput struct{ *pulumi.OutputState }
func (CacheMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cache)(nil)).Elem()
}
func (o CacheMapOutput) ToCacheMapOutput() CacheMapOutput {
return o
}
func (o CacheMapOutput) ToCacheMapOutputWithContext(ctx context.Context) CacheMapOutput {
return o
}
func (o CacheMapOutput) MapIndex(k pulumi.StringInput) CacheOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cache {
return vs[0].(map[string]*Cache)[vs[1].(string)]
}).(CacheOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CacheInput)(nil)).Elem(), &Cache{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheArrayInput)(nil)).Elem(), CacheArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheMapInput)(nil)).Elem(), CacheMap{})
pulumi.RegisterOutputType(CacheOutput{})
pulumi.RegisterOutputType(CacheArrayOutput{})
pulumi.RegisterOutputType(CacheMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/hpc/cacheBlobTarget.go | sdk/go/azure/hpc/cacheBlobTarget.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package hpc
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 Target within a HPC Cache.
//
// !> **Note:** The `hpc.CacheBlobTarget` resource has been deprecated because the service is retiring on 2025-09-30. This resource will be removed in v5.0 of the AzureRM Provider. See https://aka.ms/hpccacheretirement for more information.
//
// > **Note:** By request of the service team the provider no longer automatically registering the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace 'Microsoft.StorageCache'`.
//
// ## Import
//
// Blob Targets within an HPC Cache can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:hpc/cacheBlobTarget:CacheBlobTarget example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/storageTargets/target1
// ```
type CacheBlobTarget struct {
pulumi.CustomResourceState
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName pulumi.StringPtrOutput `pulumi:"accessPolicyName"`
// The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.
CacheName pulumi.StringOutput `pulumi:"cacheName"`
// The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The client-facing file path of the HPC Cache Blob Target.
NamespacePath pulumi.StringOutput `pulumi:"namespacePath"`
// The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId pulumi.StringOutput `pulumi:"storageContainerId"`
}
// NewCacheBlobTarget registers a new resource with the given unique name, arguments, and options.
func NewCacheBlobTarget(ctx *pulumi.Context,
name string, args *CacheBlobTargetArgs, opts ...pulumi.ResourceOption) (*CacheBlobTarget, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CacheName == nil {
return nil, errors.New("invalid value for required argument 'CacheName'")
}
if args.NamespacePath == nil {
return nil, errors.New("invalid value for required argument 'NamespacePath'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageContainerId == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CacheBlobTarget
err := ctx.RegisterResource("azure:hpc/cacheBlobTarget:CacheBlobTarget", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCacheBlobTarget gets an existing CacheBlobTarget resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCacheBlobTarget(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CacheBlobTargetState, opts ...pulumi.ResourceOption) (*CacheBlobTarget, error) {
var resource CacheBlobTarget
err := ctx.ReadResource("azure:hpc/cacheBlobTarget:CacheBlobTarget", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CacheBlobTarget resources.
type cacheBlobTargetState struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName *string `pulumi:"accessPolicyName"`
// The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.
CacheName *string `pulumi:"cacheName"`
// The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The client-facing file path of the HPC Cache Blob Target.
NamespacePath *string `pulumi:"namespacePath"`
// The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId *string `pulumi:"storageContainerId"`
}
type CacheBlobTargetState struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName pulumi.StringPtrInput
// The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.
CacheName pulumi.StringPtrInput
// The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The client-facing file path of the HPC Cache Blob Target.
NamespacePath pulumi.StringPtrInput
// The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId pulumi.StringPtrInput
}
func (CacheBlobTargetState) ElementType() reflect.Type {
return reflect.TypeOf((*cacheBlobTargetState)(nil)).Elem()
}
type cacheBlobTargetArgs struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName *string `pulumi:"accessPolicyName"`
// The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.
CacheName string `pulumi:"cacheName"`
// The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The client-facing file path of the HPC Cache Blob Target.
NamespacePath string `pulumi:"namespacePath"`
// The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId string `pulumi:"storageContainerId"`
}
// The set of arguments for constructing a CacheBlobTarget resource.
type CacheBlobTargetArgs struct {
// The name of the access policy applied to this target. Defaults to `default`.
AccessPolicyName pulumi.StringPtrInput
// The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.
CacheName pulumi.StringInput
// The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The client-facing file path of the HPC Cache Blob Target.
NamespacePath pulumi.StringInput
// The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
StorageContainerId pulumi.StringInput
}
func (CacheBlobTargetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*cacheBlobTargetArgs)(nil)).Elem()
}
type CacheBlobTargetInput interface {
pulumi.Input
ToCacheBlobTargetOutput() CacheBlobTargetOutput
ToCacheBlobTargetOutputWithContext(ctx context.Context) CacheBlobTargetOutput
}
func (*CacheBlobTarget) ElementType() reflect.Type {
return reflect.TypeOf((**CacheBlobTarget)(nil)).Elem()
}
func (i *CacheBlobTarget) ToCacheBlobTargetOutput() CacheBlobTargetOutput {
return i.ToCacheBlobTargetOutputWithContext(context.Background())
}
func (i *CacheBlobTarget) ToCacheBlobTargetOutputWithContext(ctx context.Context) CacheBlobTargetOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheBlobTargetOutput)
}
// CacheBlobTargetArrayInput is an input type that accepts CacheBlobTargetArray and CacheBlobTargetArrayOutput values.
// You can construct a concrete instance of `CacheBlobTargetArrayInput` via:
//
// CacheBlobTargetArray{ CacheBlobTargetArgs{...} }
type CacheBlobTargetArrayInput interface {
pulumi.Input
ToCacheBlobTargetArrayOutput() CacheBlobTargetArrayOutput
ToCacheBlobTargetArrayOutputWithContext(context.Context) CacheBlobTargetArrayOutput
}
type CacheBlobTargetArray []CacheBlobTargetInput
func (CacheBlobTargetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheBlobTarget)(nil)).Elem()
}
func (i CacheBlobTargetArray) ToCacheBlobTargetArrayOutput() CacheBlobTargetArrayOutput {
return i.ToCacheBlobTargetArrayOutputWithContext(context.Background())
}
func (i CacheBlobTargetArray) ToCacheBlobTargetArrayOutputWithContext(ctx context.Context) CacheBlobTargetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheBlobTargetArrayOutput)
}
// CacheBlobTargetMapInput is an input type that accepts CacheBlobTargetMap and CacheBlobTargetMapOutput values.
// You can construct a concrete instance of `CacheBlobTargetMapInput` via:
//
// CacheBlobTargetMap{ "key": CacheBlobTargetArgs{...} }
type CacheBlobTargetMapInput interface {
pulumi.Input
ToCacheBlobTargetMapOutput() CacheBlobTargetMapOutput
ToCacheBlobTargetMapOutputWithContext(context.Context) CacheBlobTargetMapOutput
}
type CacheBlobTargetMap map[string]CacheBlobTargetInput
func (CacheBlobTargetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheBlobTarget)(nil)).Elem()
}
func (i CacheBlobTargetMap) ToCacheBlobTargetMapOutput() CacheBlobTargetMapOutput {
return i.ToCacheBlobTargetMapOutputWithContext(context.Background())
}
func (i CacheBlobTargetMap) ToCacheBlobTargetMapOutputWithContext(ctx context.Context) CacheBlobTargetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheBlobTargetMapOutput)
}
type CacheBlobTargetOutput struct{ *pulumi.OutputState }
func (CacheBlobTargetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CacheBlobTarget)(nil)).Elem()
}
func (o CacheBlobTargetOutput) ToCacheBlobTargetOutput() CacheBlobTargetOutput {
return o
}
func (o CacheBlobTargetOutput) ToCacheBlobTargetOutputWithContext(ctx context.Context) CacheBlobTargetOutput {
return o
}
// The name of the access policy applied to this target. Defaults to `default`.
func (o CacheBlobTargetOutput) AccessPolicyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CacheBlobTarget) pulumi.StringPtrOutput { return v.AccessPolicyName }).(pulumi.StringPtrOutput)
}
// The name HPC Cache, which the HPC Cache Blob Target will be added to. Changing this forces a new resource to be created.
func (o CacheBlobTargetOutput) CacheName() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobTarget) pulumi.StringOutput { return v.CacheName }).(pulumi.StringOutput)
}
// The name of the HPC Cache Blob Target. Changing this forces a new resource to be created.
func (o CacheBlobTargetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobTarget) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The client-facing file path of the HPC Cache Blob Target.
func (o CacheBlobTargetOutput) NamespacePath() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobTarget) pulumi.StringOutput { return v.NamespacePath }).(pulumi.StringOutput)
}
// The name of the Resource Group in which to create the HPC Cache Blob Target. Changing this forces a new resource to be created.
func (o CacheBlobTargetOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobTarget) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Resource Manager ID of the Storage Container used as the HPC Cache Blob Target. Changing this forces a new resource to be created.
//
// > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`.
func (o CacheBlobTargetOutput) StorageContainerId() pulumi.StringOutput {
return o.ApplyT(func(v *CacheBlobTarget) pulumi.StringOutput { return v.StorageContainerId }).(pulumi.StringOutput)
}
type CacheBlobTargetArrayOutput struct{ *pulumi.OutputState }
func (CacheBlobTargetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheBlobTarget)(nil)).Elem()
}
func (o CacheBlobTargetArrayOutput) ToCacheBlobTargetArrayOutput() CacheBlobTargetArrayOutput {
return o
}
func (o CacheBlobTargetArrayOutput) ToCacheBlobTargetArrayOutputWithContext(ctx context.Context) CacheBlobTargetArrayOutput {
return o
}
func (o CacheBlobTargetArrayOutput) Index(i pulumi.IntInput) CacheBlobTargetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CacheBlobTarget {
return vs[0].([]*CacheBlobTarget)[vs[1].(int)]
}).(CacheBlobTargetOutput)
}
type CacheBlobTargetMapOutput struct{ *pulumi.OutputState }
func (CacheBlobTargetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheBlobTarget)(nil)).Elem()
}
func (o CacheBlobTargetMapOutput) ToCacheBlobTargetMapOutput() CacheBlobTargetMapOutput {
return o
}
func (o CacheBlobTargetMapOutput) ToCacheBlobTargetMapOutputWithContext(ctx context.Context) CacheBlobTargetMapOutput {
return o
}
func (o CacheBlobTargetMapOutput) MapIndex(k pulumi.StringInput) CacheBlobTargetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CacheBlobTarget {
return vs[0].(map[string]*CacheBlobTarget)[vs[1].(string)]
}).(CacheBlobTargetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CacheBlobTargetInput)(nil)).Elem(), &CacheBlobTarget{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheBlobTargetArrayInput)(nil)).Elem(), CacheBlobTargetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheBlobTargetMapInput)(nil)).Elem(), CacheBlobTargetMap{})
pulumi.RegisterOutputType(CacheBlobTargetOutput{})
pulumi.RegisterOutputType(CacheBlobTargetArrayOutput{})
pulumi.RegisterOutputType(CacheBlobTargetMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/hpc/cacheAccessPolicy.go | sdk/go/azure/hpc/cacheAccessPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package hpc
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a HPC Cache Access Policy.
//
// !> **Note:** The `hpc.CacheAccessPolicy` resource has been deprecated because the service is retiring on 2025-09-30. This resource will be removed in v5.0 of the AzureRM Provider. See https://aka.ms/hpccacheretirement for more information.
//
// ## 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/hpc"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("examplevn"),
// 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("examplesubnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleCache, err := hpc.NewCache(ctx, "example", &hpc.CacheArgs{
// Name: pulumi.String("examplehpccache"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// CacheSizeInGb: pulumi.Int(3072),
// SubnetId: exampleSubnet.ID(),
// SkuName: pulumi.String("Standard_2G"),
// })
// if err != nil {
// return err
// }
// _, err = hpc.NewCacheAccessPolicy(ctx, "example", &hpc.CacheAccessPolicyArgs{
// Name: pulumi.String("example"),
// HpcCacheId: exampleCache.ID(),
// AccessRules: hpc.CacheAccessPolicyAccessRuleArray{
// &hpc.CacheAccessPolicyAccessRuleArgs{
// Scope: pulumi.String("default"),
// Access: pulumi.String("rw"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.StorageCache` - 2023-05-01
//
// ## Import
//
// HPC Cache Access Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:hpc/cacheAccessPolicy:CacheAccessPolicy example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/cacheAccessPolicies/policy1
// ```
type CacheAccessPolicy struct {
pulumi.CustomResourceState
// One or more `accessRule` blocks (up to three) as defined below.
AccessRules CacheAccessPolicyAccessRuleArrayOutput `pulumi:"accessRules"`
// The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created.
HpcCacheId pulumi.StringOutput `pulumi:"hpcCacheId"`
// The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewCacheAccessPolicy registers a new resource with the given unique name, arguments, and options.
func NewCacheAccessPolicy(ctx *pulumi.Context,
name string, args *CacheAccessPolicyArgs, opts ...pulumi.ResourceOption) (*CacheAccessPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccessRules == nil {
return nil, errors.New("invalid value for required argument 'AccessRules'")
}
if args.HpcCacheId == nil {
return nil, errors.New("invalid value for required argument 'HpcCacheId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CacheAccessPolicy
err := ctx.RegisterResource("azure:hpc/cacheAccessPolicy:CacheAccessPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCacheAccessPolicy gets an existing CacheAccessPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCacheAccessPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CacheAccessPolicyState, opts ...pulumi.ResourceOption) (*CacheAccessPolicy, error) {
var resource CacheAccessPolicy
err := ctx.ReadResource("azure:hpc/cacheAccessPolicy:CacheAccessPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CacheAccessPolicy resources.
type cacheAccessPolicyState struct {
// One or more `accessRule` blocks (up to three) as defined below.
AccessRules []CacheAccessPolicyAccessRule `pulumi:"accessRules"`
// The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created.
HpcCacheId *string `pulumi:"hpcCacheId"`
// The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created.
Name *string `pulumi:"name"`
}
type CacheAccessPolicyState struct {
// One or more `accessRule` blocks (up to three) as defined below.
AccessRules CacheAccessPolicyAccessRuleArrayInput
// The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created.
HpcCacheId pulumi.StringPtrInput
// The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created.
Name pulumi.StringPtrInput
}
func (CacheAccessPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*cacheAccessPolicyState)(nil)).Elem()
}
type cacheAccessPolicyArgs struct {
// One or more `accessRule` blocks (up to three) as defined below.
AccessRules []CacheAccessPolicyAccessRule `pulumi:"accessRules"`
// The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created.
HpcCacheId string `pulumi:"hpcCacheId"`
// The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a CacheAccessPolicy resource.
type CacheAccessPolicyArgs struct {
// One or more `accessRule` blocks (up to three) as defined below.
AccessRules CacheAccessPolicyAccessRuleArrayInput
// The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created.
HpcCacheId pulumi.StringInput
// The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created.
Name pulumi.StringPtrInput
}
func (CacheAccessPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*cacheAccessPolicyArgs)(nil)).Elem()
}
type CacheAccessPolicyInput interface {
pulumi.Input
ToCacheAccessPolicyOutput() CacheAccessPolicyOutput
ToCacheAccessPolicyOutputWithContext(ctx context.Context) CacheAccessPolicyOutput
}
func (*CacheAccessPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**CacheAccessPolicy)(nil)).Elem()
}
func (i *CacheAccessPolicy) ToCacheAccessPolicyOutput() CacheAccessPolicyOutput {
return i.ToCacheAccessPolicyOutputWithContext(context.Background())
}
func (i *CacheAccessPolicy) ToCacheAccessPolicyOutputWithContext(ctx context.Context) CacheAccessPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyOutput)
}
// CacheAccessPolicyArrayInput is an input type that accepts CacheAccessPolicyArray and CacheAccessPolicyArrayOutput values.
// You can construct a concrete instance of `CacheAccessPolicyArrayInput` via:
//
// CacheAccessPolicyArray{ CacheAccessPolicyArgs{...} }
type CacheAccessPolicyArrayInput interface {
pulumi.Input
ToCacheAccessPolicyArrayOutput() CacheAccessPolicyArrayOutput
ToCacheAccessPolicyArrayOutputWithContext(context.Context) CacheAccessPolicyArrayOutput
}
type CacheAccessPolicyArray []CacheAccessPolicyInput
func (CacheAccessPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheAccessPolicy)(nil)).Elem()
}
func (i CacheAccessPolicyArray) ToCacheAccessPolicyArrayOutput() CacheAccessPolicyArrayOutput {
return i.ToCacheAccessPolicyArrayOutputWithContext(context.Background())
}
func (i CacheAccessPolicyArray) ToCacheAccessPolicyArrayOutputWithContext(ctx context.Context) CacheAccessPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyArrayOutput)
}
// CacheAccessPolicyMapInput is an input type that accepts CacheAccessPolicyMap and CacheAccessPolicyMapOutput values.
// You can construct a concrete instance of `CacheAccessPolicyMapInput` via:
//
// CacheAccessPolicyMap{ "key": CacheAccessPolicyArgs{...} }
type CacheAccessPolicyMapInput interface {
pulumi.Input
ToCacheAccessPolicyMapOutput() CacheAccessPolicyMapOutput
ToCacheAccessPolicyMapOutputWithContext(context.Context) CacheAccessPolicyMapOutput
}
type CacheAccessPolicyMap map[string]CacheAccessPolicyInput
func (CacheAccessPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheAccessPolicy)(nil)).Elem()
}
func (i CacheAccessPolicyMap) ToCacheAccessPolicyMapOutput() CacheAccessPolicyMapOutput {
return i.ToCacheAccessPolicyMapOutputWithContext(context.Background())
}
func (i CacheAccessPolicyMap) ToCacheAccessPolicyMapOutputWithContext(ctx context.Context) CacheAccessPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyMapOutput)
}
type CacheAccessPolicyOutput struct{ *pulumi.OutputState }
func (CacheAccessPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CacheAccessPolicy)(nil)).Elem()
}
func (o CacheAccessPolicyOutput) ToCacheAccessPolicyOutput() CacheAccessPolicyOutput {
return o
}
func (o CacheAccessPolicyOutput) ToCacheAccessPolicyOutputWithContext(ctx context.Context) CacheAccessPolicyOutput {
return o
}
// One or more `accessRule` blocks (up to three) as defined below.
func (o CacheAccessPolicyOutput) AccessRules() CacheAccessPolicyAccessRuleArrayOutput {
return o.ApplyT(func(v *CacheAccessPolicy) CacheAccessPolicyAccessRuleArrayOutput { return v.AccessRules }).(CacheAccessPolicyAccessRuleArrayOutput)
}
// The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created.
func (o CacheAccessPolicyOutput) HpcCacheId() pulumi.StringOutput {
return o.ApplyT(func(v *CacheAccessPolicy) pulumi.StringOutput { return v.HpcCacheId }).(pulumi.StringOutput)
}
// The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created.
func (o CacheAccessPolicyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CacheAccessPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type CacheAccessPolicyArrayOutput struct{ *pulumi.OutputState }
func (CacheAccessPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheAccessPolicy)(nil)).Elem()
}
func (o CacheAccessPolicyArrayOutput) ToCacheAccessPolicyArrayOutput() CacheAccessPolicyArrayOutput {
return o
}
func (o CacheAccessPolicyArrayOutput) ToCacheAccessPolicyArrayOutputWithContext(ctx context.Context) CacheAccessPolicyArrayOutput {
return o
}
func (o CacheAccessPolicyArrayOutput) Index(i pulumi.IntInput) CacheAccessPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CacheAccessPolicy {
return vs[0].([]*CacheAccessPolicy)[vs[1].(int)]
}).(CacheAccessPolicyOutput)
}
type CacheAccessPolicyMapOutput struct{ *pulumi.OutputState }
func (CacheAccessPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheAccessPolicy)(nil)).Elem()
}
func (o CacheAccessPolicyMapOutput) ToCacheAccessPolicyMapOutput() CacheAccessPolicyMapOutput {
return o
}
func (o CacheAccessPolicyMapOutput) ToCacheAccessPolicyMapOutputWithContext(ctx context.Context) CacheAccessPolicyMapOutput {
return o
}
func (o CacheAccessPolicyMapOutput) MapIndex(k pulumi.StringInput) CacheAccessPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CacheAccessPolicy {
return vs[0].(map[string]*CacheAccessPolicy)[vs[1].(string)]
}).(CacheAccessPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyInput)(nil)).Elem(), &CacheAccessPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyArrayInput)(nil)).Elem(), CacheAccessPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyMapInput)(nil)).Elem(), CacheAccessPolicyMap{})
pulumi.RegisterOutputType(CacheAccessPolicyOutput{})
pulumi.RegisterOutputType(CacheAccessPolicyArrayOutput{})
pulumi.RegisterOutputType(CacheAccessPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/hpc/cacheNfsTarget.go | sdk/go/azure/hpc/cacheNfsTarget.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package hpc
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a NFS Target within a HPC Cache.
//
// !> **Note:** The `hpc.CacheNfsTarget` resource has been deprecated because the service is retiring on 2025-09-30. This resource will be removed in v5.0 of the AzureRM Provider. See https://aka.ms/hpccacheretirement for more information.
//
// > **Note:** By request of the service team the provider no longer automatically registering the `Microsoft.StorageCache` Resource Provider for this resource. To register it you can run `az provider register --namespace 'Microsoft.StorageCache'`.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/hpc"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("examplevn"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleHpc, err := network.NewSubnet(ctx, "example_hpc", &network.SubnetArgs{
// Name: pulumi.String("examplesubnethpc"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleCache, err := hpc.NewCache(ctx, "example", &hpc.CacheArgs{
// Name: pulumi.String("examplehpccache"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// CacheSizeInGb: pulumi.Int(3072),
// SubnetId: exampleHpc.ID(),
// SkuName: pulumi.String("Standard_2G"),
// })
// if err != nil {
// return err
// }
// exampleVm, err := network.NewSubnet(ctx, "example_vm", &network.SubnetArgs{
// Name: pulumi.String("examplesubnetvm"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
// Name: pulumi.String("examplenic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
// &network.NetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("internal"),
// SubnetId: exampleVm.ID(),
// PrivateIpAddressAllocation: pulumi.String("Dynamic"),
// },
// },
// })
// if err != nil {
// return err
// }
// customData := `#!/bin/bash
//
// sudo -i
// apt-get install -y nfs-kernel-server
// mkdir -p /export/a/1
// mkdir -p /export/a/2
// mkdir -p /export/b
// cat << EOF > /etc/exports
// /export/a *(rw,fsid=0,insecure,no_subtree_check,async)
// /export/b *(rw,fsid=0,insecure,no_subtree_check,async)
// EOF
// systemctl start nfs-server
// exportfs -arv
// `
//
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "~/.ssh/id_rsa.pub",
// }, nil)
// if err != nil {
// return err
// }
// invokeBase64encode1, err := std.Base64encode(ctx, &std.Base64encodeArgs{
// Input: customData,
// }, nil)
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
// Name: pulumi.String("examplevm"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Size: pulumi.String("Standard_F2"),
// AdminUsername: pulumi.String("adminuser"),
// NetworkInterfaceIds: pulumi.StringArray{
// exampleNetworkInterface.ID(),
// },
// AdminSshKeys: compute.LinuxVirtualMachineAdminSshKeyArray{
// &compute.LinuxVirtualMachineAdminSshKeyArgs{
// Username: pulumi.String("adminuser"),
// PublicKey: pulumi.String(invokeFile.Result),
// },
// },
// OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
// Caching: pulumi.String("ReadWrite"),
// StorageAccountType: pulumi.String("Standard_LRS"),
// },
// SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// CustomData: pulumi.String(invokeBase64encode1.Result),
// })
// if err != nil {
// return err
// }
// _, err = hpc.NewCacheNfsTarget(ctx, "example", &hpc.CacheNfsTargetArgs{
// Name: pulumi.String("examplehpcnfstarget"),
// ResourceGroupName: example.Name,
// CacheName: exampleCache.Name,
// TargetHostName: exampleLinuxVirtualMachine.PrivateIpAddress,
// UsageModel: pulumi.String("READ_HEAVY_INFREQ"),
// NamespaceJunctions: hpc.CacheNfsTargetNamespaceJunctionArray{
// &hpc.CacheNfsTargetNamespaceJunctionArgs{
// NamespacePath: pulumi.String("/nfs/a1"),
// NfsExport: pulumi.String("/export/a"),
// TargetPath: pulumi.String("1"),
// },
// &hpc.CacheNfsTargetNamespaceJunctionArgs{
// NamespacePath: pulumi.String("/nfs/b"),
// NfsExport: pulumi.String("/export/b"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.StorageCache` - 2023-05-01
//
// ## Import
//
// NFS Target within a HPC Cache can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:hpc/cacheNfsTarget:CacheNfsTarget example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageCache/caches/cache1/storageTargets/target1
// ```
type CacheNfsTarget struct {
pulumi.CustomResourceState
// The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created.
CacheName pulumi.StringOutput `pulumi:"cacheName"`
// The name of the HPC Cache NFS Target. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below.
NamespaceJunctions CacheNfsTargetNamespaceJunctionArrayOutput `pulumi:"namespaceJunctions"`
// The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created.
TargetHostName pulumi.StringOutput `pulumi:"targetHostName"`
// The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel pulumi.StringOutput `pulumi:"usageModel"`
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds pulumi.IntPtrOutput `pulumi:"verificationTimerInSeconds"`
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds pulumi.IntPtrOutput `pulumi:"writeBackTimerInSeconds"`
}
// NewCacheNfsTarget registers a new resource with the given unique name, arguments, and options.
func NewCacheNfsTarget(ctx *pulumi.Context,
name string, args *CacheNfsTargetArgs, opts ...pulumi.ResourceOption) (*CacheNfsTarget, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CacheName == nil {
return nil, errors.New("invalid value for required argument 'CacheName'")
}
if args.NamespaceJunctions == nil {
return nil, errors.New("invalid value for required argument 'NamespaceJunctions'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.TargetHostName == nil {
return nil, errors.New("invalid value for required argument 'TargetHostName'")
}
if args.UsageModel == nil {
return nil, errors.New("invalid value for required argument 'UsageModel'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CacheNfsTarget
err := ctx.RegisterResource("azure:hpc/cacheNfsTarget:CacheNfsTarget", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCacheNfsTarget gets an existing CacheNfsTarget resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCacheNfsTarget(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CacheNfsTargetState, opts ...pulumi.ResourceOption) (*CacheNfsTarget, error) {
var resource CacheNfsTarget
err := ctx.ReadResource("azure:hpc/cacheNfsTarget:CacheNfsTarget", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CacheNfsTarget resources.
type cacheNfsTargetState struct {
// The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created.
CacheName *string `pulumi:"cacheName"`
// The name of the HPC Cache NFS Target. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below.
NamespaceJunctions []CacheNfsTargetNamespaceJunction `pulumi:"namespaceJunctions"`
// The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created.
TargetHostName *string `pulumi:"targetHostName"`
// The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel *string `pulumi:"usageModel"`
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds *int `pulumi:"verificationTimerInSeconds"`
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds *int `pulumi:"writeBackTimerInSeconds"`
}
type CacheNfsTargetState struct {
// The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created.
CacheName pulumi.StringPtrInput
// The name of the HPC Cache NFS Target. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below.
NamespaceJunctions CacheNfsTargetNamespaceJunctionArrayInput
// The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created.
TargetHostName pulumi.StringPtrInput
// The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel pulumi.StringPtrInput
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds pulumi.IntPtrInput
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds pulumi.IntPtrInput
}
func (CacheNfsTargetState) ElementType() reflect.Type {
return reflect.TypeOf((*cacheNfsTargetState)(nil)).Elem()
}
type cacheNfsTargetArgs struct {
// The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created.
CacheName string `pulumi:"cacheName"`
// The name of the HPC Cache NFS Target. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below.
NamespaceJunctions []CacheNfsTargetNamespaceJunction `pulumi:"namespaceJunctions"`
// The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created.
TargetHostName string `pulumi:"targetHostName"`
// The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel string `pulumi:"usageModel"`
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds *int `pulumi:"verificationTimerInSeconds"`
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds *int `pulumi:"writeBackTimerInSeconds"`
}
// The set of arguments for constructing a CacheNfsTarget resource.
type CacheNfsTargetArgs struct {
// The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created.
CacheName pulumi.StringInput
// The name of the HPC Cache NFS Target. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below.
NamespaceJunctions CacheNfsTargetNamespaceJunctionArrayInput
// The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created.
TargetHostName pulumi.StringInput
// The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
UsageModel pulumi.StringInput
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
VerificationTimerInSeconds pulumi.IntPtrInput
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
WriteBackTimerInSeconds pulumi.IntPtrInput
}
func (CacheNfsTargetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*cacheNfsTargetArgs)(nil)).Elem()
}
type CacheNfsTargetInput interface {
pulumi.Input
ToCacheNfsTargetOutput() CacheNfsTargetOutput
ToCacheNfsTargetOutputWithContext(ctx context.Context) CacheNfsTargetOutput
}
func (*CacheNfsTarget) ElementType() reflect.Type {
return reflect.TypeOf((**CacheNfsTarget)(nil)).Elem()
}
func (i *CacheNfsTarget) ToCacheNfsTargetOutput() CacheNfsTargetOutput {
return i.ToCacheNfsTargetOutputWithContext(context.Background())
}
func (i *CacheNfsTarget) ToCacheNfsTargetOutputWithContext(ctx context.Context) CacheNfsTargetOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheNfsTargetOutput)
}
// CacheNfsTargetArrayInput is an input type that accepts CacheNfsTargetArray and CacheNfsTargetArrayOutput values.
// You can construct a concrete instance of `CacheNfsTargetArrayInput` via:
//
// CacheNfsTargetArray{ CacheNfsTargetArgs{...} }
type CacheNfsTargetArrayInput interface {
pulumi.Input
ToCacheNfsTargetArrayOutput() CacheNfsTargetArrayOutput
ToCacheNfsTargetArrayOutputWithContext(context.Context) CacheNfsTargetArrayOutput
}
type CacheNfsTargetArray []CacheNfsTargetInput
func (CacheNfsTargetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheNfsTarget)(nil)).Elem()
}
func (i CacheNfsTargetArray) ToCacheNfsTargetArrayOutput() CacheNfsTargetArrayOutput {
return i.ToCacheNfsTargetArrayOutputWithContext(context.Background())
}
func (i CacheNfsTargetArray) ToCacheNfsTargetArrayOutputWithContext(ctx context.Context) CacheNfsTargetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheNfsTargetArrayOutput)
}
// CacheNfsTargetMapInput is an input type that accepts CacheNfsTargetMap and CacheNfsTargetMapOutput values.
// You can construct a concrete instance of `CacheNfsTargetMapInput` via:
//
// CacheNfsTargetMap{ "key": CacheNfsTargetArgs{...} }
type CacheNfsTargetMapInput interface {
pulumi.Input
ToCacheNfsTargetMapOutput() CacheNfsTargetMapOutput
ToCacheNfsTargetMapOutputWithContext(context.Context) CacheNfsTargetMapOutput
}
type CacheNfsTargetMap map[string]CacheNfsTargetInput
func (CacheNfsTargetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheNfsTarget)(nil)).Elem()
}
func (i CacheNfsTargetMap) ToCacheNfsTargetMapOutput() CacheNfsTargetMapOutput {
return i.ToCacheNfsTargetMapOutputWithContext(context.Background())
}
func (i CacheNfsTargetMap) ToCacheNfsTargetMapOutputWithContext(ctx context.Context) CacheNfsTargetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CacheNfsTargetMapOutput)
}
type CacheNfsTargetOutput struct{ *pulumi.OutputState }
func (CacheNfsTargetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CacheNfsTarget)(nil)).Elem()
}
func (o CacheNfsTargetOutput) ToCacheNfsTargetOutput() CacheNfsTargetOutput {
return o
}
func (o CacheNfsTargetOutput) ToCacheNfsTargetOutputWithContext(ctx context.Context) CacheNfsTargetOutput {
return o
}
// The name HPC Cache, which the HPC Cache NFS Target will be added to. Changing this forces a new resource to be created.
func (o CacheNfsTargetOutput) CacheName() pulumi.StringOutput {
return o.ApplyT(func(v *CacheNfsTarget) pulumi.StringOutput { return v.CacheName }).(pulumi.StringOutput)
}
// The name of the HPC Cache NFS Target. Changing this forces a new resource to be created.
func (o CacheNfsTargetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CacheNfsTarget) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Can be specified multiple times to define multiple `namespaceJunction`. Each `namespaceJunction` block supports fields documented below.
func (o CacheNfsTargetOutput) NamespaceJunctions() CacheNfsTargetNamespaceJunctionArrayOutput {
return o.ApplyT(func(v *CacheNfsTarget) CacheNfsTargetNamespaceJunctionArrayOutput { return v.NamespaceJunctions }).(CacheNfsTargetNamespaceJunctionArrayOutput)
}
// The name of the Resource Group in which to create the HPC Cache NFS Target. Changing this forces a new resource to be created.
func (o CacheNfsTargetOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *CacheNfsTarget) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created.
func (o CacheNfsTargetOutput) TargetHostName() pulumi.StringOutput {
return o.ApplyT(func(v *CacheNfsTarget) pulumi.StringOutput { return v.TargetHostName }).(pulumi.StringOutput)
}
// The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`.
func (o CacheNfsTargetOutput) UsageModel() pulumi.StringOutput {
return o.ApplyT(func(v *CacheNfsTarget) pulumi.StringOutput { return v.UsageModel }).(pulumi.StringOutput)
}
// The amount of time the cache waits before it checks the back-end storage for file updates. Possible values are between `1` and `31536000`.
func (o CacheNfsTargetOutput) VerificationTimerInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *CacheNfsTarget) pulumi.IntPtrOutput { return v.VerificationTimerInSeconds }).(pulumi.IntPtrOutput)
}
// The amount of time the cache waits after the last file change before it copies the changed file to back-end storage. Possible values are between `1` and `31536000`.
func (o CacheNfsTargetOutput) WriteBackTimerInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *CacheNfsTarget) pulumi.IntPtrOutput { return v.WriteBackTimerInSeconds }).(pulumi.IntPtrOutput)
}
type CacheNfsTargetArrayOutput struct{ *pulumi.OutputState }
func (CacheNfsTargetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CacheNfsTarget)(nil)).Elem()
}
func (o CacheNfsTargetArrayOutput) ToCacheNfsTargetArrayOutput() CacheNfsTargetArrayOutput {
return o
}
func (o CacheNfsTargetArrayOutput) ToCacheNfsTargetArrayOutputWithContext(ctx context.Context) CacheNfsTargetArrayOutput {
return o
}
func (o CacheNfsTargetArrayOutput) Index(i pulumi.IntInput) CacheNfsTargetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CacheNfsTarget {
return vs[0].([]*CacheNfsTarget)[vs[1].(int)]
}).(CacheNfsTargetOutput)
}
type CacheNfsTargetMapOutput struct{ *pulumi.OutputState }
func (CacheNfsTargetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CacheNfsTarget)(nil)).Elem()
}
func (o CacheNfsTargetMapOutput) ToCacheNfsTargetMapOutput() CacheNfsTargetMapOutput {
return o
}
func (o CacheNfsTargetMapOutput) ToCacheNfsTargetMapOutputWithContext(ctx context.Context) CacheNfsTargetMapOutput {
return o
}
func (o CacheNfsTargetMapOutput) MapIndex(k pulumi.StringInput) CacheNfsTargetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CacheNfsTarget {
return vs[0].(map[string]*CacheNfsTarget)[vs[1].(string)]
}).(CacheNfsTargetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CacheNfsTargetInput)(nil)).Elem(), &CacheNfsTarget{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheNfsTargetArrayInput)(nil)).Elem(), CacheNfsTargetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CacheNfsTargetMapInput)(nil)).Elem(), CacheNfsTargetMap{})
pulumi.RegisterOutputType(CacheNfsTargetOutput{})
pulumi.RegisterOutputType(CacheNfsTargetArrayOutput{})
pulumi.RegisterOutputType(CacheNfsTargetMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelDirectLineSpeech.go | sdk/go/azure/bot/channelDirectLineSpeech.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Direct Line Speech integration for a Bot Channel
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
// Name: pulumi.String("example-cogacct"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Kind: pulumi.String("SpeechServices"),
// SkuName: pulumi.String("S0"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example-bcr"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelDirectLineSpeech(ctx, "example", &bot.ChannelDirectLineSpeechArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// CognitiveServiceLocation: exampleAccount.Location,
// CognitiveServiceAccessKey: exampleAccount.PrimaryAccessKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Direct Line Speech Channels can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelDirectLineSpeech:ChannelDirectLineSpeech example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.BotService/botServices/botService1/channels/DirectLineSpeechChannel
// ```
type ChannelDirectLineSpeech struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// The ID of the Cognitive Account this Bot Channel should be associated with.
CognitiveAccountId pulumi.StringPtrOutput `pulumi:"cognitiveAccountId"`
// The access key to access the Cognitive Service.
CognitiveServiceAccessKey pulumi.StringOutput `pulumi:"cognitiveServiceAccessKey"`
// Specifies the supported Azure location where the Cognitive Service resource exists.
CognitiveServiceLocation pulumi.StringOutput `pulumi:"cognitiveServiceLocation"`
// The custom speech model id for the Direct Line Speech Channel.
CustomSpeechModelId pulumi.StringPtrOutput `pulumi:"customSpeechModelId"`
// The custom voice deployment id for the Direct Line Speech Channel.
CustomVoiceDeploymentId pulumi.StringPtrOutput `pulumi:"customVoiceDeploymentId"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource group where the Direct Line Speech Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewChannelDirectLineSpeech registers a new resource with the given unique name, arguments, and options.
func NewChannelDirectLineSpeech(ctx *pulumi.Context,
name string, args *ChannelDirectLineSpeechArgs, opts ...pulumi.ResourceOption) (*ChannelDirectLineSpeech, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.CognitiveServiceAccessKey == nil {
return nil, errors.New("invalid value for required argument 'CognitiveServiceAccessKey'")
}
if args.CognitiveServiceLocation == nil {
return nil, errors.New("invalid value for required argument 'CognitiveServiceLocation'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.CognitiveServiceAccessKey != nil {
args.CognitiveServiceAccessKey = pulumi.ToSecret(args.CognitiveServiceAccessKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"cognitiveServiceAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelDirectLineSpeech
err := ctx.RegisterResource("azure:bot/channelDirectLineSpeech:ChannelDirectLineSpeech", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelDirectLineSpeech gets an existing ChannelDirectLineSpeech resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelDirectLineSpeech(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelDirectLineSpeechState, opts ...pulumi.ResourceOption) (*ChannelDirectLineSpeech, error) {
var resource ChannelDirectLineSpeech
err := ctx.ReadResource("azure:bot/channelDirectLineSpeech:ChannelDirectLineSpeech", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelDirectLineSpeech resources.
type channelDirectLineSpeechState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// The ID of the Cognitive Account this Bot Channel should be associated with.
CognitiveAccountId *string `pulumi:"cognitiveAccountId"`
// The access key to access the Cognitive Service.
CognitiveServiceAccessKey *string `pulumi:"cognitiveServiceAccessKey"`
// Specifies the supported Azure location where the Cognitive Service resource exists.
CognitiveServiceLocation *string `pulumi:"cognitiveServiceLocation"`
// The custom speech model id for the Direct Line Speech Channel.
CustomSpeechModelId *string `pulumi:"customSpeechModelId"`
// The custom voice deployment id for the Direct Line Speech Channel.
CustomVoiceDeploymentId *string `pulumi:"customVoiceDeploymentId"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Direct Line Speech Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ChannelDirectLineSpeechState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// The ID of the Cognitive Account this Bot Channel should be associated with.
CognitiveAccountId pulumi.StringPtrInput
// The access key to access the Cognitive Service.
CognitiveServiceAccessKey pulumi.StringPtrInput
// Specifies the supported Azure location where the Cognitive Service resource exists.
CognitiveServiceLocation pulumi.StringPtrInput
// The custom speech model id for the Direct Line Speech Channel.
CustomSpeechModelId pulumi.StringPtrInput
// The custom voice deployment id for the Direct Line Speech Channel.
CustomVoiceDeploymentId pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Direct Line Speech Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ChannelDirectLineSpeechState) ElementType() reflect.Type {
return reflect.TypeOf((*channelDirectLineSpeechState)(nil)).Elem()
}
type channelDirectLineSpeechArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// The ID of the Cognitive Account this Bot Channel should be associated with.
CognitiveAccountId *string `pulumi:"cognitiveAccountId"`
// The access key to access the Cognitive Service.
CognitiveServiceAccessKey string `pulumi:"cognitiveServiceAccessKey"`
// Specifies the supported Azure location where the Cognitive Service resource exists.
CognitiveServiceLocation string `pulumi:"cognitiveServiceLocation"`
// The custom speech model id for the Direct Line Speech Channel.
CustomSpeechModelId *string `pulumi:"customSpeechModelId"`
// The custom voice deployment id for the Direct Line Speech Channel.
CustomVoiceDeploymentId *string `pulumi:"customVoiceDeploymentId"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Direct Line Speech Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ChannelDirectLineSpeech resource.
type ChannelDirectLineSpeechArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// The ID of the Cognitive Account this Bot Channel should be associated with.
CognitiveAccountId pulumi.StringPtrInput
// The access key to access the Cognitive Service.
CognitiveServiceAccessKey pulumi.StringInput
// Specifies the supported Azure location where the Cognitive Service resource exists.
CognitiveServiceLocation pulumi.StringInput
// The custom speech model id for the Direct Line Speech Channel.
CustomSpeechModelId pulumi.StringPtrInput
// The custom voice deployment id for the Direct Line Speech Channel.
CustomVoiceDeploymentId pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Direct Line Speech Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ChannelDirectLineSpeechArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelDirectLineSpeechArgs)(nil)).Elem()
}
type ChannelDirectLineSpeechInput interface {
pulumi.Input
ToChannelDirectLineSpeechOutput() ChannelDirectLineSpeechOutput
ToChannelDirectLineSpeechOutputWithContext(ctx context.Context) ChannelDirectLineSpeechOutput
}
func (*ChannelDirectLineSpeech) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelDirectLineSpeech)(nil)).Elem()
}
func (i *ChannelDirectLineSpeech) ToChannelDirectLineSpeechOutput() ChannelDirectLineSpeechOutput {
return i.ToChannelDirectLineSpeechOutputWithContext(context.Background())
}
func (i *ChannelDirectLineSpeech) ToChannelDirectLineSpeechOutputWithContext(ctx context.Context) ChannelDirectLineSpeechOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineSpeechOutput)
}
// ChannelDirectLineSpeechArrayInput is an input type that accepts ChannelDirectLineSpeechArray and ChannelDirectLineSpeechArrayOutput values.
// You can construct a concrete instance of `ChannelDirectLineSpeechArrayInput` via:
//
// ChannelDirectLineSpeechArray{ ChannelDirectLineSpeechArgs{...} }
type ChannelDirectLineSpeechArrayInput interface {
pulumi.Input
ToChannelDirectLineSpeechArrayOutput() ChannelDirectLineSpeechArrayOutput
ToChannelDirectLineSpeechArrayOutputWithContext(context.Context) ChannelDirectLineSpeechArrayOutput
}
type ChannelDirectLineSpeechArray []ChannelDirectLineSpeechInput
func (ChannelDirectLineSpeechArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelDirectLineSpeech)(nil)).Elem()
}
func (i ChannelDirectLineSpeechArray) ToChannelDirectLineSpeechArrayOutput() ChannelDirectLineSpeechArrayOutput {
return i.ToChannelDirectLineSpeechArrayOutputWithContext(context.Background())
}
func (i ChannelDirectLineSpeechArray) ToChannelDirectLineSpeechArrayOutputWithContext(ctx context.Context) ChannelDirectLineSpeechArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineSpeechArrayOutput)
}
// ChannelDirectLineSpeechMapInput is an input type that accepts ChannelDirectLineSpeechMap and ChannelDirectLineSpeechMapOutput values.
// You can construct a concrete instance of `ChannelDirectLineSpeechMapInput` via:
//
// ChannelDirectLineSpeechMap{ "key": ChannelDirectLineSpeechArgs{...} }
type ChannelDirectLineSpeechMapInput interface {
pulumi.Input
ToChannelDirectLineSpeechMapOutput() ChannelDirectLineSpeechMapOutput
ToChannelDirectLineSpeechMapOutputWithContext(context.Context) ChannelDirectLineSpeechMapOutput
}
type ChannelDirectLineSpeechMap map[string]ChannelDirectLineSpeechInput
func (ChannelDirectLineSpeechMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelDirectLineSpeech)(nil)).Elem()
}
func (i ChannelDirectLineSpeechMap) ToChannelDirectLineSpeechMapOutput() ChannelDirectLineSpeechMapOutput {
return i.ToChannelDirectLineSpeechMapOutputWithContext(context.Background())
}
func (i ChannelDirectLineSpeechMap) ToChannelDirectLineSpeechMapOutputWithContext(ctx context.Context) ChannelDirectLineSpeechMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineSpeechMapOutput)
}
type ChannelDirectLineSpeechOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineSpeechOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelDirectLineSpeech)(nil)).Elem()
}
func (o ChannelDirectLineSpeechOutput) ToChannelDirectLineSpeechOutput() ChannelDirectLineSpeechOutput {
return o
}
func (o ChannelDirectLineSpeechOutput) ToChannelDirectLineSpeechOutputWithContext(ctx context.Context) ChannelDirectLineSpeechOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelDirectLineSpeechOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// The ID of the Cognitive Account this Bot Channel should be associated with.
func (o ChannelDirectLineSpeechOutput) CognitiveAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringPtrOutput { return v.CognitiveAccountId }).(pulumi.StringPtrOutput)
}
// The access key to access the Cognitive Service.
func (o ChannelDirectLineSpeechOutput) CognitiveServiceAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringOutput { return v.CognitiveServiceAccessKey }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the Cognitive Service resource exists.
func (o ChannelDirectLineSpeechOutput) CognitiveServiceLocation() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringOutput { return v.CognitiveServiceLocation }).(pulumi.StringOutput)
}
// The custom speech model id for the Direct Line Speech Channel.
func (o ChannelDirectLineSpeechOutput) CustomSpeechModelId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringPtrOutput { return v.CustomSpeechModelId }).(pulumi.StringPtrOutput)
}
// The custom voice deployment id for the Direct Line Speech Channel.
func (o ChannelDirectLineSpeechOutput) CustomVoiceDeploymentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringPtrOutput { return v.CustomVoiceDeploymentId }).(pulumi.StringPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelDirectLineSpeechOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource group where the Direct Line Speech Channel should be created. Changing this forces a new resource to be created.
func (o ChannelDirectLineSpeechOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLineSpeech) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ChannelDirectLineSpeechArrayOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineSpeechArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelDirectLineSpeech)(nil)).Elem()
}
func (o ChannelDirectLineSpeechArrayOutput) ToChannelDirectLineSpeechArrayOutput() ChannelDirectLineSpeechArrayOutput {
return o
}
func (o ChannelDirectLineSpeechArrayOutput) ToChannelDirectLineSpeechArrayOutputWithContext(ctx context.Context) ChannelDirectLineSpeechArrayOutput {
return o
}
func (o ChannelDirectLineSpeechArrayOutput) Index(i pulumi.IntInput) ChannelDirectLineSpeechOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelDirectLineSpeech {
return vs[0].([]*ChannelDirectLineSpeech)[vs[1].(int)]
}).(ChannelDirectLineSpeechOutput)
}
type ChannelDirectLineSpeechMapOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineSpeechMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelDirectLineSpeech)(nil)).Elem()
}
func (o ChannelDirectLineSpeechMapOutput) ToChannelDirectLineSpeechMapOutput() ChannelDirectLineSpeechMapOutput {
return o
}
func (o ChannelDirectLineSpeechMapOutput) ToChannelDirectLineSpeechMapOutputWithContext(ctx context.Context) ChannelDirectLineSpeechMapOutput {
return o
}
func (o ChannelDirectLineSpeechMapOutput) MapIndex(k pulumi.StringInput) ChannelDirectLineSpeechOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelDirectLineSpeech {
return vs[0].(map[string]*ChannelDirectLineSpeech)[vs[1].(string)]
}).(ChannelDirectLineSpeechOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineSpeechInput)(nil)).Elem(), &ChannelDirectLineSpeech{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineSpeechArrayInput)(nil)).Elem(), ChannelDirectLineSpeechArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineSpeechMapInput)(nil)).Elem(), ChannelDirectLineSpeechMap{})
pulumi.RegisterOutputType(ChannelDirectLineSpeechOutput{})
pulumi.RegisterOutputType(ChannelDirectLineSpeechArrayOutput{})
pulumi.RegisterOutputType(ChannelDirectLineSpeechMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelDirectLine.go | sdk/go/azure/bot/channelDirectLine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Directline integration for a Bot Channel
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelDirectLine(ctx, "example", &bot.ChannelDirectLineArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// Sites: bot.ChannelDirectLineSiteArray{
// &bot.ChannelDirectLineSiteArgs{
// Name: pulumi.String("default"),
// Enabled: pulumi.Bool(true),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The Directline Channel for a Bot can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelDirectLine:ChannelDirectLine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example/channels/DirectlineChannel
// ```
type ChannelDirectLine struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites ChannelDirectLineSiteArrayOutput `pulumi:"sites"`
}
// NewChannelDirectLine registers a new resource with the given unique name, arguments, and options.
func NewChannelDirectLine(ctx *pulumi.Context,
name string, args *ChannelDirectLineArgs, opts ...pulumi.ResourceOption) (*ChannelDirectLine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sites == nil {
return nil, errors.New("invalid value for required argument 'Sites'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelDirectLine
err := ctx.RegisterResource("azure:bot/channelDirectLine:ChannelDirectLine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelDirectLine gets an existing ChannelDirectLine resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelDirectLine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelDirectLineState, opts ...pulumi.ResourceOption) (*ChannelDirectLine, error) {
var resource ChannelDirectLine
err := ctx.ReadResource("azure:bot/channelDirectLine:ChannelDirectLine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelDirectLine resources.
type channelDirectLineState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites []ChannelDirectLineSite `pulumi:"sites"`
}
type ChannelDirectLineState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites ChannelDirectLineSiteArrayInput
}
func (ChannelDirectLineState) ElementType() reflect.Type {
return reflect.TypeOf((*channelDirectLineState)(nil)).Elem()
}
type channelDirectLineArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites []ChannelDirectLineSite `pulumi:"sites"`
}
// The set of arguments for constructing a ChannelDirectLine resource.
type ChannelDirectLineArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites ChannelDirectLineSiteArrayInput
}
func (ChannelDirectLineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelDirectLineArgs)(nil)).Elem()
}
type ChannelDirectLineInput interface {
pulumi.Input
ToChannelDirectLineOutput() ChannelDirectLineOutput
ToChannelDirectLineOutputWithContext(ctx context.Context) ChannelDirectLineOutput
}
func (*ChannelDirectLine) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelDirectLine)(nil)).Elem()
}
func (i *ChannelDirectLine) ToChannelDirectLineOutput() ChannelDirectLineOutput {
return i.ToChannelDirectLineOutputWithContext(context.Background())
}
func (i *ChannelDirectLine) ToChannelDirectLineOutputWithContext(ctx context.Context) ChannelDirectLineOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineOutput)
}
// ChannelDirectLineArrayInput is an input type that accepts ChannelDirectLineArray and ChannelDirectLineArrayOutput values.
// You can construct a concrete instance of `ChannelDirectLineArrayInput` via:
//
// ChannelDirectLineArray{ ChannelDirectLineArgs{...} }
type ChannelDirectLineArrayInput interface {
pulumi.Input
ToChannelDirectLineArrayOutput() ChannelDirectLineArrayOutput
ToChannelDirectLineArrayOutputWithContext(context.Context) ChannelDirectLineArrayOutput
}
type ChannelDirectLineArray []ChannelDirectLineInput
func (ChannelDirectLineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelDirectLine)(nil)).Elem()
}
func (i ChannelDirectLineArray) ToChannelDirectLineArrayOutput() ChannelDirectLineArrayOutput {
return i.ToChannelDirectLineArrayOutputWithContext(context.Background())
}
func (i ChannelDirectLineArray) ToChannelDirectLineArrayOutputWithContext(ctx context.Context) ChannelDirectLineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineArrayOutput)
}
// ChannelDirectLineMapInput is an input type that accepts ChannelDirectLineMap and ChannelDirectLineMapOutput values.
// You can construct a concrete instance of `ChannelDirectLineMapInput` via:
//
// ChannelDirectLineMap{ "key": ChannelDirectLineArgs{...} }
type ChannelDirectLineMapInput interface {
pulumi.Input
ToChannelDirectLineMapOutput() ChannelDirectLineMapOutput
ToChannelDirectLineMapOutputWithContext(context.Context) ChannelDirectLineMapOutput
}
type ChannelDirectLineMap map[string]ChannelDirectLineInput
func (ChannelDirectLineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelDirectLine)(nil)).Elem()
}
func (i ChannelDirectLineMap) ToChannelDirectLineMapOutput() ChannelDirectLineMapOutput {
return i.ToChannelDirectLineMapOutputWithContext(context.Background())
}
func (i ChannelDirectLineMap) ToChannelDirectLineMapOutputWithContext(ctx context.Context) ChannelDirectLineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineMapOutput)
}
type ChannelDirectLineOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelDirectLine)(nil)).Elem()
}
func (o ChannelDirectLineOutput) ToChannelDirectLineOutput() ChannelDirectLineOutput {
return o
}
func (o ChannelDirectLineOutput) ToChannelDirectLineOutputWithContext(ctx context.Context) ChannelDirectLineOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelDirectLineOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLine) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelDirectLineOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLine) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
func (o ChannelDirectLineOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelDirectLine) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
func (o ChannelDirectLineOutput) Sites() ChannelDirectLineSiteArrayOutput {
return o.ApplyT(func(v *ChannelDirectLine) ChannelDirectLineSiteArrayOutput { return v.Sites }).(ChannelDirectLineSiteArrayOutput)
}
type ChannelDirectLineArrayOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelDirectLine)(nil)).Elem()
}
func (o ChannelDirectLineArrayOutput) ToChannelDirectLineArrayOutput() ChannelDirectLineArrayOutput {
return o
}
func (o ChannelDirectLineArrayOutput) ToChannelDirectLineArrayOutputWithContext(ctx context.Context) ChannelDirectLineArrayOutput {
return o
}
func (o ChannelDirectLineArrayOutput) Index(i pulumi.IntInput) ChannelDirectLineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelDirectLine {
return vs[0].([]*ChannelDirectLine)[vs[1].(int)]
}).(ChannelDirectLineOutput)
}
type ChannelDirectLineMapOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelDirectLine)(nil)).Elem()
}
func (o ChannelDirectLineMapOutput) ToChannelDirectLineMapOutput() ChannelDirectLineMapOutput {
return o
}
func (o ChannelDirectLineMapOutput) ToChannelDirectLineMapOutputWithContext(ctx context.Context) ChannelDirectLineMapOutput {
return o
}
func (o ChannelDirectLineMapOutput) MapIndex(k pulumi.StringInput) ChannelDirectLineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelDirectLine {
return vs[0].(map[string]*ChannelDirectLine)[vs[1].(string)]
}).(ChannelDirectLineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineInput)(nil)).Elem(), &ChannelDirectLine{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineArrayInput)(nil)).Elem(), ChannelDirectLineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineMapInput)(nil)).Elem(), ChannelDirectLineMap{})
pulumi.RegisterOutputType(ChannelDirectLineOutput{})
pulumi.RegisterOutputType(ChannelDirectLineArrayOutput{})
pulumi.RegisterOutputType(ChannelDirectLineMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/init.go | sdk/go/azure/bot/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 bot
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:bot/channelAlexa:ChannelAlexa":
r = &ChannelAlexa{}
case "azure:bot/channelDirectLine:ChannelDirectLine":
r = &ChannelDirectLine{}
case "azure:bot/channelDirectLineSpeech:ChannelDirectLineSpeech":
r = &ChannelDirectLineSpeech{}
case "azure:bot/channelEmail:ChannelEmail":
r = &ChannelEmail{}
case "azure:bot/channelFacebook:ChannelFacebook":
r = &ChannelFacebook{}
case "azure:bot/channelLine:ChannelLine":
r = &ChannelLine{}
case "azure:bot/channelSlack:ChannelSlack":
r = &ChannelSlack{}
case "azure:bot/channelSms:ChannelSms":
r = &ChannelSms{}
case "azure:bot/channelTeams:ChannelTeams":
r = &ChannelTeams{}
case "azure:bot/channelWebChat:ChannelWebChat":
r = &ChannelWebChat{}
case "azure:bot/channelsRegistration:ChannelsRegistration":
r = &ChannelsRegistration{}
case "azure:bot/connection:Connection":
r = &Connection{}
case "azure:bot/healthbot:Healthbot":
r = &Healthbot{}
case "azure:bot/serviceAzureBot:ServiceAzureBot":
r = &ServiceAzureBot{}
case "azure:bot/webApp:WebApp":
r = &WebApp{}
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",
"bot/channelAlexa",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelDirectLine",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelDirectLineSpeech",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelEmail",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelFacebook",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelLine",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelSlack",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelSms",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelTeams",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelWebChat",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/channelsRegistration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/connection",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/healthbot",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/serviceAzureBot",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"bot/webApp",
&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/bot/healthbot.go | sdk/go/azure/bot/healthbot.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Healthbot Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-healthbot"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewHealthbot(ctx, "example", &bot.HealthbotArgs{
// Name: pulumi.String("example-bot"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("F0"),
// })
// 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.HealthBot` - 2025-05-25
//
// ## Import
//
// Healthbot Service can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/healthbot:Healthbot example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HealthBot/healthBots/bot1
// ```
type Healthbot struct {
pulumi.CustomResourceState
// The management portal url.
BotManagementPortalUrl pulumi.StringOutput `pulumi:"botManagementPortalUrl"`
// Specifies The Azure Region where the resource exists. Changing this force a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies The name of the Healthbot Service resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies The name of the Resource Group in which to create the Healthbot Service. changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The name which should be used for the SKU of the service. Possible values are `C0`, `C1`, `F0`, `PES` and `S1`.
//
// > **Note:** Downgrading to `F0` forces a new resource to be created.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A mapping of tags which should be assigned to the service.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewHealthbot registers a new resource with the given unique name, arguments, and options.
func NewHealthbot(ctx *pulumi.Context,
name string, args *HealthbotArgs, opts ...pulumi.ResourceOption) (*Healthbot, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Healthbot
err := ctx.RegisterResource("azure:bot/healthbot:Healthbot", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetHealthbot gets an existing Healthbot resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetHealthbot(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *HealthbotState, opts ...pulumi.ResourceOption) (*Healthbot, error) {
var resource Healthbot
err := ctx.ReadResource("azure:bot/healthbot:Healthbot", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Healthbot resources.
type healthbotState struct {
// The management portal url.
BotManagementPortalUrl *string `pulumi:"botManagementPortalUrl"`
// Specifies The Azure Region where the resource exists. Changing this force a new resource to be created.
Location *string `pulumi:"location"`
// Specifies The name of the Healthbot Service resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies The name of the Resource Group in which to create the Healthbot Service. changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The name which should be used for the SKU of the service. Possible values are `C0`, `C1`, `F0`, `PES` and `S1`.
//
// > **Note:** Downgrading to `F0` forces a new resource to be created.
SkuName *string `pulumi:"skuName"`
// A mapping of tags which should be assigned to the service.
Tags map[string]string `pulumi:"tags"`
}
type HealthbotState struct {
// The management portal url.
BotManagementPortalUrl pulumi.StringPtrInput
// Specifies The Azure Region where the resource exists. Changing this force a new resource to be created.
Location pulumi.StringPtrInput
// Specifies The name of the Healthbot Service resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies The name of the Resource Group in which to create the Healthbot Service. changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The name which should be used for the SKU of the service. Possible values are `C0`, `C1`, `F0`, `PES` and `S1`.
//
// > **Note:** Downgrading to `F0` forces a new resource to be created.
SkuName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the service.
Tags pulumi.StringMapInput
}
func (HealthbotState) ElementType() reflect.Type {
return reflect.TypeOf((*healthbotState)(nil)).Elem()
}
type healthbotArgs struct {
// Specifies The Azure Region where the resource exists. Changing this force a new resource to be created.
Location *string `pulumi:"location"`
// Specifies The name of the Healthbot Service resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies The name of the Resource Group in which to create the Healthbot Service. changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name which should be used for the SKU of the service. Possible values are `C0`, `C1`, `F0`, `PES` and `S1`.
//
// > **Note:** Downgrading to `F0` forces a new resource to be created.
SkuName string `pulumi:"skuName"`
// A mapping of tags which should be assigned to the service.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Healthbot resource.
type HealthbotArgs struct {
// Specifies The Azure Region where the resource exists. Changing this force a new resource to be created.
Location pulumi.StringPtrInput
// Specifies The name of the Healthbot Service resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies The name of the Resource Group in which to create the Healthbot Service. changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The name which should be used for the SKU of the service. Possible values are `C0`, `C1`, `F0`, `PES` and `S1`.
//
// > **Note:** Downgrading to `F0` forces a new resource to be created.
SkuName pulumi.StringInput
// A mapping of tags which should be assigned to the service.
Tags pulumi.StringMapInput
}
func (HealthbotArgs) ElementType() reflect.Type {
return reflect.TypeOf((*healthbotArgs)(nil)).Elem()
}
type HealthbotInput interface {
pulumi.Input
ToHealthbotOutput() HealthbotOutput
ToHealthbotOutputWithContext(ctx context.Context) HealthbotOutput
}
func (*Healthbot) ElementType() reflect.Type {
return reflect.TypeOf((**Healthbot)(nil)).Elem()
}
func (i *Healthbot) ToHealthbotOutput() HealthbotOutput {
return i.ToHealthbotOutputWithContext(context.Background())
}
func (i *Healthbot) ToHealthbotOutputWithContext(ctx context.Context) HealthbotOutput {
return pulumi.ToOutputWithContext(ctx, i).(HealthbotOutput)
}
// HealthbotArrayInput is an input type that accepts HealthbotArray and HealthbotArrayOutput values.
// You can construct a concrete instance of `HealthbotArrayInput` via:
//
// HealthbotArray{ HealthbotArgs{...} }
type HealthbotArrayInput interface {
pulumi.Input
ToHealthbotArrayOutput() HealthbotArrayOutput
ToHealthbotArrayOutputWithContext(context.Context) HealthbotArrayOutput
}
type HealthbotArray []HealthbotInput
func (HealthbotArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Healthbot)(nil)).Elem()
}
func (i HealthbotArray) ToHealthbotArrayOutput() HealthbotArrayOutput {
return i.ToHealthbotArrayOutputWithContext(context.Background())
}
func (i HealthbotArray) ToHealthbotArrayOutputWithContext(ctx context.Context) HealthbotArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(HealthbotArrayOutput)
}
// HealthbotMapInput is an input type that accepts HealthbotMap and HealthbotMapOutput values.
// You can construct a concrete instance of `HealthbotMapInput` via:
//
// HealthbotMap{ "key": HealthbotArgs{...} }
type HealthbotMapInput interface {
pulumi.Input
ToHealthbotMapOutput() HealthbotMapOutput
ToHealthbotMapOutputWithContext(context.Context) HealthbotMapOutput
}
type HealthbotMap map[string]HealthbotInput
func (HealthbotMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Healthbot)(nil)).Elem()
}
func (i HealthbotMap) ToHealthbotMapOutput() HealthbotMapOutput {
return i.ToHealthbotMapOutputWithContext(context.Background())
}
func (i HealthbotMap) ToHealthbotMapOutputWithContext(ctx context.Context) HealthbotMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(HealthbotMapOutput)
}
type HealthbotOutput struct{ *pulumi.OutputState }
func (HealthbotOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Healthbot)(nil)).Elem()
}
func (o HealthbotOutput) ToHealthbotOutput() HealthbotOutput {
return o
}
func (o HealthbotOutput) ToHealthbotOutputWithContext(ctx context.Context) HealthbotOutput {
return o
}
// The management portal url.
func (o HealthbotOutput) BotManagementPortalUrl() pulumi.StringOutput {
return o.ApplyT(func(v *Healthbot) pulumi.StringOutput { return v.BotManagementPortalUrl }).(pulumi.StringOutput)
}
// Specifies The Azure Region where the resource exists. Changing this force a new resource to be created.
func (o HealthbotOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Healthbot) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies The name of the Healthbot Service resource. Changing this forces a new resource to be created.
func (o HealthbotOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Healthbot) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies The name of the Resource Group in which to create the Healthbot Service. changing this forces a new resource to be created.
func (o HealthbotOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Healthbot) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The name which should be used for the SKU of the service. Possible values are `C0`, `C1`, `F0`, `PES` and `S1`.
//
// > **Note:** Downgrading to `F0` forces a new resource to be created.
func (o HealthbotOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v *Healthbot) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the service.
func (o HealthbotOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Healthbot) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type HealthbotArrayOutput struct{ *pulumi.OutputState }
func (HealthbotArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Healthbot)(nil)).Elem()
}
func (o HealthbotArrayOutput) ToHealthbotArrayOutput() HealthbotArrayOutput {
return o
}
func (o HealthbotArrayOutput) ToHealthbotArrayOutputWithContext(ctx context.Context) HealthbotArrayOutput {
return o
}
func (o HealthbotArrayOutput) Index(i pulumi.IntInput) HealthbotOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Healthbot {
return vs[0].([]*Healthbot)[vs[1].(int)]
}).(HealthbotOutput)
}
type HealthbotMapOutput struct{ *pulumi.OutputState }
func (HealthbotMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Healthbot)(nil)).Elem()
}
func (o HealthbotMapOutput) ToHealthbotMapOutput() HealthbotMapOutput {
return o
}
func (o HealthbotMapOutput) ToHealthbotMapOutputWithContext(ctx context.Context) HealthbotMapOutput {
return o
}
func (o HealthbotMapOutput) MapIndex(k pulumi.StringInput) HealthbotOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Healthbot {
return vs[0].(map[string]*Healthbot)[vs[1].(string)]
}).(HealthbotOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*HealthbotInput)(nil)).Elem(), &Healthbot{})
pulumi.RegisterInputType(reflect.TypeOf((*HealthbotArrayInput)(nil)).Elem(), HealthbotArray{})
pulumi.RegisterInputType(reflect.TypeOf((*HealthbotMapInput)(nil)).Elem(), HealthbotMap{})
pulumi.RegisterOutputType(HealthbotOutput{})
pulumi.RegisterOutputType(HealthbotArrayOutput{})
pulumi.RegisterOutputType(HealthbotMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/pulumiTypes.go | sdk/go/azure/bot/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 bot
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 ChannelDirectLineSite struct {
// Enables/Disables this site. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// Is the endpoint parameters enabled for this site?
EndpointParametersEnabled *bool `pulumi:"endpointParametersEnabled"`
// Enables additional security measures for this site, see [Enhanced Directline Authentication Features](https://blog.botframework.com/2018/09/25/enhanced-direct-line-authentication-features). Disabled by default.
EnhancedAuthenticationEnabled *bool `pulumi:"enhancedAuthenticationEnabled"`
// Id for the site
Id *string `pulumi:"id"`
// Primary key for accessing this site
Key *string `pulumi:"key"`
// Secondary key for accessing this site
Key2 *string `pulumi:"key2"`
// The name of the site
Name string `pulumi:"name"`
// Is the storage site enabled for detailed logging? Defaults to `true`.
StorageEnabled *bool `pulumi:"storageEnabled"`
// This field is required when `isSecureSiteEnabled` is enabled. Determines which origins can establish a Directline conversation for this site.
TrustedOrigins []string `pulumi:"trustedOrigins"`
// Is the user upload enabled for this site? Defaults to `true`.
UserUploadEnabled *bool `pulumi:"userUploadEnabled"`
// Enables v1 of the Directline protocol for this site. Defaults to `true`.
V1Allowed *bool `pulumi:"v1Allowed"`
// Enables v3 of the Directline protocol for this site. Defaults to `true`.
V3Allowed *bool `pulumi:"v3Allowed"`
}
// ChannelDirectLineSiteInput is an input type that accepts ChannelDirectLineSiteArgs and ChannelDirectLineSiteOutput values.
// You can construct a concrete instance of `ChannelDirectLineSiteInput` via:
//
// ChannelDirectLineSiteArgs{...}
type ChannelDirectLineSiteInput interface {
pulumi.Input
ToChannelDirectLineSiteOutput() ChannelDirectLineSiteOutput
ToChannelDirectLineSiteOutputWithContext(context.Context) ChannelDirectLineSiteOutput
}
type ChannelDirectLineSiteArgs struct {
// Enables/Disables this site. Defaults to `true`.
Enabled pulumi.BoolPtrInput `pulumi:"enabled"`
// Is the endpoint parameters enabled for this site?
EndpointParametersEnabled pulumi.BoolPtrInput `pulumi:"endpointParametersEnabled"`
// Enables additional security measures for this site, see [Enhanced Directline Authentication Features](https://blog.botframework.com/2018/09/25/enhanced-direct-line-authentication-features). Disabled by default.
EnhancedAuthenticationEnabled pulumi.BoolPtrInput `pulumi:"enhancedAuthenticationEnabled"`
// Id for the site
Id pulumi.StringPtrInput `pulumi:"id"`
// Primary key for accessing this site
Key pulumi.StringPtrInput `pulumi:"key"`
// Secondary key for accessing this site
Key2 pulumi.StringPtrInput `pulumi:"key2"`
// The name of the site
Name pulumi.StringInput `pulumi:"name"`
// Is the storage site enabled for detailed logging? Defaults to `true`.
StorageEnabled pulumi.BoolPtrInput `pulumi:"storageEnabled"`
// This field is required when `isSecureSiteEnabled` is enabled. Determines which origins can establish a Directline conversation for this site.
TrustedOrigins pulumi.StringArrayInput `pulumi:"trustedOrigins"`
// Is the user upload enabled for this site? Defaults to `true`.
UserUploadEnabled pulumi.BoolPtrInput `pulumi:"userUploadEnabled"`
// Enables v1 of the Directline protocol for this site. Defaults to `true`.
V1Allowed pulumi.BoolPtrInput `pulumi:"v1Allowed"`
// Enables v3 of the Directline protocol for this site. Defaults to `true`.
V3Allowed pulumi.BoolPtrInput `pulumi:"v3Allowed"`
}
func (ChannelDirectLineSiteArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelDirectLineSite)(nil)).Elem()
}
func (i ChannelDirectLineSiteArgs) ToChannelDirectLineSiteOutput() ChannelDirectLineSiteOutput {
return i.ToChannelDirectLineSiteOutputWithContext(context.Background())
}
func (i ChannelDirectLineSiteArgs) ToChannelDirectLineSiteOutputWithContext(ctx context.Context) ChannelDirectLineSiteOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineSiteOutput)
}
// ChannelDirectLineSiteArrayInput is an input type that accepts ChannelDirectLineSiteArray and ChannelDirectLineSiteArrayOutput values.
// You can construct a concrete instance of `ChannelDirectLineSiteArrayInput` via:
//
// ChannelDirectLineSiteArray{ ChannelDirectLineSiteArgs{...} }
type ChannelDirectLineSiteArrayInput interface {
pulumi.Input
ToChannelDirectLineSiteArrayOutput() ChannelDirectLineSiteArrayOutput
ToChannelDirectLineSiteArrayOutputWithContext(context.Context) ChannelDirectLineSiteArrayOutput
}
type ChannelDirectLineSiteArray []ChannelDirectLineSiteInput
func (ChannelDirectLineSiteArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelDirectLineSite)(nil)).Elem()
}
func (i ChannelDirectLineSiteArray) ToChannelDirectLineSiteArrayOutput() ChannelDirectLineSiteArrayOutput {
return i.ToChannelDirectLineSiteArrayOutputWithContext(context.Background())
}
func (i ChannelDirectLineSiteArray) ToChannelDirectLineSiteArrayOutputWithContext(ctx context.Context) ChannelDirectLineSiteArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelDirectLineSiteArrayOutput)
}
type ChannelDirectLineSiteOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineSiteOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelDirectLineSite)(nil)).Elem()
}
func (o ChannelDirectLineSiteOutput) ToChannelDirectLineSiteOutput() ChannelDirectLineSiteOutput {
return o
}
func (o ChannelDirectLineSiteOutput) ToChannelDirectLineSiteOutputWithContext(ctx context.Context) ChannelDirectLineSiteOutput {
return o
}
// Enables/Disables this site. Defaults to `true`.
func (o ChannelDirectLineSiteOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *bool { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Is the endpoint parameters enabled for this site?
func (o ChannelDirectLineSiteOutput) EndpointParametersEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *bool { return v.EndpointParametersEnabled }).(pulumi.BoolPtrOutput)
}
// Enables additional security measures for this site, see [Enhanced Directline Authentication Features](https://blog.botframework.com/2018/09/25/enhanced-direct-line-authentication-features). Disabled by default.
func (o ChannelDirectLineSiteOutput) EnhancedAuthenticationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *bool { return v.EnhancedAuthenticationEnabled }).(pulumi.BoolPtrOutput)
}
// Id for the site
func (o ChannelDirectLineSiteOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// Primary key for accessing this site
func (o ChannelDirectLineSiteOutput) Key() pulumi.StringPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *string { return v.Key }).(pulumi.StringPtrOutput)
}
// Secondary key for accessing this site
func (o ChannelDirectLineSiteOutput) Key2() pulumi.StringPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *string { return v.Key2 }).(pulumi.StringPtrOutput)
}
// The name of the site
func (o ChannelDirectLineSiteOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ChannelDirectLineSite) string { return v.Name }).(pulumi.StringOutput)
}
// Is the storage site enabled for detailed logging? Defaults to `true`.
func (o ChannelDirectLineSiteOutput) StorageEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *bool { return v.StorageEnabled }).(pulumi.BoolPtrOutput)
}
// This field is required when `isSecureSiteEnabled` is enabled. Determines which origins can establish a Directline conversation for this site.
func (o ChannelDirectLineSiteOutput) TrustedOrigins() pulumi.StringArrayOutput {
return o.ApplyT(func(v ChannelDirectLineSite) []string { return v.TrustedOrigins }).(pulumi.StringArrayOutput)
}
// Is the user upload enabled for this site? Defaults to `true`.
func (o ChannelDirectLineSiteOutput) UserUploadEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *bool { return v.UserUploadEnabled }).(pulumi.BoolPtrOutput)
}
// Enables v1 of the Directline protocol for this site. Defaults to `true`.
func (o ChannelDirectLineSiteOutput) V1Allowed() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *bool { return v.V1Allowed }).(pulumi.BoolPtrOutput)
}
// Enables v3 of the Directline protocol for this site. Defaults to `true`.
func (o ChannelDirectLineSiteOutput) V3Allowed() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelDirectLineSite) *bool { return v.V3Allowed }).(pulumi.BoolPtrOutput)
}
type ChannelDirectLineSiteArrayOutput struct{ *pulumi.OutputState }
func (ChannelDirectLineSiteArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelDirectLineSite)(nil)).Elem()
}
func (o ChannelDirectLineSiteArrayOutput) ToChannelDirectLineSiteArrayOutput() ChannelDirectLineSiteArrayOutput {
return o
}
func (o ChannelDirectLineSiteArrayOutput) ToChannelDirectLineSiteArrayOutputWithContext(ctx context.Context) ChannelDirectLineSiteArrayOutput {
return o
}
func (o ChannelDirectLineSiteArrayOutput) Index(i pulumi.IntInput) ChannelDirectLineSiteOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ChannelDirectLineSite {
return vs[0].([]ChannelDirectLineSite)[vs[1].(int)]
}).(ChannelDirectLineSiteOutput)
}
type ChannelFacebookPage struct {
// The Facebook Page Access Token for the Facebook Channel.
AccessToken string `pulumi:"accessToken"`
// The Facebook Page ID for the Facebook Channel.
Id string `pulumi:"id"`
}
// ChannelFacebookPageInput is an input type that accepts ChannelFacebookPageArgs and ChannelFacebookPageOutput values.
// You can construct a concrete instance of `ChannelFacebookPageInput` via:
//
// ChannelFacebookPageArgs{...}
type ChannelFacebookPageInput interface {
pulumi.Input
ToChannelFacebookPageOutput() ChannelFacebookPageOutput
ToChannelFacebookPageOutputWithContext(context.Context) ChannelFacebookPageOutput
}
type ChannelFacebookPageArgs struct {
// The Facebook Page Access Token for the Facebook Channel.
AccessToken pulumi.StringInput `pulumi:"accessToken"`
// The Facebook Page ID for the Facebook Channel.
Id pulumi.StringInput `pulumi:"id"`
}
func (ChannelFacebookPageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelFacebookPage)(nil)).Elem()
}
func (i ChannelFacebookPageArgs) ToChannelFacebookPageOutput() ChannelFacebookPageOutput {
return i.ToChannelFacebookPageOutputWithContext(context.Background())
}
func (i ChannelFacebookPageArgs) ToChannelFacebookPageOutputWithContext(ctx context.Context) ChannelFacebookPageOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelFacebookPageOutput)
}
// ChannelFacebookPageArrayInput is an input type that accepts ChannelFacebookPageArray and ChannelFacebookPageArrayOutput values.
// You can construct a concrete instance of `ChannelFacebookPageArrayInput` via:
//
// ChannelFacebookPageArray{ ChannelFacebookPageArgs{...} }
type ChannelFacebookPageArrayInput interface {
pulumi.Input
ToChannelFacebookPageArrayOutput() ChannelFacebookPageArrayOutput
ToChannelFacebookPageArrayOutputWithContext(context.Context) ChannelFacebookPageArrayOutput
}
type ChannelFacebookPageArray []ChannelFacebookPageInput
func (ChannelFacebookPageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelFacebookPage)(nil)).Elem()
}
func (i ChannelFacebookPageArray) ToChannelFacebookPageArrayOutput() ChannelFacebookPageArrayOutput {
return i.ToChannelFacebookPageArrayOutputWithContext(context.Background())
}
func (i ChannelFacebookPageArray) ToChannelFacebookPageArrayOutputWithContext(ctx context.Context) ChannelFacebookPageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelFacebookPageArrayOutput)
}
type ChannelFacebookPageOutput struct{ *pulumi.OutputState }
func (ChannelFacebookPageOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelFacebookPage)(nil)).Elem()
}
func (o ChannelFacebookPageOutput) ToChannelFacebookPageOutput() ChannelFacebookPageOutput {
return o
}
func (o ChannelFacebookPageOutput) ToChannelFacebookPageOutputWithContext(ctx context.Context) ChannelFacebookPageOutput {
return o
}
// The Facebook Page Access Token for the Facebook Channel.
func (o ChannelFacebookPageOutput) AccessToken() pulumi.StringOutput {
return o.ApplyT(func(v ChannelFacebookPage) string { return v.AccessToken }).(pulumi.StringOutput)
}
// The Facebook Page ID for the Facebook Channel.
func (o ChannelFacebookPageOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v ChannelFacebookPage) string { return v.Id }).(pulumi.StringOutput)
}
type ChannelFacebookPageArrayOutput struct{ *pulumi.OutputState }
func (ChannelFacebookPageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelFacebookPage)(nil)).Elem()
}
func (o ChannelFacebookPageArrayOutput) ToChannelFacebookPageArrayOutput() ChannelFacebookPageArrayOutput {
return o
}
func (o ChannelFacebookPageArrayOutput) ToChannelFacebookPageArrayOutputWithContext(ctx context.Context) ChannelFacebookPageArrayOutput {
return o
}
func (o ChannelFacebookPageArrayOutput) Index(i pulumi.IntInput) ChannelFacebookPageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ChannelFacebookPage {
return vs[0].([]ChannelFacebookPage)[vs[1].(int)]
}).(ChannelFacebookPageOutput)
}
type ChannelLineLineChannel struct {
// The access token which is used to call the Line Channel API.
AccessToken string `pulumi:"accessToken"`
// The secret which is used to access the Line Channel.
Secret string `pulumi:"secret"`
}
// ChannelLineLineChannelInput is an input type that accepts ChannelLineLineChannelArgs and ChannelLineLineChannelOutput values.
// You can construct a concrete instance of `ChannelLineLineChannelInput` via:
//
// ChannelLineLineChannelArgs{...}
type ChannelLineLineChannelInput interface {
pulumi.Input
ToChannelLineLineChannelOutput() ChannelLineLineChannelOutput
ToChannelLineLineChannelOutputWithContext(context.Context) ChannelLineLineChannelOutput
}
type ChannelLineLineChannelArgs struct {
// The access token which is used to call the Line Channel API.
AccessToken pulumi.StringInput `pulumi:"accessToken"`
// The secret which is used to access the Line Channel.
Secret pulumi.StringInput `pulumi:"secret"`
}
func (ChannelLineLineChannelArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelLineLineChannel)(nil)).Elem()
}
func (i ChannelLineLineChannelArgs) ToChannelLineLineChannelOutput() ChannelLineLineChannelOutput {
return i.ToChannelLineLineChannelOutputWithContext(context.Background())
}
func (i ChannelLineLineChannelArgs) ToChannelLineLineChannelOutputWithContext(ctx context.Context) ChannelLineLineChannelOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelLineLineChannelOutput)
}
// ChannelLineLineChannelArrayInput is an input type that accepts ChannelLineLineChannelArray and ChannelLineLineChannelArrayOutput values.
// You can construct a concrete instance of `ChannelLineLineChannelArrayInput` via:
//
// ChannelLineLineChannelArray{ ChannelLineLineChannelArgs{...} }
type ChannelLineLineChannelArrayInput interface {
pulumi.Input
ToChannelLineLineChannelArrayOutput() ChannelLineLineChannelArrayOutput
ToChannelLineLineChannelArrayOutputWithContext(context.Context) ChannelLineLineChannelArrayOutput
}
type ChannelLineLineChannelArray []ChannelLineLineChannelInput
func (ChannelLineLineChannelArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelLineLineChannel)(nil)).Elem()
}
func (i ChannelLineLineChannelArray) ToChannelLineLineChannelArrayOutput() ChannelLineLineChannelArrayOutput {
return i.ToChannelLineLineChannelArrayOutputWithContext(context.Background())
}
func (i ChannelLineLineChannelArray) ToChannelLineLineChannelArrayOutputWithContext(ctx context.Context) ChannelLineLineChannelArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelLineLineChannelArrayOutput)
}
type ChannelLineLineChannelOutput struct{ *pulumi.OutputState }
func (ChannelLineLineChannelOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelLineLineChannel)(nil)).Elem()
}
func (o ChannelLineLineChannelOutput) ToChannelLineLineChannelOutput() ChannelLineLineChannelOutput {
return o
}
func (o ChannelLineLineChannelOutput) ToChannelLineLineChannelOutputWithContext(ctx context.Context) ChannelLineLineChannelOutput {
return o
}
// The access token which is used to call the Line Channel API.
func (o ChannelLineLineChannelOutput) AccessToken() pulumi.StringOutput {
return o.ApplyT(func(v ChannelLineLineChannel) string { return v.AccessToken }).(pulumi.StringOutput)
}
// The secret which is used to access the Line Channel.
func (o ChannelLineLineChannelOutput) Secret() pulumi.StringOutput {
return o.ApplyT(func(v ChannelLineLineChannel) string { return v.Secret }).(pulumi.StringOutput)
}
type ChannelLineLineChannelArrayOutput struct{ *pulumi.OutputState }
func (ChannelLineLineChannelArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelLineLineChannel)(nil)).Elem()
}
func (o ChannelLineLineChannelArrayOutput) ToChannelLineLineChannelArrayOutput() ChannelLineLineChannelArrayOutput {
return o
}
func (o ChannelLineLineChannelArrayOutput) ToChannelLineLineChannelArrayOutputWithContext(ctx context.Context) ChannelLineLineChannelArrayOutput {
return o
}
func (o ChannelLineLineChannelArrayOutput) Index(i pulumi.IntInput) ChannelLineLineChannelOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ChannelLineLineChannel {
return vs[0].([]ChannelLineLineChannel)[vs[1].(int)]
}).(ChannelLineLineChannelOutput)
}
type ChannelWebChatSite struct {
// Is the endpoint parameters enabled for this site?
EndpointParametersEnabled *bool `pulumi:"endpointParametersEnabled"`
// The name of the site.
Name string `pulumi:"name"`
// Is the storage site enabled for detailed logging? Defaults to `true`.
StorageEnabled *bool `pulumi:"storageEnabled"`
// Is the user upload enabled for this site? Defaults to `true`.
UserUploadEnabled *bool `pulumi:"userUploadEnabled"`
}
// ChannelWebChatSiteInput is an input type that accepts ChannelWebChatSiteArgs and ChannelWebChatSiteOutput values.
// You can construct a concrete instance of `ChannelWebChatSiteInput` via:
//
// ChannelWebChatSiteArgs{...}
type ChannelWebChatSiteInput interface {
pulumi.Input
ToChannelWebChatSiteOutput() ChannelWebChatSiteOutput
ToChannelWebChatSiteOutputWithContext(context.Context) ChannelWebChatSiteOutput
}
type ChannelWebChatSiteArgs struct {
// Is the endpoint parameters enabled for this site?
EndpointParametersEnabled pulumi.BoolPtrInput `pulumi:"endpointParametersEnabled"`
// The name of the site.
Name pulumi.StringInput `pulumi:"name"`
// Is the storage site enabled for detailed logging? Defaults to `true`.
StorageEnabled pulumi.BoolPtrInput `pulumi:"storageEnabled"`
// Is the user upload enabled for this site? Defaults to `true`.
UserUploadEnabled pulumi.BoolPtrInput `pulumi:"userUploadEnabled"`
}
func (ChannelWebChatSiteArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelWebChatSite)(nil)).Elem()
}
func (i ChannelWebChatSiteArgs) ToChannelWebChatSiteOutput() ChannelWebChatSiteOutput {
return i.ToChannelWebChatSiteOutputWithContext(context.Background())
}
func (i ChannelWebChatSiteArgs) ToChannelWebChatSiteOutputWithContext(ctx context.Context) ChannelWebChatSiteOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelWebChatSiteOutput)
}
// ChannelWebChatSiteArrayInput is an input type that accepts ChannelWebChatSiteArray and ChannelWebChatSiteArrayOutput values.
// You can construct a concrete instance of `ChannelWebChatSiteArrayInput` via:
//
// ChannelWebChatSiteArray{ ChannelWebChatSiteArgs{...} }
type ChannelWebChatSiteArrayInput interface {
pulumi.Input
ToChannelWebChatSiteArrayOutput() ChannelWebChatSiteArrayOutput
ToChannelWebChatSiteArrayOutputWithContext(context.Context) ChannelWebChatSiteArrayOutput
}
type ChannelWebChatSiteArray []ChannelWebChatSiteInput
func (ChannelWebChatSiteArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelWebChatSite)(nil)).Elem()
}
func (i ChannelWebChatSiteArray) ToChannelWebChatSiteArrayOutput() ChannelWebChatSiteArrayOutput {
return i.ToChannelWebChatSiteArrayOutputWithContext(context.Background())
}
func (i ChannelWebChatSiteArray) ToChannelWebChatSiteArrayOutputWithContext(ctx context.Context) ChannelWebChatSiteArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelWebChatSiteArrayOutput)
}
type ChannelWebChatSiteOutput struct{ *pulumi.OutputState }
func (ChannelWebChatSiteOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ChannelWebChatSite)(nil)).Elem()
}
func (o ChannelWebChatSiteOutput) ToChannelWebChatSiteOutput() ChannelWebChatSiteOutput {
return o
}
func (o ChannelWebChatSiteOutput) ToChannelWebChatSiteOutputWithContext(ctx context.Context) ChannelWebChatSiteOutput {
return o
}
// Is the endpoint parameters enabled for this site?
func (o ChannelWebChatSiteOutput) EndpointParametersEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelWebChatSite) *bool { return v.EndpointParametersEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the site.
func (o ChannelWebChatSiteOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ChannelWebChatSite) string { return v.Name }).(pulumi.StringOutput)
}
// Is the storage site enabled for detailed logging? Defaults to `true`.
func (o ChannelWebChatSiteOutput) StorageEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelWebChatSite) *bool { return v.StorageEnabled }).(pulumi.BoolPtrOutput)
}
// Is the user upload enabled for this site? Defaults to `true`.
func (o ChannelWebChatSiteOutput) UserUploadEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ChannelWebChatSite) *bool { return v.UserUploadEnabled }).(pulumi.BoolPtrOutput)
}
type ChannelWebChatSiteArrayOutput struct{ *pulumi.OutputState }
func (ChannelWebChatSiteArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ChannelWebChatSite)(nil)).Elem()
}
func (o ChannelWebChatSiteArrayOutput) ToChannelWebChatSiteArrayOutput() ChannelWebChatSiteArrayOutput {
return o
}
func (o ChannelWebChatSiteArrayOutput) ToChannelWebChatSiteArrayOutputWithContext(ctx context.Context) ChannelWebChatSiteArrayOutput {
return o
}
func (o ChannelWebChatSiteArrayOutput) Index(i pulumi.IntInput) ChannelWebChatSiteOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ChannelWebChatSite {
return vs[0].([]ChannelWebChatSite)[vs[1].(int)]
}).(ChannelWebChatSiteOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineSiteInput)(nil)).Elem(), ChannelDirectLineSiteArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelDirectLineSiteArrayInput)(nil)).Elem(), ChannelDirectLineSiteArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelFacebookPageInput)(nil)).Elem(), ChannelFacebookPageArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelFacebookPageArrayInput)(nil)).Elem(), ChannelFacebookPageArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelLineLineChannelInput)(nil)).Elem(), ChannelLineLineChannelArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelLineLineChannelArrayInput)(nil)).Elem(), ChannelLineLineChannelArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelWebChatSiteInput)(nil)).Elem(), ChannelWebChatSiteArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelWebChatSiteArrayInput)(nil)).Elem(), ChannelWebChatSiteArray{})
pulumi.RegisterOutputType(ChannelDirectLineSiteOutput{})
pulumi.RegisterOutputType(ChannelDirectLineSiteArrayOutput{})
pulumi.RegisterOutputType(ChannelFacebookPageOutput{})
pulumi.RegisterOutputType(ChannelFacebookPageArrayOutput{})
pulumi.RegisterOutputType(ChannelLineLineChannelOutput{})
pulumi.RegisterOutputType(ChannelLineLineChannelArrayOutput{})
pulumi.RegisterOutputType(ChannelWebChatSiteOutput{})
pulumi.RegisterOutputType(ChannelWebChatSiteArrayOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelsRegistration.go | sdk/go/azure/bot/channelsRegistration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Bot Channels Registration.
//
// > **Note:** Bot Channels Registration has been [deprecated by Azure](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-resources-faq-azure?view=azure-bot-service-4.0#why-are-web-app-bot-and-bot-channel-registration-being-deprecated). New implementations should use the `bot.ServiceAzureBot` resource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Bot Channels Registration can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelsRegistration:ChannelsRegistration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example
// ```
type ChannelsRegistration struct {
pulumi.CustomResourceState
// The CMK Key Vault Key URL to encrypt the Bot Channels Registration with the Customer Managed Encryption Key.
//
// > **Note:** It has to add the Key Vault Access Policy for the `Bot Service CMEK Prod` Service Principal and the `softDeleteEnabled` and the `purgeProtectionEnabled` is enabled on the `keyvault.KeyVault` resource while using `cmkKeyVaultUrl`.
//
// > **Note:** It has to turn off the CMK feature before revoking Key Vault Access Policy. For more information, please refer to [Revoke access to customer-managed keys](https://docs.microsoft.com/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0&WT.mc_id=Portal-Microsoft_Azure_BotService#revoke-access-to-customer-managed-keys).
CmkKeyVaultUrl pulumi.StringPtrOutput `pulumi:"cmkKeyVaultUrl"`
// The description of the Bot Channels Registration.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The Application Insights API Key to associate with the Bot Channels Registration.
DeveloperAppInsightsApiKey pulumi.StringPtrOutput `pulumi:"developerAppInsightsApiKey"`
// The Application Insights Application ID to associate with the Bot Channels Registration.
DeveloperAppInsightsApplicationId pulumi.StringPtrOutput `pulumi:"developerAppInsightsApplicationId"`
// The Application Insights Key to associate with the Bot Channels Registration.
DeveloperAppInsightsKey pulumi.StringPtrOutput `pulumi:"developerAppInsightsKey"`
// The name of the Bot Channels Registration will be displayed as. This defaults to `name` if not specified.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Bot Channels Registration endpoint.
Endpoint pulumi.StringPtrOutput `pulumi:"endpoint"`
// The icon URL to visually identify the Bot Channels Registration. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl pulumi.StringPtrOutput `pulumi:"iconUrl"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The Microsoft Application ID for the Bot Channels Registration. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringOutput `pulumi:"microsoftAppId"`
// Specifies the name of the Bot Channels Registration. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringOutput `pulumi:"name"`
// Is the Bot Channels Registration in an isolated network?
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Bot Channels Registration. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SKU of the Bot Channels Registration. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringOutput `pulumi:"sku"`
// Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`.
StreamingEndpointEnabled pulumi.BoolPtrOutput `pulumi:"streamingEndpointEnabled"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewChannelsRegistration registers a new resource with the given unique name, arguments, and options.
func NewChannelsRegistration(ctx *pulumi.Context,
name string, args *ChannelsRegistrationArgs, opts ...pulumi.ResourceOption) (*ChannelsRegistration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MicrosoftAppId == nil {
return nil, errors.New("invalid value for required argument 'MicrosoftAppId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
if args.DeveloperAppInsightsApiKey != nil {
args.DeveloperAppInsightsApiKey = pulumi.ToSecret(args.DeveloperAppInsightsApiKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"developerAppInsightsApiKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelsRegistration
err := ctx.RegisterResource("azure:bot/channelsRegistration:ChannelsRegistration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelsRegistration gets an existing ChannelsRegistration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelsRegistration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelsRegistrationState, opts ...pulumi.ResourceOption) (*ChannelsRegistration, error) {
var resource ChannelsRegistration
err := ctx.ReadResource("azure:bot/channelsRegistration:ChannelsRegistration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelsRegistration resources.
type channelsRegistrationState struct {
// The CMK Key Vault Key URL to encrypt the Bot Channels Registration with the Customer Managed Encryption Key.
//
// > **Note:** It has to add the Key Vault Access Policy for the `Bot Service CMEK Prod` Service Principal and the `softDeleteEnabled` and the `purgeProtectionEnabled` is enabled on the `keyvault.KeyVault` resource while using `cmkKeyVaultUrl`.
//
// > **Note:** It has to turn off the CMK feature before revoking Key Vault Access Policy. For more information, please refer to [Revoke access to customer-managed keys](https://docs.microsoft.com/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0&WT.mc_id=Portal-Microsoft_Azure_BotService#revoke-access-to-customer-managed-keys).
CmkKeyVaultUrl *string `pulumi:"cmkKeyVaultUrl"`
// The description of the Bot Channels Registration.
Description *string `pulumi:"description"`
// The Application Insights API Key to associate with the Bot Channels Registration.
DeveloperAppInsightsApiKey *string `pulumi:"developerAppInsightsApiKey"`
// The Application Insights Application ID to associate with the Bot Channels Registration.
DeveloperAppInsightsApplicationId *string `pulumi:"developerAppInsightsApplicationId"`
// The Application Insights Key to associate with the Bot Channels Registration.
DeveloperAppInsightsKey *string `pulumi:"developerAppInsightsKey"`
// The name of the Bot Channels Registration will be displayed as. This defaults to `name` if not specified.
DisplayName *string `pulumi:"displayName"`
// The Bot Channels Registration endpoint.
Endpoint *string `pulumi:"endpoint"`
// The icon URL to visually identify the Bot Channels Registration. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl *string `pulumi:"iconUrl"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The Microsoft Application ID for the Bot Channels Registration. Changing this forces a new resource to be created.
MicrosoftAppId *string `pulumi:"microsoftAppId"`
// Specifies the name of the Bot Channels Registration. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// Is the Bot Channels Registration in an isolated network?
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Bot Channels Registration. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SKU of the Bot Channels Registration. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku *string `pulumi:"sku"`
// Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`.
StreamingEndpointEnabled *bool `pulumi:"streamingEndpointEnabled"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type ChannelsRegistrationState struct {
// The CMK Key Vault Key URL to encrypt the Bot Channels Registration with the Customer Managed Encryption Key.
//
// > **Note:** It has to add the Key Vault Access Policy for the `Bot Service CMEK Prod` Service Principal and the `softDeleteEnabled` and the `purgeProtectionEnabled` is enabled on the `keyvault.KeyVault` resource while using `cmkKeyVaultUrl`.
//
// > **Note:** It has to turn off the CMK feature before revoking Key Vault Access Policy. For more information, please refer to [Revoke access to customer-managed keys](https://docs.microsoft.com/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0&WT.mc_id=Portal-Microsoft_Azure_BotService#revoke-access-to-customer-managed-keys).
CmkKeyVaultUrl pulumi.StringPtrInput
// The description of the Bot Channels Registration.
Description pulumi.StringPtrInput
// The Application Insights API Key to associate with the Bot Channels Registration.
DeveloperAppInsightsApiKey pulumi.StringPtrInput
// The Application Insights Application ID to associate with the Bot Channels Registration.
DeveloperAppInsightsApplicationId pulumi.StringPtrInput
// The Application Insights Key to associate with the Bot Channels Registration.
DeveloperAppInsightsKey pulumi.StringPtrInput
// The name of the Bot Channels Registration will be displayed as. This defaults to `name` if not specified.
DisplayName pulumi.StringPtrInput
// The Bot Channels Registration endpoint.
Endpoint pulumi.StringPtrInput
// The icon URL to visually identify the Bot Channels Registration. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The Microsoft Application ID for the Bot Channels Registration. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringPtrInput
// Specifies the name of the Bot Channels Registration. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// Is the Bot Channels Registration in an isolated network?
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Bot Channels Registration. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The SKU of the Bot Channels Registration. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringPtrInput
// Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`.
StreamingEndpointEnabled pulumi.BoolPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ChannelsRegistrationState) ElementType() reflect.Type {
return reflect.TypeOf((*channelsRegistrationState)(nil)).Elem()
}
type channelsRegistrationArgs struct {
// The CMK Key Vault Key URL to encrypt the Bot Channels Registration with the Customer Managed Encryption Key.
//
// > **Note:** It has to add the Key Vault Access Policy for the `Bot Service CMEK Prod` Service Principal and the `softDeleteEnabled` and the `purgeProtectionEnabled` is enabled on the `keyvault.KeyVault` resource while using `cmkKeyVaultUrl`.
//
// > **Note:** It has to turn off the CMK feature before revoking Key Vault Access Policy. For more information, please refer to [Revoke access to customer-managed keys](https://docs.microsoft.com/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0&WT.mc_id=Portal-Microsoft_Azure_BotService#revoke-access-to-customer-managed-keys).
CmkKeyVaultUrl *string `pulumi:"cmkKeyVaultUrl"`
// The description of the Bot Channels Registration.
Description *string `pulumi:"description"`
// The Application Insights API Key to associate with the Bot Channels Registration.
DeveloperAppInsightsApiKey *string `pulumi:"developerAppInsightsApiKey"`
// The Application Insights Application ID to associate with the Bot Channels Registration.
DeveloperAppInsightsApplicationId *string `pulumi:"developerAppInsightsApplicationId"`
// The Application Insights Key to associate with the Bot Channels Registration.
DeveloperAppInsightsKey *string `pulumi:"developerAppInsightsKey"`
// The name of the Bot Channels Registration will be displayed as. This defaults to `name` if not specified.
DisplayName *string `pulumi:"displayName"`
// The Bot Channels Registration endpoint.
Endpoint *string `pulumi:"endpoint"`
// The icon URL to visually identify the Bot Channels Registration. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl *string `pulumi:"iconUrl"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The Microsoft Application ID for the Bot Channels Registration. Changing this forces a new resource to be created.
MicrosoftAppId string `pulumi:"microsoftAppId"`
// Specifies the name of the Bot Channels Registration. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// Is the Bot Channels Registration in an isolated network?
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Bot Channels Registration. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU of the Bot Channels Registration. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku string `pulumi:"sku"`
// Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`.
StreamingEndpointEnabled *bool `pulumi:"streamingEndpointEnabled"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ChannelsRegistration resource.
type ChannelsRegistrationArgs struct {
// The CMK Key Vault Key URL to encrypt the Bot Channels Registration with the Customer Managed Encryption Key.
//
// > **Note:** It has to add the Key Vault Access Policy for the `Bot Service CMEK Prod` Service Principal and the `softDeleteEnabled` and the `purgeProtectionEnabled` is enabled on the `keyvault.KeyVault` resource while using `cmkKeyVaultUrl`.
//
// > **Note:** It has to turn off the CMK feature before revoking Key Vault Access Policy. For more information, please refer to [Revoke access to customer-managed keys](https://docs.microsoft.com/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0&WT.mc_id=Portal-Microsoft_Azure_BotService#revoke-access-to-customer-managed-keys).
CmkKeyVaultUrl pulumi.StringPtrInput
// The description of the Bot Channels Registration.
Description pulumi.StringPtrInput
// The Application Insights API Key to associate with the Bot Channels Registration.
DeveloperAppInsightsApiKey pulumi.StringPtrInput
// The Application Insights Application ID to associate with the Bot Channels Registration.
DeveloperAppInsightsApplicationId pulumi.StringPtrInput
// The Application Insights Key to associate with the Bot Channels Registration.
DeveloperAppInsightsKey pulumi.StringPtrInput
// The name of the Bot Channels Registration will be displayed as. This defaults to `name` if not specified.
DisplayName pulumi.StringPtrInput
// The Bot Channels Registration endpoint.
Endpoint pulumi.StringPtrInput
// The icon URL to visually identify the Bot Channels Registration. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The Microsoft Application ID for the Bot Channels Registration. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringInput
// Specifies the name of the Bot Channels Registration. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// Is the Bot Channels Registration in an isolated network?
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Bot Channels Registration. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SKU of the Bot Channels Registration. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringInput
// Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`.
StreamingEndpointEnabled pulumi.BoolPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ChannelsRegistrationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelsRegistrationArgs)(nil)).Elem()
}
type ChannelsRegistrationInput interface {
pulumi.Input
ToChannelsRegistrationOutput() ChannelsRegistrationOutput
ToChannelsRegistrationOutputWithContext(ctx context.Context) ChannelsRegistrationOutput
}
func (*ChannelsRegistration) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelsRegistration)(nil)).Elem()
}
func (i *ChannelsRegistration) ToChannelsRegistrationOutput() ChannelsRegistrationOutput {
return i.ToChannelsRegistrationOutputWithContext(context.Background())
}
func (i *ChannelsRegistration) ToChannelsRegistrationOutputWithContext(ctx context.Context) ChannelsRegistrationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelsRegistrationOutput)
}
// ChannelsRegistrationArrayInput is an input type that accepts ChannelsRegistrationArray and ChannelsRegistrationArrayOutput values.
// You can construct a concrete instance of `ChannelsRegistrationArrayInput` via:
//
// ChannelsRegistrationArray{ ChannelsRegistrationArgs{...} }
type ChannelsRegistrationArrayInput interface {
pulumi.Input
ToChannelsRegistrationArrayOutput() ChannelsRegistrationArrayOutput
ToChannelsRegistrationArrayOutputWithContext(context.Context) ChannelsRegistrationArrayOutput
}
type ChannelsRegistrationArray []ChannelsRegistrationInput
func (ChannelsRegistrationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelsRegistration)(nil)).Elem()
}
func (i ChannelsRegistrationArray) ToChannelsRegistrationArrayOutput() ChannelsRegistrationArrayOutput {
return i.ToChannelsRegistrationArrayOutputWithContext(context.Background())
}
func (i ChannelsRegistrationArray) ToChannelsRegistrationArrayOutputWithContext(ctx context.Context) ChannelsRegistrationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelsRegistrationArrayOutput)
}
// ChannelsRegistrationMapInput is an input type that accepts ChannelsRegistrationMap and ChannelsRegistrationMapOutput values.
// You can construct a concrete instance of `ChannelsRegistrationMapInput` via:
//
// ChannelsRegistrationMap{ "key": ChannelsRegistrationArgs{...} }
type ChannelsRegistrationMapInput interface {
pulumi.Input
ToChannelsRegistrationMapOutput() ChannelsRegistrationMapOutput
ToChannelsRegistrationMapOutputWithContext(context.Context) ChannelsRegistrationMapOutput
}
type ChannelsRegistrationMap map[string]ChannelsRegistrationInput
func (ChannelsRegistrationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelsRegistration)(nil)).Elem()
}
func (i ChannelsRegistrationMap) ToChannelsRegistrationMapOutput() ChannelsRegistrationMapOutput {
return i.ToChannelsRegistrationMapOutputWithContext(context.Background())
}
func (i ChannelsRegistrationMap) ToChannelsRegistrationMapOutputWithContext(ctx context.Context) ChannelsRegistrationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelsRegistrationMapOutput)
}
type ChannelsRegistrationOutput struct{ *pulumi.OutputState }
func (ChannelsRegistrationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelsRegistration)(nil)).Elem()
}
func (o ChannelsRegistrationOutput) ToChannelsRegistrationOutput() ChannelsRegistrationOutput {
return o
}
func (o ChannelsRegistrationOutput) ToChannelsRegistrationOutputWithContext(ctx context.Context) ChannelsRegistrationOutput {
return o
}
// The CMK Key Vault Key URL to encrypt the Bot Channels Registration with the Customer Managed Encryption Key.
//
// > **Note:** It has to add the Key Vault Access Policy for the `Bot Service CMEK Prod` Service Principal and the `softDeleteEnabled` and the `purgeProtectionEnabled` is enabled on the `keyvault.KeyVault` resource while using `cmkKeyVaultUrl`.
//
// > **Note:** It has to turn off the CMK feature before revoking Key Vault Access Policy. For more information, please refer to [Revoke access to customer-managed keys](https://docs.microsoft.com/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0&WT.mc_id=Portal-Microsoft_Azure_BotService#revoke-access-to-customer-managed-keys).
func (o ChannelsRegistrationOutput) CmkKeyVaultUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringPtrOutput { return v.CmkKeyVaultUrl }).(pulumi.StringPtrOutput)
}
// The description of the Bot Channels Registration.
func (o ChannelsRegistrationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The Application Insights API Key to associate with the Bot Channels Registration.
func (o ChannelsRegistrationOutput) DeveloperAppInsightsApiKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringPtrOutput { return v.DeveloperAppInsightsApiKey }).(pulumi.StringPtrOutput)
}
// The Application Insights Application ID to associate with the Bot Channels Registration.
func (o ChannelsRegistrationOutput) DeveloperAppInsightsApplicationId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringPtrOutput { return v.DeveloperAppInsightsApplicationId }).(pulumi.StringPtrOutput)
}
// The Application Insights Key to associate with the Bot Channels Registration.
func (o ChannelsRegistrationOutput) DeveloperAppInsightsKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringPtrOutput { return v.DeveloperAppInsightsKey }).(pulumi.StringPtrOutput)
}
// The name of the Bot Channels Registration will be displayed as. This defaults to `name` if not specified.
func (o ChannelsRegistrationOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The Bot Channels Registration endpoint.
func (o ChannelsRegistrationOutput) Endpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringPtrOutput { return v.Endpoint }).(pulumi.StringPtrOutput)
}
// The icon URL to visually identify the Bot Channels Registration. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
func (o ChannelsRegistrationOutput) IconUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringPtrOutput { return v.IconUrl }).(pulumi.StringPtrOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelsRegistrationOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The Microsoft Application ID for the Bot Channels Registration. Changing this forces a new resource to be created.
func (o ChannelsRegistrationOutput) MicrosoftAppId() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringOutput { return v.MicrosoftAppId }).(pulumi.StringOutput)
}
// Specifies the name of the Bot Channels Registration. Changing this forces a new resource to be created. Must be globally unique.
func (o ChannelsRegistrationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Is the Bot Channels Registration in an isolated network?
func (o ChannelsRegistrationOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which to create the Bot Channels Registration. Changing this forces a new resource to be created.
func (o ChannelsRegistrationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The SKU of the Bot Channels Registration. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
func (o ChannelsRegistrationOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`.
func (o ChannelsRegistrationOutput) StreamingEndpointEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.BoolPtrOutput { return v.StreamingEndpointEnabled }).(pulumi.BoolPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o ChannelsRegistrationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ChannelsRegistration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ChannelsRegistrationArrayOutput struct{ *pulumi.OutputState }
func (ChannelsRegistrationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelsRegistration)(nil)).Elem()
}
func (o ChannelsRegistrationArrayOutput) ToChannelsRegistrationArrayOutput() ChannelsRegistrationArrayOutput {
return o
}
func (o ChannelsRegistrationArrayOutput) ToChannelsRegistrationArrayOutputWithContext(ctx context.Context) ChannelsRegistrationArrayOutput {
return o
}
func (o ChannelsRegistrationArrayOutput) Index(i pulumi.IntInput) ChannelsRegistrationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelsRegistration {
return vs[0].([]*ChannelsRegistration)[vs[1].(int)]
}).(ChannelsRegistrationOutput)
}
type ChannelsRegistrationMapOutput struct{ *pulumi.OutputState }
func (ChannelsRegistrationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelsRegistration)(nil)).Elem()
}
func (o ChannelsRegistrationMapOutput) ToChannelsRegistrationMapOutput() ChannelsRegistrationMapOutput {
return o
}
func (o ChannelsRegistrationMapOutput) ToChannelsRegistrationMapOutputWithContext(ctx context.Context) ChannelsRegistrationMapOutput {
return o
}
func (o ChannelsRegistrationMapOutput) MapIndex(k pulumi.StringInput) ChannelsRegistrationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelsRegistration {
return vs[0].(map[string]*ChannelsRegistration)[vs[1].(string)]
}).(ChannelsRegistrationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelsRegistrationInput)(nil)).Elem(), &ChannelsRegistration{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelsRegistrationArrayInput)(nil)).Elem(), ChannelsRegistrationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelsRegistrationMapInput)(nil)).Elem(), ChannelsRegistrationMap{})
pulumi.RegisterOutputType(ChannelsRegistrationOutput{})
pulumi.RegisterOutputType(ChannelsRegistrationArrayOutput{})
pulumi.RegisterOutputType(ChannelsRegistrationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/serviceAzureBot.go | sdk/go/azure/bot/serviceAzureBot.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
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 Bot Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example-appinsights"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleApiKey, err := appinsights.NewApiKey(ctx, "example", &appinsights.ApiKeyArgs{
// Name: pulumi.String("example-appinsightsapikey"),
// ApplicationInsightsId: exampleInsights.ID(),
// ReadPermissions: pulumi.StringArray{
// pulumi.String("aggregate"),
// pulumi.String("api"),
// pulumi.String("draft"),
// pulumi.String("extendqueries"),
// pulumi.String("search"),
// },
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// _, err = bot.NewServiceAzureBot(ctx, "example", &bot.ServiceAzureBotArgs{
// Name: pulumi.String("exampleazurebot"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("global"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// Sku: pulumi.String("F0"),
// Endpoint: pulumi.String("https://example.com"),
// DeveloperAppInsightsApiKey: exampleApiKey.ApiKey,
// DeveloperAppInsightsApplicationId: exampleInsights.AppId,
// Tags: pulumi.StringMap{
// "environment": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Azure Bot Services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/serviceAzureBot:ServiceAzureBot example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.BotService/botServices/botService1
// ```
type ServiceAzureBot struct {
pulumi.CustomResourceState
// The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
//
// > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `softDeleteEnabled` and `purgeProtectionEnabled` on the `keyvault.KeyVault` that `cmkKeyVaultKeyUrl` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
CmkKeyVaultKeyUrl pulumi.StringPtrOutput `pulumi:"cmkKeyVaultKeyUrl"`
// The Application Insights API Key to associate with this Azure Bot Service.
DeveloperAppInsightsApiKey pulumi.StringPtrOutput `pulumi:"developerAppInsightsApiKey"`
// The resource ID of the Application Insights instance to associate with this Azure Bot Service.
DeveloperAppInsightsApplicationId pulumi.StringPtrOutput `pulumi:"developerAppInsightsApplicationId"`
// The Application Insight Key to associate with this Azure Bot Service.
DeveloperAppInsightsKey pulumi.StringPtrOutput `pulumi:"developerAppInsightsKey"`
// The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Azure Bot Service endpoint.
Endpoint pulumi.StringPtrOutput `pulumi:"endpoint"`
// The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl pulumi.StringPtrOutput `pulumi:"iconUrl"`
// Is local authentication enabled? Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"`
// The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A list of LUIS App IDs to associate with this Azure Bot Service.
LuisAppIds pulumi.StringArrayOutput `pulumi:"luisAppIds"`
// The LUIS key to associate with this Azure Bot Service.
LuisKey pulumi.StringPtrOutput `pulumi:"luisKey"`
// The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringOutput `pulumi:"microsoftAppId"`
// The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppMsiId pulumi.StringPtrOutput `pulumi:"microsoftAppMsiId"`
// The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppTenantId pulumi.StringPtrOutput `pulumi:"microsoftAppTenantId"`
// The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
MicrosoftAppType pulumi.StringPtrOutput `pulumi:"microsoftAppType"`
// The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether public network access is enabled. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the Resource Group where the Azure Bot Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringOutput `pulumi:"sku"`
// Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`.
StreamingEndpointEnabled pulumi.BoolPtrOutput `pulumi:"streamingEndpointEnabled"`
// A mapping of tags which should be assigned to this Azure Bot Service.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewServiceAzureBot registers a new resource with the given unique name, arguments, and options.
func NewServiceAzureBot(ctx *pulumi.Context,
name string, args *ServiceAzureBotArgs, opts ...pulumi.ResourceOption) (*ServiceAzureBot, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MicrosoftAppId == nil {
return nil, errors.New("invalid value for required argument 'MicrosoftAppId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
if args.DeveloperAppInsightsApiKey != nil {
args.DeveloperAppInsightsApiKey = pulumi.ToSecret(args.DeveloperAppInsightsApiKey).(pulumi.StringPtrInput)
}
if args.LuisKey != nil {
args.LuisKey = pulumi.ToSecret(args.LuisKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"developerAppInsightsApiKey",
"luisKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServiceAzureBot
err := ctx.RegisterResource("azure:bot/serviceAzureBot:ServiceAzureBot", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceAzureBot gets an existing ServiceAzureBot resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServiceAzureBot(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceAzureBotState, opts ...pulumi.ResourceOption) (*ServiceAzureBot, error) {
var resource ServiceAzureBot
err := ctx.ReadResource("azure:bot/serviceAzureBot:ServiceAzureBot", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceAzureBot resources.
type serviceAzureBotState struct {
// The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
//
// > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `softDeleteEnabled` and `purgeProtectionEnabled` on the `keyvault.KeyVault` that `cmkKeyVaultKeyUrl` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
CmkKeyVaultKeyUrl *string `pulumi:"cmkKeyVaultKeyUrl"`
// The Application Insights API Key to associate with this Azure Bot Service.
DeveloperAppInsightsApiKey *string `pulumi:"developerAppInsightsApiKey"`
// The resource ID of the Application Insights instance to associate with this Azure Bot Service.
DeveloperAppInsightsApplicationId *string `pulumi:"developerAppInsightsApplicationId"`
// The Application Insight Key to associate with this Azure Bot Service.
DeveloperAppInsightsKey *string `pulumi:"developerAppInsightsKey"`
// The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
DisplayName *string `pulumi:"displayName"`
// The Azure Bot Service endpoint.
Endpoint *string `pulumi:"endpoint"`
// The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl *string `pulumi:"iconUrl"`
// Is local authentication enabled? Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A list of LUIS App IDs to associate with this Azure Bot Service.
LuisAppIds []string `pulumi:"luisAppIds"`
// The LUIS key to associate with this Azure Bot Service.
LuisKey *string `pulumi:"luisKey"`
// The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppId *string `pulumi:"microsoftAppId"`
// The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppMsiId *string `pulumi:"microsoftAppMsiId"`
// The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppTenantId *string `pulumi:"microsoftAppTenantId"`
// The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
MicrosoftAppType *string `pulumi:"microsoftAppType"`
// The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether public network access is enabled. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the Resource Group where the Azure Bot Service should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
Sku *string `pulumi:"sku"`
// Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`.
StreamingEndpointEnabled *bool `pulumi:"streamingEndpointEnabled"`
// A mapping of tags which should be assigned to this Azure Bot Service.
Tags map[string]string `pulumi:"tags"`
}
type ServiceAzureBotState struct {
// The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
//
// > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `softDeleteEnabled` and `purgeProtectionEnabled` on the `keyvault.KeyVault` that `cmkKeyVaultKeyUrl` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
CmkKeyVaultKeyUrl pulumi.StringPtrInput
// The Application Insights API Key to associate with this Azure Bot Service.
DeveloperAppInsightsApiKey pulumi.StringPtrInput
// The resource ID of the Application Insights instance to associate with this Azure Bot Service.
DeveloperAppInsightsApplicationId pulumi.StringPtrInput
// The Application Insight Key to associate with this Azure Bot Service.
DeveloperAppInsightsKey pulumi.StringPtrInput
// The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
DisplayName pulumi.StringPtrInput
// The Azure Bot Service endpoint.
Endpoint pulumi.StringPtrInput
// The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl pulumi.StringPtrInput
// Is local authentication enabled? Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A list of LUIS App IDs to associate with this Azure Bot Service.
LuisAppIds pulumi.StringArrayInput
// The LUIS key to associate with this Azure Bot Service.
LuisKey pulumi.StringPtrInput
// The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringPtrInput
// The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppMsiId pulumi.StringPtrInput
// The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppTenantId pulumi.StringPtrInput
// The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
MicrosoftAppType pulumi.StringPtrInput
// The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether public network access is enabled. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the Resource Group where the Azure Bot Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringPtrInput
// Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`.
StreamingEndpointEnabled pulumi.BoolPtrInput
// A mapping of tags which should be assigned to this Azure Bot Service.
Tags pulumi.StringMapInput
}
func (ServiceAzureBotState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceAzureBotState)(nil)).Elem()
}
type serviceAzureBotArgs struct {
// The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
//
// > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `softDeleteEnabled` and `purgeProtectionEnabled` on the `keyvault.KeyVault` that `cmkKeyVaultKeyUrl` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
CmkKeyVaultKeyUrl *string `pulumi:"cmkKeyVaultKeyUrl"`
// The Application Insights API Key to associate with this Azure Bot Service.
DeveloperAppInsightsApiKey *string `pulumi:"developerAppInsightsApiKey"`
// The resource ID of the Application Insights instance to associate with this Azure Bot Service.
DeveloperAppInsightsApplicationId *string `pulumi:"developerAppInsightsApplicationId"`
// The Application Insight Key to associate with this Azure Bot Service.
DeveloperAppInsightsKey *string `pulumi:"developerAppInsightsKey"`
// The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
DisplayName *string `pulumi:"displayName"`
// The Azure Bot Service endpoint.
Endpoint *string `pulumi:"endpoint"`
// The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl *string `pulumi:"iconUrl"`
// Is local authentication enabled? Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A list of LUIS App IDs to associate with this Azure Bot Service.
LuisAppIds []string `pulumi:"luisAppIds"`
// The LUIS key to associate with this Azure Bot Service.
LuisKey *string `pulumi:"luisKey"`
// The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppId string `pulumi:"microsoftAppId"`
// The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppMsiId *string `pulumi:"microsoftAppMsiId"`
// The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppTenantId *string `pulumi:"microsoftAppTenantId"`
// The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
MicrosoftAppType *string `pulumi:"microsoftAppType"`
// The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether public network access is enabled. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the Resource Group where the Azure Bot Service should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
Sku string `pulumi:"sku"`
// Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`.
StreamingEndpointEnabled *bool `pulumi:"streamingEndpointEnabled"`
// A mapping of tags which should be assigned to this Azure Bot Service.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ServiceAzureBot resource.
type ServiceAzureBotArgs struct {
// The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
//
// > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `softDeleteEnabled` and `purgeProtectionEnabled` on the `keyvault.KeyVault` that `cmkKeyVaultKeyUrl` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
CmkKeyVaultKeyUrl pulumi.StringPtrInput
// The Application Insights API Key to associate with this Azure Bot Service.
DeveloperAppInsightsApiKey pulumi.StringPtrInput
// The resource ID of the Application Insights instance to associate with this Azure Bot Service.
DeveloperAppInsightsApplicationId pulumi.StringPtrInput
// The Application Insight Key to associate with this Azure Bot Service.
DeveloperAppInsightsKey pulumi.StringPtrInput
// The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
DisplayName pulumi.StringPtrInput
// The Azure Bot Service endpoint.
Endpoint pulumi.StringPtrInput
// The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
IconUrl pulumi.StringPtrInput
// Is local authentication enabled? Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A list of LUIS App IDs to associate with this Azure Bot Service.
LuisAppIds pulumi.StringArrayInput
// The LUIS key to associate with this Azure Bot Service.
LuisKey pulumi.StringPtrInput
// The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringInput
// The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppMsiId pulumi.StringPtrInput
// The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
MicrosoftAppTenantId pulumi.StringPtrInput
// The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
MicrosoftAppType pulumi.StringPtrInput
// The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether public network access is enabled. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the Resource Group where the Azure Bot Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringInput
// Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`.
StreamingEndpointEnabled pulumi.BoolPtrInput
// A mapping of tags which should be assigned to this Azure Bot Service.
Tags pulumi.StringMapInput
}
func (ServiceAzureBotArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceAzureBotArgs)(nil)).Elem()
}
type ServiceAzureBotInput interface {
pulumi.Input
ToServiceAzureBotOutput() ServiceAzureBotOutput
ToServiceAzureBotOutputWithContext(ctx context.Context) ServiceAzureBotOutput
}
func (*ServiceAzureBot) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceAzureBot)(nil)).Elem()
}
func (i *ServiceAzureBot) ToServiceAzureBotOutput() ServiceAzureBotOutput {
return i.ToServiceAzureBotOutputWithContext(context.Background())
}
func (i *ServiceAzureBot) ToServiceAzureBotOutputWithContext(ctx context.Context) ServiceAzureBotOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceAzureBotOutput)
}
// ServiceAzureBotArrayInput is an input type that accepts ServiceAzureBotArray and ServiceAzureBotArrayOutput values.
// You can construct a concrete instance of `ServiceAzureBotArrayInput` via:
//
// ServiceAzureBotArray{ ServiceAzureBotArgs{...} }
type ServiceAzureBotArrayInput interface {
pulumi.Input
ToServiceAzureBotArrayOutput() ServiceAzureBotArrayOutput
ToServiceAzureBotArrayOutputWithContext(context.Context) ServiceAzureBotArrayOutput
}
type ServiceAzureBotArray []ServiceAzureBotInput
func (ServiceAzureBotArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceAzureBot)(nil)).Elem()
}
func (i ServiceAzureBotArray) ToServiceAzureBotArrayOutput() ServiceAzureBotArrayOutput {
return i.ToServiceAzureBotArrayOutputWithContext(context.Background())
}
func (i ServiceAzureBotArray) ToServiceAzureBotArrayOutputWithContext(ctx context.Context) ServiceAzureBotArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceAzureBotArrayOutput)
}
// ServiceAzureBotMapInput is an input type that accepts ServiceAzureBotMap and ServiceAzureBotMapOutput values.
// You can construct a concrete instance of `ServiceAzureBotMapInput` via:
//
// ServiceAzureBotMap{ "key": ServiceAzureBotArgs{...} }
type ServiceAzureBotMapInput interface {
pulumi.Input
ToServiceAzureBotMapOutput() ServiceAzureBotMapOutput
ToServiceAzureBotMapOutputWithContext(context.Context) ServiceAzureBotMapOutput
}
type ServiceAzureBotMap map[string]ServiceAzureBotInput
func (ServiceAzureBotMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceAzureBot)(nil)).Elem()
}
func (i ServiceAzureBotMap) ToServiceAzureBotMapOutput() ServiceAzureBotMapOutput {
return i.ToServiceAzureBotMapOutputWithContext(context.Background())
}
func (i ServiceAzureBotMap) ToServiceAzureBotMapOutputWithContext(ctx context.Context) ServiceAzureBotMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceAzureBotMapOutput)
}
type ServiceAzureBotOutput struct{ *pulumi.OutputState }
func (ServiceAzureBotOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceAzureBot)(nil)).Elem()
}
func (o ServiceAzureBotOutput) ToServiceAzureBotOutput() ServiceAzureBotOutput {
return o
}
func (o ServiceAzureBotOutput) ToServiceAzureBotOutputWithContext(ctx context.Context) ServiceAzureBotOutput {
return o
}
// The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
//
// > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `softDeleteEnabled` and `purgeProtectionEnabled` on the `keyvault.KeyVault` that `cmkKeyVaultKeyUrl` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
func (o ServiceAzureBotOutput) CmkKeyVaultKeyUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.CmkKeyVaultKeyUrl }).(pulumi.StringPtrOutput)
}
// The Application Insights API Key to associate with this Azure Bot Service.
func (o ServiceAzureBotOutput) DeveloperAppInsightsApiKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.DeveloperAppInsightsApiKey }).(pulumi.StringPtrOutput)
}
// The resource ID of the Application Insights instance to associate with this Azure Bot Service.
func (o ServiceAzureBotOutput) DeveloperAppInsightsApplicationId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.DeveloperAppInsightsApplicationId }).(pulumi.StringPtrOutput)
}
// The Application Insight Key to associate with this Azure Bot Service.
func (o ServiceAzureBotOutput) DeveloperAppInsightsKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.DeveloperAppInsightsKey }).(pulumi.StringPtrOutput)
}
// The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
func (o ServiceAzureBotOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The Azure Bot Service endpoint.
func (o ServiceAzureBotOutput) Endpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.Endpoint }).(pulumi.StringPtrOutput)
}
// The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
func (o ServiceAzureBotOutput) IconUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.IconUrl }).(pulumi.StringPtrOutput)
}
// Is local authentication enabled? Defaults to `true`.
func (o ServiceAzureBotOutput) LocalAuthenticationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.BoolPtrOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolPtrOutput)
}
// The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A list of LUIS App IDs to associate with this Azure Bot Service.
func (o ServiceAzureBotOutput) LuisAppIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringArrayOutput { return v.LuisAppIds }).(pulumi.StringArrayOutput)
}
// The LUIS key to associate with this Azure Bot Service.
func (o ServiceAzureBotOutput) LuisKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.LuisKey }).(pulumi.StringPtrOutput)
}
// The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) MicrosoftAppId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringOutput { return v.MicrosoftAppId }).(pulumi.StringOutput)
}
// The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) MicrosoftAppMsiId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.MicrosoftAppMsiId }).(pulumi.StringPtrOutput)
}
// The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) MicrosoftAppTenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.MicrosoftAppTenantId }).(pulumi.StringPtrOutput)
}
// The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) MicrosoftAppType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringPtrOutput { return v.MicrosoftAppType }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether public network access is enabled. Defaults to `true`.
func (o ServiceAzureBotOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the Resource Group where the Azure Bot Service should exist. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
func (o ServiceAzureBotOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceAzureBot) pulumi.StringOutput { return v.Sku }).(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/bot/connection.go | sdk/go/azure/bot/connection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Bot Connection.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewConnection(ctx, "example", &bot.ConnectionArgs{
// Name: pulumi.String("example"),
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// ServiceProviderName: pulumi.String("box"),
// ClientId: pulumi.String("exampleId"),
// ClientSecret: pulumi.String("exampleSecret"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Bot Connection can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/connection:Connection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example/connections/example
// ```
type Connection struct {
pulumi.CustomResourceState
// The name of the Bot Resource this connection will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// The Client ID that will be used to authenticate with the service provider.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The Client Secret that will be used to authenticate with the service provider.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// 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 Bot Connection. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringOutput `pulumi:"name"`
// A map of additional parameters to apply to the connection.
Parameters pulumi.StringMapOutput `pulumi:"parameters"`
// The name of the resource group in which to create the Bot Connection. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Scopes at which the connection should be applied.
Scopes pulumi.StringPtrOutput `pulumi:"scopes"`
// The name of the service provider that will be associated with this connection. Changing this forces a new resource to be created.
ServiceProviderName pulumi.StringOutput `pulumi:"serviceProviderName"`
}
// NewConnection registers a new resource with the given unique name, arguments, and options.
func NewConnection(ctx *pulumi.Context,
name string, args *ConnectionArgs, opts ...pulumi.ResourceOption) (*Connection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ServiceProviderName == nil {
return nil, errors.New("invalid value for required argument 'ServiceProviderName'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Connection
err := ctx.RegisterResource("azure:bot/connection:Connection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnection gets an existing Connection resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionState, opts ...pulumi.ResourceOption) (*Connection, error) {
var resource Connection
err := ctx.ReadResource("azure:bot/connection:Connection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Connection resources.
type connectionState struct {
// The name of the Bot Resource this connection will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// The Client ID that will be used to authenticate with the service provider.
ClientId *string `pulumi:"clientId"`
// The Client Secret that will be used to authenticate with the service provider.
ClientSecret *string `pulumi:"clientSecret"`
// 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 Bot Connection. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// A map of additional parameters to apply to the connection.
Parameters map[string]string `pulumi:"parameters"`
// The name of the resource group in which to create the Bot Connection. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Scopes at which the connection should be applied.
Scopes *string `pulumi:"scopes"`
// The name of the service provider that will be associated with this connection. Changing this forces a new resource to be created.
ServiceProviderName *string `pulumi:"serviceProviderName"`
}
type ConnectionState struct {
// The name of the Bot Resource this connection will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// The Client ID that will be used to authenticate with the service provider.
ClientId pulumi.StringPtrInput
// The Client Secret that will be used to authenticate with the service provider.
ClientSecret pulumi.StringPtrInput
// 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 Bot Connection. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// A map of additional parameters to apply to the connection.
Parameters pulumi.StringMapInput
// The name of the resource group in which to create the Bot Connection. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Scopes at which the connection should be applied.
Scopes pulumi.StringPtrInput
// The name of the service provider that will be associated with this connection. Changing this forces a new resource to be created.
ServiceProviderName pulumi.StringPtrInput
}
func (ConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionState)(nil)).Elem()
}
type connectionArgs struct {
// The name of the Bot Resource this connection will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// The Client ID that will be used to authenticate with the service provider.
ClientId string `pulumi:"clientId"`
// The Client Secret that will be used to authenticate with the service provider.
ClientSecret string `pulumi:"clientSecret"`
// 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 Bot Connection. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// A map of additional parameters to apply to the connection.
Parameters map[string]string `pulumi:"parameters"`
// The name of the resource group in which to create the Bot Connection. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Scopes at which the connection should be applied.
Scopes *string `pulumi:"scopes"`
// The name of the service provider that will be associated with this connection. Changing this forces a new resource to be created.
ServiceProviderName string `pulumi:"serviceProviderName"`
}
// The set of arguments for constructing a Connection resource.
type ConnectionArgs struct {
// The name of the Bot Resource this connection will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// The Client ID that will be used to authenticate with the service provider.
ClientId pulumi.StringInput
// The Client Secret that will be used to authenticate with the service provider.
ClientSecret pulumi.StringInput
// 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 Bot Connection. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// A map of additional parameters to apply to the connection.
Parameters pulumi.StringMapInput
// The name of the resource group in which to create the Bot Connection. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The Scopes at which the connection should be applied.
Scopes pulumi.StringPtrInput
// The name of the service provider that will be associated with this connection. Changing this forces a new resource to be created.
ServiceProviderName pulumi.StringInput
}
func (ConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionArgs)(nil)).Elem()
}
type ConnectionInput interface {
pulumi.Input
ToConnectionOutput() ConnectionOutput
ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput
}
func (*Connection) ElementType() reflect.Type {
return reflect.TypeOf((**Connection)(nil)).Elem()
}
func (i *Connection) ToConnectionOutput() ConnectionOutput {
return i.ToConnectionOutputWithContext(context.Background())
}
func (i *Connection) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionOutput)
}
// ConnectionArrayInput is an input type that accepts ConnectionArray and ConnectionArrayOutput values.
// You can construct a concrete instance of `ConnectionArrayInput` via:
//
// ConnectionArray{ ConnectionArgs{...} }
type ConnectionArrayInput interface {
pulumi.Input
ToConnectionArrayOutput() ConnectionArrayOutput
ToConnectionArrayOutputWithContext(context.Context) ConnectionArrayOutput
}
type ConnectionArray []ConnectionInput
func (ConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Connection)(nil)).Elem()
}
func (i ConnectionArray) ToConnectionArrayOutput() ConnectionArrayOutput {
return i.ToConnectionArrayOutputWithContext(context.Background())
}
func (i ConnectionArray) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionArrayOutput)
}
// ConnectionMapInput is an input type that accepts ConnectionMap and ConnectionMapOutput values.
// You can construct a concrete instance of `ConnectionMapInput` via:
//
// ConnectionMap{ "key": ConnectionArgs{...} }
type ConnectionMapInput interface {
pulumi.Input
ToConnectionMapOutput() ConnectionMapOutput
ToConnectionMapOutputWithContext(context.Context) ConnectionMapOutput
}
type ConnectionMap map[string]ConnectionInput
func (ConnectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Connection)(nil)).Elem()
}
func (i ConnectionMap) ToConnectionMapOutput() ConnectionMapOutput {
return i.ToConnectionMapOutputWithContext(context.Background())
}
func (i ConnectionMap) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionMapOutput)
}
type ConnectionOutput struct{ *pulumi.OutputState }
func (ConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Connection)(nil)).Elem()
}
func (o ConnectionOutput) ToConnectionOutput() ConnectionOutput {
return o
}
func (o ConnectionOutput) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput {
return o
}
// The name of the Bot Resource this connection will be associated with. Changing this forces a new resource to be created.
func (o ConnectionOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// The Client ID that will be used to authenticate with the service provider.
func (o ConnectionOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// The Client Secret that will be used to authenticate with the service provider.
func (o ConnectionOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ConnectionOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Bot Connection. Changing this forces a new resource to be created. Must be globally unique.
func (o ConnectionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A map of additional parameters to apply to the connection.
func (o ConnectionOutput) Parameters() pulumi.StringMapOutput {
return o.ApplyT(func(v *Connection) pulumi.StringMapOutput { return v.Parameters }).(pulumi.StringMapOutput)
}
// The name of the resource group in which to create the Bot Connection. Changing this forces a new resource to be created.
func (o ConnectionOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Scopes at which the connection should be applied.
func (o ConnectionOutput) Scopes() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.Scopes }).(pulumi.StringPtrOutput)
}
// The name of the service provider that will be associated with this connection. Changing this forces a new resource to be created.
func (o ConnectionOutput) ServiceProviderName() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.ServiceProviderName }).(pulumi.StringOutput)
}
type ConnectionArrayOutput struct{ *pulumi.OutputState }
func (ConnectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Connection)(nil)).Elem()
}
func (o ConnectionArrayOutput) ToConnectionArrayOutput() ConnectionArrayOutput {
return o
}
func (o ConnectionArrayOutput) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput {
return o
}
func (o ConnectionArrayOutput) Index(i pulumi.IntInput) ConnectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Connection {
return vs[0].([]*Connection)[vs[1].(int)]
}).(ConnectionOutput)
}
type ConnectionMapOutput struct{ *pulumi.OutputState }
func (ConnectionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Connection)(nil)).Elem()
}
func (o ConnectionMapOutput) ToConnectionMapOutput() ConnectionMapOutput {
return o
}
func (o ConnectionMapOutput) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput {
return o
}
func (o ConnectionMapOutput) MapIndex(k pulumi.StringInput) ConnectionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Connection {
return vs[0].(map[string]*Connection)[vs[1].(string)]
}).(ConnectionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionInput)(nil)).Elem(), &Connection{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionArrayInput)(nil)).Elem(), ConnectionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionMapInput)(nil)).Elem(), ConnectionMap{})
pulumi.RegisterOutputType(ConnectionOutput{})
pulumi.RegisterOutputType(ConnectionArrayOutput{})
pulumi.RegisterOutputType(ConnectionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelWebChat.go | sdk/go/azure/bot/channelWebChat.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Web Chat integration for a Bot Channel
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example-bcr"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelWebChat(ctx, "example", &bot.ChannelWebChatArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// Sites: bot.ChannelWebChatSiteArray{
// &bot.ChannelWebChatSiteArgs{
// Name: pulumi.String("TestSite"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Web Chat Channels can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelWebChat:ChannelWebChat example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.BotService/botServices/botService1/channels/WebChatChannel
// ```
type ChannelWebChat struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource group where the Web Chat Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites ChannelWebChatSiteArrayOutput `pulumi:"sites"`
}
// NewChannelWebChat registers a new resource with the given unique name, arguments, and options.
func NewChannelWebChat(ctx *pulumi.Context,
name string, args *ChannelWebChatArgs, opts ...pulumi.ResourceOption) (*ChannelWebChat, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelWebChat
err := ctx.RegisterResource("azure:bot/channelWebChat:ChannelWebChat", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelWebChat gets an existing ChannelWebChat resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelWebChat(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelWebChatState, opts ...pulumi.ResourceOption) (*ChannelWebChat, error) {
var resource ChannelWebChat
err := ctx.ReadResource("azure:bot/channelWebChat:ChannelWebChat", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelWebChat resources.
type channelWebChatState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Web Chat Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites []ChannelWebChatSite `pulumi:"sites"`
}
type ChannelWebChatState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Web Chat Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites ChannelWebChatSiteArrayInput
}
func (ChannelWebChatState) ElementType() reflect.Type {
return reflect.TypeOf((*channelWebChatState)(nil)).Elem()
}
type channelWebChatArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Web Chat Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites []ChannelWebChatSite `pulumi:"sites"`
}
// The set of arguments for constructing a ChannelWebChat resource.
type ChannelWebChatArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Web Chat Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
Sites ChannelWebChatSiteArrayInput
}
func (ChannelWebChatArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelWebChatArgs)(nil)).Elem()
}
type ChannelWebChatInput interface {
pulumi.Input
ToChannelWebChatOutput() ChannelWebChatOutput
ToChannelWebChatOutputWithContext(ctx context.Context) ChannelWebChatOutput
}
func (*ChannelWebChat) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelWebChat)(nil)).Elem()
}
func (i *ChannelWebChat) ToChannelWebChatOutput() ChannelWebChatOutput {
return i.ToChannelWebChatOutputWithContext(context.Background())
}
func (i *ChannelWebChat) ToChannelWebChatOutputWithContext(ctx context.Context) ChannelWebChatOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelWebChatOutput)
}
// ChannelWebChatArrayInput is an input type that accepts ChannelWebChatArray and ChannelWebChatArrayOutput values.
// You can construct a concrete instance of `ChannelWebChatArrayInput` via:
//
// ChannelWebChatArray{ ChannelWebChatArgs{...} }
type ChannelWebChatArrayInput interface {
pulumi.Input
ToChannelWebChatArrayOutput() ChannelWebChatArrayOutput
ToChannelWebChatArrayOutputWithContext(context.Context) ChannelWebChatArrayOutput
}
type ChannelWebChatArray []ChannelWebChatInput
func (ChannelWebChatArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelWebChat)(nil)).Elem()
}
func (i ChannelWebChatArray) ToChannelWebChatArrayOutput() ChannelWebChatArrayOutput {
return i.ToChannelWebChatArrayOutputWithContext(context.Background())
}
func (i ChannelWebChatArray) ToChannelWebChatArrayOutputWithContext(ctx context.Context) ChannelWebChatArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelWebChatArrayOutput)
}
// ChannelWebChatMapInput is an input type that accepts ChannelWebChatMap and ChannelWebChatMapOutput values.
// You can construct a concrete instance of `ChannelWebChatMapInput` via:
//
// ChannelWebChatMap{ "key": ChannelWebChatArgs{...} }
type ChannelWebChatMapInput interface {
pulumi.Input
ToChannelWebChatMapOutput() ChannelWebChatMapOutput
ToChannelWebChatMapOutputWithContext(context.Context) ChannelWebChatMapOutput
}
type ChannelWebChatMap map[string]ChannelWebChatInput
func (ChannelWebChatMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelWebChat)(nil)).Elem()
}
func (i ChannelWebChatMap) ToChannelWebChatMapOutput() ChannelWebChatMapOutput {
return i.ToChannelWebChatMapOutputWithContext(context.Background())
}
func (i ChannelWebChatMap) ToChannelWebChatMapOutputWithContext(ctx context.Context) ChannelWebChatMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelWebChatMapOutput)
}
type ChannelWebChatOutput struct{ *pulumi.OutputState }
func (ChannelWebChatOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelWebChat)(nil)).Elem()
}
func (o ChannelWebChatOutput) ToChannelWebChatOutput() ChannelWebChatOutput {
return o
}
func (o ChannelWebChatOutput) ToChannelWebChatOutputWithContext(ctx context.Context) ChannelWebChatOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelWebChatOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelWebChat) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelWebChatOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelWebChat) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource group where the Web Chat Channel should be created. Changing this forces a new resource to be created.
func (o ChannelWebChatOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelWebChat) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A site represents a client application that you want to connect to your bot. One or more `site` blocks as defined below.
func (o ChannelWebChatOutput) Sites() ChannelWebChatSiteArrayOutput {
return o.ApplyT(func(v *ChannelWebChat) ChannelWebChatSiteArrayOutput { return v.Sites }).(ChannelWebChatSiteArrayOutput)
}
type ChannelWebChatArrayOutput struct{ *pulumi.OutputState }
func (ChannelWebChatArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelWebChat)(nil)).Elem()
}
func (o ChannelWebChatArrayOutput) ToChannelWebChatArrayOutput() ChannelWebChatArrayOutput {
return o
}
func (o ChannelWebChatArrayOutput) ToChannelWebChatArrayOutputWithContext(ctx context.Context) ChannelWebChatArrayOutput {
return o
}
func (o ChannelWebChatArrayOutput) Index(i pulumi.IntInput) ChannelWebChatOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelWebChat {
return vs[0].([]*ChannelWebChat)[vs[1].(int)]
}).(ChannelWebChatOutput)
}
type ChannelWebChatMapOutput struct{ *pulumi.OutputState }
func (ChannelWebChatMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelWebChat)(nil)).Elem()
}
func (o ChannelWebChatMapOutput) ToChannelWebChatMapOutput() ChannelWebChatMapOutput {
return o
}
func (o ChannelWebChatMapOutput) ToChannelWebChatMapOutputWithContext(ctx context.Context) ChannelWebChatMapOutput {
return o
}
func (o ChannelWebChatMapOutput) MapIndex(k pulumi.StringInput) ChannelWebChatOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelWebChat {
return vs[0].(map[string]*ChannelWebChat)[vs[1].(string)]
}).(ChannelWebChatOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelWebChatInput)(nil)).Elem(), &ChannelWebChat{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelWebChatArrayInput)(nil)).Elem(), ChannelWebChatArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelWebChatMapInput)(nil)).Elem(), ChannelWebChatMap{})
pulumi.RegisterOutputType(ChannelWebChatOutput{})
pulumi.RegisterOutputType(ChannelWebChatArrayOutput{})
pulumi.RegisterOutputType(ChannelWebChatMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelSms.go | sdk/go/azure/bot/channelSms.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a SMS integration for a Bot Channel
//
// > **Note:** A bot can only have a single SMS Channel associated with it.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example-bcr"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelSms(ctx, "example", &bot.ChannelSmsArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// SmsChannelAccountSecurityId: pulumi.String("BG61f7cf5157f439b084e98256409c2815"),
// SmsChannelAuthToken: pulumi.String("jh8980432610052ed4e29565c5e232f"),
// PhoneNumber: pulumi.String("+12313803556"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The SMS Integration for a Bot Channel can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelSms:ChannelSms example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.BotService/botServices/botService1/channels/SmsChannel
// ```
type ChannelSms struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The phone number for the SMS Channel.
PhoneNumber pulumi.StringOutput `pulumi:"phoneNumber"`
// The name of the resource group where the SMS Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The account security identifier (SID) for the SMS Channel.
SmsChannelAccountSecurityId pulumi.StringOutput `pulumi:"smsChannelAccountSecurityId"`
// The authorization token for the SMS Channel.
SmsChannelAuthToken pulumi.StringOutput `pulumi:"smsChannelAuthToken"`
}
// NewChannelSms registers a new resource with the given unique name, arguments, and options.
func NewChannelSms(ctx *pulumi.Context,
name string, args *ChannelSmsArgs, opts ...pulumi.ResourceOption) (*ChannelSms, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.PhoneNumber == nil {
return nil, errors.New("invalid value for required argument 'PhoneNumber'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SmsChannelAccountSecurityId == nil {
return nil, errors.New("invalid value for required argument 'SmsChannelAccountSecurityId'")
}
if args.SmsChannelAuthToken == nil {
return nil, errors.New("invalid value for required argument 'SmsChannelAuthToken'")
}
if args.SmsChannelAuthToken != nil {
args.SmsChannelAuthToken = pulumi.ToSecret(args.SmsChannelAuthToken).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"smsChannelAuthToken",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelSms
err := ctx.RegisterResource("azure:bot/channelSms:ChannelSms", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelSms gets an existing ChannelSms resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelSms(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelSmsState, opts ...pulumi.ResourceOption) (*ChannelSms, error) {
var resource ChannelSms
err := ctx.ReadResource("azure:bot/channelSms:ChannelSms", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelSms resources.
type channelSmsState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The phone number for the SMS Channel.
PhoneNumber *string `pulumi:"phoneNumber"`
// The name of the resource group where the SMS Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The account security identifier (SID) for the SMS Channel.
SmsChannelAccountSecurityId *string `pulumi:"smsChannelAccountSecurityId"`
// The authorization token for the SMS Channel.
SmsChannelAuthToken *string `pulumi:"smsChannelAuthToken"`
}
type ChannelSmsState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The phone number for the SMS Channel.
PhoneNumber pulumi.StringPtrInput
// The name of the resource group where the SMS Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The account security identifier (SID) for the SMS Channel.
SmsChannelAccountSecurityId pulumi.StringPtrInput
// The authorization token for the SMS Channel.
SmsChannelAuthToken pulumi.StringPtrInput
}
func (ChannelSmsState) ElementType() reflect.Type {
return reflect.TypeOf((*channelSmsState)(nil)).Elem()
}
type channelSmsArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The phone number for the SMS Channel.
PhoneNumber string `pulumi:"phoneNumber"`
// The name of the resource group where the SMS Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The account security identifier (SID) for the SMS Channel.
SmsChannelAccountSecurityId string `pulumi:"smsChannelAccountSecurityId"`
// The authorization token for the SMS Channel.
SmsChannelAuthToken string `pulumi:"smsChannelAuthToken"`
}
// The set of arguments for constructing a ChannelSms resource.
type ChannelSmsArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The phone number for the SMS Channel.
PhoneNumber pulumi.StringInput
// The name of the resource group where the SMS Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The account security identifier (SID) for the SMS Channel.
SmsChannelAccountSecurityId pulumi.StringInput
// The authorization token for the SMS Channel.
SmsChannelAuthToken pulumi.StringInput
}
func (ChannelSmsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelSmsArgs)(nil)).Elem()
}
type ChannelSmsInput interface {
pulumi.Input
ToChannelSmsOutput() ChannelSmsOutput
ToChannelSmsOutputWithContext(ctx context.Context) ChannelSmsOutput
}
func (*ChannelSms) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelSms)(nil)).Elem()
}
func (i *ChannelSms) ToChannelSmsOutput() ChannelSmsOutput {
return i.ToChannelSmsOutputWithContext(context.Background())
}
func (i *ChannelSms) ToChannelSmsOutputWithContext(ctx context.Context) ChannelSmsOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelSmsOutput)
}
// ChannelSmsArrayInput is an input type that accepts ChannelSmsArray and ChannelSmsArrayOutput values.
// You can construct a concrete instance of `ChannelSmsArrayInput` via:
//
// ChannelSmsArray{ ChannelSmsArgs{...} }
type ChannelSmsArrayInput interface {
pulumi.Input
ToChannelSmsArrayOutput() ChannelSmsArrayOutput
ToChannelSmsArrayOutputWithContext(context.Context) ChannelSmsArrayOutput
}
type ChannelSmsArray []ChannelSmsInput
func (ChannelSmsArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelSms)(nil)).Elem()
}
func (i ChannelSmsArray) ToChannelSmsArrayOutput() ChannelSmsArrayOutput {
return i.ToChannelSmsArrayOutputWithContext(context.Background())
}
func (i ChannelSmsArray) ToChannelSmsArrayOutputWithContext(ctx context.Context) ChannelSmsArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelSmsArrayOutput)
}
// ChannelSmsMapInput is an input type that accepts ChannelSmsMap and ChannelSmsMapOutput values.
// You can construct a concrete instance of `ChannelSmsMapInput` via:
//
// ChannelSmsMap{ "key": ChannelSmsArgs{...} }
type ChannelSmsMapInput interface {
pulumi.Input
ToChannelSmsMapOutput() ChannelSmsMapOutput
ToChannelSmsMapOutputWithContext(context.Context) ChannelSmsMapOutput
}
type ChannelSmsMap map[string]ChannelSmsInput
func (ChannelSmsMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelSms)(nil)).Elem()
}
func (i ChannelSmsMap) ToChannelSmsMapOutput() ChannelSmsMapOutput {
return i.ToChannelSmsMapOutputWithContext(context.Background())
}
func (i ChannelSmsMap) ToChannelSmsMapOutputWithContext(ctx context.Context) ChannelSmsMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelSmsMapOutput)
}
type ChannelSmsOutput struct{ *pulumi.OutputState }
func (ChannelSmsOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelSms)(nil)).Elem()
}
func (o ChannelSmsOutput) ToChannelSmsOutput() ChannelSmsOutput {
return o
}
func (o ChannelSmsOutput) ToChannelSmsOutputWithContext(ctx context.Context) ChannelSmsOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelSmsOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSms) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelSmsOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSms) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The phone number for the SMS Channel.
func (o ChannelSmsOutput) PhoneNumber() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSms) pulumi.StringOutput { return v.PhoneNumber }).(pulumi.StringOutput)
}
// The name of the resource group where the SMS Channel should be created. Changing this forces a new resource to be created.
func (o ChannelSmsOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSms) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The account security identifier (SID) for the SMS Channel.
func (o ChannelSmsOutput) SmsChannelAccountSecurityId() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSms) pulumi.StringOutput { return v.SmsChannelAccountSecurityId }).(pulumi.StringOutput)
}
// The authorization token for the SMS Channel.
func (o ChannelSmsOutput) SmsChannelAuthToken() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSms) pulumi.StringOutput { return v.SmsChannelAuthToken }).(pulumi.StringOutput)
}
type ChannelSmsArrayOutput struct{ *pulumi.OutputState }
func (ChannelSmsArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelSms)(nil)).Elem()
}
func (o ChannelSmsArrayOutput) ToChannelSmsArrayOutput() ChannelSmsArrayOutput {
return o
}
func (o ChannelSmsArrayOutput) ToChannelSmsArrayOutputWithContext(ctx context.Context) ChannelSmsArrayOutput {
return o
}
func (o ChannelSmsArrayOutput) Index(i pulumi.IntInput) ChannelSmsOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelSms {
return vs[0].([]*ChannelSms)[vs[1].(int)]
}).(ChannelSmsOutput)
}
type ChannelSmsMapOutput struct{ *pulumi.OutputState }
func (ChannelSmsMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelSms)(nil)).Elem()
}
func (o ChannelSmsMapOutput) ToChannelSmsMapOutput() ChannelSmsMapOutput {
return o
}
func (o ChannelSmsMapOutput) ToChannelSmsMapOutputWithContext(ctx context.Context) ChannelSmsMapOutput {
return o
}
func (o ChannelSmsMapOutput) MapIndex(k pulumi.StringInput) ChannelSmsOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelSms {
return vs[0].(map[string]*ChannelSms)[vs[1].(string)]
}).(ChannelSmsOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelSmsInput)(nil)).Elem(), &ChannelSms{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelSmsArrayInput)(nil)).Elem(), ChannelSmsArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelSmsMapInput)(nil)).Elem(), ChannelSmsMap{})
pulumi.RegisterOutputType(ChannelSmsOutput{})
pulumi.RegisterOutputType(ChannelSmsArrayOutput{})
pulumi.RegisterOutputType(ChannelSmsMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/webApp.go | sdk/go/azure/bot/webApp.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Bot Web App.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewWebApp(ctx, "example", &bot.WebAppArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Bot Web App's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/webApp:WebApp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example
// ```
type WebApp struct {
pulumi.CustomResourceState
// The Application Insights API Key to associate with the Web App Bot.
DeveloperAppInsightsApiKey pulumi.StringPtrOutput `pulumi:"developerAppInsightsApiKey"`
// The Application Insights Application ID to associate with the Web App Bot.
DeveloperAppInsightsApplicationId pulumi.StringPtrOutput `pulumi:"developerAppInsightsApplicationId"`
// The Application Insights Key to associate with the Web App Bot.
DeveloperAppInsightsKey pulumi.StringPtrOutput `pulumi:"developerAppInsightsKey"`
// The name of the Web App Bot will be displayed as. This defaults to `name` if not specified.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Web App Bot endpoint.
Endpoint pulumi.StringPtrOutput `pulumi:"endpoint"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A list of LUIS App IDs to associate with the Web App Bot.
LuisAppIds pulumi.StringArrayOutput `pulumi:"luisAppIds"`
// The LUIS key to associate with the Web App Bot.
LuisKey pulumi.StringPtrOutput `pulumi:"luisKey"`
// The Microsoft Application ID for the Web App Bot. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringOutput `pulumi:"microsoftAppId"`
// Specifies the name of the Web App Bot. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which to create the Web App Bot. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SKU of the Web App Bot. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewWebApp registers a new resource with the given unique name, arguments, and options.
func NewWebApp(ctx *pulumi.Context,
name string, args *WebAppArgs, opts ...pulumi.ResourceOption) (*WebApp, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MicrosoftAppId == nil {
return nil, errors.New("invalid value for required argument 'MicrosoftAppId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
if args.DeveloperAppInsightsApiKey != nil {
args.DeveloperAppInsightsApiKey = pulumi.ToSecret(args.DeveloperAppInsightsApiKey).(pulumi.StringPtrInput)
}
if args.LuisKey != nil {
args.LuisKey = pulumi.ToSecret(args.LuisKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"developerAppInsightsApiKey",
"luisKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource WebApp
err := ctx.RegisterResource("azure:bot/webApp:WebApp", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWebApp gets an existing WebApp resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWebApp(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WebAppState, opts ...pulumi.ResourceOption) (*WebApp, error) {
var resource WebApp
err := ctx.ReadResource("azure:bot/webApp:WebApp", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WebApp resources.
type webAppState struct {
// The Application Insights API Key to associate with the Web App Bot.
DeveloperAppInsightsApiKey *string `pulumi:"developerAppInsightsApiKey"`
// The Application Insights Application ID to associate with the Web App Bot.
DeveloperAppInsightsApplicationId *string `pulumi:"developerAppInsightsApplicationId"`
// The Application Insights Key to associate with the Web App Bot.
DeveloperAppInsightsKey *string `pulumi:"developerAppInsightsKey"`
// The name of the Web App Bot will be displayed as. This defaults to `name` if not specified.
DisplayName *string `pulumi:"displayName"`
// The Web App Bot endpoint.
Endpoint *string `pulumi:"endpoint"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A list of LUIS App IDs to associate with the Web App Bot.
LuisAppIds []string `pulumi:"luisAppIds"`
// The LUIS key to associate with the Web App Bot.
LuisKey *string `pulumi:"luisKey"`
// The Microsoft Application ID for the Web App Bot. Changing this forces a new resource to be created.
MicrosoftAppId *string `pulumi:"microsoftAppId"`
// Specifies the name of the Web App Bot. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Web App Bot. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SKU of the Web App Bot. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type WebAppState struct {
// The Application Insights API Key to associate with the Web App Bot.
DeveloperAppInsightsApiKey pulumi.StringPtrInput
// The Application Insights Application ID to associate with the Web App Bot.
DeveloperAppInsightsApplicationId pulumi.StringPtrInput
// The Application Insights Key to associate with the Web App Bot.
DeveloperAppInsightsKey pulumi.StringPtrInput
// The name of the Web App Bot will be displayed as. This defaults to `name` if not specified.
DisplayName pulumi.StringPtrInput
// The Web App Bot endpoint.
Endpoint pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A list of LUIS App IDs to associate with the Web App Bot.
LuisAppIds pulumi.StringArrayInput
// The LUIS key to associate with the Web App Bot.
LuisKey pulumi.StringPtrInput
// The Microsoft Application ID for the Web App Bot. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringPtrInput
// Specifies the name of the Web App Bot. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Web App Bot. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The SKU of the Web App Bot. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (WebAppState) ElementType() reflect.Type {
return reflect.TypeOf((*webAppState)(nil)).Elem()
}
type webAppArgs struct {
// The Application Insights API Key to associate with the Web App Bot.
DeveloperAppInsightsApiKey *string `pulumi:"developerAppInsightsApiKey"`
// The Application Insights Application ID to associate with the Web App Bot.
DeveloperAppInsightsApplicationId *string `pulumi:"developerAppInsightsApplicationId"`
// The Application Insights Key to associate with the Web App Bot.
DeveloperAppInsightsKey *string `pulumi:"developerAppInsightsKey"`
// The name of the Web App Bot will be displayed as. This defaults to `name` if not specified.
DisplayName *string `pulumi:"displayName"`
// The Web App Bot endpoint.
Endpoint *string `pulumi:"endpoint"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A list of LUIS App IDs to associate with the Web App Bot.
LuisAppIds []string `pulumi:"luisAppIds"`
// The LUIS key to associate with the Web App Bot.
LuisKey *string `pulumi:"luisKey"`
// The Microsoft Application ID for the Web App Bot. Changing this forces a new resource to be created.
MicrosoftAppId string `pulumi:"microsoftAppId"`
// Specifies the name of the Web App Bot. Changing this forces a new resource to be created. Must be globally unique.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Web App Bot. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU of the Web App Bot. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a WebApp resource.
type WebAppArgs struct {
// The Application Insights API Key to associate with the Web App Bot.
DeveloperAppInsightsApiKey pulumi.StringPtrInput
// The Application Insights Application ID to associate with the Web App Bot.
DeveloperAppInsightsApplicationId pulumi.StringPtrInput
// The Application Insights Key to associate with the Web App Bot.
DeveloperAppInsightsKey pulumi.StringPtrInput
// The name of the Web App Bot will be displayed as. This defaults to `name` if not specified.
DisplayName pulumi.StringPtrInput
// The Web App Bot endpoint.
Endpoint pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A list of LUIS App IDs to associate with the Web App Bot.
LuisAppIds pulumi.StringArrayInput
// The LUIS key to associate with the Web App Bot.
LuisKey pulumi.StringPtrInput
// The Microsoft Application ID for the Web App Bot. Changing this forces a new resource to be created.
MicrosoftAppId pulumi.StringInput
// Specifies the name of the Web App Bot. Changing this forces a new resource to be created. Must be globally unique.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Web App Bot. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SKU of the Web App Bot. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
Sku pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (WebAppArgs) ElementType() reflect.Type {
return reflect.TypeOf((*webAppArgs)(nil)).Elem()
}
type WebAppInput interface {
pulumi.Input
ToWebAppOutput() WebAppOutput
ToWebAppOutputWithContext(ctx context.Context) WebAppOutput
}
func (*WebApp) ElementType() reflect.Type {
return reflect.TypeOf((**WebApp)(nil)).Elem()
}
func (i *WebApp) ToWebAppOutput() WebAppOutput {
return i.ToWebAppOutputWithContext(context.Background())
}
func (i *WebApp) ToWebAppOutputWithContext(ctx context.Context) WebAppOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebAppOutput)
}
// WebAppArrayInput is an input type that accepts WebAppArray and WebAppArrayOutput values.
// You can construct a concrete instance of `WebAppArrayInput` via:
//
// WebAppArray{ WebAppArgs{...} }
type WebAppArrayInput interface {
pulumi.Input
ToWebAppArrayOutput() WebAppArrayOutput
ToWebAppArrayOutputWithContext(context.Context) WebAppArrayOutput
}
type WebAppArray []WebAppInput
func (WebAppArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WebApp)(nil)).Elem()
}
func (i WebAppArray) ToWebAppArrayOutput() WebAppArrayOutput {
return i.ToWebAppArrayOutputWithContext(context.Background())
}
func (i WebAppArray) ToWebAppArrayOutputWithContext(ctx context.Context) WebAppArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebAppArrayOutput)
}
// WebAppMapInput is an input type that accepts WebAppMap and WebAppMapOutput values.
// You can construct a concrete instance of `WebAppMapInput` via:
//
// WebAppMap{ "key": WebAppArgs{...} }
type WebAppMapInput interface {
pulumi.Input
ToWebAppMapOutput() WebAppMapOutput
ToWebAppMapOutputWithContext(context.Context) WebAppMapOutput
}
type WebAppMap map[string]WebAppInput
func (WebAppMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WebApp)(nil)).Elem()
}
func (i WebAppMap) ToWebAppMapOutput() WebAppMapOutput {
return i.ToWebAppMapOutputWithContext(context.Background())
}
func (i WebAppMap) ToWebAppMapOutputWithContext(ctx context.Context) WebAppMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebAppMapOutput)
}
type WebAppOutput struct{ *pulumi.OutputState }
func (WebAppOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WebApp)(nil)).Elem()
}
func (o WebAppOutput) ToWebAppOutput() WebAppOutput {
return o
}
func (o WebAppOutput) ToWebAppOutputWithContext(ctx context.Context) WebAppOutput {
return o
}
// The Application Insights API Key to associate with the Web App Bot.
func (o WebAppOutput) DeveloperAppInsightsApiKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringPtrOutput { return v.DeveloperAppInsightsApiKey }).(pulumi.StringPtrOutput)
}
// The Application Insights Application ID to associate with the Web App Bot.
func (o WebAppOutput) DeveloperAppInsightsApplicationId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringPtrOutput { return v.DeveloperAppInsightsApplicationId }).(pulumi.StringPtrOutput)
}
// The Application Insights Key to associate with the Web App Bot.
func (o WebAppOutput) DeveloperAppInsightsKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringPtrOutput { return v.DeveloperAppInsightsKey }).(pulumi.StringPtrOutput)
}
// The name of the Web App Bot will be displayed as. This defaults to `name` if not specified.
func (o WebAppOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The Web App Bot endpoint.
func (o WebAppOutput) Endpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringPtrOutput { return v.Endpoint }).(pulumi.StringPtrOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o WebAppOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A list of LUIS App IDs to associate with the Web App Bot.
func (o WebAppOutput) LuisAppIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringArrayOutput { return v.LuisAppIds }).(pulumi.StringArrayOutput)
}
// The LUIS key to associate with the Web App Bot.
func (o WebAppOutput) LuisKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringPtrOutput { return v.LuisKey }).(pulumi.StringPtrOutput)
}
// The Microsoft Application ID for the Web App Bot. Changing this forces a new resource to be created.
func (o WebAppOutput) MicrosoftAppId() pulumi.StringOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringOutput { return v.MicrosoftAppId }).(pulumi.StringOutput)
}
// Specifies the name of the Web App Bot. Changing this forces a new resource to be created. Must be globally unique.
func (o WebAppOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Web App Bot. Changing this forces a new resource to be created.
func (o WebAppOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The SKU of the Web App Bot. Valid values include `F0` or `S1`. Changing this forces a new resource to be created.
func (o WebAppOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o WebAppOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *WebApp) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type WebAppArrayOutput struct{ *pulumi.OutputState }
func (WebAppArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WebApp)(nil)).Elem()
}
func (o WebAppArrayOutput) ToWebAppArrayOutput() WebAppArrayOutput {
return o
}
func (o WebAppArrayOutput) ToWebAppArrayOutputWithContext(ctx context.Context) WebAppArrayOutput {
return o
}
func (o WebAppArrayOutput) Index(i pulumi.IntInput) WebAppOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WebApp {
return vs[0].([]*WebApp)[vs[1].(int)]
}).(WebAppOutput)
}
type WebAppMapOutput struct{ *pulumi.OutputState }
func (WebAppMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WebApp)(nil)).Elem()
}
func (o WebAppMapOutput) ToWebAppMapOutput() WebAppMapOutput {
return o
}
func (o WebAppMapOutput) ToWebAppMapOutputWithContext(ctx context.Context) WebAppMapOutput {
return o
}
func (o WebAppMapOutput) MapIndex(k pulumi.StringInput) WebAppOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WebApp {
return vs[0].(map[string]*WebApp)[vs[1].(string)]
}).(WebAppOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WebAppInput)(nil)).Elem(), &WebApp{})
pulumi.RegisterInputType(reflect.TypeOf((*WebAppArrayInput)(nil)).Elem(), WebAppArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WebAppMapInput)(nil)).Elem(), WebAppMap{})
pulumi.RegisterOutputType(WebAppOutput{})
pulumi.RegisterOutputType(WebAppArrayOutput{})
pulumi.RegisterOutputType(WebAppMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelEmail.go | sdk/go/azure/bot/channelEmail.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Email integration for a Bot Channel
//
// > **Note:** A bot can only have a single Email Channel associated with it.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelEmail(ctx, "example", &bot.ChannelEmailArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// EmailAddress: pulumi.String("example.com"),
// EmailPassword: pulumi.String("123456"),
// })
// 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.BotService` - 2022-09-15
//
// ## Import
//
// The Email Integration for a Bot Channel can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelEmail:ChannelEmail example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example/channels/EmailChannel
// ```
type ChannelEmail struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// The email address that the Bot will authenticate with.
EmailAddress pulumi.StringOutput `pulumi:"emailAddress"`
// The email password that the Bot will authenticate with.
EmailPassword pulumi.StringPtrOutput `pulumi:"emailPassword"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The magic code used to set up OAUTH authentication.
MagicCode pulumi.StringPtrOutput `pulumi:"magicCode"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewChannelEmail registers a new resource with the given unique name, arguments, and options.
func NewChannelEmail(ctx *pulumi.Context,
name string, args *ChannelEmailArgs, opts ...pulumi.ResourceOption) (*ChannelEmail, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.EmailAddress == nil {
return nil, errors.New("invalid value for required argument 'EmailAddress'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.EmailPassword != nil {
args.EmailPassword = pulumi.ToSecret(args.EmailPassword).(pulumi.StringPtrInput)
}
if args.MagicCode != nil {
args.MagicCode = pulumi.ToSecret(args.MagicCode).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"emailPassword",
"magicCode",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelEmail
err := ctx.RegisterResource("azure:bot/channelEmail:ChannelEmail", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelEmail gets an existing ChannelEmail resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelEmail(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelEmailState, opts ...pulumi.ResourceOption) (*ChannelEmail, error) {
var resource ChannelEmail
err := ctx.ReadResource("azure:bot/channelEmail:ChannelEmail", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelEmail resources.
type channelEmailState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// The email address that the Bot will authenticate with.
EmailAddress *string `pulumi:"emailAddress"`
// The email password that the Bot will authenticate with.
EmailPassword *string `pulumi:"emailPassword"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The magic code used to set up OAUTH authentication.
MagicCode *string `pulumi:"magicCode"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ChannelEmailState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// The email address that the Bot will authenticate with.
EmailAddress pulumi.StringPtrInput
// The email password that the Bot will authenticate with.
EmailPassword pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The magic code used to set up OAUTH authentication.
MagicCode pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ChannelEmailState) ElementType() reflect.Type {
return reflect.TypeOf((*channelEmailState)(nil)).Elem()
}
type channelEmailArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// The email address that the Bot will authenticate with.
EmailAddress string `pulumi:"emailAddress"`
// The email password that the Bot will authenticate with.
EmailPassword *string `pulumi:"emailPassword"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The magic code used to set up OAUTH authentication.
MagicCode *string `pulumi:"magicCode"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ChannelEmail resource.
type ChannelEmailArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// The email address that the Bot will authenticate with.
EmailAddress pulumi.StringInput
// The email password that the Bot will authenticate with.
EmailPassword pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The magic code used to set up OAUTH authentication.
MagicCode pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ChannelEmailArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelEmailArgs)(nil)).Elem()
}
type ChannelEmailInput interface {
pulumi.Input
ToChannelEmailOutput() ChannelEmailOutput
ToChannelEmailOutputWithContext(ctx context.Context) ChannelEmailOutput
}
func (*ChannelEmail) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelEmail)(nil)).Elem()
}
func (i *ChannelEmail) ToChannelEmailOutput() ChannelEmailOutput {
return i.ToChannelEmailOutputWithContext(context.Background())
}
func (i *ChannelEmail) ToChannelEmailOutputWithContext(ctx context.Context) ChannelEmailOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelEmailOutput)
}
// ChannelEmailArrayInput is an input type that accepts ChannelEmailArray and ChannelEmailArrayOutput values.
// You can construct a concrete instance of `ChannelEmailArrayInput` via:
//
// ChannelEmailArray{ ChannelEmailArgs{...} }
type ChannelEmailArrayInput interface {
pulumi.Input
ToChannelEmailArrayOutput() ChannelEmailArrayOutput
ToChannelEmailArrayOutputWithContext(context.Context) ChannelEmailArrayOutput
}
type ChannelEmailArray []ChannelEmailInput
func (ChannelEmailArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelEmail)(nil)).Elem()
}
func (i ChannelEmailArray) ToChannelEmailArrayOutput() ChannelEmailArrayOutput {
return i.ToChannelEmailArrayOutputWithContext(context.Background())
}
func (i ChannelEmailArray) ToChannelEmailArrayOutputWithContext(ctx context.Context) ChannelEmailArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelEmailArrayOutput)
}
// ChannelEmailMapInput is an input type that accepts ChannelEmailMap and ChannelEmailMapOutput values.
// You can construct a concrete instance of `ChannelEmailMapInput` via:
//
// ChannelEmailMap{ "key": ChannelEmailArgs{...} }
type ChannelEmailMapInput interface {
pulumi.Input
ToChannelEmailMapOutput() ChannelEmailMapOutput
ToChannelEmailMapOutputWithContext(context.Context) ChannelEmailMapOutput
}
type ChannelEmailMap map[string]ChannelEmailInput
func (ChannelEmailMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelEmail)(nil)).Elem()
}
func (i ChannelEmailMap) ToChannelEmailMapOutput() ChannelEmailMapOutput {
return i.ToChannelEmailMapOutputWithContext(context.Background())
}
func (i ChannelEmailMap) ToChannelEmailMapOutputWithContext(ctx context.Context) ChannelEmailMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelEmailMapOutput)
}
type ChannelEmailOutput struct{ *pulumi.OutputState }
func (ChannelEmailOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelEmail)(nil)).Elem()
}
func (o ChannelEmailOutput) ToChannelEmailOutput() ChannelEmailOutput {
return o
}
func (o ChannelEmailOutput) ToChannelEmailOutputWithContext(ctx context.Context) ChannelEmailOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelEmailOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelEmail) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// The email address that the Bot will authenticate with.
func (o ChannelEmailOutput) EmailAddress() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelEmail) pulumi.StringOutput { return v.EmailAddress }).(pulumi.StringOutput)
}
// The email password that the Bot will authenticate with.
func (o ChannelEmailOutput) EmailPassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelEmail) pulumi.StringPtrOutput { return v.EmailPassword }).(pulumi.StringPtrOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelEmailOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelEmail) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The magic code used to set up OAUTH authentication.
func (o ChannelEmailOutput) MagicCode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelEmail) pulumi.StringPtrOutput { return v.MagicCode }).(pulumi.StringPtrOutput)
}
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
func (o ChannelEmailOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelEmail) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ChannelEmailArrayOutput struct{ *pulumi.OutputState }
func (ChannelEmailArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelEmail)(nil)).Elem()
}
func (o ChannelEmailArrayOutput) ToChannelEmailArrayOutput() ChannelEmailArrayOutput {
return o
}
func (o ChannelEmailArrayOutput) ToChannelEmailArrayOutputWithContext(ctx context.Context) ChannelEmailArrayOutput {
return o
}
func (o ChannelEmailArrayOutput) Index(i pulumi.IntInput) ChannelEmailOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelEmail {
return vs[0].([]*ChannelEmail)[vs[1].(int)]
}).(ChannelEmailOutput)
}
type ChannelEmailMapOutput struct{ *pulumi.OutputState }
func (ChannelEmailMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelEmail)(nil)).Elem()
}
func (o ChannelEmailMapOutput) ToChannelEmailMapOutput() ChannelEmailMapOutput {
return o
}
func (o ChannelEmailMapOutput) ToChannelEmailMapOutputWithContext(ctx context.Context) ChannelEmailMapOutput {
return o
}
func (o ChannelEmailMapOutput) MapIndex(k pulumi.StringInput) ChannelEmailOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelEmail {
return vs[0].(map[string]*ChannelEmail)[vs[1].(string)]
}).(ChannelEmailOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelEmailInput)(nil)).Elem(), &ChannelEmail{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelEmailArrayInput)(nil)).Elem(), ChannelEmailArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelEmailMapInput)(nil)).Elem(), ChannelEmailMap{})
pulumi.RegisterOutputType(ChannelEmailOutput{})
pulumi.RegisterOutputType(ChannelEmailArrayOutput{})
pulumi.RegisterOutputType(ChannelEmailMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelTeams.go | sdk/go/azure/bot/channelTeams.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a MS Teams integration for a Bot Channel
//
// > **Note:** A bot can only have a single MS Teams Channel associated with it.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelTeams(ctx, "example", &bot.ChannelTeamsArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The Microsoft Teams Integration for a Bot Channel can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelTeams:ChannelTeams example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example/channels/MsTeamsChannel
// ```
type ChannelTeams struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// Specifies whether to enable Microsoft Teams channel calls. This defaults to `false`.
CallingEnabled pulumi.BoolOutput `pulumi:"callingEnabled"`
// Specifies the webhook for Microsoft Teams channel calls.
CallingWebHook pulumi.StringOutput `pulumi:"callingWebHook"`
// The deployment environment for Microsoft Teams channel calls. Possible values are `CommercialDeployment` and `GCCModerateDeployment`. Defaults to `CommercialDeployment`.
DeploymentEnvironment pulumi.StringPtrOutput `pulumi:"deploymentEnvironment"`
// Deprecated: The property `enableCalling` is deprecated in favour of `callingEnabled` and will be removed in version 5.0 of the AzureRM Provider.
EnableCalling pulumi.BoolOutput `pulumi:"enableCalling"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewChannelTeams registers a new resource with the given unique name, arguments, and options.
func NewChannelTeams(ctx *pulumi.Context,
name string, args *ChannelTeamsArgs, opts ...pulumi.ResourceOption) (*ChannelTeams, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelTeams
err := ctx.RegisterResource("azure:bot/channelTeams:ChannelTeams", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelTeams gets an existing ChannelTeams resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelTeams(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelTeamsState, opts ...pulumi.ResourceOption) (*ChannelTeams, error) {
var resource ChannelTeams
err := ctx.ReadResource("azure:bot/channelTeams:ChannelTeams", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelTeams resources.
type channelTeamsState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// Specifies whether to enable Microsoft Teams channel calls. This defaults to `false`.
CallingEnabled *bool `pulumi:"callingEnabled"`
// Specifies the webhook for Microsoft Teams channel calls.
CallingWebHook *string `pulumi:"callingWebHook"`
// The deployment environment for Microsoft Teams channel calls. Possible values are `CommercialDeployment` and `GCCModerateDeployment`. Defaults to `CommercialDeployment`.
DeploymentEnvironment *string `pulumi:"deploymentEnvironment"`
// Deprecated: The property `enableCalling` is deprecated in favour of `callingEnabled` and will be removed in version 5.0 of the AzureRM Provider.
EnableCalling *bool `pulumi:"enableCalling"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ChannelTeamsState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// Specifies whether to enable Microsoft Teams channel calls. This defaults to `false`.
CallingEnabled pulumi.BoolPtrInput
// Specifies the webhook for Microsoft Teams channel calls.
CallingWebHook pulumi.StringPtrInput
// The deployment environment for Microsoft Teams channel calls. Possible values are `CommercialDeployment` and `GCCModerateDeployment`. Defaults to `CommercialDeployment`.
DeploymentEnvironment pulumi.StringPtrInput
// Deprecated: The property `enableCalling` is deprecated in favour of `callingEnabled` and will be removed in version 5.0 of the AzureRM Provider.
EnableCalling pulumi.BoolPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ChannelTeamsState) ElementType() reflect.Type {
return reflect.TypeOf((*channelTeamsState)(nil)).Elem()
}
type channelTeamsArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// Specifies whether to enable Microsoft Teams channel calls. This defaults to `false`.
CallingEnabled *bool `pulumi:"callingEnabled"`
// Specifies the webhook for Microsoft Teams channel calls.
CallingWebHook *string `pulumi:"callingWebHook"`
// The deployment environment for Microsoft Teams channel calls. Possible values are `CommercialDeployment` and `GCCModerateDeployment`. Defaults to `CommercialDeployment`.
DeploymentEnvironment *string `pulumi:"deploymentEnvironment"`
// Deprecated: The property `enableCalling` is deprecated in favour of `callingEnabled` and will be removed in version 5.0 of the AzureRM Provider.
EnableCalling *bool `pulumi:"enableCalling"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ChannelTeams resource.
type ChannelTeamsArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// Specifies whether to enable Microsoft Teams channel calls. This defaults to `false`.
CallingEnabled pulumi.BoolPtrInput
// Specifies the webhook for Microsoft Teams channel calls.
CallingWebHook pulumi.StringPtrInput
// The deployment environment for Microsoft Teams channel calls. Possible values are `CommercialDeployment` and `GCCModerateDeployment`. Defaults to `CommercialDeployment`.
DeploymentEnvironment pulumi.StringPtrInput
// Deprecated: The property `enableCalling` is deprecated in favour of `callingEnabled` and will be removed in version 5.0 of the AzureRM Provider.
EnableCalling pulumi.BoolPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ChannelTeamsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelTeamsArgs)(nil)).Elem()
}
type ChannelTeamsInput interface {
pulumi.Input
ToChannelTeamsOutput() ChannelTeamsOutput
ToChannelTeamsOutputWithContext(ctx context.Context) ChannelTeamsOutput
}
func (*ChannelTeams) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelTeams)(nil)).Elem()
}
func (i *ChannelTeams) ToChannelTeamsOutput() ChannelTeamsOutput {
return i.ToChannelTeamsOutputWithContext(context.Background())
}
func (i *ChannelTeams) ToChannelTeamsOutputWithContext(ctx context.Context) ChannelTeamsOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelTeamsOutput)
}
// ChannelTeamsArrayInput is an input type that accepts ChannelTeamsArray and ChannelTeamsArrayOutput values.
// You can construct a concrete instance of `ChannelTeamsArrayInput` via:
//
// ChannelTeamsArray{ ChannelTeamsArgs{...} }
type ChannelTeamsArrayInput interface {
pulumi.Input
ToChannelTeamsArrayOutput() ChannelTeamsArrayOutput
ToChannelTeamsArrayOutputWithContext(context.Context) ChannelTeamsArrayOutput
}
type ChannelTeamsArray []ChannelTeamsInput
func (ChannelTeamsArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelTeams)(nil)).Elem()
}
func (i ChannelTeamsArray) ToChannelTeamsArrayOutput() ChannelTeamsArrayOutput {
return i.ToChannelTeamsArrayOutputWithContext(context.Background())
}
func (i ChannelTeamsArray) ToChannelTeamsArrayOutputWithContext(ctx context.Context) ChannelTeamsArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelTeamsArrayOutput)
}
// ChannelTeamsMapInput is an input type that accepts ChannelTeamsMap and ChannelTeamsMapOutput values.
// You can construct a concrete instance of `ChannelTeamsMapInput` via:
//
// ChannelTeamsMap{ "key": ChannelTeamsArgs{...} }
type ChannelTeamsMapInput interface {
pulumi.Input
ToChannelTeamsMapOutput() ChannelTeamsMapOutput
ToChannelTeamsMapOutputWithContext(context.Context) ChannelTeamsMapOutput
}
type ChannelTeamsMap map[string]ChannelTeamsInput
func (ChannelTeamsMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelTeams)(nil)).Elem()
}
func (i ChannelTeamsMap) ToChannelTeamsMapOutput() ChannelTeamsMapOutput {
return i.ToChannelTeamsMapOutputWithContext(context.Background())
}
func (i ChannelTeamsMap) ToChannelTeamsMapOutputWithContext(ctx context.Context) ChannelTeamsMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelTeamsMapOutput)
}
type ChannelTeamsOutput struct{ *pulumi.OutputState }
func (ChannelTeamsOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelTeams)(nil)).Elem()
}
func (o ChannelTeamsOutput) ToChannelTeamsOutput() ChannelTeamsOutput {
return o
}
func (o ChannelTeamsOutput) ToChannelTeamsOutputWithContext(ctx context.Context) ChannelTeamsOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelTeamsOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelTeams) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// Specifies whether to enable Microsoft Teams channel calls. This defaults to `false`.
func (o ChannelTeamsOutput) CallingEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *ChannelTeams) pulumi.BoolOutput { return v.CallingEnabled }).(pulumi.BoolOutput)
}
// Specifies the webhook for Microsoft Teams channel calls.
func (o ChannelTeamsOutput) CallingWebHook() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelTeams) pulumi.StringOutput { return v.CallingWebHook }).(pulumi.StringOutput)
}
// The deployment environment for Microsoft Teams channel calls. Possible values are `CommercialDeployment` and `GCCModerateDeployment`. Defaults to `CommercialDeployment`.
func (o ChannelTeamsOutput) DeploymentEnvironment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelTeams) pulumi.StringPtrOutput { return v.DeploymentEnvironment }).(pulumi.StringPtrOutput)
}
// Deprecated: The property `enableCalling` is deprecated in favour of `callingEnabled` and will be removed in version 5.0 of the AzureRM Provider.
func (o ChannelTeamsOutput) EnableCalling() pulumi.BoolOutput {
return o.ApplyT(func(v *ChannelTeams) pulumi.BoolOutput { return v.EnableCalling }).(pulumi.BoolOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelTeamsOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelTeams) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
func (o ChannelTeamsOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelTeams) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ChannelTeamsArrayOutput struct{ *pulumi.OutputState }
func (ChannelTeamsArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelTeams)(nil)).Elem()
}
func (o ChannelTeamsArrayOutput) ToChannelTeamsArrayOutput() ChannelTeamsArrayOutput {
return o
}
func (o ChannelTeamsArrayOutput) ToChannelTeamsArrayOutputWithContext(ctx context.Context) ChannelTeamsArrayOutput {
return o
}
func (o ChannelTeamsArrayOutput) Index(i pulumi.IntInput) ChannelTeamsOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelTeams {
return vs[0].([]*ChannelTeams)[vs[1].(int)]
}).(ChannelTeamsOutput)
}
type ChannelTeamsMapOutput struct{ *pulumi.OutputState }
func (ChannelTeamsMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelTeams)(nil)).Elem()
}
func (o ChannelTeamsMapOutput) ToChannelTeamsMapOutput() ChannelTeamsMapOutput {
return o
}
func (o ChannelTeamsMapOutput) ToChannelTeamsMapOutputWithContext(ctx context.Context) ChannelTeamsMapOutput {
return o
}
func (o ChannelTeamsMapOutput) MapIndex(k pulumi.StringInput) ChannelTeamsOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelTeams {
return vs[0].(map[string]*ChannelTeams)[vs[1].(string)]
}).(ChannelTeamsOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelTeamsInput)(nil)).Elem(), &ChannelTeams{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelTeamsArrayInput)(nil)).Elem(), ChannelTeamsArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelTeamsMapInput)(nil)).Elem(), ChannelTeamsMap{})
pulumi.RegisterOutputType(ChannelTeamsOutput{})
pulumi.RegisterOutputType(ChannelTeamsArrayOutput{})
pulumi.RegisterOutputType(ChannelTeamsMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelLine.go | sdk/go/azure/bot/channelLine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Line integration for a Bot Channel
//
// > **Note:** A bot can only have a single Line Channel associated with it.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example-bcr"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelLine(ctx, "example", &bot.ChannelLineArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// LineChannels: bot.ChannelLineLineChannelArray{
// &bot.ChannelLineLineChannelArgs{
// AccessToken: pulumi.String("asdfdsdfTYUIOIoj1231hkjhk"),
// Secret: pulumi.String("aagfdgfd123567"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The Line Integration for a Bot Channel can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelLine:ChannelLine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.BotService/botServices/botService1/channels/LineChannel
// ```
type ChannelLine struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// One or more `lineChannel` blocks as defined below.
LineChannels ChannelLineLineChannelArrayOutput `pulumi:"lineChannels"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewChannelLine registers a new resource with the given unique name, arguments, and options.
func NewChannelLine(ctx *pulumi.Context,
name string, args *ChannelLineArgs, opts ...pulumi.ResourceOption) (*ChannelLine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.LineChannels == nil {
return nil, errors.New("invalid value for required argument 'LineChannels'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelLine
err := ctx.RegisterResource("azure:bot/channelLine:ChannelLine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelLine gets an existing ChannelLine resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelLine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelLineState, opts ...pulumi.ResourceOption) (*ChannelLine, error) {
var resource ChannelLine
err := ctx.ReadResource("azure:bot/channelLine:ChannelLine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelLine resources.
type channelLineState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// One or more `lineChannel` blocks as defined below.
LineChannels []ChannelLineLineChannel `pulumi:"lineChannels"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ChannelLineState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// One or more `lineChannel` blocks as defined below.
LineChannels ChannelLineLineChannelArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ChannelLineState) ElementType() reflect.Type {
return reflect.TypeOf((*channelLineState)(nil)).Elem()
}
type channelLineArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// One or more `lineChannel` blocks as defined below.
LineChannels []ChannelLineLineChannel `pulumi:"lineChannels"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ChannelLine resource.
type ChannelLineArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// One or more `lineChannel` blocks as defined below.
LineChannels ChannelLineLineChannelArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ChannelLineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelLineArgs)(nil)).Elem()
}
type ChannelLineInput interface {
pulumi.Input
ToChannelLineOutput() ChannelLineOutput
ToChannelLineOutputWithContext(ctx context.Context) ChannelLineOutput
}
func (*ChannelLine) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelLine)(nil)).Elem()
}
func (i *ChannelLine) ToChannelLineOutput() ChannelLineOutput {
return i.ToChannelLineOutputWithContext(context.Background())
}
func (i *ChannelLine) ToChannelLineOutputWithContext(ctx context.Context) ChannelLineOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelLineOutput)
}
// ChannelLineArrayInput is an input type that accepts ChannelLineArray and ChannelLineArrayOutput values.
// You can construct a concrete instance of `ChannelLineArrayInput` via:
//
// ChannelLineArray{ ChannelLineArgs{...} }
type ChannelLineArrayInput interface {
pulumi.Input
ToChannelLineArrayOutput() ChannelLineArrayOutput
ToChannelLineArrayOutputWithContext(context.Context) ChannelLineArrayOutput
}
type ChannelLineArray []ChannelLineInput
func (ChannelLineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelLine)(nil)).Elem()
}
func (i ChannelLineArray) ToChannelLineArrayOutput() ChannelLineArrayOutput {
return i.ToChannelLineArrayOutputWithContext(context.Background())
}
func (i ChannelLineArray) ToChannelLineArrayOutputWithContext(ctx context.Context) ChannelLineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelLineArrayOutput)
}
// ChannelLineMapInput is an input type that accepts ChannelLineMap and ChannelLineMapOutput values.
// You can construct a concrete instance of `ChannelLineMapInput` via:
//
// ChannelLineMap{ "key": ChannelLineArgs{...} }
type ChannelLineMapInput interface {
pulumi.Input
ToChannelLineMapOutput() ChannelLineMapOutput
ToChannelLineMapOutputWithContext(context.Context) ChannelLineMapOutput
}
type ChannelLineMap map[string]ChannelLineInput
func (ChannelLineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelLine)(nil)).Elem()
}
func (i ChannelLineMap) ToChannelLineMapOutput() ChannelLineMapOutput {
return i.ToChannelLineMapOutputWithContext(context.Background())
}
func (i ChannelLineMap) ToChannelLineMapOutputWithContext(ctx context.Context) ChannelLineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelLineMapOutput)
}
type ChannelLineOutput struct{ *pulumi.OutputState }
func (ChannelLineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelLine)(nil)).Elem()
}
func (o ChannelLineOutput) ToChannelLineOutput() ChannelLineOutput {
return o
}
func (o ChannelLineOutput) ToChannelLineOutputWithContext(ctx context.Context) ChannelLineOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelLineOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelLine) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// One or more `lineChannel` blocks as defined below.
func (o ChannelLineOutput) LineChannels() ChannelLineLineChannelArrayOutput {
return o.ApplyT(func(v *ChannelLine) ChannelLineLineChannelArrayOutput { return v.LineChannels }).(ChannelLineLineChannelArrayOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelLineOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelLine) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created.
func (o ChannelLineOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelLine) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ChannelLineArrayOutput struct{ *pulumi.OutputState }
func (ChannelLineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelLine)(nil)).Elem()
}
func (o ChannelLineArrayOutput) ToChannelLineArrayOutput() ChannelLineArrayOutput {
return o
}
func (o ChannelLineArrayOutput) ToChannelLineArrayOutputWithContext(ctx context.Context) ChannelLineArrayOutput {
return o
}
func (o ChannelLineArrayOutput) Index(i pulumi.IntInput) ChannelLineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelLine {
return vs[0].([]*ChannelLine)[vs[1].(int)]
}).(ChannelLineOutput)
}
type ChannelLineMapOutput struct{ *pulumi.OutputState }
func (ChannelLineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelLine)(nil)).Elem()
}
func (o ChannelLineMapOutput) ToChannelLineMapOutput() ChannelLineMapOutput {
return o
}
func (o ChannelLineMapOutput) ToChannelLineMapOutputWithContext(ctx context.Context) ChannelLineMapOutput {
return o
}
func (o ChannelLineMapOutput) MapIndex(k pulumi.StringInput) ChannelLineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelLine {
return vs[0].(map[string]*ChannelLine)[vs[1].(string)]
}).(ChannelLineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelLineInput)(nil)).Elem(), &ChannelLine{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelLineArrayInput)(nil)).Elem(), ChannelLineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelLineMapInput)(nil)).Elem(), ChannelLineMap{})
pulumi.RegisterOutputType(ChannelLineOutput{})
pulumi.RegisterOutputType(ChannelLineArrayOutput{})
pulumi.RegisterOutputType(ChannelLineMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelAlexa.go | sdk/go/azure/bot/channelAlexa.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Alexa integration for a Bot Channel
//
// > **Note:** A bot can only have a single Alexa Channel associated with it.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example-bcr"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelAlexa(ctx, "example", &bot.ChannelAlexaArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// SkillId: pulumi.String("amzn1.ask.skill.00000000-0000-0000-0000-000000000000"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The Alexa Integration for a Bot Channel can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelAlexa:ChannelAlexa example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.BotService/botServices/botService1/channels/AlexaChannel
// ```
type ChannelAlexa struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource group where the Alexa Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Alexa skill ID for the Alexa Channel.
SkillId pulumi.StringOutput `pulumi:"skillId"`
}
// NewChannelAlexa registers a new resource with the given unique name, arguments, and options.
func NewChannelAlexa(ctx *pulumi.Context,
name string, args *ChannelAlexaArgs, opts ...pulumi.ResourceOption) (*ChannelAlexa, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkillId == nil {
return nil, errors.New("invalid value for required argument 'SkillId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelAlexa
err := ctx.RegisterResource("azure:bot/channelAlexa:ChannelAlexa", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelAlexa gets an existing ChannelAlexa resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelAlexa(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelAlexaState, opts ...pulumi.ResourceOption) (*ChannelAlexa, error) {
var resource ChannelAlexa
err := ctx.ReadResource("azure:bot/channelAlexa:ChannelAlexa", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelAlexa resources.
type channelAlexaState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Alexa Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Alexa skill ID for the Alexa Channel.
SkillId *string `pulumi:"skillId"`
}
type ChannelAlexaState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Alexa Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Alexa skill ID for the Alexa Channel.
SkillId pulumi.StringPtrInput
}
func (ChannelAlexaState) ElementType() reflect.Type {
return reflect.TypeOf((*channelAlexaState)(nil)).Elem()
}
type channelAlexaArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group where the Alexa Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Alexa skill ID for the Alexa Channel.
SkillId string `pulumi:"skillId"`
}
// The set of arguments for constructing a ChannelAlexa resource.
type ChannelAlexaArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group where the Alexa Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The Alexa skill ID for the Alexa Channel.
SkillId pulumi.StringInput
}
func (ChannelAlexaArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelAlexaArgs)(nil)).Elem()
}
type ChannelAlexaInput interface {
pulumi.Input
ToChannelAlexaOutput() ChannelAlexaOutput
ToChannelAlexaOutputWithContext(ctx context.Context) ChannelAlexaOutput
}
func (*ChannelAlexa) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelAlexa)(nil)).Elem()
}
func (i *ChannelAlexa) ToChannelAlexaOutput() ChannelAlexaOutput {
return i.ToChannelAlexaOutputWithContext(context.Background())
}
func (i *ChannelAlexa) ToChannelAlexaOutputWithContext(ctx context.Context) ChannelAlexaOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelAlexaOutput)
}
// ChannelAlexaArrayInput is an input type that accepts ChannelAlexaArray and ChannelAlexaArrayOutput values.
// You can construct a concrete instance of `ChannelAlexaArrayInput` via:
//
// ChannelAlexaArray{ ChannelAlexaArgs{...} }
type ChannelAlexaArrayInput interface {
pulumi.Input
ToChannelAlexaArrayOutput() ChannelAlexaArrayOutput
ToChannelAlexaArrayOutputWithContext(context.Context) ChannelAlexaArrayOutput
}
type ChannelAlexaArray []ChannelAlexaInput
func (ChannelAlexaArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelAlexa)(nil)).Elem()
}
func (i ChannelAlexaArray) ToChannelAlexaArrayOutput() ChannelAlexaArrayOutput {
return i.ToChannelAlexaArrayOutputWithContext(context.Background())
}
func (i ChannelAlexaArray) ToChannelAlexaArrayOutputWithContext(ctx context.Context) ChannelAlexaArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelAlexaArrayOutput)
}
// ChannelAlexaMapInput is an input type that accepts ChannelAlexaMap and ChannelAlexaMapOutput values.
// You can construct a concrete instance of `ChannelAlexaMapInput` via:
//
// ChannelAlexaMap{ "key": ChannelAlexaArgs{...} }
type ChannelAlexaMapInput interface {
pulumi.Input
ToChannelAlexaMapOutput() ChannelAlexaMapOutput
ToChannelAlexaMapOutputWithContext(context.Context) ChannelAlexaMapOutput
}
type ChannelAlexaMap map[string]ChannelAlexaInput
func (ChannelAlexaMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelAlexa)(nil)).Elem()
}
func (i ChannelAlexaMap) ToChannelAlexaMapOutput() ChannelAlexaMapOutput {
return i.ToChannelAlexaMapOutputWithContext(context.Background())
}
func (i ChannelAlexaMap) ToChannelAlexaMapOutputWithContext(ctx context.Context) ChannelAlexaMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelAlexaMapOutput)
}
type ChannelAlexaOutput struct{ *pulumi.OutputState }
func (ChannelAlexaOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelAlexa)(nil)).Elem()
}
func (o ChannelAlexaOutput) ToChannelAlexaOutput() ChannelAlexaOutput {
return o
}
func (o ChannelAlexaOutput) ToChannelAlexaOutputWithContext(ctx context.Context) ChannelAlexaOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelAlexaOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelAlexa) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelAlexaOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelAlexa) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource group where the Alexa Channel should be created. Changing this forces a new resource to be created.
func (o ChannelAlexaOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelAlexa) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Alexa skill ID for the Alexa Channel.
func (o ChannelAlexaOutput) SkillId() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelAlexa) pulumi.StringOutput { return v.SkillId }).(pulumi.StringOutput)
}
type ChannelAlexaArrayOutput struct{ *pulumi.OutputState }
func (ChannelAlexaArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelAlexa)(nil)).Elem()
}
func (o ChannelAlexaArrayOutput) ToChannelAlexaArrayOutput() ChannelAlexaArrayOutput {
return o
}
func (o ChannelAlexaArrayOutput) ToChannelAlexaArrayOutputWithContext(ctx context.Context) ChannelAlexaArrayOutput {
return o
}
func (o ChannelAlexaArrayOutput) Index(i pulumi.IntInput) ChannelAlexaOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelAlexa {
return vs[0].([]*ChannelAlexa)[vs[1].(int)]
}).(ChannelAlexaOutput)
}
type ChannelAlexaMapOutput struct{ *pulumi.OutputState }
func (ChannelAlexaMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelAlexa)(nil)).Elem()
}
func (o ChannelAlexaMapOutput) ToChannelAlexaMapOutput() ChannelAlexaMapOutput {
return o
}
func (o ChannelAlexaMapOutput) ToChannelAlexaMapOutputWithContext(ctx context.Context) ChannelAlexaMapOutput {
return o
}
func (o ChannelAlexaMapOutput) MapIndex(k pulumi.StringInput) ChannelAlexaOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelAlexa {
return vs[0].(map[string]*ChannelAlexa)[vs[1].(string)]
}).(ChannelAlexaOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelAlexaInput)(nil)).Elem(), &ChannelAlexa{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelAlexaArrayInput)(nil)).Elem(), ChannelAlexaArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelAlexaMapInput)(nil)).Elem(), ChannelAlexaMap{})
pulumi.RegisterOutputType(ChannelAlexaOutput{})
pulumi.RegisterOutputType(ChannelAlexaArrayOutput{})
pulumi.RegisterOutputType(ChannelAlexaMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelSlack.go | sdk/go/azure/bot/channelSlack.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Slack integration for a Bot Channel
//
// > **Note:** A bot can only have a single Slack Channel associated with it.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelSlack(ctx, "example", &bot.ChannelSlackArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// ClientId: pulumi.String("exampleId"),
// ClientSecret: pulumi.String("exampleSecret"),
// VerificationToken: pulumi.String("exampleVerificationToken"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The Slack Integration for a Bot Channel can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelSlack:ChannelSlack example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example/channels/SlackChannel
// ```
type ChannelSlack struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// The Client ID that will be used to authenticate with Slack.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The Client Secret that will be used to authenticate with Slack.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// The Slack Landing Page URL.
LandingPageUrl pulumi.StringPtrOutput `pulumi:"landingPageUrl"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Signing Secret that will be used to sign the requests.
SigningSecret pulumi.StringPtrOutput `pulumi:"signingSecret"`
// The Verification Token that will be used to authenticate with Slack.
VerificationToken pulumi.StringOutput `pulumi:"verificationToken"`
}
// NewChannelSlack registers a new resource with the given unique name, arguments, and options.
func NewChannelSlack(ctx *pulumi.Context,
name string, args *ChannelSlackArgs, opts ...pulumi.ResourceOption) (*ChannelSlack, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.VerificationToken == nil {
return nil, errors.New("invalid value for required argument 'VerificationToken'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringInput)
}
if args.SigningSecret != nil {
args.SigningSecret = pulumi.ToSecret(args.SigningSecret).(pulumi.StringPtrInput)
}
if args.VerificationToken != nil {
args.VerificationToken = pulumi.ToSecret(args.VerificationToken).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
"signingSecret",
"verificationToken",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelSlack
err := ctx.RegisterResource("azure:bot/channelSlack:ChannelSlack", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelSlack gets an existing ChannelSlack resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelSlack(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelSlackState, opts ...pulumi.ResourceOption) (*ChannelSlack, error) {
var resource ChannelSlack
err := ctx.ReadResource("azure:bot/channelSlack:ChannelSlack", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelSlack resources.
type channelSlackState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// The Client ID that will be used to authenticate with Slack.
ClientId *string `pulumi:"clientId"`
// The Client Secret that will be used to authenticate with Slack.
ClientSecret *string `pulumi:"clientSecret"`
// The Slack Landing Page URL.
LandingPageUrl *string `pulumi:"landingPageUrl"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Signing Secret that will be used to sign the requests.
SigningSecret *string `pulumi:"signingSecret"`
// The Verification Token that will be used to authenticate with Slack.
VerificationToken *string `pulumi:"verificationToken"`
}
type ChannelSlackState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// The Client ID that will be used to authenticate with Slack.
ClientId pulumi.StringPtrInput
// The Client Secret that will be used to authenticate with Slack.
ClientSecret pulumi.StringPtrInput
// The Slack Landing Page URL.
LandingPageUrl pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Signing Secret that will be used to sign the requests.
SigningSecret pulumi.StringPtrInput
// The Verification Token that will be used to authenticate with Slack.
VerificationToken pulumi.StringPtrInput
}
func (ChannelSlackState) ElementType() reflect.Type {
return reflect.TypeOf((*channelSlackState)(nil)).Elem()
}
type channelSlackArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// The Client ID that will be used to authenticate with Slack.
ClientId string `pulumi:"clientId"`
// The Client Secret that will be used to authenticate with Slack.
ClientSecret string `pulumi:"clientSecret"`
// The Slack Landing Page URL.
LandingPageUrl *string `pulumi:"landingPageUrl"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Signing Secret that will be used to sign the requests.
SigningSecret *string `pulumi:"signingSecret"`
// The Verification Token that will be used to authenticate with Slack.
VerificationToken string `pulumi:"verificationToken"`
}
// The set of arguments for constructing a ChannelSlack resource.
type ChannelSlackArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// The Client ID that will be used to authenticate with Slack.
ClientId pulumi.StringInput
// The Client Secret that will be used to authenticate with Slack.
ClientSecret pulumi.StringInput
// The Slack Landing Page URL.
LandingPageUrl pulumi.StringPtrInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The Signing Secret that will be used to sign the requests.
SigningSecret pulumi.StringPtrInput
// The Verification Token that will be used to authenticate with Slack.
VerificationToken pulumi.StringInput
}
func (ChannelSlackArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelSlackArgs)(nil)).Elem()
}
type ChannelSlackInput interface {
pulumi.Input
ToChannelSlackOutput() ChannelSlackOutput
ToChannelSlackOutputWithContext(ctx context.Context) ChannelSlackOutput
}
func (*ChannelSlack) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelSlack)(nil)).Elem()
}
func (i *ChannelSlack) ToChannelSlackOutput() ChannelSlackOutput {
return i.ToChannelSlackOutputWithContext(context.Background())
}
func (i *ChannelSlack) ToChannelSlackOutputWithContext(ctx context.Context) ChannelSlackOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelSlackOutput)
}
// ChannelSlackArrayInput is an input type that accepts ChannelSlackArray and ChannelSlackArrayOutput values.
// You can construct a concrete instance of `ChannelSlackArrayInput` via:
//
// ChannelSlackArray{ ChannelSlackArgs{...} }
type ChannelSlackArrayInput interface {
pulumi.Input
ToChannelSlackArrayOutput() ChannelSlackArrayOutput
ToChannelSlackArrayOutputWithContext(context.Context) ChannelSlackArrayOutput
}
type ChannelSlackArray []ChannelSlackInput
func (ChannelSlackArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelSlack)(nil)).Elem()
}
func (i ChannelSlackArray) ToChannelSlackArrayOutput() ChannelSlackArrayOutput {
return i.ToChannelSlackArrayOutputWithContext(context.Background())
}
func (i ChannelSlackArray) ToChannelSlackArrayOutputWithContext(ctx context.Context) ChannelSlackArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelSlackArrayOutput)
}
// ChannelSlackMapInput is an input type that accepts ChannelSlackMap and ChannelSlackMapOutput values.
// You can construct a concrete instance of `ChannelSlackMapInput` via:
//
// ChannelSlackMap{ "key": ChannelSlackArgs{...} }
type ChannelSlackMapInput interface {
pulumi.Input
ToChannelSlackMapOutput() ChannelSlackMapOutput
ToChannelSlackMapOutputWithContext(context.Context) ChannelSlackMapOutput
}
type ChannelSlackMap map[string]ChannelSlackInput
func (ChannelSlackMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelSlack)(nil)).Elem()
}
func (i ChannelSlackMap) ToChannelSlackMapOutput() ChannelSlackMapOutput {
return i.ToChannelSlackMapOutputWithContext(context.Background())
}
func (i ChannelSlackMap) ToChannelSlackMapOutputWithContext(ctx context.Context) ChannelSlackMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelSlackMapOutput)
}
type ChannelSlackOutput struct{ *pulumi.OutputState }
func (ChannelSlackOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelSlack)(nil)).Elem()
}
func (o ChannelSlackOutput) ToChannelSlackOutput() ChannelSlackOutput {
return o
}
func (o ChannelSlackOutput) ToChannelSlackOutputWithContext(ctx context.Context) ChannelSlackOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelSlackOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// The Client ID that will be used to authenticate with Slack.
func (o ChannelSlackOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// The Client Secret that will be used to authenticate with Slack.
func (o ChannelSlackOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// The Slack Landing Page URL.
func (o ChannelSlackOutput) LandingPageUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringPtrOutput { return v.LandingPageUrl }).(pulumi.StringPtrOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelSlackOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
func (o ChannelSlackOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Signing Secret that will be used to sign the requests.
func (o ChannelSlackOutput) SigningSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringPtrOutput { return v.SigningSecret }).(pulumi.StringPtrOutput)
}
// The Verification Token that will be used to authenticate with Slack.
func (o ChannelSlackOutput) VerificationToken() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelSlack) pulumi.StringOutput { return v.VerificationToken }).(pulumi.StringOutput)
}
type ChannelSlackArrayOutput struct{ *pulumi.OutputState }
func (ChannelSlackArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelSlack)(nil)).Elem()
}
func (o ChannelSlackArrayOutput) ToChannelSlackArrayOutput() ChannelSlackArrayOutput {
return o
}
func (o ChannelSlackArrayOutput) ToChannelSlackArrayOutputWithContext(ctx context.Context) ChannelSlackArrayOutput {
return o
}
func (o ChannelSlackArrayOutput) Index(i pulumi.IntInput) ChannelSlackOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelSlack {
return vs[0].([]*ChannelSlack)[vs[1].(int)]
}).(ChannelSlackOutput)
}
type ChannelSlackMapOutput struct{ *pulumi.OutputState }
func (ChannelSlackMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelSlack)(nil)).Elem()
}
func (o ChannelSlackMapOutput) ToChannelSlackMapOutput() ChannelSlackMapOutput {
return o
}
func (o ChannelSlackMapOutput) ToChannelSlackMapOutputWithContext(ctx context.Context) ChannelSlackMapOutput {
return o
}
func (o ChannelSlackMapOutput) MapIndex(k pulumi.StringInput) ChannelSlackOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelSlack {
return vs[0].(map[string]*ChannelSlack)[vs[1].(string)]
}).(ChannelSlackOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelSlackInput)(nil)).Elem(), &ChannelSlack{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelSlackArrayInput)(nil)).Elem(), ChannelSlackArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelSlackMapInput)(nil)).Elem(), ChannelSlackMap{})
pulumi.RegisterOutputType(ChannelSlackOutput{})
pulumi.RegisterOutputType(ChannelSlackArrayOutput{})
pulumi.RegisterOutputType(ChannelSlackMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/bot/channelFacebook.go | sdk/go/azure/bot/channelFacebook.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package bot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Facebook integration for a Bot Channel
//
// > **Note:** A bot can only have a single Facebook Channel associated with it.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/bot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "example", &bot.ChannelsRegistrationArgs{
// Name: pulumi.String("example-bcr"),
// Location: pulumi.String("global"),
// ResourceGroupName: example.Name,
// Sku: pulumi.String("F0"),
// MicrosoftAppId: pulumi.String(current.ClientId),
// })
// if err != nil {
// return err
// }
// _, err = bot.NewChannelFacebook(ctx, "example", &bot.ChannelFacebookArgs{
// BotName: exampleChannelsRegistration.Name,
// Location: exampleChannelsRegistration.Location,
// ResourceGroupName: example.Name,
// FacebookApplicationId: pulumi.String("563490254873576"),
// FacebookApplicationSecret: pulumi.String("8976d2536445ad5b976dee8437b9beb0"),
// Pages: bot.ChannelFacebookPageArray{
// &bot.ChannelFacebookPageArgs{
// Id: pulumi.String("876248795081953"),
// AccessToken: pulumi.String("CGGCec3UAFPMBAKwK3Ft8SEpO8ZCuvpNBI5DClaJCDfqJj2BgEHCKxcY0FDarmUQap6XxpZC9GWCW4nZCzjcKosAZAP7SO44X8Q8gAntbDIXgYUBGp9xtS8wUkwgKPobUePcOOVFkvClxvYZByuiQxoTiK9fQ9jZCPEorbmZCsKDZAx4VLnrNwCTZAPUwXxO61gfq4ZD"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The Facebook Integration for a Bot Channel can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:bot/channelFacebook:ChannelFacebook example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.BotService/botServices/botService1/channels/FacebookChannel
// ```
type ChannelFacebook struct {
pulumi.CustomResourceState
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringOutput `pulumi:"botName"`
// The Facebook Application ID for the Facebook Channel.
FacebookApplicationId pulumi.StringOutput `pulumi:"facebookApplicationId"`
// The Facebook Application Secret for the Facebook Channel.
FacebookApplicationSecret pulumi.StringOutput `pulumi:"facebookApplicationSecret"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// One or more `page` blocks as defined below.
Pages ChannelFacebookPageArrayOutput `pulumi:"pages"`
// The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewChannelFacebook registers a new resource with the given unique name, arguments, and options.
func NewChannelFacebook(ctx *pulumi.Context,
name string, args *ChannelFacebookArgs, opts ...pulumi.ResourceOption) (*ChannelFacebook, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BotName == nil {
return nil, errors.New("invalid value for required argument 'BotName'")
}
if args.FacebookApplicationId == nil {
return nil, errors.New("invalid value for required argument 'FacebookApplicationId'")
}
if args.FacebookApplicationSecret == nil {
return nil, errors.New("invalid value for required argument 'FacebookApplicationSecret'")
}
if args.Pages == nil {
return nil, errors.New("invalid value for required argument 'Pages'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.FacebookApplicationSecret != nil {
args.FacebookApplicationSecret = pulumi.ToSecret(args.FacebookApplicationSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"facebookApplicationSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ChannelFacebook
err := ctx.RegisterResource("azure:bot/channelFacebook:ChannelFacebook", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetChannelFacebook gets an existing ChannelFacebook resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetChannelFacebook(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ChannelFacebookState, opts ...pulumi.ResourceOption) (*ChannelFacebook, error) {
var resource ChannelFacebook
err := ctx.ReadResource("azure:bot/channelFacebook:ChannelFacebook", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ChannelFacebook resources.
type channelFacebookState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName *string `pulumi:"botName"`
// The Facebook Application ID for the Facebook Channel.
FacebookApplicationId *string `pulumi:"facebookApplicationId"`
// The Facebook Application Secret for the Facebook Channel.
FacebookApplicationSecret *string `pulumi:"facebookApplicationSecret"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// One or more `page` blocks as defined below.
Pages []ChannelFacebookPage `pulumi:"pages"`
// The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ChannelFacebookState struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringPtrInput
// The Facebook Application ID for the Facebook Channel.
FacebookApplicationId pulumi.StringPtrInput
// The Facebook Application Secret for the Facebook Channel.
FacebookApplicationSecret pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// One or more `page` blocks as defined below.
Pages ChannelFacebookPageArrayInput
// The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ChannelFacebookState) ElementType() reflect.Type {
return reflect.TypeOf((*channelFacebookState)(nil)).Elem()
}
type channelFacebookArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName string `pulumi:"botName"`
// The Facebook Application ID for the Facebook Channel.
FacebookApplicationId string `pulumi:"facebookApplicationId"`
// The Facebook Application Secret for the Facebook Channel.
FacebookApplicationSecret string `pulumi:"facebookApplicationSecret"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// One or more `page` blocks as defined below.
Pages []ChannelFacebookPage `pulumi:"pages"`
// The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ChannelFacebook resource.
type ChannelFacebookArgs struct {
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
BotName pulumi.StringInput
// The Facebook Application ID for the Facebook Channel.
FacebookApplicationId pulumi.StringInput
// The Facebook Application Secret for the Facebook Channel.
FacebookApplicationSecret pulumi.StringInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// One or more `page` blocks as defined below.
Pages ChannelFacebookPageArrayInput
// The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ChannelFacebookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*channelFacebookArgs)(nil)).Elem()
}
type ChannelFacebookInput interface {
pulumi.Input
ToChannelFacebookOutput() ChannelFacebookOutput
ToChannelFacebookOutputWithContext(ctx context.Context) ChannelFacebookOutput
}
func (*ChannelFacebook) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelFacebook)(nil)).Elem()
}
func (i *ChannelFacebook) ToChannelFacebookOutput() ChannelFacebookOutput {
return i.ToChannelFacebookOutputWithContext(context.Background())
}
func (i *ChannelFacebook) ToChannelFacebookOutputWithContext(ctx context.Context) ChannelFacebookOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelFacebookOutput)
}
// ChannelFacebookArrayInput is an input type that accepts ChannelFacebookArray and ChannelFacebookArrayOutput values.
// You can construct a concrete instance of `ChannelFacebookArrayInput` via:
//
// ChannelFacebookArray{ ChannelFacebookArgs{...} }
type ChannelFacebookArrayInput interface {
pulumi.Input
ToChannelFacebookArrayOutput() ChannelFacebookArrayOutput
ToChannelFacebookArrayOutputWithContext(context.Context) ChannelFacebookArrayOutput
}
type ChannelFacebookArray []ChannelFacebookInput
func (ChannelFacebookArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelFacebook)(nil)).Elem()
}
func (i ChannelFacebookArray) ToChannelFacebookArrayOutput() ChannelFacebookArrayOutput {
return i.ToChannelFacebookArrayOutputWithContext(context.Background())
}
func (i ChannelFacebookArray) ToChannelFacebookArrayOutputWithContext(ctx context.Context) ChannelFacebookArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelFacebookArrayOutput)
}
// ChannelFacebookMapInput is an input type that accepts ChannelFacebookMap and ChannelFacebookMapOutput values.
// You can construct a concrete instance of `ChannelFacebookMapInput` via:
//
// ChannelFacebookMap{ "key": ChannelFacebookArgs{...} }
type ChannelFacebookMapInput interface {
pulumi.Input
ToChannelFacebookMapOutput() ChannelFacebookMapOutput
ToChannelFacebookMapOutputWithContext(context.Context) ChannelFacebookMapOutput
}
type ChannelFacebookMap map[string]ChannelFacebookInput
func (ChannelFacebookMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelFacebook)(nil)).Elem()
}
func (i ChannelFacebookMap) ToChannelFacebookMapOutput() ChannelFacebookMapOutput {
return i.ToChannelFacebookMapOutputWithContext(context.Background())
}
func (i ChannelFacebookMap) ToChannelFacebookMapOutputWithContext(ctx context.Context) ChannelFacebookMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ChannelFacebookMapOutput)
}
type ChannelFacebookOutput struct{ *pulumi.OutputState }
func (ChannelFacebookOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ChannelFacebook)(nil)).Elem()
}
func (o ChannelFacebookOutput) ToChannelFacebookOutput() ChannelFacebookOutput {
return o
}
func (o ChannelFacebookOutput) ToChannelFacebookOutputWithContext(ctx context.Context) ChannelFacebookOutput {
return o
}
// The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
func (o ChannelFacebookOutput) BotName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelFacebook) pulumi.StringOutput { return v.BotName }).(pulumi.StringOutput)
}
// The Facebook Application ID for the Facebook Channel.
func (o ChannelFacebookOutput) FacebookApplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelFacebook) pulumi.StringOutput { return v.FacebookApplicationId }).(pulumi.StringOutput)
}
// The Facebook Application Secret for the Facebook Channel.
func (o ChannelFacebookOutput) FacebookApplicationSecret() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelFacebook) pulumi.StringOutput { return v.FacebookApplicationSecret }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ChannelFacebookOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelFacebook) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// One or more `page` blocks as defined below.
func (o ChannelFacebookOutput) Pages() ChannelFacebookPageArrayOutput {
return o.ApplyT(func(v *ChannelFacebook) ChannelFacebookPageArrayOutput { return v.Pages }).(ChannelFacebookPageArrayOutput)
}
// The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created.
func (o ChannelFacebookOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ChannelFacebook) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ChannelFacebookArrayOutput struct{ *pulumi.OutputState }
func (ChannelFacebookArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ChannelFacebook)(nil)).Elem()
}
func (o ChannelFacebookArrayOutput) ToChannelFacebookArrayOutput() ChannelFacebookArrayOutput {
return o
}
func (o ChannelFacebookArrayOutput) ToChannelFacebookArrayOutputWithContext(ctx context.Context) ChannelFacebookArrayOutput {
return o
}
func (o ChannelFacebookArrayOutput) Index(i pulumi.IntInput) ChannelFacebookOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ChannelFacebook {
return vs[0].([]*ChannelFacebook)[vs[1].(int)]
}).(ChannelFacebookOutput)
}
type ChannelFacebookMapOutput struct{ *pulumi.OutputState }
func (ChannelFacebookMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ChannelFacebook)(nil)).Elem()
}
func (o ChannelFacebookMapOutput) ToChannelFacebookMapOutput() ChannelFacebookMapOutput {
return o
}
func (o ChannelFacebookMapOutput) ToChannelFacebookMapOutputWithContext(ctx context.Context) ChannelFacebookMapOutput {
return o
}
func (o ChannelFacebookMapOutput) MapIndex(k pulumi.StringInput) ChannelFacebookOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ChannelFacebook {
return vs[0].(map[string]*ChannelFacebook)[vs[1].(string)]
}).(ChannelFacebookOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ChannelFacebookInput)(nil)).Elem(), &ChannelFacebook{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelFacebookArrayInput)(nil)).Elem(), ChannelFacebookArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ChannelFacebookMapInput)(nil)).Elem(), ChannelFacebookMap{})
pulumi.RegisterOutputType(ChannelFacebookOutput{})
pulumi.RegisterOutputType(ChannelFacebookArrayOutput{})
pulumi.RegisterOutputType(ChannelFacebookMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/connections/init.go | sdk/go/azure/connections/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 connections
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:connections/apiConnection:ApiConnection":
r = &ApiConnection{}
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",
"connections/apiConnection",
&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/connections/getApiConnection.go | sdk/go/azure/connections/getApiConnection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package connections
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 API Connection.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/connections"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := connections.LookupApiConnection(ctx, &connections.LookupApiConnectionArgs{
// Name: "example-connection",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("connectionId", example.Id)
// ctx.Export("connectionName", example.Name)
// ctx.Export("managedApiId", example.ManagedApiId)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Web` - 2016-06-01
func LookupApiConnection(ctx *pulumi.Context, args *LookupApiConnectionArgs, opts ...pulumi.InvokeOption) (*LookupApiConnectionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupApiConnectionResult
err := ctx.Invoke("azure:connections/getApiConnection:getApiConnection", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApiConnection.
type LookupApiConnectionArgs struct {
// The name of the API Connection.
Name string `pulumi:"name"`
// The name of the Resource Group where the API Connection exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getApiConnection.
type LookupApiConnectionResult struct {
// The display name of the API Connection.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the API Connection exists.
Location string `pulumi:"location"`
// The ID of the Managed API that this connection is linked to.
ManagedApiId string `pulumi:"managedApiId"`
Name string `pulumi:"name"`
// A mapping of parameter names to their values for the API Connection.
ParameterValues map[string]string `pulumi:"parameterValues"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the API Connection.
Tags map[string]string `pulumi:"tags"`
}
func LookupApiConnectionOutput(ctx *pulumi.Context, args LookupApiConnectionOutputArgs, opts ...pulumi.InvokeOption) LookupApiConnectionResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupApiConnectionResultOutput, error) {
args := v.(LookupApiConnectionArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:connections/getApiConnection:getApiConnection", args, LookupApiConnectionResultOutput{}, options).(LookupApiConnectionResultOutput), nil
}).(LookupApiConnectionResultOutput)
}
// A collection of arguments for invoking getApiConnection.
type LookupApiConnectionOutputArgs struct {
// The name of the API Connection.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the API Connection exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupApiConnectionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApiConnectionArgs)(nil)).Elem()
}
// A collection of values returned by getApiConnection.
type LookupApiConnectionResultOutput struct{ *pulumi.OutputState }
func (LookupApiConnectionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApiConnectionResult)(nil)).Elem()
}
func (o LookupApiConnectionResultOutput) ToLookupApiConnectionResultOutput() LookupApiConnectionResultOutput {
return o
}
func (o LookupApiConnectionResultOutput) ToLookupApiConnectionResultOutputWithContext(ctx context.Context) LookupApiConnectionResultOutput {
return o
}
// The display name of the API Connection.
func (o LookupApiConnectionResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiConnectionResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupApiConnectionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiConnectionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the API Connection exists.
func (o LookupApiConnectionResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiConnectionResult) string { return v.Location }).(pulumi.StringOutput)
}
// The ID of the Managed API that this connection is linked to.
func (o LookupApiConnectionResultOutput) ManagedApiId() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiConnectionResult) string { return v.ManagedApiId }).(pulumi.StringOutput)
}
func (o LookupApiConnectionResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiConnectionResult) string { return v.Name }).(pulumi.StringOutput)
}
// A mapping of parameter names to their values for the API Connection.
func (o LookupApiConnectionResultOutput) ParameterValues() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupApiConnectionResult) map[string]string { return v.ParameterValues }).(pulumi.StringMapOutput)
}
func (o LookupApiConnectionResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiConnectionResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the API Connection.
func (o LookupApiConnectionResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupApiConnectionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupApiConnectionResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/connections/apiConnection.go | sdk/go/azure/connections/apiConnection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package connections
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Connection.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/connections"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicebus"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example := connections.GetManagedApiOutput(ctx, connections.GetManagedApiOutputArgs{
// Name: pulumi.String("servicebus"),
// Location: exampleResourceGroup.Location,
// }, nil)
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("example-namespace"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// Sku: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = connections.NewApiConnection(ctx, "example", &connections.ApiConnectionArgs{
// Name: pulumi.String("example-connection"),
// ResourceGroupName: exampleResourceGroup.Name,
// ManagedApiId: pulumi.String(example.ApplyT(func(example connections.GetManagedApiResult) (*string, error) {
// return &example.Id, nil
// }).(pulumi.StringPtrOutput)),
// DisplayName: pulumi.String("Example 1"),
// ParameterValues: pulumi.StringMap{
// "connectionString": exampleNamespace.DefaultPrimaryConnectionString,
// },
// Tags: pulumi.StringMap{
// "Hello": pulumi.String("World"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Web` - 2016-06-01
//
// ## Import
//
// API Connections can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:connections/apiConnection:ApiConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Web/connections/example-connection
// ```
type ApiConnection struct {
pulumi.CustomResourceState
// A display name for this API Connection.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The ID of the Managed API which this API Connection is linked to. Changing this forces a new API Connection to be created.
ManagedApiId pulumi.StringOutput `pulumi:"managedApiId"`
// The Name which should be used for this API Connection. Changing this forces a new API Connection to be created.
Name pulumi.StringOutput `pulumi:"name"`
ParameterValues pulumi.StringMapOutput `pulumi:"parameterValues"`
// The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the API Connection.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewApiConnection registers a new resource with the given unique name, arguments, and options.
func NewApiConnection(ctx *pulumi.Context,
name string, args *ApiConnectionArgs, opts ...pulumi.ResourceOption) (*ApiConnection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedApiId == nil {
return nil, errors.New("invalid value for required argument 'ManagedApiId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiConnection
err := ctx.RegisterResource("azure:connections/apiConnection:ApiConnection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiConnection gets an existing ApiConnection resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiConnectionState, opts ...pulumi.ResourceOption) (*ApiConnection, error) {
var resource ApiConnection
err := ctx.ReadResource("azure:connections/apiConnection:ApiConnection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiConnection resources.
type apiConnectionState struct {
// A display name for this API Connection.
DisplayName *string `pulumi:"displayName"`
// The ID of the Managed API which this API Connection is linked to. Changing this forces a new API Connection to be created.
ManagedApiId *string `pulumi:"managedApiId"`
// The Name which should be used for this API Connection. Changing this forces a new API Connection to be created.
Name *string `pulumi:"name"`
ParameterValues map[string]string `pulumi:"parameterValues"`
// The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the API Connection.
Tags map[string]string `pulumi:"tags"`
}
type ApiConnectionState struct {
// A display name for this API Connection.
DisplayName pulumi.StringPtrInput
// The ID of the Managed API which this API Connection is linked to. Changing this forces a new API Connection to be created.
ManagedApiId pulumi.StringPtrInput
// The Name which should be used for this API Connection. Changing this forces a new API Connection to be created.
Name pulumi.StringPtrInput
ParameterValues pulumi.StringMapInput
// The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the API Connection.
Tags pulumi.StringMapInput
}
func (ApiConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*apiConnectionState)(nil)).Elem()
}
type apiConnectionArgs struct {
// A display name for this API Connection.
DisplayName *string `pulumi:"displayName"`
// The ID of the Managed API which this API Connection is linked to. Changing this forces a new API Connection to be created.
ManagedApiId string `pulumi:"managedApiId"`
// The Name which should be used for this API Connection. Changing this forces a new API Connection to be created.
Name *string `pulumi:"name"`
ParameterValues map[string]string `pulumi:"parameterValues"`
// The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the API Connection.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ApiConnection resource.
type ApiConnectionArgs struct {
// A display name for this API Connection.
DisplayName pulumi.StringPtrInput
// The ID of the Managed API which this API Connection is linked to. Changing this forces a new API Connection to be created.
ManagedApiId pulumi.StringInput
// The Name which should be used for this API Connection. Changing this forces a new API Connection to be created.
Name pulumi.StringPtrInput
ParameterValues pulumi.StringMapInput
// The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the API Connection.
Tags pulumi.StringMapInput
}
func (ApiConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiConnectionArgs)(nil)).Elem()
}
type ApiConnectionInput interface {
pulumi.Input
ToApiConnectionOutput() ApiConnectionOutput
ToApiConnectionOutputWithContext(ctx context.Context) ApiConnectionOutput
}
func (*ApiConnection) ElementType() reflect.Type {
return reflect.TypeOf((**ApiConnection)(nil)).Elem()
}
func (i *ApiConnection) ToApiConnectionOutput() ApiConnectionOutput {
return i.ToApiConnectionOutputWithContext(context.Background())
}
func (i *ApiConnection) ToApiConnectionOutputWithContext(ctx context.Context) ApiConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiConnectionOutput)
}
// ApiConnectionArrayInput is an input type that accepts ApiConnectionArray and ApiConnectionArrayOutput values.
// You can construct a concrete instance of `ApiConnectionArrayInput` via:
//
// ApiConnectionArray{ ApiConnectionArgs{...} }
type ApiConnectionArrayInput interface {
pulumi.Input
ToApiConnectionArrayOutput() ApiConnectionArrayOutput
ToApiConnectionArrayOutputWithContext(context.Context) ApiConnectionArrayOutput
}
type ApiConnectionArray []ApiConnectionInput
func (ApiConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiConnection)(nil)).Elem()
}
func (i ApiConnectionArray) ToApiConnectionArrayOutput() ApiConnectionArrayOutput {
return i.ToApiConnectionArrayOutputWithContext(context.Background())
}
func (i ApiConnectionArray) ToApiConnectionArrayOutputWithContext(ctx context.Context) ApiConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiConnectionArrayOutput)
}
// ApiConnectionMapInput is an input type that accepts ApiConnectionMap and ApiConnectionMapOutput values.
// You can construct a concrete instance of `ApiConnectionMapInput` via:
//
// ApiConnectionMap{ "key": ApiConnectionArgs{...} }
type ApiConnectionMapInput interface {
pulumi.Input
ToApiConnectionMapOutput() ApiConnectionMapOutput
ToApiConnectionMapOutputWithContext(context.Context) ApiConnectionMapOutput
}
type ApiConnectionMap map[string]ApiConnectionInput
func (ApiConnectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiConnection)(nil)).Elem()
}
func (i ApiConnectionMap) ToApiConnectionMapOutput() ApiConnectionMapOutput {
return i.ToApiConnectionMapOutputWithContext(context.Background())
}
func (i ApiConnectionMap) ToApiConnectionMapOutputWithContext(ctx context.Context) ApiConnectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiConnectionMapOutput)
}
type ApiConnectionOutput struct{ *pulumi.OutputState }
func (ApiConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiConnection)(nil)).Elem()
}
func (o ApiConnectionOutput) ToApiConnectionOutput() ApiConnectionOutput {
return o
}
func (o ApiConnectionOutput) ToApiConnectionOutputWithContext(ctx context.Context) ApiConnectionOutput {
return o
}
// A display name for this API Connection.
func (o ApiConnectionOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConnection) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The ID of the Managed API which this API Connection is linked to. Changing this forces a new API Connection to be created.
func (o ApiConnectionOutput) ManagedApiId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConnection) pulumi.StringOutput { return v.ManagedApiId }).(pulumi.StringOutput)
}
// The Name which should be used for this API Connection. Changing this forces a new API Connection to be created.
func (o ApiConnectionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o ApiConnectionOutput) ParameterValues() pulumi.StringMapOutput {
return o.ApplyT(func(v *ApiConnection) pulumi.StringMapOutput { return v.ParameterValues }).(pulumi.StringMapOutput)
}
// The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created.
func (o ApiConnectionOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiConnection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the API Connection.
func (o ApiConnectionOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ApiConnection) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ApiConnectionArrayOutput struct{ *pulumi.OutputState }
func (ApiConnectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiConnection)(nil)).Elem()
}
func (o ApiConnectionArrayOutput) ToApiConnectionArrayOutput() ApiConnectionArrayOutput {
return o
}
func (o ApiConnectionArrayOutput) ToApiConnectionArrayOutputWithContext(ctx context.Context) ApiConnectionArrayOutput {
return o
}
func (o ApiConnectionArrayOutput) Index(i pulumi.IntInput) ApiConnectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiConnection {
return vs[0].([]*ApiConnection)[vs[1].(int)]
}).(ApiConnectionOutput)
}
type ApiConnectionMapOutput struct{ *pulumi.OutputState }
func (ApiConnectionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiConnection)(nil)).Elem()
}
func (o ApiConnectionMapOutput) ToApiConnectionMapOutput() ApiConnectionMapOutput {
return o
}
func (o ApiConnectionMapOutput) ToApiConnectionMapOutputWithContext(ctx context.Context) ApiConnectionMapOutput {
return o
}
func (o ApiConnectionMapOutput) MapIndex(k pulumi.StringInput) ApiConnectionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiConnection {
return vs[0].(map[string]*ApiConnection)[vs[1].(string)]
}).(ApiConnectionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiConnectionInput)(nil)).Elem(), &ApiConnection{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiConnectionArrayInput)(nil)).Elem(), ApiConnectionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiConnectionMapInput)(nil)).Elem(), ApiConnectionMap{})
pulumi.RegisterOutputType(ApiConnectionOutput{})
pulumi.RegisterOutputType(ApiConnectionArrayOutput{})
pulumi.RegisterOutputType(ApiConnectionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/connections/getManagedApi.go | sdk/go/azure/connections/getManagedApi.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package connections
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Uses this data source to access information about an existing Managed API.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/connections"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := connections.GetManagedApi(ctx, &connections.GetManagedApiArgs{
// Name: "servicebus",
// Location: "West Europe",
// }, 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.Web` - 2016-06-01
func GetManagedApi(ctx *pulumi.Context, args *GetManagedApiArgs, opts ...pulumi.InvokeOption) (*GetManagedApiResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetManagedApiResult
err := ctx.Invoke("azure:connections/getManagedApi:getManagedApi", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getManagedApi.
type GetManagedApiArgs struct {
// The Azure location for this Managed API.
Location string `pulumi:"location"`
// Specifies the name of the Managed API.
Name string `pulumi:"name"`
}
// A collection of values returned by getManagedApi.
type GetManagedApiResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
Name string `pulumi:"name"`
Tags map[string]string `pulumi:"tags"`
}
func GetManagedApiOutput(ctx *pulumi.Context, args GetManagedApiOutputArgs, opts ...pulumi.InvokeOption) GetManagedApiResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetManagedApiResultOutput, error) {
args := v.(GetManagedApiArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:connections/getManagedApi:getManagedApi", args, GetManagedApiResultOutput{}, options).(GetManagedApiResultOutput), nil
}).(GetManagedApiResultOutput)
}
// A collection of arguments for invoking getManagedApi.
type GetManagedApiOutputArgs struct {
// The Azure location for this Managed API.
Location pulumi.StringInput `pulumi:"location"`
// Specifies the name of the Managed API.
Name pulumi.StringInput `pulumi:"name"`
}
func (GetManagedApiOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetManagedApiArgs)(nil)).Elem()
}
// A collection of values returned by getManagedApi.
type GetManagedApiResultOutput struct{ *pulumi.OutputState }
func (GetManagedApiResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetManagedApiResult)(nil)).Elem()
}
func (o GetManagedApiResultOutput) ToGetManagedApiResultOutput() GetManagedApiResultOutput {
return o
}
func (o GetManagedApiResultOutput) ToGetManagedApiResultOutputWithContext(ctx context.Context) GetManagedApiResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetManagedApiResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetManagedApiResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetManagedApiResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetManagedApiResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o GetManagedApiResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetManagedApiResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetManagedApiResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetManagedApiResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(GetManagedApiResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/getWorkspace.go | sdk/go/azure/apimanagement/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 apimanagement
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 API Management Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apimanagement"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Premium_1"),
// })
// if err != nil {
// return err
// }
// example := apimanagement.LookupWorkspaceOutput(ctx, apimanagement.GetWorkspaceOutputArgs{
// Name: pulumi.String("existing"),
// ApiManagementId: exampleService.ID(),
// }, nil)
// ctx.Export("id", example.ApplyT(func(example apimanagement.GetWorkspaceResult) (*string, error) {
// return &example.Id, nil
// }).(pulumi.StringPtrOutput))
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2024-05-01
func LookupWorkspace(ctx *pulumi.Context, args *LookupWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupWorkspaceResult
err := ctx.Invoke("azure:apimanagement/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 ID of the API Management Workspace.
ApiManagementId string `pulumi:"apiManagementId"`
// The name of this API Management Workspace.
Name string `pulumi:"name"`
}
// A collection of values returned by getWorkspace.
type LookupWorkspaceResult struct {
ApiManagementId string `pulumi:"apiManagementId"`
// The display name of the API Management Workspace.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
}
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:apimanagement/getWorkspace:getWorkspace", args, LookupWorkspaceResultOutput{}, options).(LookupWorkspaceResultOutput), nil
}).(LookupWorkspaceResultOutput)
}
// A collection of arguments for invoking getWorkspace.
type LookupWorkspaceOutputArgs struct {
// The ID of the API Management Workspace.
ApiManagementId pulumi.StringInput `pulumi:"apiManagementId"`
// The name of this API Management Workspace.
Name pulumi.StringInput `pulumi:"name"`
}
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
}
func (o LookupWorkspaceResultOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The display name of the API Management Workspace.
func (o LookupWorkspaceResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.DisplayName }).(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)
}
func (o LookupWorkspaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Name }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupWorkspaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/apiPolicy.go | sdk/go/azure/apimanagement/apiPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management API Policy
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupApi(ctx, &apimanagement.LookupApiArgs{
// Name: "my-api",
// ApiManagementName: "example-apim",
// ResourceGroupName: "search-service",
// Revision: "2",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApiPolicy(ctx, "example", &apimanagement.ApiPolicyArgs{
// ApiName: pulumi.String(example.Name),
// ApiManagementName: pulumi.String(example.ApiManagementName),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// XmlContent: pulumi.String(`<policies>
// <inbound>
// <find-and-replace from=\"xyz\" to=\"abc\" />
// </inbound>
//
// </policies>
// `),
//
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management API Policy can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/apiPolicy:ApiPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/apis/exampleId
// ```
type ApiPolicy struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The ID of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName pulumi.StringOutput `pulumi:"apiName"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The XML Content for this Policy as a string.
XmlContent pulumi.StringOutput `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrOutput `pulumi:"xmlLink"`
}
// NewApiPolicy registers a new resource with the given unique name, arguments, and options.
func NewApiPolicy(ctx *pulumi.Context,
name string, args *ApiPolicyArgs, opts ...pulumi.ResourceOption) (*ApiPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ApiName == nil {
return nil, errors.New("invalid value for required argument 'ApiName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiPolicy
err := ctx.RegisterResource("azure:apimanagement/apiPolicy:ApiPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiPolicy gets an existing ApiPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiPolicyState, opts ...pulumi.ResourceOption) (*ApiPolicy, error) {
var resource ApiPolicy
err := ctx.ReadResource("azure:apimanagement/apiPolicy:ApiPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiPolicy resources.
type apiPolicyState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The ID of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName *string `pulumi:"apiName"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The XML Content for this Policy as a string.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
type ApiPolicyState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The ID of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The XML Content for this Policy as a string.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (ApiPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*apiPolicyState)(nil)).Elem()
}
type apiPolicyArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The ID of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName string `pulumi:"apiName"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The XML Content for this Policy as a string.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
// The set of arguments for constructing a ApiPolicy resource.
type ApiPolicyArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The ID of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName pulumi.StringInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The XML Content for this Policy as a string.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (ApiPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiPolicyArgs)(nil)).Elem()
}
type ApiPolicyInput interface {
pulumi.Input
ToApiPolicyOutput() ApiPolicyOutput
ToApiPolicyOutputWithContext(ctx context.Context) ApiPolicyOutput
}
func (*ApiPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ApiPolicy)(nil)).Elem()
}
func (i *ApiPolicy) ToApiPolicyOutput() ApiPolicyOutput {
return i.ToApiPolicyOutputWithContext(context.Background())
}
func (i *ApiPolicy) ToApiPolicyOutputWithContext(ctx context.Context) ApiPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiPolicyOutput)
}
// ApiPolicyArrayInput is an input type that accepts ApiPolicyArray and ApiPolicyArrayOutput values.
// You can construct a concrete instance of `ApiPolicyArrayInput` via:
//
// ApiPolicyArray{ ApiPolicyArgs{...} }
type ApiPolicyArrayInput interface {
pulumi.Input
ToApiPolicyArrayOutput() ApiPolicyArrayOutput
ToApiPolicyArrayOutputWithContext(context.Context) ApiPolicyArrayOutput
}
type ApiPolicyArray []ApiPolicyInput
func (ApiPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiPolicy)(nil)).Elem()
}
func (i ApiPolicyArray) ToApiPolicyArrayOutput() ApiPolicyArrayOutput {
return i.ToApiPolicyArrayOutputWithContext(context.Background())
}
func (i ApiPolicyArray) ToApiPolicyArrayOutputWithContext(ctx context.Context) ApiPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiPolicyArrayOutput)
}
// ApiPolicyMapInput is an input type that accepts ApiPolicyMap and ApiPolicyMapOutput values.
// You can construct a concrete instance of `ApiPolicyMapInput` via:
//
// ApiPolicyMap{ "key": ApiPolicyArgs{...} }
type ApiPolicyMapInput interface {
pulumi.Input
ToApiPolicyMapOutput() ApiPolicyMapOutput
ToApiPolicyMapOutputWithContext(context.Context) ApiPolicyMapOutput
}
type ApiPolicyMap map[string]ApiPolicyInput
func (ApiPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiPolicy)(nil)).Elem()
}
func (i ApiPolicyMap) ToApiPolicyMapOutput() ApiPolicyMapOutput {
return i.ToApiPolicyMapOutputWithContext(context.Background())
}
func (i ApiPolicyMap) ToApiPolicyMapOutputWithContext(ctx context.Context) ApiPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiPolicyMapOutput)
}
type ApiPolicyOutput struct{ *pulumi.OutputState }
func (ApiPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiPolicy)(nil)).Elem()
}
func (o ApiPolicyOutput) ToApiPolicyOutput() ApiPolicyOutput {
return o
}
func (o ApiPolicyOutput) ToApiPolicyOutputWithContext(ctx context.Context) ApiPolicyOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o ApiPolicyOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiPolicy) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The ID of the API Management API within the API Management Service. Changing this forces a new resource to be created.
func (o ApiPolicyOutput) ApiName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiPolicy) pulumi.StringOutput { return v.ApiName }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o ApiPolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The XML Content for this Policy as a string.
func (o ApiPolicyOutput) XmlContent() pulumi.StringOutput {
return o.ApplyT(func(v *ApiPolicy) pulumi.StringOutput { return v.XmlContent }).(pulumi.StringOutput)
}
// A link to a Policy XML Document, which must be publicly available.
func (o ApiPolicyOutput) XmlLink() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiPolicy) pulumi.StringPtrOutput { return v.XmlLink }).(pulumi.StringPtrOutput)
}
type ApiPolicyArrayOutput struct{ *pulumi.OutputState }
func (ApiPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiPolicy)(nil)).Elem()
}
func (o ApiPolicyArrayOutput) ToApiPolicyArrayOutput() ApiPolicyArrayOutput {
return o
}
func (o ApiPolicyArrayOutput) ToApiPolicyArrayOutputWithContext(ctx context.Context) ApiPolicyArrayOutput {
return o
}
func (o ApiPolicyArrayOutput) Index(i pulumi.IntInput) ApiPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiPolicy {
return vs[0].([]*ApiPolicy)[vs[1].(int)]
}).(ApiPolicyOutput)
}
type ApiPolicyMapOutput struct{ *pulumi.OutputState }
func (ApiPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiPolicy)(nil)).Elem()
}
func (o ApiPolicyMapOutput) ToApiPolicyMapOutput() ApiPolicyMapOutput {
return o
}
func (o ApiPolicyMapOutput) ToApiPolicyMapOutputWithContext(ctx context.Context) ApiPolicyMapOutput {
return o
}
func (o ApiPolicyMapOutput) MapIndex(k pulumi.StringInput) ApiPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiPolicy {
return vs[0].(map[string]*ApiPolicy)[vs[1].(string)]
}).(ApiPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiPolicyInput)(nil)).Elem(), &ApiPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiPolicyArrayInput)(nil)).Elem(), ApiPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiPolicyMapInput)(nil)).Elem(), ApiPolicyMap{})
pulumi.RegisterOutputType(ApiPolicyOutput{})
pulumi.RegisterOutputType(ApiPolicyArrayOutput{})
pulumi.RegisterOutputType(ApiPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/apiVersionSet.go | sdk/go/azure/apimanagement/apiVersionSet.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Version Set within an API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApiVersionSet(ctx, "example", &apimanagement.ApiVersionSetArgs{
// Name: pulumi.String("example-apimapi-1_0_0"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// DisplayName: pulumi.String("ExampleAPIVersionSet"),
// VersioningScheme: pulumi.String("Segment"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Version Set can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/apiVersionSet:ApiVersionSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/apiVersionSets/set1
// ```
type ApiVersionSet struct {
pulumi.CustomResourceState
// The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The description of API Version Set.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The display name of this API Version Set.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The name of the Header which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Header`.
VersionHeaderName pulumi.StringPtrOutput `pulumi:"versionHeaderName"`
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Query`.
VersionQueryName pulumi.StringPtrOutput `pulumi:"versionQueryName"`
// Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme pulumi.StringOutput `pulumi:"versioningScheme"`
}
// NewApiVersionSet registers a new resource with the given unique name, arguments, and options.
func NewApiVersionSet(ctx *pulumi.Context,
name string, args *ApiVersionSetArgs, opts ...pulumi.ResourceOption) (*ApiVersionSet, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.VersioningScheme == nil {
return nil, errors.New("invalid value for required argument 'VersioningScheme'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiVersionSet
err := ctx.RegisterResource("azure:apimanagement/apiVersionSet:ApiVersionSet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiVersionSet gets an existing ApiVersionSet resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiVersionSet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiVersionSetState, opts ...pulumi.ResourceOption) (*ApiVersionSet, error) {
var resource ApiVersionSet
err := ctx.ReadResource("azure:apimanagement/apiVersionSet:ApiVersionSet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiVersionSet resources.
type apiVersionSetState struct {
// The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The description of API Version Set.
Description *string `pulumi:"description"`
// The display name of this API Version Set.
DisplayName *string `pulumi:"displayName"`
// The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The name of the Header which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Header`.
VersionHeaderName *string `pulumi:"versionHeaderName"`
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Query`.
VersionQueryName *string `pulumi:"versionQueryName"`
// Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme *string `pulumi:"versioningScheme"`
}
type ApiVersionSetState struct {
// The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The description of API Version Set.
Description pulumi.StringPtrInput
// The display name of this API Version Set.
DisplayName pulumi.StringPtrInput
// The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The name of the Header which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Header`.
VersionHeaderName pulumi.StringPtrInput
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Query`.
VersionQueryName pulumi.StringPtrInput
// Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme pulumi.StringPtrInput
}
func (ApiVersionSetState) ElementType() reflect.Type {
return reflect.TypeOf((*apiVersionSetState)(nil)).Elem()
}
type apiVersionSetArgs struct {
// The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The description of API Version Set.
Description *string `pulumi:"description"`
// The display name of this API Version Set.
DisplayName string `pulumi:"displayName"`
// The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the Header which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Header`.
VersionHeaderName *string `pulumi:"versionHeaderName"`
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Query`.
VersionQueryName *string `pulumi:"versionQueryName"`
// Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme string `pulumi:"versioningScheme"`
}
// The set of arguments for constructing a ApiVersionSet resource.
type ApiVersionSetArgs struct {
// The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The description of API Version Set.
Description pulumi.StringPtrInput
// The display name of this API Version Set.
DisplayName pulumi.StringInput
// The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The name of the Header which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Header`.
VersionHeaderName pulumi.StringPtrInput
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Query`.
VersionQueryName pulumi.StringPtrInput
// Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme pulumi.StringInput
}
func (ApiVersionSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiVersionSetArgs)(nil)).Elem()
}
type ApiVersionSetInput interface {
pulumi.Input
ToApiVersionSetOutput() ApiVersionSetOutput
ToApiVersionSetOutputWithContext(ctx context.Context) ApiVersionSetOutput
}
func (*ApiVersionSet) ElementType() reflect.Type {
return reflect.TypeOf((**ApiVersionSet)(nil)).Elem()
}
func (i *ApiVersionSet) ToApiVersionSetOutput() ApiVersionSetOutput {
return i.ToApiVersionSetOutputWithContext(context.Background())
}
func (i *ApiVersionSet) ToApiVersionSetOutputWithContext(ctx context.Context) ApiVersionSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiVersionSetOutput)
}
// ApiVersionSetArrayInput is an input type that accepts ApiVersionSetArray and ApiVersionSetArrayOutput values.
// You can construct a concrete instance of `ApiVersionSetArrayInput` via:
//
// ApiVersionSetArray{ ApiVersionSetArgs{...} }
type ApiVersionSetArrayInput interface {
pulumi.Input
ToApiVersionSetArrayOutput() ApiVersionSetArrayOutput
ToApiVersionSetArrayOutputWithContext(context.Context) ApiVersionSetArrayOutput
}
type ApiVersionSetArray []ApiVersionSetInput
func (ApiVersionSetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiVersionSet)(nil)).Elem()
}
func (i ApiVersionSetArray) ToApiVersionSetArrayOutput() ApiVersionSetArrayOutput {
return i.ToApiVersionSetArrayOutputWithContext(context.Background())
}
func (i ApiVersionSetArray) ToApiVersionSetArrayOutputWithContext(ctx context.Context) ApiVersionSetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiVersionSetArrayOutput)
}
// ApiVersionSetMapInput is an input type that accepts ApiVersionSetMap and ApiVersionSetMapOutput values.
// You can construct a concrete instance of `ApiVersionSetMapInput` via:
//
// ApiVersionSetMap{ "key": ApiVersionSetArgs{...} }
type ApiVersionSetMapInput interface {
pulumi.Input
ToApiVersionSetMapOutput() ApiVersionSetMapOutput
ToApiVersionSetMapOutputWithContext(context.Context) ApiVersionSetMapOutput
}
type ApiVersionSetMap map[string]ApiVersionSetInput
func (ApiVersionSetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiVersionSet)(nil)).Elem()
}
func (i ApiVersionSetMap) ToApiVersionSetMapOutput() ApiVersionSetMapOutput {
return i.ToApiVersionSetMapOutputWithContext(context.Background())
}
func (i ApiVersionSetMap) ToApiVersionSetMapOutputWithContext(ctx context.Context) ApiVersionSetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiVersionSetMapOutput)
}
type ApiVersionSetOutput struct{ *pulumi.OutputState }
func (ApiVersionSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiVersionSet)(nil)).Elem()
}
func (o ApiVersionSetOutput) ToApiVersionSetOutput() ApiVersionSetOutput {
return o
}
func (o ApiVersionSetOutput) ToApiVersionSetOutputWithContext(ctx context.Context) ApiVersionSetOutput {
return o
}
// The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
func (o ApiVersionSetOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The description of API Version Set.
func (o ApiVersionSetOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of this API Version Set.
func (o ApiVersionSetOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
func (o ApiVersionSetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
func (o ApiVersionSetOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The name of the Header which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Header`.
func (o ApiVersionSetOutput) VersionHeaderName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringPtrOutput { return v.VersionHeaderName }).(pulumi.StringPtrOutput)
}
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
//
// > **Note:** This must be specified when `versioningScheme` is set to `Query`.
func (o ApiVersionSetOutput) VersionQueryName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringPtrOutput { return v.VersionQueryName }).(pulumi.StringPtrOutput)
}
// Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
func (o ApiVersionSetOutput) VersioningScheme() pulumi.StringOutput {
return o.ApplyT(func(v *ApiVersionSet) pulumi.StringOutput { return v.VersioningScheme }).(pulumi.StringOutput)
}
type ApiVersionSetArrayOutput struct{ *pulumi.OutputState }
func (ApiVersionSetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiVersionSet)(nil)).Elem()
}
func (o ApiVersionSetArrayOutput) ToApiVersionSetArrayOutput() ApiVersionSetArrayOutput {
return o
}
func (o ApiVersionSetArrayOutput) ToApiVersionSetArrayOutputWithContext(ctx context.Context) ApiVersionSetArrayOutput {
return o
}
func (o ApiVersionSetArrayOutput) Index(i pulumi.IntInput) ApiVersionSetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiVersionSet {
return vs[0].([]*ApiVersionSet)[vs[1].(int)]
}).(ApiVersionSetOutput)
}
type ApiVersionSetMapOutput struct{ *pulumi.OutputState }
func (ApiVersionSetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiVersionSet)(nil)).Elem()
}
func (o ApiVersionSetMapOutput) ToApiVersionSetMapOutput() ApiVersionSetMapOutput {
return o
}
func (o ApiVersionSetMapOutput) ToApiVersionSetMapOutputWithContext(ctx context.Context) ApiVersionSetMapOutput {
return o
}
func (o ApiVersionSetMapOutput) MapIndex(k pulumi.StringInput) ApiVersionSetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiVersionSet {
return vs[0].(map[string]*ApiVersionSet)[vs[1].(string)]
}).(ApiVersionSetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiVersionSetInput)(nil)).Elem(), &ApiVersionSet{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiVersionSetArrayInput)(nil)).Elem(), ApiVersionSetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiVersionSetMapInput)(nil)).Elem(), ApiVersionSetMap{})
pulumi.RegisterOutputType(ApiVersionSetOutput{})
pulumi.RegisterOutputType(ApiVersionSetArrayOutput{})
pulumi.RegisterOutputType(ApiVersionSetMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/productPolicy.go | sdk/go/azure/apimanagement/productPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Product Policy
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
// ProductId: "my-product",
// ApiManagementName: "example-apim",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewProductPolicy(ctx, "example", &apimanagement.ProductPolicyArgs{
// ProductId: pulumi.String(example.ProductId),
// ApiManagementName: pulumi.String(example.ApiManagementName),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// XmlContent: pulumi.String(`<policies>
// <inbound>
// <find-and-replace from=\"xyz\" to=\"abc\" />
// </inbound>
//
// </policies>
// `),
//
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Product Policy can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/productPolicy:ProductPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/products/product1
// ```
type ProductPolicy struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringOutput `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The XML Content for this Policy.
XmlContent pulumi.StringOutput `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrOutput `pulumi:"xmlLink"`
}
// NewProductPolicy registers a new resource with the given unique name, arguments, and options.
func NewProductPolicy(ctx *pulumi.Context,
name string, args *ProductPolicyArgs, opts ...pulumi.ResourceOption) (*ProductPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ProductId == nil {
return nil, errors.New("invalid value for required argument 'ProductId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ProductPolicy
err := ctx.RegisterResource("azure:apimanagement/productPolicy:ProductPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProductPolicy gets an existing ProductPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetProductPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProductPolicyState, opts ...pulumi.ResourceOption) (*ProductPolicy, error) {
var resource ProductPolicy
err := ctx.ReadResource("azure:apimanagement/productPolicy:ProductPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ProductPolicy resources.
type productPolicyState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId *string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The XML Content for this Policy.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
type ProductPolicyState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The XML Content for this Policy.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (ProductPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*productPolicyState)(nil)).Elem()
}
type productPolicyArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The XML Content for this Policy.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
// The set of arguments for constructing a ProductPolicy resource.
type ProductPolicyArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The XML Content for this Policy.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (ProductPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*productPolicyArgs)(nil)).Elem()
}
type ProductPolicyInput interface {
pulumi.Input
ToProductPolicyOutput() ProductPolicyOutput
ToProductPolicyOutputWithContext(ctx context.Context) ProductPolicyOutput
}
func (*ProductPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ProductPolicy)(nil)).Elem()
}
func (i *ProductPolicy) ToProductPolicyOutput() ProductPolicyOutput {
return i.ToProductPolicyOutputWithContext(context.Background())
}
func (i *ProductPolicy) ToProductPolicyOutputWithContext(ctx context.Context) ProductPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductPolicyOutput)
}
// ProductPolicyArrayInput is an input type that accepts ProductPolicyArray and ProductPolicyArrayOutput values.
// You can construct a concrete instance of `ProductPolicyArrayInput` via:
//
// ProductPolicyArray{ ProductPolicyArgs{...} }
type ProductPolicyArrayInput interface {
pulumi.Input
ToProductPolicyArrayOutput() ProductPolicyArrayOutput
ToProductPolicyArrayOutputWithContext(context.Context) ProductPolicyArrayOutput
}
type ProductPolicyArray []ProductPolicyInput
func (ProductPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductPolicy)(nil)).Elem()
}
func (i ProductPolicyArray) ToProductPolicyArrayOutput() ProductPolicyArrayOutput {
return i.ToProductPolicyArrayOutputWithContext(context.Background())
}
func (i ProductPolicyArray) ToProductPolicyArrayOutputWithContext(ctx context.Context) ProductPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductPolicyArrayOutput)
}
// ProductPolicyMapInput is an input type that accepts ProductPolicyMap and ProductPolicyMapOutput values.
// You can construct a concrete instance of `ProductPolicyMapInput` via:
//
// ProductPolicyMap{ "key": ProductPolicyArgs{...} }
type ProductPolicyMapInput interface {
pulumi.Input
ToProductPolicyMapOutput() ProductPolicyMapOutput
ToProductPolicyMapOutputWithContext(context.Context) ProductPolicyMapOutput
}
type ProductPolicyMap map[string]ProductPolicyInput
func (ProductPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductPolicy)(nil)).Elem()
}
func (i ProductPolicyMap) ToProductPolicyMapOutput() ProductPolicyMapOutput {
return i.ToProductPolicyMapOutputWithContext(context.Background())
}
func (i ProductPolicyMap) ToProductPolicyMapOutputWithContext(ctx context.Context) ProductPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductPolicyMapOutput)
}
type ProductPolicyOutput struct{ *pulumi.OutputState }
func (ProductPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ProductPolicy)(nil)).Elem()
}
func (o ProductPolicyOutput) ToProductPolicyOutput() ProductPolicyOutput {
return o
}
func (o ProductPolicyOutput) ToProductPolicyOutputWithContext(ctx context.Context) ProductPolicyOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o ProductPolicyOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductPolicy) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
func (o ProductPolicyOutput) ProductId() pulumi.StringOutput {
return o.ApplyT(func(v *ProductPolicy) pulumi.StringOutput { return v.ProductId }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o ProductPolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The XML Content for this Policy.
func (o ProductPolicyOutput) XmlContent() pulumi.StringOutput {
return o.ApplyT(func(v *ProductPolicy) pulumi.StringOutput { return v.XmlContent }).(pulumi.StringOutput)
}
// A link to a Policy XML Document, which must be publicly available.
func (o ProductPolicyOutput) XmlLink() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ProductPolicy) pulumi.StringPtrOutput { return v.XmlLink }).(pulumi.StringPtrOutput)
}
type ProductPolicyArrayOutput struct{ *pulumi.OutputState }
func (ProductPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductPolicy)(nil)).Elem()
}
func (o ProductPolicyArrayOutput) ToProductPolicyArrayOutput() ProductPolicyArrayOutput {
return o
}
func (o ProductPolicyArrayOutput) ToProductPolicyArrayOutputWithContext(ctx context.Context) ProductPolicyArrayOutput {
return o
}
func (o ProductPolicyArrayOutput) Index(i pulumi.IntInput) ProductPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProductPolicy {
return vs[0].([]*ProductPolicy)[vs[1].(int)]
}).(ProductPolicyOutput)
}
type ProductPolicyMapOutput struct{ *pulumi.OutputState }
func (ProductPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductPolicy)(nil)).Elem()
}
func (o ProductPolicyMapOutput) ToProductPolicyMapOutput() ProductPolicyMapOutput {
return o
}
func (o ProductPolicyMapOutput) ToProductPolicyMapOutputWithContext(ctx context.Context) ProductPolicyMapOutput {
return o
}
func (o ProductPolicyMapOutput) MapIndex(k pulumi.StringInput) ProductPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProductPolicy {
return vs[0].(map[string]*ProductPolicy)[vs[1].(string)]
}).(ProductPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProductPolicyInput)(nil)).Elem(), &ProductPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductPolicyArrayInput)(nil)).Elem(), ProductPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductPolicyMapInput)(nil)).Elem(), ProductPolicyMap{})
pulumi.RegisterOutputType(ProductPolicyOutput{})
pulumi.RegisterOutputType(ProductPolicyArrayOutput{})
pulumi.RegisterOutputType(ProductPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/policy.go | sdk/go/azure/apimanagement/policy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management service Policy.
//
// > **Note:** This resource will, upon creation, **overwrite any existing policy in the API Management service**, as there is no feasible way to test whether the policy has been modified from the default. Similarly, when this resource is destroyed, the API Management service will revert to its default policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewNamedValue(ctx, "example", &apimanagement.NamedValueArgs{
// Name: pulumi.String("example-apimg"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// DisplayName: pulumi.String("ExampleProperty"),
// Value: pulumi.String("Example Value"),
// })
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "example.xml",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewPolicy(ctx, "example", &apimanagement.PolicyArgs{
// ApiManagementId: exampleService.ID(),
// XmlContent: pulumi.String(invokeFile.Result),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2024-05-01, 2022-08-01
//
// ## Import
//
// API Management service Policys can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/policy:Policy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1
// ```
type Policy struct {
pulumi.CustomResourceState
// The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The XML Content for this Policy as a string. To integrate frontend and backend services in Azure API Management, utilize the [`set-backend-service`](https://learn.microsoft.com/azure/api-management/set-backend-service-policy) policy, specifying the `base-url` value. Typically, this value corresponds to the `url` property defined in the `Backend` resource configuration.
XmlContent pulumi.StringOutput `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrOutput `pulumi:"xmlLink"`
}
// NewPolicy registers a new resource with the given unique name, arguments, and options.
func NewPolicy(ctx *pulumi.Context,
name string, args *PolicyArgs, opts ...pulumi.ResourceOption) (*Policy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Policy
err := ctx.RegisterResource("azure:apimanagement/policy:Policy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPolicy gets an existing Policy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PolicyState, opts ...pulumi.ResourceOption) (*Policy, error) {
var resource Policy
err := ctx.ReadResource("azure:apimanagement/policy:Policy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Policy resources.
type policyState struct {
// The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The XML Content for this Policy as a string. To integrate frontend and backend services in Azure API Management, utilize the [`set-backend-service`](https://learn.microsoft.com/azure/api-management/set-backend-service-policy) policy, specifying the `base-url` value. Typically, this value corresponds to the `url` property defined in the `Backend` resource configuration.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
type PolicyState struct {
// The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
ApiManagementId pulumi.StringPtrInput
// The XML Content for this Policy as a string. To integrate frontend and backend services in Azure API Management, utilize the [`set-backend-service`](https://learn.microsoft.com/azure/api-management/set-backend-service-policy) policy, specifying the `base-url` value. Typically, this value corresponds to the `url` property defined in the `Backend` resource configuration.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (PolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*policyState)(nil)).Elem()
}
type policyArgs struct {
// The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The XML Content for this Policy as a string. To integrate frontend and backend services in Azure API Management, utilize the [`set-backend-service`](https://learn.microsoft.com/azure/api-management/set-backend-service-policy) policy, specifying the `base-url` value. Typically, this value corresponds to the `url` property defined in the `Backend` resource configuration.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
// The set of arguments for constructing a Policy resource.
type PolicyArgs struct {
// The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
ApiManagementId pulumi.StringInput
// The XML Content for this Policy as a string. To integrate frontend and backend services in Azure API Management, utilize the [`set-backend-service`](https://learn.microsoft.com/azure/api-management/set-backend-service-policy) policy, specifying the `base-url` value. Typically, this value corresponds to the `url` property defined in the `Backend` resource configuration.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (PolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*policyArgs)(nil)).Elem()
}
type PolicyInput interface {
pulumi.Input
ToPolicyOutput() PolicyOutput
ToPolicyOutputWithContext(ctx context.Context) PolicyOutput
}
func (*Policy) ElementType() reflect.Type {
return reflect.TypeOf((**Policy)(nil)).Elem()
}
func (i *Policy) ToPolicyOutput() PolicyOutput {
return i.ToPolicyOutputWithContext(context.Background())
}
func (i *Policy) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyOutput)
}
// PolicyArrayInput is an input type that accepts PolicyArray and PolicyArrayOutput values.
// You can construct a concrete instance of `PolicyArrayInput` via:
//
// PolicyArray{ PolicyArgs{...} }
type PolicyArrayInput interface {
pulumi.Input
ToPolicyArrayOutput() PolicyArrayOutput
ToPolicyArrayOutputWithContext(context.Context) PolicyArrayOutput
}
type PolicyArray []PolicyInput
func (PolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Policy)(nil)).Elem()
}
func (i PolicyArray) ToPolicyArrayOutput() PolicyArrayOutput {
return i.ToPolicyArrayOutputWithContext(context.Background())
}
func (i PolicyArray) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyArrayOutput)
}
// PolicyMapInput is an input type that accepts PolicyMap and PolicyMapOutput values.
// You can construct a concrete instance of `PolicyMapInput` via:
//
// PolicyMap{ "key": PolicyArgs{...} }
type PolicyMapInput interface {
pulumi.Input
ToPolicyMapOutput() PolicyMapOutput
ToPolicyMapOutputWithContext(context.Context) PolicyMapOutput
}
type PolicyMap map[string]PolicyInput
func (PolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Policy)(nil)).Elem()
}
func (i PolicyMap) ToPolicyMapOutput() PolicyMapOutput {
return i.ToPolicyMapOutputWithContext(context.Background())
}
func (i PolicyMap) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyMapOutput)
}
type PolicyOutput struct{ *pulumi.OutputState }
func (PolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Policy)(nil)).Elem()
}
func (o PolicyOutput) ToPolicyOutput() PolicyOutput {
return o
}
func (o PolicyOutput) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput {
return o
}
// The ID of the API Management service. Changing this forces a new API Management service Policy to be created.
func (o PolicyOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The XML Content for this Policy as a string. To integrate frontend and backend services in Azure API Management, utilize the [`set-backend-service`](https://learn.microsoft.com/azure/api-management/set-backend-service-policy) policy, specifying the `base-url` value. Typically, this value corresponds to the `url` property defined in the `Backend` resource configuration.
func (o PolicyOutput) XmlContent() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.XmlContent }).(pulumi.StringOutput)
}
// A link to a Policy XML Document, which must be publicly available.
func (o PolicyOutput) XmlLink() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Policy) pulumi.StringPtrOutput { return v.XmlLink }).(pulumi.StringPtrOutput)
}
type PolicyArrayOutput struct{ *pulumi.OutputState }
func (PolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Policy)(nil)).Elem()
}
func (o PolicyArrayOutput) ToPolicyArrayOutput() PolicyArrayOutput {
return o
}
func (o PolicyArrayOutput) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput {
return o
}
func (o PolicyArrayOutput) Index(i pulumi.IntInput) PolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Policy {
return vs[0].([]*Policy)[vs[1].(int)]
}).(PolicyOutput)
}
type PolicyMapOutput struct{ *pulumi.OutputState }
func (PolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Policy)(nil)).Elem()
}
func (o PolicyMapOutput) ToPolicyMapOutput() PolicyMapOutput {
return o
}
func (o PolicyMapOutput) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput {
return o
}
func (o PolicyMapOutput) MapIndex(k pulumi.StringInput) PolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Policy {
return vs[0].(map[string]*Policy)[vs[1].(string)]
}).(PolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PolicyInput)(nil)).Elem(), &Policy{})
pulumi.RegisterInputType(reflect.TypeOf((*PolicyArrayInput)(nil)).Elem(), PolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PolicyMapInput)(nil)).Elem(), PolicyMap{})
pulumi.RegisterOutputType(PolicyOutput{})
pulumi.RegisterOutputType(PolicyArrayOutput{})
pulumi.RegisterOutputType(PolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/identityProviderGoogle.go | sdk/go/azure/apimanagement/identityProviderGoogle.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Google Identity Provider.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@mycompany.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewIdentityProviderGoogle(ctx, "example", &apimanagement.IdentityProviderGoogleArgs{
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// ClientId: pulumi.String("00000000.apps.googleusercontent.com"),
// ClientSecret: pulumi.String("00000000000000000000000000000000"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Google Identity Provider can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/identityProviderGoogle:IdentityProviderGoogle example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/identityProviders/google
// ```
type IdentityProviderGoogle struct {
pulumi.CustomResourceState
// The Name of the API Management Service where this Google Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// Client Id for Google Sign-in.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// Client secret for Google Sign-in.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewIdentityProviderGoogle registers a new resource with the given unique name, arguments, and options.
func NewIdentityProviderGoogle(ctx *pulumi.Context,
name string, args *IdentityProviderGoogleArgs, opts ...pulumi.ResourceOption) (*IdentityProviderGoogle, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource IdentityProviderGoogle
err := ctx.RegisterResource("azure:apimanagement/identityProviderGoogle:IdentityProviderGoogle", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProviderGoogle gets an existing IdentityProviderGoogle resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIdentityProviderGoogle(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderGoogleState, opts ...pulumi.ResourceOption) (*IdentityProviderGoogle, error) {
var resource IdentityProviderGoogle
err := ctx.ReadResource("azure:apimanagement/identityProviderGoogle:IdentityProviderGoogle", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProviderGoogle resources.
type identityProviderGoogleState struct {
// The Name of the API Management Service where this Google Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// Client Id for Google Sign-in.
ClientId *string `pulumi:"clientId"`
// Client secret for Google Sign-in.
ClientSecret *string `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type IdentityProviderGoogleState struct {
// The Name of the API Management Service where this Google Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// Client Id for Google Sign-in.
ClientId pulumi.StringPtrInput
// Client secret for Google Sign-in.
ClientSecret pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (IdentityProviderGoogleState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderGoogleState)(nil)).Elem()
}
type identityProviderGoogleArgs struct {
// The Name of the API Management Service where this Google Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// Client Id for Google Sign-in.
ClientId string `pulumi:"clientId"`
// Client secret for Google Sign-in.
ClientSecret string `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a IdentityProviderGoogle resource.
type IdentityProviderGoogleArgs struct {
// The Name of the API Management Service where this Google Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// Client Id for Google Sign-in.
ClientId pulumi.StringInput
// Client secret for Google Sign-in.
ClientSecret pulumi.StringInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (IdentityProviderGoogleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderGoogleArgs)(nil)).Elem()
}
type IdentityProviderGoogleInput interface {
pulumi.Input
ToIdentityProviderGoogleOutput() IdentityProviderGoogleOutput
ToIdentityProviderGoogleOutputWithContext(ctx context.Context) IdentityProviderGoogleOutput
}
func (*IdentityProviderGoogle) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderGoogle)(nil)).Elem()
}
func (i *IdentityProviderGoogle) ToIdentityProviderGoogleOutput() IdentityProviderGoogleOutput {
return i.ToIdentityProviderGoogleOutputWithContext(context.Background())
}
func (i *IdentityProviderGoogle) ToIdentityProviderGoogleOutputWithContext(ctx context.Context) IdentityProviderGoogleOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderGoogleOutput)
}
// IdentityProviderGoogleArrayInput is an input type that accepts IdentityProviderGoogleArray and IdentityProviderGoogleArrayOutput values.
// You can construct a concrete instance of `IdentityProviderGoogleArrayInput` via:
//
// IdentityProviderGoogleArray{ IdentityProviderGoogleArgs{...} }
type IdentityProviderGoogleArrayInput interface {
pulumi.Input
ToIdentityProviderGoogleArrayOutput() IdentityProviderGoogleArrayOutput
ToIdentityProviderGoogleArrayOutputWithContext(context.Context) IdentityProviderGoogleArrayOutput
}
type IdentityProviderGoogleArray []IdentityProviderGoogleInput
func (IdentityProviderGoogleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderGoogle)(nil)).Elem()
}
func (i IdentityProviderGoogleArray) ToIdentityProviderGoogleArrayOutput() IdentityProviderGoogleArrayOutput {
return i.ToIdentityProviderGoogleArrayOutputWithContext(context.Background())
}
func (i IdentityProviderGoogleArray) ToIdentityProviderGoogleArrayOutputWithContext(ctx context.Context) IdentityProviderGoogleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderGoogleArrayOutput)
}
// IdentityProviderGoogleMapInput is an input type that accepts IdentityProviderGoogleMap and IdentityProviderGoogleMapOutput values.
// You can construct a concrete instance of `IdentityProviderGoogleMapInput` via:
//
// IdentityProviderGoogleMap{ "key": IdentityProviderGoogleArgs{...} }
type IdentityProviderGoogleMapInput interface {
pulumi.Input
ToIdentityProviderGoogleMapOutput() IdentityProviderGoogleMapOutput
ToIdentityProviderGoogleMapOutputWithContext(context.Context) IdentityProviderGoogleMapOutput
}
type IdentityProviderGoogleMap map[string]IdentityProviderGoogleInput
func (IdentityProviderGoogleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderGoogle)(nil)).Elem()
}
func (i IdentityProviderGoogleMap) ToIdentityProviderGoogleMapOutput() IdentityProviderGoogleMapOutput {
return i.ToIdentityProviderGoogleMapOutputWithContext(context.Background())
}
func (i IdentityProviderGoogleMap) ToIdentityProviderGoogleMapOutputWithContext(ctx context.Context) IdentityProviderGoogleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderGoogleMapOutput)
}
type IdentityProviderGoogleOutput struct{ *pulumi.OutputState }
func (IdentityProviderGoogleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderGoogle)(nil)).Elem()
}
func (o IdentityProviderGoogleOutput) ToIdentityProviderGoogleOutput() IdentityProviderGoogleOutput {
return o
}
func (o IdentityProviderGoogleOutput) ToIdentityProviderGoogleOutputWithContext(ctx context.Context) IdentityProviderGoogleOutput {
return o
}
// The Name of the API Management Service where this Google Identity Provider should be created. Changing this forces a new resource to be created.
func (o IdentityProviderGoogleOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderGoogle) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// Client Id for Google Sign-in.
func (o IdentityProviderGoogleOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderGoogle) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// Client secret for Google Sign-in.
func (o IdentityProviderGoogleOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderGoogle) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o IdentityProviderGoogleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderGoogle) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type IdentityProviderGoogleArrayOutput struct{ *pulumi.OutputState }
func (IdentityProviderGoogleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderGoogle)(nil)).Elem()
}
func (o IdentityProviderGoogleArrayOutput) ToIdentityProviderGoogleArrayOutput() IdentityProviderGoogleArrayOutput {
return o
}
func (o IdentityProviderGoogleArrayOutput) ToIdentityProviderGoogleArrayOutputWithContext(ctx context.Context) IdentityProviderGoogleArrayOutput {
return o
}
func (o IdentityProviderGoogleArrayOutput) Index(i pulumi.IntInput) IdentityProviderGoogleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IdentityProviderGoogle {
return vs[0].([]*IdentityProviderGoogle)[vs[1].(int)]
}).(IdentityProviderGoogleOutput)
}
type IdentityProviderGoogleMapOutput struct{ *pulumi.OutputState }
func (IdentityProviderGoogleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderGoogle)(nil)).Elem()
}
func (o IdentityProviderGoogleMapOutput) ToIdentityProviderGoogleMapOutput() IdentityProviderGoogleMapOutput {
return o
}
func (o IdentityProviderGoogleMapOutput) ToIdentityProviderGoogleMapOutputWithContext(ctx context.Context) IdentityProviderGoogleMapOutput {
return o
}
func (o IdentityProviderGoogleMapOutput) MapIndex(k pulumi.StringInput) IdentityProviderGoogleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IdentityProviderGoogle {
return vs[0].(map[string]*IdentityProviderGoogle)[vs[1].(string)]
}).(IdentityProviderGoogleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderGoogleInput)(nil)).Elem(), &IdentityProviderGoogle{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderGoogleArrayInput)(nil)).Elem(), IdentityProviderGoogleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderGoogleMapInput)(nil)).Elem(), IdentityProviderGoogleMap{})
pulumi.RegisterOutputType(IdentityProviderGoogleOutput{})
pulumi.RegisterOutputType(IdentityProviderGoogleArrayOutput{})
pulumi.RegisterOutputType(IdentityProviderGoogleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/init.go | sdk/go/azure/apimanagement/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 apimanagement
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:apimanagement/api:Api":
r = &Api{}
case "azure:apimanagement/apiDiagnostic:ApiDiagnostic":
r = &ApiDiagnostic{}
case "azure:apimanagement/apiOperation:ApiOperation":
r = &ApiOperation{}
case "azure:apimanagement/apiOperationPolicy:ApiOperationPolicy":
r = &ApiOperationPolicy{}
case "azure:apimanagement/apiOperationTag:ApiOperationTag":
r = &ApiOperationTag{}
case "azure:apimanagement/apiPolicy:ApiPolicy":
r = &ApiPolicy{}
case "azure:apimanagement/apiRelease:ApiRelease":
r = &ApiRelease{}
case "azure:apimanagement/apiSchema:ApiSchema":
r = &ApiSchema{}
case "azure:apimanagement/apiTag:ApiTag":
r = &ApiTag{}
case "azure:apimanagement/apiTagDescription:ApiTagDescription":
r = &ApiTagDescription{}
case "azure:apimanagement/apiVersionSet:ApiVersionSet":
r = &ApiVersionSet{}
case "azure:apimanagement/authorizationServer:AuthorizationServer":
r = &AuthorizationServer{}
case "azure:apimanagement/backend:Backend":
r = &Backend{}
case "azure:apimanagement/certificate:Certificate":
r = &Certificate{}
case "azure:apimanagement/customDomain:CustomDomain":
r = &CustomDomain{}
case "azure:apimanagement/diagnostic:Diagnostic":
r = &Diagnostic{}
case "azure:apimanagement/emailTemplate:EmailTemplate":
r = &EmailTemplate{}
case "azure:apimanagement/gateway:Gateway":
r = &Gateway{}
case "azure:apimanagement/gatewayApi:GatewayApi":
r = &GatewayApi{}
case "azure:apimanagement/gatewayCertificateAuthority:GatewayCertificateAuthority":
r = &GatewayCertificateAuthority{}
case "azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration":
r = &GatewayHostNameConfiguration{}
case "azure:apimanagement/globalSchema:GlobalSchema":
r = &GlobalSchema{}
case "azure:apimanagement/group:Group":
r = &Group{}
case "azure:apimanagement/groupUser:GroupUser":
r = &GroupUser{}
case "azure:apimanagement/identityProviderAad:IdentityProviderAad":
r = &IdentityProviderAad{}
case "azure:apimanagement/identityProviderAadb2c:IdentityProviderAadb2c":
r = &IdentityProviderAadb2c{}
case "azure:apimanagement/identityProviderFacebook:IdentityProviderFacebook":
r = &IdentityProviderFacebook{}
case "azure:apimanagement/identityProviderGoogle:IdentityProviderGoogle":
r = &IdentityProviderGoogle{}
case "azure:apimanagement/identityProviderMicrosoft:IdentityProviderMicrosoft":
r = &IdentityProviderMicrosoft{}
case "azure:apimanagement/identityProviderTwitter:IdentityProviderTwitter":
r = &IdentityProviderTwitter{}
case "azure:apimanagement/logger:Logger":
r = &Logger{}
case "azure:apimanagement/namedValue:NamedValue":
r = &NamedValue{}
case "azure:apimanagement/notificationRecipientEmail:NotificationRecipientEmail":
r = &NotificationRecipientEmail{}
case "azure:apimanagement/notificationRecipientUser:NotificationRecipientUser":
r = &NotificationRecipientUser{}
case "azure:apimanagement/openIdConnectProvider:OpenIdConnectProvider":
r = &OpenIdConnectProvider{}
case "azure:apimanagement/policy:Policy":
r = &Policy{}
case "azure:apimanagement/policyFragment:PolicyFragment":
r = &PolicyFragment{}
case "azure:apimanagement/product:Product":
r = &Product{}
case "azure:apimanagement/productApi:ProductApi":
r = &ProductApi{}
case "azure:apimanagement/productGroup:ProductGroup":
r = &ProductGroup{}
case "azure:apimanagement/productPolicy:ProductPolicy":
r = &ProductPolicy{}
case "azure:apimanagement/productTag:ProductTag":
r = &ProductTag{}
case "azure:apimanagement/redisCache:RedisCache":
r = &RedisCache{}
case "azure:apimanagement/service:Service":
r = &Service{}
case "azure:apimanagement/standaloneGateway:StandaloneGateway":
r = &StandaloneGateway{}
case "azure:apimanagement/subscription:Subscription":
r = &Subscription{}
case "azure:apimanagement/tag:Tag":
r = &Tag{}
case "azure:apimanagement/user:User":
r = &User{}
case "azure:apimanagement/workspace:Workspace":
r = &Workspace{}
case "azure:apimanagement/workspaceApiVersionSet:WorkspaceApiVersionSet":
r = &WorkspaceApiVersionSet{}
case "azure:apimanagement/workspaceCertificate:WorkspaceCertificate":
r = &WorkspaceCertificate{}
case "azure:apimanagement/workspacePolicy:WorkspacePolicy":
r = &WorkspacePolicy{}
case "azure:apimanagement/workspacePolicyFragment:WorkspacePolicyFragment":
r = &WorkspacePolicyFragment{}
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",
"apimanagement/api",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiDiagnostic",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiOperation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiOperationPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiOperationTag",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiRelease",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiSchema",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiTag",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiTagDescription",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/apiVersionSet",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/authorizationServer",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/backend",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/certificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/customDomain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/diagnostic",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/emailTemplate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/gateway",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/gatewayApi",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/gatewayCertificateAuthority",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/gatewayHostNameConfiguration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/globalSchema",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/group",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/groupUser",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/identityProviderAad",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/identityProviderAadb2c",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/identityProviderFacebook",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/identityProviderGoogle",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/identityProviderMicrosoft",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/identityProviderTwitter",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/logger",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/namedValue",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/notificationRecipientEmail",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/notificationRecipientUser",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/openIdConnectProvider",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/policy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/policyFragment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/product",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/productApi",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/productGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/productPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/productTag",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/redisCache",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/service",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/standaloneGateway",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/subscription",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/tag",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/user",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/workspace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/workspaceApiVersionSet",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/workspaceCertificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/workspacePolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"apimanagement/workspacePolicyFragment",
&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/apimanagement/apiOperation.go | sdk/go/azure/apimanagement/apiOperation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Operation within an API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupApi(ctx, &apimanagement.LookupApiArgs{
// Name: "search-api",
// ApiManagementName: "search-api-management",
// ResourceGroupName: "search-service",
// Revision: "2",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApiOperation(ctx, "example", &apimanagement.ApiOperationArgs{
// OperationId: pulumi.String("user-delete"),
// ApiName: pulumi.String(example.Name),
// ApiManagementName: pulumi.String(example.ApiManagementName),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// DisplayName: pulumi.String("Delete User Operation"),
// Method: pulumi.String("DELETE"),
// UrlTemplate: pulumi.String("/users/{id}/delete"),
// Description: pulumi.String("This can only be done by the logged in user."),
// TemplateParameters: apimanagement.ApiOperationTemplateParameterArray{
// &apimanagement.ApiOperationTemplateParameterArgs{
// Name: pulumi.String("id"),
// Type: pulumi.String("number"),
// Required: pulumi.Bool(true),
// },
// },
// Responses: apimanagement.ApiOperationResponseArray{
// &apimanagement.ApiOperationResponseArgs{
// StatusCode: pulumi.Int(200),
// },
// },
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management API Operation's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/apiOperation:ApiOperation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/operations/operation1
// ```
type ApiOperation struct {
pulumi.CustomResourceState
// The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The name of the API within the API Management Service where this API Operation should be created. Changing this forces a new resource to be created.
ApiName pulumi.StringOutput `pulumi:"apiName"`
// A description for this API Operation, which may include HTML formatting tags.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The Display Name for this API Management Operation.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The HTTP Method used for this API Management Operation, like `GET`, `DELETE`, `PUT` or `POST` - but not limited to these values.
Method pulumi.StringOutput `pulumi:"method"`
// A unique identifier for this API Operation. Changing this forces a new resource to be created.
OperationId pulumi.StringOutput `pulumi:"operationId"`
// A `request` block as defined below.
Request ApiOperationRequestOutput `pulumi:"request"`
// The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// One or more `response` blocks as defined below.
Responses ApiOperationResponseArrayOutput `pulumi:"responses"`
// One or more `templateParameter` blocks as defined below. Required if `urlTemplate` contains one or more parameters.
TemplateParameters ApiOperationTemplateParameterArrayOutput `pulumi:"templateParameters"`
// The relative URL Template identifying the target resource for this operation, which may include parameters.
UrlTemplate pulumi.StringOutput `pulumi:"urlTemplate"`
}
// NewApiOperation registers a new resource with the given unique name, arguments, and options.
func NewApiOperation(ctx *pulumi.Context,
name string, args *ApiOperationArgs, opts ...pulumi.ResourceOption) (*ApiOperation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ApiName == nil {
return nil, errors.New("invalid value for required argument 'ApiName'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.Method == nil {
return nil, errors.New("invalid value for required argument 'Method'")
}
if args.OperationId == nil {
return nil, errors.New("invalid value for required argument 'OperationId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.UrlTemplate == nil {
return nil, errors.New("invalid value for required argument 'UrlTemplate'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiOperation
err := ctx.RegisterResource("azure:apimanagement/apiOperation:ApiOperation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiOperation gets an existing ApiOperation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiOperation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiOperationState, opts ...pulumi.ResourceOption) (*ApiOperation, error) {
var resource ApiOperation
err := ctx.ReadResource("azure:apimanagement/apiOperation:ApiOperation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiOperation resources.
type apiOperationState struct {
// The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The name of the API within the API Management Service where this API Operation should be created. Changing this forces a new resource to be created.
ApiName *string `pulumi:"apiName"`
// A description for this API Operation, which may include HTML formatting tags.
Description *string `pulumi:"description"`
// The Display Name for this API Management Operation.
DisplayName *string `pulumi:"displayName"`
// The HTTP Method used for this API Management Operation, like `GET`, `DELETE`, `PUT` or `POST` - but not limited to these values.
Method *string `pulumi:"method"`
// A unique identifier for this API Operation. Changing this forces a new resource to be created.
OperationId *string `pulumi:"operationId"`
// A `request` block as defined below.
Request *ApiOperationRequest `pulumi:"request"`
// The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// One or more `response` blocks as defined below.
Responses []ApiOperationResponse `pulumi:"responses"`
// One or more `templateParameter` blocks as defined below. Required if `urlTemplate` contains one or more parameters.
TemplateParameters []ApiOperationTemplateParameter `pulumi:"templateParameters"`
// The relative URL Template identifying the target resource for this operation, which may include parameters.
UrlTemplate *string `pulumi:"urlTemplate"`
}
type ApiOperationState struct {
// The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The name of the API within the API Management Service where this API Operation should be created. Changing this forces a new resource to be created.
ApiName pulumi.StringPtrInput
// A description for this API Operation, which may include HTML formatting tags.
Description pulumi.StringPtrInput
// The Display Name for this API Management Operation.
DisplayName pulumi.StringPtrInput
// The HTTP Method used for this API Management Operation, like `GET`, `DELETE`, `PUT` or `POST` - but not limited to these values.
Method pulumi.StringPtrInput
// A unique identifier for this API Operation. Changing this forces a new resource to be created.
OperationId pulumi.StringPtrInput
// A `request` block as defined below.
Request ApiOperationRequestPtrInput
// The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// One or more `response` blocks as defined below.
Responses ApiOperationResponseArrayInput
// One or more `templateParameter` blocks as defined below. Required if `urlTemplate` contains one or more parameters.
TemplateParameters ApiOperationTemplateParameterArrayInput
// The relative URL Template identifying the target resource for this operation, which may include parameters.
UrlTemplate pulumi.StringPtrInput
}
func (ApiOperationState) ElementType() reflect.Type {
return reflect.TypeOf((*apiOperationState)(nil)).Elem()
}
type apiOperationArgs struct {
// The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The name of the API within the API Management Service where this API Operation should be created. Changing this forces a new resource to be created.
ApiName string `pulumi:"apiName"`
// A description for this API Operation, which may include HTML formatting tags.
Description *string `pulumi:"description"`
// The Display Name for this API Management Operation.
DisplayName string `pulumi:"displayName"`
// The HTTP Method used for this API Management Operation, like `GET`, `DELETE`, `PUT` or `POST` - but not limited to these values.
Method string `pulumi:"method"`
// A unique identifier for this API Operation. Changing this forces a new resource to be created.
OperationId string `pulumi:"operationId"`
// A `request` block as defined below.
Request *ApiOperationRequest `pulumi:"request"`
// The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// One or more `response` blocks as defined below.
Responses []ApiOperationResponse `pulumi:"responses"`
// One or more `templateParameter` blocks as defined below. Required if `urlTemplate` contains one or more parameters.
TemplateParameters []ApiOperationTemplateParameter `pulumi:"templateParameters"`
// The relative URL Template identifying the target resource for this operation, which may include parameters.
UrlTemplate string `pulumi:"urlTemplate"`
}
// The set of arguments for constructing a ApiOperation resource.
type ApiOperationArgs struct {
// The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The name of the API within the API Management Service where this API Operation should be created. Changing this forces a new resource to be created.
ApiName pulumi.StringInput
// A description for this API Operation, which may include HTML formatting tags.
Description pulumi.StringPtrInput
// The Display Name for this API Management Operation.
DisplayName pulumi.StringInput
// The HTTP Method used for this API Management Operation, like `GET`, `DELETE`, `PUT` or `POST` - but not limited to these values.
Method pulumi.StringInput
// A unique identifier for this API Operation. Changing this forces a new resource to be created.
OperationId pulumi.StringInput
// A `request` block as defined below.
Request ApiOperationRequestPtrInput
// The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// One or more `response` blocks as defined below.
Responses ApiOperationResponseArrayInput
// One or more `templateParameter` blocks as defined below. Required if `urlTemplate` contains one or more parameters.
TemplateParameters ApiOperationTemplateParameterArrayInput
// The relative URL Template identifying the target resource for this operation, which may include parameters.
UrlTemplate pulumi.StringInput
}
func (ApiOperationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiOperationArgs)(nil)).Elem()
}
type ApiOperationInput interface {
pulumi.Input
ToApiOperationOutput() ApiOperationOutput
ToApiOperationOutputWithContext(ctx context.Context) ApiOperationOutput
}
func (*ApiOperation) ElementType() reflect.Type {
return reflect.TypeOf((**ApiOperation)(nil)).Elem()
}
func (i *ApiOperation) ToApiOperationOutput() ApiOperationOutput {
return i.ToApiOperationOutputWithContext(context.Background())
}
func (i *ApiOperation) ToApiOperationOutputWithContext(ctx context.Context) ApiOperationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiOperationOutput)
}
// ApiOperationArrayInput is an input type that accepts ApiOperationArray and ApiOperationArrayOutput values.
// You can construct a concrete instance of `ApiOperationArrayInput` via:
//
// ApiOperationArray{ ApiOperationArgs{...} }
type ApiOperationArrayInput interface {
pulumi.Input
ToApiOperationArrayOutput() ApiOperationArrayOutput
ToApiOperationArrayOutputWithContext(context.Context) ApiOperationArrayOutput
}
type ApiOperationArray []ApiOperationInput
func (ApiOperationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiOperation)(nil)).Elem()
}
func (i ApiOperationArray) ToApiOperationArrayOutput() ApiOperationArrayOutput {
return i.ToApiOperationArrayOutputWithContext(context.Background())
}
func (i ApiOperationArray) ToApiOperationArrayOutputWithContext(ctx context.Context) ApiOperationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiOperationArrayOutput)
}
// ApiOperationMapInput is an input type that accepts ApiOperationMap and ApiOperationMapOutput values.
// You can construct a concrete instance of `ApiOperationMapInput` via:
//
// ApiOperationMap{ "key": ApiOperationArgs{...} }
type ApiOperationMapInput interface {
pulumi.Input
ToApiOperationMapOutput() ApiOperationMapOutput
ToApiOperationMapOutputWithContext(context.Context) ApiOperationMapOutput
}
type ApiOperationMap map[string]ApiOperationInput
func (ApiOperationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiOperation)(nil)).Elem()
}
func (i ApiOperationMap) ToApiOperationMapOutput() ApiOperationMapOutput {
return i.ToApiOperationMapOutputWithContext(context.Background())
}
func (i ApiOperationMap) ToApiOperationMapOutputWithContext(ctx context.Context) ApiOperationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiOperationMapOutput)
}
type ApiOperationOutput struct{ *pulumi.OutputState }
func (ApiOperationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiOperation)(nil)).Elem()
}
func (o ApiOperationOutput) ToApiOperationOutput() ApiOperationOutput {
return o
}
func (o ApiOperationOutput) ToApiOperationOutputWithContext(ctx context.Context) ApiOperationOutput {
return o
}
// The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
func (o ApiOperationOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The name of the API within the API Management Service where this API Operation should be created. Changing this forces a new resource to be created.
func (o ApiOperationOutput) ApiName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringOutput { return v.ApiName }).(pulumi.StringOutput)
}
// A description for this API Operation, which may include HTML formatting tags.
func (o ApiOperationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The Display Name for this API Management Operation.
func (o ApiOperationOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The HTTP Method used for this API Management Operation, like `GET`, `DELETE`, `PUT` or `POST` - but not limited to these values.
func (o ApiOperationOutput) Method() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringOutput { return v.Method }).(pulumi.StringOutput)
}
// A unique identifier for this API Operation. Changing this forces a new resource to be created.
func (o ApiOperationOutput) OperationId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringOutput { return v.OperationId }).(pulumi.StringOutput)
}
// A `request` block as defined below.
func (o ApiOperationOutput) Request() ApiOperationRequestOutput {
return o.ApplyT(func(v *ApiOperation) ApiOperationRequestOutput { return v.Request }).(ApiOperationRequestOutput)
}
// The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o ApiOperationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// One or more `response` blocks as defined below.
func (o ApiOperationOutput) Responses() ApiOperationResponseArrayOutput {
return o.ApplyT(func(v *ApiOperation) ApiOperationResponseArrayOutput { return v.Responses }).(ApiOperationResponseArrayOutput)
}
// One or more `templateParameter` blocks as defined below. Required if `urlTemplate` contains one or more parameters.
func (o ApiOperationOutput) TemplateParameters() ApiOperationTemplateParameterArrayOutput {
return o.ApplyT(func(v *ApiOperation) ApiOperationTemplateParameterArrayOutput { return v.TemplateParameters }).(ApiOperationTemplateParameterArrayOutput)
}
// The relative URL Template identifying the target resource for this operation, which may include parameters.
func (o ApiOperationOutput) UrlTemplate() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperation) pulumi.StringOutput { return v.UrlTemplate }).(pulumi.StringOutput)
}
type ApiOperationArrayOutput struct{ *pulumi.OutputState }
func (ApiOperationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiOperation)(nil)).Elem()
}
func (o ApiOperationArrayOutput) ToApiOperationArrayOutput() ApiOperationArrayOutput {
return o
}
func (o ApiOperationArrayOutput) ToApiOperationArrayOutputWithContext(ctx context.Context) ApiOperationArrayOutput {
return o
}
func (o ApiOperationArrayOutput) Index(i pulumi.IntInput) ApiOperationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiOperation {
return vs[0].([]*ApiOperation)[vs[1].(int)]
}).(ApiOperationOutput)
}
type ApiOperationMapOutput struct{ *pulumi.OutputState }
func (ApiOperationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiOperation)(nil)).Elem()
}
func (o ApiOperationMapOutput) ToApiOperationMapOutput() ApiOperationMapOutput {
return o
}
func (o ApiOperationMapOutput) ToApiOperationMapOutputWithContext(ctx context.Context) ApiOperationMapOutput {
return o
}
func (o ApiOperationMapOutput) MapIndex(k pulumi.StringInput) ApiOperationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiOperation {
return vs[0].(map[string]*ApiOperation)[vs[1].(string)]
}).(ApiOperationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiOperationInput)(nil)).Elem(), &ApiOperation{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiOperationArrayInput)(nil)).Elem(), ApiOperationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiOperationMapInput)(nil)).Elem(), ApiOperationMap{})
pulumi.RegisterOutputType(ApiOperationOutput{})
pulumi.RegisterOutputType(ApiOperationArrayOutput{})
pulumi.RegisterOutputType(ApiOperationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/gatewayHostNameConfiguration.go | sdk/go/azure/apimanagement/gatewayHostNameConfiguration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Gateway Host Name Configuration.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Consumption_0"),
// })
// if err != nil {
// return err
// }
// exampleGateway, err := apimanagement.NewGateway(ctx, "example", &apimanagement.GatewayArgs{
// Name: pulumi.String("example-gateway"),
// ApiManagementId: exampleService.ID(),
// Description: pulumi.String("Example API Management gateway"),
// LocationData: &apimanagement.GatewayLocationDataArgs{
// Name: pulumi.String("example name"),
// City: pulumi.String("example city"),
// District: pulumi.String("example district"),
// Region: pulumi.String("example region"),
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "example.pfx",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := apimanagement.NewCertificate(ctx, "example", &apimanagement.CertificateArgs{
// Name: pulumi.String("example-cert"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// Data: pulumi.String(invokeFilebase64.Result),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewGatewayHostNameConfiguration(ctx, "example", &apimanagement.GatewayHostNameConfigurationArgs{
// Name: pulumi.String("example-host-name-configuration"),
// ApiManagementId: exampleService.ID(),
// GatewayName: exampleGateway.Name,
// CertificateId: exampleCertificate.ID(),
// HostName: pulumi.String("example-host-name"),
// RequestClientCertificateEnabled: pulumi.Bool(true),
// Http2Enabled: pulumi.Bool(true),
// Tls10Enabled: pulumi.Bool(true),
// Tls11Enabled: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Gateway Host Name Configuration can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/gateways/gateway1/hostnameConfigurations/hc1
// ```
type GatewayHostNameConfiguration struct {
pulumi.CustomResourceState
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The certificate ID to be used for TLS connection establishment.
CertificateId pulumi.StringOutput `pulumi:"certificateId"`
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName pulumi.StringOutput `pulumi:"gatewayName"`
// The host name to use for the API Management Gateway Host Name Configuration.
HostName pulumi.StringOutput `pulumi:"hostName"`
// Whether HTTP/2.0 is supported. Defaults to `true`.
Http2Enabled pulumi.BoolPtrOutput `pulumi:"http2Enabled"`
// The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether the API Management Gateway requests a client certificate.
RequestClientCertificateEnabled pulumi.BoolPtrOutput `pulumi:"requestClientCertificateEnabled"`
// Whether TLS 1.0 is supported.
Tls10Enabled pulumi.BoolPtrOutput `pulumi:"tls10Enabled"`
// Whether TLS 1.1 is supported.
Tls11Enabled pulumi.BoolPtrOutput `pulumi:"tls11Enabled"`
}
// NewGatewayHostNameConfiguration registers a new resource with the given unique name, arguments, and options.
func NewGatewayHostNameConfiguration(ctx *pulumi.Context,
name string, args *GatewayHostNameConfigurationArgs, opts ...pulumi.ResourceOption) (*GatewayHostNameConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
if args.CertificateId == nil {
return nil, errors.New("invalid value for required argument 'CertificateId'")
}
if args.GatewayName == nil {
return nil, errors.New("invalid value for required argument 'GatewayName'")
}
if args.HostName == nil {
return nil, errors.New("invalid value for required argument 'HostName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GatewayHostNameConfiguration
err := ctx.RegisterResource("azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGatewayHostNameConfiguration gets an existing GatewayHostNameConfiguration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGatewayHostNameConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GatewayHostNameConfigurationState, opts ...pulumi.ResourceOption) (*GatewayHostNameConfiguration, error) {
var resource GatewayHostNameConfiguration
err := ctx.ReadResource("azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GatewayHostNameConfiguration resources.
type gatewayHostNameConfigurationState struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The certificate ID to be used for TLS connection establishment.
CertificateId *string `pulumi:"certificateId"`
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName *string `pulumi:"gatewayName"`
// The host name to use for the API Management Gateway Host Name Configuration.
HostName *string `pulumi:"hostName"`
// Whether HTTP/2.0 is supported. Defaults to `true`.
Http2Enabled *bool `pulumi:"http2Enabled"`
// The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether the API Management Gateway requests a client certificate.
RequestClientCertificateEnabled *bool `pulumi:"requestClientCertificateEnabled"`
// Whether TLS 1.0 is supported.
Tls10Enabled *bool `pulumi:"tls10Enabled"`
// Whether TLS 1.1 is supported.
Tls11Enabled *bool `pulumi:"tls11Enabled"`
}
type GatewayHostNameConfigurationState struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId pulumi.StringPtrInput
// The certificate ID to be used for TLS connection establishment.
CertificateId pulumi.StringPtrInput
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName pulumi.StringPtrInput
// The host name to use for the API Management Gateway Host Name Configuration.
HostName pulumi.StringPtrInput
// Whether HTTP/2.0 is supported. Defaults to `true`.
Http2Enabled pulumi.BoolPtrInput
// The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether the API Management Gateway requests a client certificate.
RequestClientCertificateEnabled pulumi.BoolPtrInput
// Whether TLS 1.0 is supported.
Tls10Enabled pulumi.BoolPtrInput
// Whether TLS 1.1 is supported.
Tls11Enabled pulumi.BoolPtrInput
}
func (GatewayHostNameConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*gatewayHostNameConfigurationState)(nil)).Elem()
}
type gatewayHostNameConfigurationArgs struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The certificate ID to be used for TLS connection establishment.
CertificateId string `pulumi:"certificateId"`
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName string `pulumi:"gatewayName"`
// The host name to use for the API Management Gateway Host Name Configuration.
HostName string `pulumi:"hostName"`
// Whether HTTP/2.0 is supported. Defaults to `true`.
Http2Enabled *bool `pulumi:"http2Enabled"`
// The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether the API Management Gateway requests a client certificate.
RequestClientCertificateEnabled *bool `pulumi:"requestClientCertificateEnabled"`
// Whether TLS 1.0 is supported.
Tls10Enabled *bool `pulumi:"tls10Enabled"`
// Whether TLS 1.1 is supported.
Tls11Enabled *bool `pulumi:"tls11Enabled"`
}
// The set of arguments for constructing a GatewayHostNameConfiguration resource.
type GatewayHostNameConfigurationArgs struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId pulumi.StringInput
// The certificate ID to be used for TLS connection establishment.
CertificateId pulumi.StringInput
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName pulumi.StringInput
// The host name to use for the API Management Gateway Host Name Configuration.
HostName pulumi.StringInput
// Whether HTTP/2.0 is supported. Defaults to `true`.
Http2Enabled pulumi.BoolPtrInput
// The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether the API Management Gateway requests a client certificate.
RequestClientCertificateEnabled pulumi.BoolPtrInput
// Whether TLS 1.0 is supported.
Tls10Enabled pulumi.BoolPtrInput
// Whether TLS 1.1 is supported.
Tls11Enabled pulumi.BoolPtrInput
}
func (GatewayHostNameConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*gatewayHostNameConfigurationArgs)(nil)).Elem()
}
type GatewayHostNameConfigurationInput interface {
pulumi.Input
ToGatewayHostNameConfigurationOutput() GatewayHostNameConfigurationOutput
ToGatewayHostNameConfigurationOutputWithContext(ctx context.Context) GatewayHostNameConfigurationOutput
}
func (*GatewayHostNameConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**GatewayHostNameConfiguration)(nil)).Elem()
}
func (i *GatewayHostNameConfiguration) ToGatewayHostNameConfigurationOutput() GatewayHostNameConfigurationOutput {
return i.ToGatewayHostNameConfigurationOutputWithContext(context.Background())
}
func (i *GatewayHostNameConfiguration) ToGatewayHostNameConfigurationOutputWithContext(ctx context.Context) GatewayHostNameConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayHostNameConfigurationOutput)
}
// GatewayHostNameConfigurationArrayInput is an input type that accepts GatewayHostNameConfigurationArray and GatewayHostNameConfigurationArrayOutput values.
// You can construct a concrete instance of `GatewayHostNameConfigurationArrayInput` via:
//
// GatewayHostNameConfigurationArray{ GatewayHostNameConfigurationArgs{...} }
type GatewayHostNameConfigurationArrayInput interface {
pulumi.Input
ToGatewayHostNameConfigurationArrayOutput() GatewayHostNameConfigurationArrayOutput
ToGatewayHostNameConfigurationArrayOutputWithContext(context.Context) GatewayHostNameConfigurationArrayOutput
}
type GatewayHostNameConfigurationArray []GatewayHostNameConfigurationInput
func (GatewayHostNameConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GatewayHostNameConfiguration)(nil)).Elem()
}
func (i GatewayHostNameConfigurationArray) ToGatewayHostNameConfigurationArrayOutput() GatewayHostNameConfigurationArrayOutput {
return i.ToGatewayHostNameConfigurationArrayOutputWithContext(context.Background())
}
func (i GatewayHostNameConfigurationArray) ToGatewayHostNameConfigurationArrayOutputWithContext(ctx context.Context) GatewayHostNameConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayHostNameConfigurationArrayOutput)
}
// GatewayHostNameConfigurationMapInput is an input type that accepts GatewayHostNameConfigurationMap and GatewayHostNameConfigurationMapOutput values.
// You can construct a concrete instance of `GatewayHostNameConfigurationMapInput` via:
//
// GatewayHostNameConfigurationMap{ "key": GatewayHostNameConfigurationArgs{...} }
type GatewayHostNameConfigurationMapInput interface {
pulumi.Input
ToGatewayHostNameConfigurationMapOutput() GatewayHostNameConfigurationMapOutput
ToGatewayHostNameConfigurationMapOutputWithContext(context.Context) GatewayHostNameConfigurationMapOutput
}
type GatewayHostNameConfigurationMap map[string]GatewayHostNameConfigurationInput
func (GatewayHostNameConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GatewayHostNameConfiguration)(nil)).Elem()
}
func (i GatewayHostNameConfigurationMap) ToGatewayHostNameConfigurationMapOutput() GatewayHostNameConfigurationMapOutput {
return i.ToGatewayHostNameConfigurationMapOutputWithContext(context.Background())
}
func (i GatewayHostNameConfigurationMap) ToGatewayHostNameConfigurationMapOutputWithContext(ctx context.Context) GatewayHostNameConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayHostNameConfigurationMapOutput)
}
type GatewayHostNameConfigurationOutput struct{ *pulumi.OutputState }
func (GatewayHostNameConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GatewayHostNameConfiguration)(nil)).Elem()
}
func (o GatewayHostNameConfigurationOutput) ToGatewayHostNameConfigurationOutput() GatewayHostNameConfigurationOutput {
return o
}
func (o GatewayHostNameConfigurationOutput) ToGatewayHostNameConfigurationOutputWithContext(ctx context.Context) GatewayHostNameConfigurationOutput {
return o
}
// The ID of the API Management Service. Changing this forces a new resource to be created.
func (o GatewayHostNameConfigurationOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The certificate ID to be used for TLS connection establishment.
func (o GatewayHostNameConfigurationOutput) CertificateId() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.StringOutput { return v.CertificateId }).(pulumi.StringOutput)
}
// The name of the API Management Gateway. Changing this forces a new resource to be created.
func (o GatewayHostNameConfigurationOutput) GatewayName() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.StringOutput { return v.GatewayName }).(pulumi.StringOutput)
}
// The host name to use for the API Management Gateway Host Name Configuration.
func (o GatewayHostNameConfigurationOutput) HostName() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.StringOutput { return v.HostName }).(pulumi.StringOutput)
}
// Whether HTTP/2.0 is supported. Defaults to `true`.
func (o GatewayHostNameConfigurationOutput) Http2Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.BoolPtrOutput { return v.Http2Enabled }).(pulumi.BoolPtrOutput)
}
// The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
func (o GatewayHostNameConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether the API Management Gateway requests a client certificate.
func (o GatewayHostNameConfigurationOutput) RequestClientCertificateEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.BoolPtrOutput { return v.RequestClientCertificateEnabled }).(pulumi.BoolPtrOutput)
}
// Whether TLS 1.0 is supported.
func (o GatewayHostNameConfigurationOutput) Tls10Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.BoolPtrOutput { return v.Tls10Enabled }).(pulumi.BoolPtrOutput)
}
// Whether TLS 1.1 is supported.
func (o GatewayHostNameConfigurationOutput) Tls11Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GatewayHostNameConfiguration) pulumi.BoolPtrOutput { return v.Tls11Enabled }).(pulumi.BoolPtrOutput)
}
type GatewayHostNameConfigurationArrayOutput struct{ *pulumi.OutputState }
func (GatewayHostNameConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GatewayHostNameConfiguration)(nil)).Elem()
}
func (o GatewayHostNameConfigurationArrayOutput) ToGatewayHostNameConfigurationArrayOutput() GatewayHostNameConfigurationArrayOutput {
return o
}
func (o GatewayHostNameConfigurationArrayOutput) ToGatewayHostNameConfigurationArrayOutputWithContext(ctx context.Context) GatewayHostNameConfigurationArrayOutput {
return o
}
func (o GatewayHostNameConfigurationArrayOutput) Index(i pulumi.IntInput) GatewayHostNameConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GatewayHostNameConfiguration {
return vs[0].([]*GatewayHostNameConfiguration)[vs[1].(int)]
}).(GatewayHostNameConfigurationOutput)
}
type GatewayHostNameConfigurationMapOutput struct{ *pulumi.OutputState }
func (GatewayHostNameConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GatewayHostNameConfiguration)(nil)).Elem()
}
func (o GatewayHostNameConfigurationMapOutput) ToGatewayHostNameConfigurationMapOutput() GatewayHostNameConfigurationMapOutput {
return o
}
func (o GatewayHostNameConfigurationMapOutput) ToGatewayHostNameConfigurationMapOutputWithContext(ctx context.Context) GatewayHostNameConfigurationMapOutput {
return o
}
func (o GatewayHostNameConfigurationMapOutput) MapIndex(k pulumi.StringInput) GatewayHostNameConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GatewayHostNameConfiguration {
return vs[0].(map[string]*GatewayHostNameConfiguration)[vs[1].(string)]
}).(GatewayHostNameConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GatewayHostNameConfigurationInput)(nil)).Elem(), &GatewayHostNameConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*GatewayHostNameConfigurationArrayInput)(nil)).Elem(), GatewayHostNameConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GatewayHostNameConfigurationMapInput)(nil)).Elem(), GatewayHostNameConfigurationMap{})
pulumi.RegisterOutputType(GatewayHostNameConfigurationOutput{})
pulumi.RegisterOutputType(GatewayHostNameConfigurationArrayOutput{})
pulumi.RegisterOutputType(GatewayHostNameConfigurationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/pulumiTypes.go | sdk/go/azure/apimanagement/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 apimanagement
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 ApiContact struct {
// The email address of the contact person/organization.
Email *string `pulumi:"email"`
// The name of the contact person/organization.
Name *string `pulumi:"name"`
// Absolute URL of the contact information.
Url *string `pulumi:"url"`
}
// ApiContactInput is an input type that accepts ApiContactArgs and ApiContactOutput values.
// You can construct a concrete instance of `ApiContactInput` via:
//
// ApiContactArgs{...}
type ApiContactInput interface {
pulumi.Input
ToApiContactOutput() ApiContactOutput
ToApiContactOutputWithContext(context.Context) ApiContactOutput
}
type ApiContactArgs struct {
// The email address of the contact person/organization.
Email pulumi.StringPtrInput `pulumi:"email"`
// The name of the contact person/organization.
Name pulumi.StringPtrInput `pulumi:"name"`
// Absolute URL of the contact information.
Url pulumi.StringPtrInput `pulumi:"url"`
}
func (ApiContactArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ApiContact)(nil)).Elem()
}
func (i ApiContactArgs) ToApiContactOutput() ApiContactOutput {
return i.ToApiContactOutputWithContext(context.Background())
}
func (i ApiContactArgs) ToApiContactOutputWithContext(ctx context.Context) ApiContactOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiContactOutput)
}
func (i ApiContactArgs) ToApiContactPtrOutput() ApiContactPtrOutput {
return i.ToApiContactPtrOutputWithContext(context.Background())
}
func (i ApiContactArgs) ToApiContactPtrOutputWithContext(ctx context.Context) ApiContactPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiContactOutput).ToApiContactPtrOutputWithContext(ctx)
}
// ApiContactPtrInput is an input type that accepts ApiContactArgs, ApiContactPtr and ApiContactPtrOutput values.
// You can construct a concrete instance of `ApiContactPtrInput` via:
//
// ApiContactArgs{...}
//
// or:
//
// nil
type ApiContactPtrInput interface {
pulumi.Input
ToApiContactPtrOutput() ApiContactPtrOutput
ToApiContactPtrOutputWithContext(context.Context) ApiContactPtrOutput
}
type apiContactPtrType ApiContactArgs
func ApiContactPtr(v *ApiContactArgs) ApiContactPtrInput {
return (*apiContactPtrType)(v)
}
func (*apiContactPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ApiContact)(nil)).Elem()
}
func (i *apiContactPtrType) ToApiContactPtrOutput() ApiContactPtrOutput {
return i.ToApiContactPtrOutputWithContext(context.Background())
}
func (i *apiContactPtrType) ToApiContactPtrOutputWithContext(ctx context.Context) ApiContactPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiContactPtrOutput)
}
type ApiContactOutput struct{ *pulumi.OutputState }
func (ApiContactOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApiContact)(nil)).Elem()
}
func (o ApiContactOutput) ToApiContactOutput() ApiContactOutput {
return o
}
func (o ApiContactOutput) ToApiContactOutputWithContext(ctx context.Context) ApiContactOutput {
return o
}
func (o ApiContactOutput) ToApiContactPtrOutput() ApiContactPtrOutput {
return o.ToApiContactPtrOutputWithContext(context.Background())
}
func (o ApiContactOutput) ToApiContactPtrOutputWithContext(ctx context.Context) ApiContactPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ApiContact) *ApiContact {
return &v
}).(ApiContactPtrOutput)
}
// The email address of the contact person/organization.
func (o ApiContactOutput) Email() pulumi.StringPtrOutput {
return o.ApplyT(func(v ApiContact) *string { return v.Email }).(pulumi.StringPtrOutput)
}
// The name of the contact person/organization.
func (o ApiContactOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v ApiContact) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Absolute URL of the contact information.
func (o ApiContactOutput) Url() pulumi.StringPtrOutput {
return o.ApplyT(func(v ApiContact) *string { return v.Url }).(pulumi.StringPtrOutput)
}
type ApiContactPtrOutput struct{ *pulumi.OutputState }
func (ApiContactPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiContact)(nil)).Elem()
}
func (o ApiContactPtrOutput) ToApiContactPtrOutput() ApiContactPtrOutput {
return o
}
func (o ApiContactPtrOutput) ToApiContactPtrOutputWithContext(ctx context.Context) ApiContactPtrOutput {
return o
}
func (o ApiContactPtrOutput) Elem() ApiContactOutput {
return o.ApplyT(func(v *ApiContact) ApiContact {
if v != nil {
return *v
}
var ret ApiContact
return ret
}).(ApiContactOutput)
}
// The email address of the contact person/organization.
func (o ApiContactPtrOutput) Email() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiContact) *string {
if v == nil {
return nil
}
return v.Email
}).(pulumi.StringPtrOutput)
}
// The name of the contact person/organization.
func (o ApiContactPtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiContact) *string {
if v == nil {
return nil
}
return v.Name
}).(pulumi.StringPtrOutput)
}
// Absolute URL of the contact information.
func (o ApiContactPtrOutput) Url() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiContact) *string {
if v == nil {
return nil
}
return v.Url
}).(pulumi.StringPtrOutput)
}
type ApiDiagnosticBackendRequest struct {
// Number of payload bytes to log (up to 8192).
BodyBytes *int `pulumi:"bodyBytes"`
// A `dataMasking` block as defined below.
DataMasking *ApiDiagnosticBackendRequestDataMasking `pulumi:"dataMasking"`
// Specifies a list of headers to log.
HeadersToLogs []string `pulumi:"headersToLogs"`
}
// ApiDiagnosticBackendRequestInput is an input type that accepts ApiDiagnosticBackendRequestArgs and ApiDiagnosticBackendRequestOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestInput` via:
//
// ApiDiagnosticBackendRequestArgs{...}
type ApiDiagnosticBackendRequestInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestOutput() ApiDiagnosticBackendRequestOutput
ToApiDiagnosticBackendRequestOutputWithContext(context.Context) ApiDiagnosticBackendRequestOutput
}
type ApiDiagnosticBackendRequestArgs struct {
// Number of payload bytes to log (up to 8192).
BodyBytes pulumi.IntPtrInput `pulumi:"bodyBytes"`
// A `dataMasking` block as defined below.
DataMasking ApiDiagnosticBackendRequestDataMaskingPtrInput `pulumi:"dataMasking"`
// Specifies a list of headers to log.
HeadersToLogs pulumi.StringArrayInput `pulumi:"headersToLogs"`
}
func (ApiDiagnosticBackendRequestArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequest)(nil)).Elem()
}
func (i ApiDiagnosticBackendRequestArgs) ToApiDiagnosticBackendRequestOutput() ApiDiagnosticBackendRequestOutput {
return i.ToApiDiagnosticBackendRequestOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestArgs) ToApiDiagnosticBackendRequestOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestOutput)
}
func (i ApiDiagnosticBackendRequestArgs) ToApiDiagnosticBackendRequestPtrOutput() ApiDiagnosticBackendRequestPtrOutput {
return i.ToApiDiagnosticBackendRequestPtrOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestArgs) ToApiDiagnosticBackendRequestPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestOutput).ToApiDiagnosticBackendRequestPtrOutputWithContext(ctx)
}
// ApiDiagnosticBackendRequestPtrInput is an input type that accepts ApiDiagnosticBackendRequestArgs, ApiDiagnosticBackendRequestPtr and ApiDiagnosticBackendRequestPtrOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestPtrInput` via:
//
// ApiDiagnosticBackendRequestArgs{...}
//
// or:
//
// nil
type ApiDiagnosticBackendRequestPtrInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestPtrOutput() ApiDiagnosticBackendRequestPtrOutput
ToApiDiagnosticBackendRequestPtrOutputWithContext(context.Context) ApiDiagnosticBackendRequestPtrOutput
}
type apiDiagnosticBackendRequestPtrType ApiDiagnosticBackendRequestArgs
func ApiDiagnosticBackendRequestPtr(v *ApiDiagnosticBackendRequestArgs) ApiDiagnosticBackendRequestPtrInput {
return (*apiDiagnosticBackendRequestPtrType)(v)
}
func (*apiDiagnosticBackendRequestPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ApiDiagnosticBackendRequest)(nil)).Elem()
}
func (i *apiDiagnosticBackendRequestPtrType) ToApiDiagnosticBackendRequestPtrOutput() ApiDiagnosticBackendRequestPtrOutput {
return i.ToApiDiagnosticBackendRequestPtrOutputWithContext(context.Background())
}
func (i *apiDiagnosticBackendRequestPtrType) ToApiDiagnosticBackendRequestPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestPtrOutput)
}
type ApiDiagnosticBackendRequestOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequest)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestOutput) ToApiDiagnosticBackendRequestOutput() ApiDiagnosticBackendRequestOutput {
return o
}
func (o ApiDiagnosticBackendRequestOutput) ToApiDiagnosticBackendRequestOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestOutput {
return o
}
func (o ApiDiagnosticBackendRequestOutput) ToApiDiagnosticBackendRequestPtrOutput() ApiDiagnosticBackendRequestPtrOutput {
return o.ToApiDiagnosticBackendRequestPtrOutputWithContext(context.Background())
}
func (o ApiDiagnosticBackendRequestOutput) ToApiDiagnosticBackendRequestPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ApiDiagnosticBackendRequest) *ApiDiagnosticBackendRequest {
return &v
}).(ApiDiagnosticBackendRequestPtrOutput)
}
// Number of payload bytes to log (up to 8192).
func (o ApiDiagnosticBackendRequestOutput) BodyBytes() pulumi.IntPtrOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequest) *int { return v.BodyBytes }).(pulumi.IntPtrOutput)
}
// A `dataMasking` block as defined below.
func (o ApiDiagnosticBackendRequestOutput) DataMasking() ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequest) *ApiDiagnosticBackendRequestDataMasking { return v.DataMasking }).(ApiDiagnosticBackendRequestDataMaskingPtrOutput)
}
// Specifies a list of headers to log.
func (o ApiDiagnosticBackendRequestOutput) HeadersToLogs() pulumi.StringArrayOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequest) []string { return v.HeadersToLogs }).(pulumi.StringArrayOutput)
}
type ApiDiagnosticBackendRequestPtrOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiDiagnosticBackendRequest)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestPtrOutput) ToApiDiagnosticBackendRequestPtrOutput() ApiDiagnosticBackendRequestPtrOutput {
return o
}
func (o ApiDiagnosticBackendRequestPtrOutput) ToApiDiagnosticBackendRequestPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestPtrOutput {
return o
}
func (o ApiDiagnosticBackendRequestPtrOutput) Elem() ApiDiagnosticBackendRequestOutput {
return o.ApplyT(func(v *ApiDiagnosticBackendRequest) ApiDiagnosticBackendRequest {
if v != nil {
return *v
}
var ret ApiDiagnosticBackendRequest
return ret
}).(ApiDiagnosticBackendRequestOutput)
}
// Number of payload bytes to log (up to 8192).
func (o ApiDiagnosticBackendRequestPtrOutput) BodyBytes() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ApiDiagnosticBackendRequest) *int {
if v == nil {
return nil
}
return v.BodyBytes
}).(pulumi.IntPtrOutput)
}
// A `dataMasking` block as defined below.
func (o ApiDiagnosticBackendRequestPtrOutput) DataMasking() ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return o.ApplyT(func(v *ApiDiagnosticBackendRequest) *ApiDiagnosticBackendRequestDataMasking {
if v == nil {
return nil
}
return v.DataMasking
}).(ApiDiagnosticBackendRequestDataMaskingPtrOutput)
}
// Specifies a list of headers to log.
func (o ApiDiagnosticBackendRequestPtrOutput) HeadersToLogs() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ApiDiagnosticBackendRequest) []string {
if v == nil {
return nil
}
return v.HeadersToLogs
}).(pulumi.StringArrayOutput)
}
type ApiDiagnosticBackendRequestDataMasking struct {
// A `headers` block as defined below.
Headers []ApiDiagnosticBackendRequestDataMaskingHeader `pulumi:"headers"`
// A `queryParams` block as defined below.
QueryParams []ApiDiagnosticBackendRequestDataMaskingQueryParam `pulumi:"queryParams"`
}
// ApiDiagnosticBackendRequestDataMaskingInput is an input type that accepts ApiDiagnosticBackendRequestDataMaskingArgs and ApiDiagnosticBackendRequestDataMaskingOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestDataMaskingInput` via:
//
// ApiDiagnosticBackendRequestDataMaskingArgs{...}
type ApiDiagnosticBackendRequestDataMaskingInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestDataMaskingOutput() ApiDiagnosticBackendRequestDataMaskingOutput
ToApiDiagnosticBackendRequestDataMaskingOutputWithContext(context.Context) ApiDiagnosticBackendRequestDataMaskingOutput
}
type ApiDiagnosticBackendRequestDataMaskingArgs struct {
// A `headers` block as defined below.
Headers ApiDiagnosticBackendRequestDataMaskingHeaderArrayInput `pulumi:"headers"`
// A `queryParams` block as defined below.
QueryParams ApiDiagnosticBackendRequestDataMaskingQueryParamArrayInput `pulumi:"queryParams"`
}
func (ApiDiagnosticBackendRequestDataMaskingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequestDataMasking)(nil)).Elem()
}
func (i ApiDiagnosticBackendRequestDataMaskingArgs) ToApiDiagnosticBackendRequestDataMaskingOutput() ApiDiagnosticBackendRequestDataMaskingOutput {
return i.ToApiDiagnosticBackendRequestDataMaskingOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestDataMaskingArgs) ToApiDiagnosticBackendRequestDataMaskingOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestDataMaskingOutput)
}
func (i ApiDiagnosticBackendRequestDataMaskingArgs) ToApiDiagnosticBackendRequestDataMaskingPtrOutput() ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return i.ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestDataMaskingArgs) ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestDataMaskingOutput).ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(ctx)
}
// ApiDiagnosticBackendRequestDataMaskingPtrInput is an input type that accepts ApiDiagnosticBackendRequestDataMaskingArgs, ApiDiagnosticBackendRequestDataMaskingPtr and ApiDiagnosticBackendRequestDataMaskingPtrOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestDataMaskingPtrInput` via:
//
// ApiDiagnosticBackendRequestDataMaskingArgs{...}
//
// or:
//
// nil
type ApiDiagnosticBackendRequestDataMaskingPtrInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestDataMaskingPtrOutput() ApiDiagnosticBackendRequestDataMaskingPtrOutput
ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(context.Context) ApiDiagnosticBackendRequestDataMaskingPtrOutput
}
type apiDiagnosticBackendRequestDataMaskingPtrType ApiDiagnosticBackendRequestDataMaskingArgs
func ApiDiagnosticBackendRequestDataMaskingPtr(v *ApiDiagnosticBackendRequestDataMaskingArgs) ApiDiagnosticBackendRequestDataMaskingPtrInput {
return (*apiDiagnosticBackendRequestDataMaskingPtrType)(v)
}
func (*apiDiagnosticBackendRequestDataMaskingPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ApiDiagnosticBackendRequestDataMasking)(nil)).Elem()
}
func (i *apiDiagnosticBackendRequestDataMaskingPtrType) ToApiDiagnosticBackendRequestDataMaskingPtrOutput() ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return i.ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(context.Background())
}
func (i *apiDiagnosticBackendRequestDataMaskingPtrType) ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestDataMaskingPtrOutput)
}
type ApiDiagnosticBackendRequestDataMaskingOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestDataMaskingOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequestDataMasking)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestDataMaskingOutput) ToApiDiagnosticBackendRequestDataMaskingOutput() ApiDiagnosticBackendRequestDataMaskingOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingOutput) ToApiDiagnosticBackendRequestDataMaskingOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingOutput) ToApiDiagnosticBackendRequestDataMaskingPtrOutput() ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return o.ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(context.Background())
}
func (o ApiDiagnosticBackendRequestDataMaskingOutput) ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ApiDiagnosticBackendRequestDataMasking) *ApiDiagnosticBackendRequestDataMasking {
return &v
}).(ApiDiagnosticBackendRequestDataMaskingPtrOutput)
}
// A `headers` block as defined below.
func (o ApiDiagnosticBackendRequestDataMaskingOutput) Headers() ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequestDataMasking) []ApiDiagnosticBackendRequestDataMaskingHeader {
return v.Headers
}).(ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput)
}
// A `queryParams` block as defined below.
func (o ApiDiagnosticBackendRequestDataMaskingOutput) QueryParams() ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequestDataMasking) []ApiDiagnosticBackendRequestDataMaskingQueryParam {
return v.QueryParams
}).(ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput)
}
type ApiDiagnosticBackendRequestDataMaskingPtrOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestDataMaskingPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiDiagnosticBackendRequestDataMasking)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestDataMaskingPtrOutput) ToApiDiagnosticBackendRequestDataMaskingPtrOutput() ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingPtrOutput) ToApiDiagnosticBackendRequestDataMaskingPtrOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingPtrOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingPtrOutput) Elem() ApiDiagnosticBackendRequestDataMaskingOutput {
return o.ApplyT(func(v *ApiDiagnosticBackendRequestDataMasking) ApiDiagnosticBackendRequestDataMasking {
if v != nil {
return *v
}
var ret ApiDiagnosticBackendRequestDataMasking
return ret
}).(ApiDiagnosticBackendRequestDataMaskingOutput)
}
// A `headers` block as defined below.
func (o ApiDiagnosticBackendRequestDataMaskingPtrOutput) Headers() ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput {
return o.ApplyT(func(v *ApiDiagnosticBackendRequestDataMasking) []ApiDiagnosticBackendRequestDataMaskingHeader {
if v == nil {
return nil
}
return v.Headers
}).(ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput)
}
// A `queryParams` block as defined below.
func (o ApiDiagnosticBackendRequestDataMaskingPtrOutput) QueryParams() ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput {
return o.ApplyT(func(v *ApiDiagnosticBackendRequestDataMasking) []ApiDiagnosticBackendRequestDataMaskingQueryParam {
if v == nil {
return nil
}
return v.QueryParams
}).(ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput)
}
type ApiDiagnosticBackendRequestDataMaskingHeader struct {
// The data masking mode. Possible values are `Mask` and `Hide` for `queryParams`. The only possible value is `Mask` for `headers`.
Mode string `pulumi:"mode"`
// The name of the header or the query parameter to mask.
Value string `pulumi:"value"`
}
// ApiDiagnosticBackendRequestDataMaskingHeaderInput is an input type that accepts ApiDiagnosticBackendRequestDataMaskingHeaderArgs and ApiDiagnosticBackendRequestDataMaskingHeaderOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestDataMaskingHeaderInput` via:
//
// ApiDiagnosticBackendRequestDataMaskingHeaderArgs{...}
type ApiDiagnosticBackendRequestDataMaskingHeaderInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestDataMaskingHeaderOutput() ApiDiagnosticBackendRequestDataMaskingHeaderOutput
ToApiDiagnosticBackendRequestDataMaskingHeaderOutputWithContext(context.Context) ApiDiagnosticBackendRequestDataMaskingHeaderOutput
}
type ApiDiagnosticBackendRequestDataMaskingHeaderArgs struct {
// The data masking mode. Possible values are `Mask` and `Hide` for `queryParams`. The only possible value is `Mask` for `headers`.
Mode pulumi.StringInput `pulumi:"mode"`
// The name of the header or the query parameter to mask.
Value pulumi.StringInput `pulumi:"value"`
}
func (ApiDiagnosticBackendRequestDataMaskingHeaderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequestDataMaskingHeader)(nil)).Elem()
}
func (i ApiDiagnosticBackendRequestDataMaskingHeaderArgs) ToApiDiagnosticBackendRequestDataMaskingHeaderOutput() ApiDiagnosticBackendRequestDataMaskingHeaderOutput {
return i.ToApiDiagnosticBackendRequestDataMaskingHeaderOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestDataMaskingHeaderArgs) ToApiDiagnosticBackendRequestDataMaskingHeaderOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingHeaderOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestDataMaskingHeaderOutput)
}
// ApiDiagnosticBackendRequestDataMaskingHeaderArrayInput is an input type that accepts ApiDiagnosticBackendRequestDataMaskingHeaderArray and ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestDataMaskingHeaderArrayInput` via:
//
// ApiDiagnosticBackendRequestDataMaskingHeaderArray{ ApiDiagnosticBackendRequestDataMaskingHeaderArgs{...} }
type ApiDiagnosticBackendRequestDataMaskingHeaderArrayInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput() ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput
ToApiDiagnosticBackendRequestDataMaskingHeaderArrayOutputWithContext(context.Context) ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput
}
type ApiDiagnosticBackendRequestDataMaskingHeaderArray []ApiDiagnosticBackendRequestDataMaskingHeaderInput
func (ApiDiagnosticBackendRequestDataMaskingHeaderArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ApiDiagnosticBackendRequestDataMaskingHeader)(nil)).Elem()
}
func (i ApiDiagnosticBackendRequestDataMaskingHeaderArray) ToApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput() ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput {
return i.ToApiDiagnosticBackendRequestDataMaskingHeaderArrayOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestDataMaskingHeaderArray) ToApiDiagnosticBackendRequestDataMaskingHeaderArrayOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput)
}
type ApiDiagnosticBackendRequestDataMaskingHeaderOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestDataMaskingHeaderOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequestDataMaskingHeader)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestDataMaskingHeaderOutput) ToApiDiagnosticBackendRequestDataMaskingHeaderOutput() ApiDiagnosticBackendRequestDataMaskingHeaderOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingHeaderOutput) ToApiDiagnosticBackendRequestDataMaskingHeaderOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingHeaderOutput {
return o
}
// The data masking mode. Possible values are `Mask` and `Hide` for `queryParams`. The only possible value is `Mask` for `headers`.
func (o ApiDiagnosticBackendRequestDataMaskingHeaderOutput) Mode() pulumi.StringOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequestDataMaskingHeader) string { return v.Mode }).(pulumi.StringOutput)
}
// The name of the header or the query parameter to mask.
func (o ApiDiagnosticBackendRequestDataMaskingHeaderOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequestDataMaskingHeader) string { return v.Value }).(pulumi.StringOutput)
}
type ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ApiDiagnosticBackendRequestDataMaskingHeader)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput) ToApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput() ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput) ToApiDiagnosticBackendRequestDataMaskingHeaderArrayOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingHeaderArrayOutput) Index(i pulumi.IntInput) ApiDiagnosticBackendRequestDataMaskingHeaderOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ApiDiagnosticBackendRequestDataMaskingHeader {
return vs[0].([]ApiDiagnosticBackendRequestDataMaskingHeader)[vs[1].(int)]
}).(ApiDiagnosticBackendRequestDataMaskingHeaderOutput)
}
type ApiDiagnosticBackendRequestDataMaskingQueryParam struct {
// The data masking mode. Possible values are `Mask` and `Hide` for `queryParams`. The only possible value is `Mask` for `headers`.
Mode string `pulumi:"mode"`
// The name of the header or the query parameter to mask.
Value string `pulumi:"value"`
}
// ApiDiagnosticBackendRequestDataMaskingQueryParamInput is an input type that accepts ApiDiagnosticBackendRequestDataMaskingQueryParamArgs and ApiDiagnosticBackendRequestDataMaskingQueryParamOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestDataMaskingQueryParamInput` via:
//
// ApiDiagnosticBackendRequestDataMaskingQueryParamArgs{...}
type ApiDiagnosticBackendRequestDataMaskingQueryParamInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestDataMaskingQueryParamOutput() ApiDiagnosticBackendRequestDataMaskingQueryParamOutput
ToApiDiagnosticBackendRequestDataMaskingQueryParamOutputWithContext(context.Context) ApiDiagnosticBackendRequestDataMaskingQueryParamOutput
}
type ApiDiagnosticBackendRequestDataMaskingQueryParamArgs struct {
// The data masking mode. Possible values are `Mask` and `Hide` for `queryParams`. The only possible value is `Mask` for `headers`.
Mode pulumi.StringInput `pulumi:"mode"`
// The name of the header or the query parameter to mask.
Value pulumi.StringInput `pulumi:"value"`
}
func (ApiDiagnosticBackendRequestDataMaskingQueryParamArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequestDataMaskingQueryParam)(nil)).Elem()
}
func (i ApiDiagnosticBackendRequestDataMaskingQueryParamArgs) ToApiDiagnosticBackendRequestDataMaskingQueryParamOutput() ApiDiagnosticBackendRequestDataMaskingQueryParamOutput {
return i.ToApiDiagnosticBackendRequestDataMaskingQueryParamOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestDataMaskingQueryParamArgs) ToApiDiagnosticBackendRequestDataMaskingQueryParamOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingQueryParamOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestDataMaskingQueryParamOutput)
}
// ApiDiagnosticBackendRequestDataMaskingQueryParamArrayInput is an input type that accepts ApiDiagnosticBackendRequestDataMaskingQueryParamArray and ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput values.
// You can construct a concrete instance of `ApiDiagnosticBackendRequestDataMaskingQueryParamArrayInput` via:
//
// ApiDiagnosticBackendRequestDataMaskingQueryParamArray{ ApiDiagnosticBackendRequestDataMaskingQueryParamArgs{...} }
type ApiDiagnosticBackendRequestDataMaskingQueryParamArrayInput interface {
pulumi.Input
ToApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput() ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput
ToApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutputWithContext(context.Context) ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput
}
type ApiDiagnosticBackendRequestDataMaskingQueryParamArray []ApiDiagnosticBackendRequestDataMaskingQueryParamInput
func (ApiDiagnosticBackendRequestDataMaskingQueryParamArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ApiDiagnosticBackendRequestDataMaskingQueryParam)(nil)).Elem()
}
func (i ApiDiagnosticBackendRequestDataMaskingQueryParamArray) ToApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput() ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput {
return i.ToApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutputWithContext(context.Background())
}
func (i ApiDiagnosticBackendRequestDataMaskingQueryParamArray) ToApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput)
}
type ApiDiagnosticBackendRequestDataMaskingQueryParamOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestDataMaskingQueryParamOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApiDiagnosticBackendRequestDataMaskingQueryParam)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestDataMaskingQueryParamOutput) ToApiDiagnosticBackendRequestDataMaskingQueryParamOutput() ApiDiagnosticBackendRequestDataMaskingQueryParamOutput {
return o
}
func (o ApiDiagnosticBackendRequestDataMaskingQueryParamOutput) ToApiDiagnosticBackendRequestDataMaskingQueryParamOutputWithContext(ctx context.Context) ApiDiagnosticBackendRequestDataMaskingQueryParamOutput {
return o
}
// The data masking mode. Possible values are `Mask` and `Hide` for `queryParams`. The only possible value is `Mask` for `headers`.
func (o ApiDiagnosticBackendRequestDataMaskingQueryParamOutput) Mode() pulumi.StringOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequestDataMaskingQueryParam) string { return v.Mode }).(pulumi.StringOutput)
}
// The name of the header or the query parameter to mask.
func (o ApiDiagnosticBackendRequestDataMaskingQueryParamOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v ApiDiagnosticBackendRequestDataMaskingQueryParam) string { return v.Value }).(pulumi.StringOutput)
}
type ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ApiDiagnosticBackendRequestDataMaskingQueryParam)(nil)).Elem()
}
func (o ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput) ToApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput() ApiDiagnosticBackendRequestDataMaskingQueryParamArrayOutput {
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/apimanagement/workspaceCertificate.go | sdk/go/azure/apimanagement/workspaceCertificate.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Certificate within an API Management Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Premium_1"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := apimanagement.NewWorkspace(ctx, "example", &apimanagement.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// ApiManagementId: exampleService.ID(),
// DisplayName: pulumi.String("Example Workspace"),
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "example.pfx",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewWorkspaceCertificate(ctx, "example", &apimanagement.WorkspaceCertificateArgs{
// Name: pulumi.String("example-cert"),
// ApiManagementWorkspaceId: exampleWorkspace.ID(),
// CertificateDataBase64: pulumi.String(invokeFilebase64.Result),
// Password: pulumi.String("terraform"),
// })
// 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.ApiManagement` - 2024-05-01
//
// ## Import
//
// API Management Workspace Certificates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/workspaceCertificate:WorkspaceCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/workspaces/workspace1/certificates/certificate1
// ```
type WorkspaceCertificate struct {
pulumi.CustomResourceState
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringOutput `pulumi:"apiManagementWorkspaceId"`
// Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format.
//
// > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
CertificateDataBase64 pulumi.StringPtrOutput `pulumi:"certificateDataBase64"`
// The expiration date of the API Management Workspace Certificate.
Expiration pulumi.StringOutput `pulumi:"expiration"`
// Specifies the ID of the key vault secret.
//
// > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
KeyVaultSecretId pulumi.StringPtrOutput `pulumi:"keyVaultSecretId"`
// Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the password used to access the `certificateDataBase64`.
Password pulumi.StringPtrOutput `pulumi:"password"`
// The subject name of the API Management Workspace Certificate.
Subject pulumi.StringOutput `pulumi:"subject"`
// The thumbprint of the API Management Workspace Certificate.
Thumbprint pulumi.StringOutput `pulumi:"thumbprint"`
// Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`.
UserAssignedIdentityClientId pulumi.StringPtrOutput `pulumi:"userAssignedIdentityClientId"`
}
// NewWorkspaceCertificate registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceCertificate(ctx *pulumi.Context,
name string, args *WorkspaceCertificateArgs, opts ...pulumi.ResourceOption) (*WorkspaceCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementWorkspaceId'")
}
if args.CertificateDataBase64 != nil {
args.CertificateDataBase64 = pulumi.ToSecret(args.CertificateDataBase64).(pulumi.StringPtrInput)
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"certificateDataBase64",
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceCertificate
err := ctx.RegisterResource("azure:apimanagement/workspaceCertificate:WorkspaceCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceCertificate gets an existing WorkspaceCertificate resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceCertificateState, opts ...pulumi.ResourceOption) (*WorkspaceCertificate, error) {
var resource WorkspaceCertificate
err := ctx.ReadResource("azure:apimanagement/workspaceCertificate:WorkspaceCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceCertificate resources.
type workspaceCertificateState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId *string `pulumi:"apiManagementWorkspaceId"`
// Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format.
//
// > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
CertificateDataBase64 *string `pulumi:"certificateDataBase64"`
// The expiration date of the API Management Workspace Certificate.
Expiration *string `pulumi:"expiration"`
// Specifies the ID of the key vault secret.
//
// > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
KeyVaultSecretId *string `pulumi:"keyVaultSecretId"`
// Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the password used to access the `certificateDataBase64`.
Password *string `pulumi:"password"`
// The subject name of the API Management Workspace Certificate.
Subject *string `pulumi:"subject"`
// The thumbprint of the API Management Workspace Certificate.
Thumbprint *string `pulumi:"thumbprint"`
// Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`.
UserAssignedIdentityClientId *string `pulumi:"userAssignedIdentityClientId"`
}
type WorkspaceCertificateState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringPtrInput
// Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format.
//
// > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
CertificateDataBase64 pulumi.StringPtrInput
// The expiration date of the API Management Workspace Certificate.
Expiration pulumi.StringPtrInput
// Specifies the ID of the key vault secret.
//
// > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
KeyVaultSecretId pulumi.StringPtrInput
// Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the password used to access the `certificateDataBase64`.
Password pulumi.StringPtrInput
// The subject name of the API Management Workspace Certificate.
Subject pulumi.StringPtrInput
// The thumbprint of the API Management Workspace Certificate.
Thumbprint pulumi.StringPtrInput
// Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`.
UserAssignedIdentityClientId pulumi.StringPtrInput
}
func (WorkspaceCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceCertificateState)(nil)).Elem()
}
type workspaceCertificateArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId string `pulumi:"apiManagementWorkspaceId"`
// Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format.
//
// > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
CertificateDataBase64 *string `pulumi:"certificateDataBase64"`
// Specifies the ID of the key vault secret.
//
// > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
KeyVaultSecretId *string `pulumi:"keyVaultSecretId"`
// Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the password used to access the `certificateDataBase64`.
Password *string `pulumi:"password"`
// Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`.
UserAssignedIdentityClientId *string `pulumi:"userAssignedIdentityClientId"`
}
// The set of arguments for constructing a WorkspaceCertificate resource.
type WorkspaceCertificateArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringInput
// Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format.
//
// > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
CertificateDataBase64 pulumi.StringPtrInput
// Specifies the ID of the key vault secret.
//
// > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
KeyVaultSecretId pulumi.StringPtrInput
// Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the password used to access the `certificateDataBase64`.
Password pulumi.StringPtrInput
// Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`.
UserAssignedIdentityClientId pulumi.StringPtrInput
}
func (WorkspaceCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceCertificateArgs)(nil)).Elem()
}
type WorkspaceCertificateInput interface {
pulumi.Input
ToWorkspaceCertificateOutput() WorkspaceCertificateOutput
ToWorkspaceCertificateOutputWithContext(ctx context.Context) WorkspaceCertificateOutput
}
func (*WorkspaceCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceCertificate)(nil)).Elem()
}
func (i *WorkspaceCertificate) ToWorkspaceCertificateOutput() WorkspaceCertificateOutput {
return i.ToWorkspaceCertificateOutputWithContext(context.Background())
}
func (i *WorkspaceCertificate) ToWorkspaceCertificateOutputWithContext(ctx context.Context) WorkspaceCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCertificateOutput)
}
// WorkspaceCertificateArrayInput is an input type that accepts WorkspaceCertificateArray and WorkspaceCertificateArrayOutput values.
// You can construct a concrete instance of `WorkspaceCertificateArrayInput` via:
//
// WorkspaceCertificateArray{ WorkspaceCertificateArgs{...} }
type WorkspaceCertificateArrayInput interface {
pulumi.Input
ToWorkspaceCertificateArrayOutput() WorkspaceCertificateArrayOutput
ToWorkspaceCertificateArrayOutputWithContext(context.Context) WorkspaceCertificateArrayOutput
}
type WorkspaceCertificateArray []WorkspaceCertificateInput
func (WorkspaceCertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceCertificate)(nil)).Elem()
}
func (i WorkspaceCertificateArray) ToWorkspaceCertificateArrayOutput() WorkspaceCertificateArrayOutput {
return i.ToWorkspaceCertificateArrayOutputWithContext(context.Background())
}
func (i WorkspaceCertificateArray) ToWorkspaceCertificateArrayOutputWithContext(ctx context.Context) WorkspaceCertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCertificateArrayOutput)
}
// WorkspaceCertificateMapInput is an input type that accepts WorkspaceCertificateMap and WorkspaceCertificateMapOutput values.
// You can construct a concrete instance of `WorkspaceCertificateMapInput` via:
//
// WorkspaceCertificateMap{ "key": WorkspaceCertificateArgs{...} }
type WorkspaceCertificateMapInput interface {
pulumi.Input
ToWorkspaceCertificateMapOutput() WorkspaceCertificateMapOutput
ToWorkspaceCertificateMapOutputWithContext(context.Context) WorkspaceCertificateMapOutput
}
type WorkspaceCertificateMap map[string]WorkspaceCertificateInput
func (WorkspaceCertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceCertificate)(nil)).Elem()
}
func (i WorkspaceCertificateMap) ToWorkspaceCertificateMapOutput() WorkspaceCertificateMapOutput {
return i.ToWorkspaceCertificateMapOutputWithContext(context.Background())
}
func (i WorkspaceCertificateMap) ToWorkspaceCertificateMapOutputWithContext(ctx context.Context) WorkspaceCertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCertificateMapOutput)
}
type WorkspaceCertificateOutput struct{ *pulumi.OutputState }
func (WorkspaceCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceCertificate)(nil)).Elem()
}
func (o WorkspaceCertificateOutput) ToWorkspaceCertificateOutput() WorkspaceCertificateOutput {
return o
}
func (o WorkspaceCertificateOutput) ToWorkspaceCertificateOutputWithContext(ctx context.Context) WorkspaceCertificateOutput {
return o
}
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
func (o WorkspaceCertificateOutput) ApiManagementWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringOutput { return v.ApiManagementWorkspaceId }).(pulumi.StringOutput)
}
// Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format.
//
// > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
func (o WorkspaceCertificateOutput) CertificateDataBase64() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringPtrOutput { return v.CertificateDataBase64 }).(pulumi.StringPtrOutput)
}
// The expiration date of the API Management Workspace Certificate.
func (o WorkspaceCertificateOutput) Expiration() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringOutput { return v.Expiration }).(pulumi.StringOutput)
}
// Specifies the ID of the key vault secret.
//
// > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified.
func (o WorkspaceCertificateOutput) KeyVaultSecretId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringPtrOutput { return v.KeyVaultSecretId }).(pulumi.StringPtrOutput)
}
// Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created.
func (o WorkspaceCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the password used to access the `certificateDataBase64`.
func (o WorkspaceCertificateOutput) Password() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput)
}
// The subject name of the API Management Workspace Certificate.
func (o WorkspaceCertificateOutput) Subject() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringOutput { return v.Subject }).(pulumi.StringOutput)
}
// The thumbprint of the API Management Workspace Certificate.
func (o WorkspaceCertificateOutput) Thumbprint() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringOutput { return v.Thumbprint }).(pulumi.StringOutput)
}
// Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`.
func (o WorkspaceCertificateOutput) UserAssignedIdentityClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceCertificate) pulumi.StringPtrOutput { return v.UserAssignedIdentityClientId }).(pulumi.StringPtrOutput)
}
type WorkspaceCertificateArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceCertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceCertificate)(nil)).Elem()
}
func (o WorkspaceCertificateArrayOutput) ToWorkspaceCertificateArrayOutput() WorkspaceCertificateArrayOutput {
return o
}
func (o WorkspaceCertificateArrayOutput) ToWorkspaceCertificateArrayOutputWithContext(ctx context.Context) WorkspaceCertificateArrayOutput {
return o
}
func (o WorkspaceCertificateArrayOutput) Index(i pulumi.IntInput) WorkspaceCertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceCertificate {
return vs[0].([]*WorkspaceCertificate)[vs[1].(int)]
}).(WorkspaceCertificateOutput)
}
type WorkspaceCertificateMapOutput struct{ *pulumi.OutputState }
func (WorkspaceCertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceCertificate)(nil)).Elem()
}
func (o WorkspaceCertificateMapOutput) ToWorkspaceCertificateMapOutput() WorkspaceCertificateMapOutput {
return o
}
func (o WorkspaceCertificateMapOutput) ToWorkspaceCertificateMapOutputWithContext(ctx context.Context) WorkspaceCertificateMapOutput {
return o
}
func (o WorkspaceCertificateMapOutput) MapIndex(k pulumi.StringInput) WorkspaceCertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceCertificate {
return vs[0].(map[string]*WorkspaceCertificate)[vs[1].(string)]
}).(WorkspaceCertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceCertificateInput)(nil)).Elem(), &WorkspaceCertificate{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceCertificateArrayInput)(nil)).Elem(), WorkspaceCertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceCertificateMapInput)(nil)).Elem(), WorkspaceCertificateMap{})
pulumi.RegisterOutputType(WorkspaceCertificateOutput{})
pulumi.RegisterOutputType(WorkspaceCertificateArrayOutput{})
pulumi.RegisterOutputType(WorkspaceCertificateMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/getApiVersionSet.go | sdk/go/azure/apimanagement/getApiVersionSet.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Uses this data source to access information about an API Version Set within an API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupApiVersionSet(ctx, &apimanagement.LookupApiVersionSetArgs{
// ResourceGroupName: "example-resources",
// ApiManagementName: "example-api",
// Name: "example-api-version-set",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("apiManagementApiVersionSetId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
func LookupApiVersionSet(ctx *pulumi.Context, args *LookupApiVersionSetArgs, opts ...pulumi.InvokeOption) (*LookupApiVersionSetResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupApiVersionSetResult
err := ctx.Invoke("azure:apimanagement/getApiVersionSet:getApiVersionSet", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApiVersionSet.
type LookupApiVersionSetArgs struct {
// The name of the API Management Service where the API Version Set exists.
ApiManagementName string `pulumi:"apiManagementName"`
// The name of the API Version Set.
Name string `pulumi:"name"`
// The name of the Resource Group in which the parent API Management Service exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getApiVersionSet.
type LookupApiVersionSetResult struct {
ApiManagementName string `pulumi:"apiManagementName"`
// The description of API Version Set.
Description string `pulumi:"description"`
// The display name of this API Version Set.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the Header which should be read from Inbound Requests which defines the API Version.
VersionHeaderName string `pulumi:"versionHeaderName"`
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
VersionQueryName string `pulumi:"versionQueryName"`
VersioningScheme string `pulumi:"versioningScheme"`
}
func LookupApiVersionSetOutput(ctx *pulumi.Context, args LookupApiVersionSetOutputArgs, opts ...pulumi.InvokeOption) LookupApiVersionSetResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupApiVersionSetResultOutput, error) {
args := v.(LookupApiVersionSetArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:apimanagement/getApiVersionSet:getApiVersionSet", args, LookupApiVersionSetResultOutput{}, options).(LookupApiVersionSetResultOutput), nil
}).(LookupApiVersionSetResultOutput)
}
// A collection of arguments for invoking getApiVersionSet.
type LookupApiVersionSetOutputArgs struct {
// The name of the API Management Service where the API Version Set exists.
ApiManagementName pulumi.StringInput `pulumi:"apiManagementName"`
// The name of the API Version Set.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group in which the parent API Management Service exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupApiVersionSetOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApiVersionSetArgs)(nil)).Elem()
}
// A collection of values returned by getApiVersionSet.
type LookupApiVersionSetResultOutput struct{ *pulumi.OutputState }
func (LookupApiVersionSetResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApiVersionSetResult)(nil)).Elem()
}
func (o LookupApiVersionSetResultOutput) ToLookupApiVersionSetResultOutput() LookupApiVersionSetResultOutput {
return o
}
func (o LookupApiVersionSetResultOutput) ToLookupApiVersionSetResultOutputWithContext(ctx context.Context) LookupApiVersionSetResultOutput {
return o
}
func (o LookupApiVersionSetResultOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The description of API Version Set.
func (o LookupApiVersionSetResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.Description }).(pulumi.StringOutput)
}
// The display name of this API Version Set.
func (o LookupApiVersionSetResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupApiVersionSetResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupApiVersionSetResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupApiVersionSetResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The name of the Header which should be read from Inbound Requests which defines the API Version.
func (o LookupApiVersionSetResultOutput) VersionHeaderName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.VersionHeaderName }).(pulumi.StringOutput)
}
// The name of the Query String which should be read from Inbound Requests which defines the API Version.
func (o LookupApiVersionSetResultOutput) VersionQueryName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.VersionQueryName }).(pulumi.StringOutput)
}
func (o LookupApiVersionSetResultOutput) VersioningScheme() pulumi.StringOutput {
return o.ApplyT(func(v LookupApiVersionSetResult) string { return v.VersioningScheme }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupApiVersionSetResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/api.go | sdk/go/azure/apimanagement/api.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API within an API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@exmaple.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApi(ctx, "example", &apimanagement.ApiArgs{
// Name: pulumi.String("example-api"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// Revision: pulumi.String("1"),
// DisplayName: pulumi.String("Example API"),
// Path: pulumi.String("example"),
// Protocols: pulumi.StringArray{
// pulumi.String("https"),
// },
// Import: &apimanagement.ApiImportArgs{
// ContentFormat: pulumi.String("swagger-link-json"),
// ContentValue: pulumi.String("https://raw.githubusercontent.com/hashicorp/terraform-provider-azurerm/refs/heads/main/internal/services/apimanagement/testdata/api_management_api_schema_swagger.json"),
// },
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management API's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/api:Api example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/apis/api1;rev=1
// ```
type Api struct {
pulumi.CustomResourceState
// The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
ApiType pulumi.StringOutput `pulumi:"apiType"`
// A `contact` block as documented below.
Contact ApiContactPtrOutput `pulumi:"contact"`
// A description of the API Management API, which may include HTML formatting tags.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The display name of the API.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// A `import` block as documented below.
//
// > **Note:** The `displayName`, `description`, `contact`, and `license` fields can be imported by the `import` block, which might cause a drift if these fields are set along with the `import` block.
Import ApiImportPtrOutput `pulumi:"import"`
// Is this the current API Revision?
IsCurrent pulumi.BoolOutput `pulumi:"isCurrent"`
// Is this API Revision online/accessible via the Gateway?
IsOnline pulumi.BoolOutput `pulumi:"isOnline"`
// A `license` block as documented below.
License ApiLicensePtrOutput `pulumi:"license"`
// The name of the API Management API. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// An `oauth2Authorization` block as documented below.
Oauth2Authorization ApiOauth2AuthorizationPtrOutput `pulumi:"oauth2Authorization"`
// An `openidAuthentication` block as documented below.
OpenidAuthentication ApiOpenidAuthenticationPtrOutput `pulumi:"openidAuthentication"`
// The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
Path pulumi.StringOutput `pulumi:"path"`
// A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
//
// > **Note:** `displayName`, `path` and `protocols` are required when `sourceApiId` is not set.
Protocols pulumi.StringArrayOutput `pulumi:"protocols"`
// The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Revision which used for this API. Changing this forces a new resource to be created.
Revision pulumi.StringOutput `pulumi:"revision"`
// The description of the API Revision of the API Management API.
RevisionDescription pulumi.StringPtrOutput `pulumi:"revisionDescription"`
// Absolute URL of the backend service implementing this API.
//
// > **Note:** The `serviceUrl` is required when `apiType` is specified as `websocket`.
ServiceUrl pulumi.StringOutput `pulumi:"serviceUrl"`
// The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
SourceApiId pulumi.StringPtrOutput `pulumi:"sourceApiId"`
// A `subscriptionKeyParameterNames` block as documented below.
SubscriptionKeyParameterNames ApiSubscriptionKeyParameterNamesOutput `pulumi:"subscriptionKeyParameterNames"`
// Should this API require a subscription key? Defaults to `true`.
SubscriptionRequired pulumi.BoolPtrOutput `pulumi:"subscriptionRequired"`
// Absolute URL of the Terms of Service for the API.
TermsOfServiceUrl pulumi.StringPtrOutput `pulumi:"termsOfServiceUrl"`
// The Version number of this API, if this API is versioned.
Version pulumi.StringOutput `pulumi:"version"`
// The description of the API Version of the API Management API.
VersionDescription pulumi.StringPtrOutput `pulumi:"versionDescription"`
// The ID of the Version Set which this API is associated with.
//
// > **Note:** When `version` is set, `versionSetId` must also be specified
VersionSetId pulumi.StringOutput `pulumi:"versionSetId"`
}
// NewApi registers a new resource with the given unique name, arguments, and options.
func NewApi(ctx *pulumi.Context,
name string, args *ApiArgs, opts ...pulumi.ResourceOption) (*Api, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Revision == nil {
return nil, errors.New("invalid value for required argument 'Revision'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Api
err := ctx.RegisterResource("azure:apimanagement/api:Api", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApi gets an existing Api resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApi(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiState, opts ...pulumi.ResourceOption) (*Api, error) {
var resource Api
err := ctx.ReadResource("azure:apimanagement/api:Api", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Api resources.
type apiState struct {
// The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
ApiType *string `pulumi:"apiType"`
// A `contact` block as documented below.
Contact *ApiContact `pulumi:"contact"`
// A description of the API Management API, which may include HTML formatting tags.
Description *string `pulumi:"description"`
// The display name of the API.
DisplayName *string `pulumi:"displayName"`
// A `import` block as documented below.
//
// > **Note:** The `displayName`, `description`, `contact`, and `license` fields can be imported by the `import` block, which might cause a drift if these fields are set along with the `import` block.
Import *ApiImport `pulumi:"import"`
// Is this the current API Revision?
IsCurrent *bool `pulumi:"isCurrent"`
// Is this API Revision online/accessible via the Gateway?
IsOnline *bool `pulumi:"isOnline"`
// A `license` block as documented below.
License *ApiLicense `pulumi:"license"`
// The name of the API Management API. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `oauth2Authorization` block as documented below.
Oauth2Authorization *ApiOauth2Authorization `pulumi:"oauth2Authorization"`
// An `openidAuthentication` block as documented below.
OpenidAuthentication *ApiOpenidAuthentication `pulumi:"openidAuthentication"`
// The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
Path *string `pulumi:"path"`
// A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
//
// > **Note:** `displayName`, `path` and `protocols` are required when `sourceApiId` is not set.
Protocols []string `pulumi:"protocols"`
// The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Revision which used for this API. Changing this forces a new resource to be created.
Revision *string `pulumi:"revision"`
// The description of the API Revision of the API Management API.
RevisionDescription *string `pulumi:"revisionDescription"`
// Absolute URL of the backend service implementing this API.
//
// > **Note:** The `serviceUrl` is required when `apiType` is specified as `websocket`.
ServiceUrl *string `pulumi:"serviceUrl"`
// The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
SourceApiId *string `pulumi:"sourceApiId"`
// A `subscriptionKeyParameterNames` block as documented below.
SubscriptionKeyParameterNames *ApiSubscriptionKeyParameterNames `pulumi:"subscriptionKeyParameterNames"`
// Should this API require a subscription key? Defaults to `true`.
SubscriptionRequired *bool `pulumi:"subscriptionRequired"`
// Absolute URL of the Terms of Service for the API.
TermsOfServiceUrl *string `pulumi:"termsOfServiceUrl"`
// The Version number of this API, if this API is versioned.
Version *string `pulumi:"version"`
// The description of the API Version of the API Management API.
VersionDescription *string `pulumi:"versionDescription"`
// The ID of the Version Set which this API is associated with.
//
// > **Note:** When `version` is set, `versionSetId` must also be specified
VersionSetId *string `pulumi:"versionSetId"`
}
type ApiState struct {
// The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
ApiType pulumi.StringPtrInput
// A `contact` block as documented below.
Contact ApiContactPtrInput
// A description of the API Management API, which may include HTML formatting tags.
Description pulumi.StringPtrInput
// The display name of the API.
DisplayName pulumi.StringPtrInput
// A `import` block as documented below.
//
// > **Note:** The `displayName`, `description`, `contact`, and `license` fields can be imported by the `import` block, which might cause a drift if these fields are set along with the `import` block.
Import ApiImportPtrInput
// Is this the current API Revision?
IsCurrent pulumi.BoolPtrInput
// Is this API Revision online/accessible via the Gateway?
IsOnline pulumi.BoolPtrInput
// A `license` block as documented below.
License ApiLicensePtrInput
// The name of the API Management API. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `oauth2Authorization` block as documented below.
Oauth2Authorization ApiOauth2AuthorizationPtrInput
// An `openidAuthentication` block as documented below.
OpenidAuthentication ApiOpenidAuthenticationPtrInput
// The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
Path pulumi.StringPtrInput
// A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
//
// > **Note:** `displayName`, `path` and `protocols` are required when `sourceApiId` is not set.
Protocols pulumi.StringArrayInput
// The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Revision which used for this API. Changing this forces a new resource to be created.
Revision pulumi.StringPtrInput
// The description of the API Revision of the API Management API.
RevisionDescription pulumi.StringPtrInput
// Absolute URL of the backend service implementing this API.
//
// > **Note:** The `serviceUrl` is required when `apiType` is specified as `websocket`.
ServiceUrl pulumi.StringPtrInput
// The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
SourceApiId pulumi.StringPtrInput
// A `subscriptionKeyParameterNames` block as documented below.
SubscriptionKeyParameterNames ApiSubscriptionKeyParameterNamesPtrInput
// Should this API require a subscription key? Defaults to `true`.
SubscriptionRequired pulumi.BoolPtrInput
// Absolute URL of the Terms of Service for the API.
TermsOfServiceUrl pulumi.StringPtrInput
// The Version number of this API, if this API is versioned.
Version pulumi.StringPtrInput
// The description of the API Version of the API Management API.
VersionDescription pulumi.StringPtrInput
// The ID of the Version Set which this API is associated with.
//
// > **Note:** When `version` is set, `versionSetId` must also be specified
VersionSetId pulumi.StringPtrInput
}
func (ApiState) ElementType() reflect.Type {
return reflect.TypeOf((*apiState)(nil)).Elem()
}
type apiArgs struct {
// The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
ApiType *string `pulumi:"apiType"`
// A `contact` block as documented below.
Contact *ApiContact `pulumi:"contact"`
// A description of the API Management API, which may include HTML formatting tags.
Description *string `pulumi:"description"`
// The display name of the API.
DisplayName *string `pulumi:"displayName"`
// A `import` block as documented below.
//
// > **Note:** The `displayName`, `description`, `contact`, and `license` fields can be imported by the `import` block, which might cause a drift if these fields are set along with the `import` block.
Import *ApiImport `pulumi:"import"`
// A `license` block as documented below.
License *ApiLicense `pulumi:"license"`
// The name of the API Management API. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `oauth2Authorization` block as documented below.
Oauth2Authorization *ApiOauth2Authorization `pulumi:"oauth2Authorization"`
// An `openidAuthentication` block as documented below.
OpenidAuthentication *ApiOpenidAuthentication `pulumi:"openidAuthentication"`
// The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
Path *string `pulumi:"path"`
// A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
//
// > **Note:** `displayName`, `path` and `protocols` are required when `sourceApiId` is not set.
Protocols []string `pulumi:"protocols"`
// The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Revision which used for this API. Changing this forces a new resource to be created.
Revision string `pulumi:"revision"`
// The description of the API Revision of the API Management API.
RevisionDescription *string `pulumi:"revisionDescription"`
// Absolute URL of the backend service implementing this API.
//
// > **Note:** The `serviceUrl` is required when `apiType` is specified as `websocket`.
ServiceUrl *string `pulumi:"serviceUrl"`
// The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
SourceApiId *string `pulumi:"sourceApiId"`
// A `subscriptionKeyParameterNames` block as documented below.
SubscriptionKeyParameterNames *ApiSubscriptionKeyParameterNames `pulumi:"subscriptionKeyParameterNames"`
// Should this API require a subscription key? Defaults to `true`.
SubscriptionRequired *bool `pulumi:"subscriptionRequired"`
// Absolute URL of the Terms of Service for the API.
TermsOfServiceUrl *string `pulumi:"termsOfServiceUrl"`
// The Version number of this API, if this API is versioned.
Version *string `pulumi:"version"`
// The description of the API Version of the API Management API.
VersionDescription *string `pulumi:"versionDescription"`
// The ID of the Version Set which this API is associated with.
//
// > **Note:** When `version` is set, `versionSetId` must also be specified
VersionSetId *string `pulumi:"versionSetId"`
}
// The set of arguments for constructing a Api resource.
type ApiArgs struct {
// The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
ApiType pulumi.StringPtrInput
// A `contact` block as documented below.
Contact ApiContactPtrInput
// A description of the API Management API, which may include HTML formatting tags.
Description pulumi.StringPtrInput
// The display name of the API.
DisplayName pulumi.StringPtrInput
// A `import` block as documented below.
//
// > **Note:** The `displayName`, `description`, `contact`, and `license` fields can be imported by the `import` block, which might cause a drift if these fields are set along with the `import` block.
Import ApiImportPtrInput
// A `license` block as documented below.
License ApiLicensePtrInput
// The name of the API Management API. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `oauth2Authorization` block as documented below.
Oauth2Authorization ApiOauth2AuthorizationPtrInput
// An `openidAuthentication` block as documented below.
OpenidAuthentication ApiOpenidAuthenticationPtrInput
// The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
Path pulumi.StringPtrInput
// A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
//
// > **Note:** `displayName`, `path` and `protocols` are required when `sourceApiId` is not set.
Protocols pulumi.StringArrayInput
// The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The Revision which used for this API. Changing this forces a new resource to be created.
Revision pulumi.StringInput
// The description of the API Revision of the API Management API.
RevisionDescription pulumi.StringPtrInput
// Absolute URL of the backend service implementing this API.
//
// > **Note:** The `serviceUrl` is required when `apiType` is specified as `websocket`.
ServiceUrl pulumi.StringPtrInput
// The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
SourceApiId pulumi.StringPtrInput
// A `subscriptionKeyParameterNames` block as documented below.
SubscriptionKeyParameterNames ApiSubscriptionKeyParameterNamesPtrInput
// Should this API require a subscription key? Defaults to `true`.
SubscriptionRequired pulumi.BoolPtrInput
// Absolute URL of the Terms of Service for the API.
TermsOfServiceUrl pulumi.StringPtrInput
// The Version number of this API, if this API is versioned.
Version pulumi.StringPtrInput
// The description of the API Version of the API Management API.
VersionDescription pulumi.StringPtrInput
// The ID of the Version Set which this API is associated with.
//
// > **Note:** When `version` is set, `versionSetId` must also be specified
VersionSetId pulumi.StringPtrInput
}
func (ApiArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiArgs)(nil)).Elem()
}
type ApiInput interface {
pulumi.Input
ToApiOutput() ApiOutput
ToApiOutputWithContext(ctx context.Context) ApiOutput
}
func (*Api) ElementType() reflect.Type {
return reflect.TypeOf((**Api)(nil)).Elem()
}
func (i *Api) ToApiOutput() ApiOutput {
return i.ToApiOutputWithContext(context.Background())
}
func (i *Api) ToApiOutputWithContext(ctx context.Context) ApiOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiOutput)
}
// ApiArrayInput is an input type that accepts ApiArray and ApiArrayOutput values.
// You can construct a concrete instance of `ApiArrayInput` via:
//
// ApiArray{ ApiArgs{...} }
type ApiArrayInput interface {
pulumi.Input
ToApiArrayOutput() ApiArrayOutput
ToApiArrayOutputWithContext(context.Context) ApiArrayOutput
}
type ApiArray []ApiInput
func (ApiArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Api)(nil)).Elem()
}
func (i ApiArray) ToApiArrayOutput() ApiArrayOutput {
return i.ToApiArrayOutputWithContext(context.Background())
}
func (i ApiArray) ToApiArrayOutputWithContext(ctx context.Context) ApiArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiArrayOutput)
}
// ApiMapInput is an input type that accepts ApiMap and ApiMapOutput values.
// You can construct a concrete instance of `ApiMapInput` via:
//
// ApiMap{ "key": ApiArgs{...} }
type ApiMapInput interface {
pulumi.Input
ToApiMapOutput() ApiMapOutput
ToApiMapOutputWithContext(context.Context) ApiMapOutput
}
type ApiMap map[string]ApiInput
func (ApiMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Api)(nil)).Elem()
}
func (i ApiMap) ToApiMapOutput() ApiMapOutput {
return i.ToApiMapOutputWithContext(context.Background())
}
func (i ApiMap) ToApiMapOutputWithContext(ctx context.Context) ApiMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiMapOutput)
}
type ApiOutput struct{ *pulumi.OutputState }
func (ApiOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Api)(nil)).Elem()
}
func (o ApiOutput) ToApiOutput() ApiOutput {
return o
}
func (o ApiOutput) ToApiOutputWithContext(ctx context.Context) ApiOutput {
return o
}
// The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
func (o ApiOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// Type of API. Possible values are `graphql`, `http`, `soap`, and `websocket`. Defaults to `http`.
func (o ApiOutput) ApiType() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.ApiType }).(pulumi.StringOutput)
}
// A `contact` block as documented below.
func (o ApiOutput) Contact() ApiContactPtrOutput {
return o.ApplyT(func(v *Api) ApiContactPtrOutput { return v.Contact }).(ApiContactPtrOutput)
}
// A description of the API Management API, which may include HTML formatting tags.
func (o ApiOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Api) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of the API.
func (o ApiOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// A `import` block as documented below.
//
// > **Note:** The `displayName`, `description`, `contact`, and `license` fields can be imported by the `import` block, which might cause a drift if these fields are set along with the `import` block.
func (o ApiOutput) Import() ApiImportPtrOutput {
return o.ApplyT(func(v *Api) ApiImportPtrOutput { return v.Import }).(ApiImportPtrOutput)
}
// Is this the current API Revision?
func (o ApiOutput) IsCurrent() pulumi.BoolOutput {
return o.ApplyT(func(v *Api) pulumi.BoolOutput { return v.IsCurrent }).(pulumi.BoolOutput)
}
// Is this API Revision online/accessible via the Gateway?
func (o ApiOutput) IsOnline() pulumi.BoolOutput {
return o.ApplyT(func(v *Api) pulumi.BoolOutput { return v.IsOnline }).(pulumi.BoolOutput)
}
// A `license` block as documented below.
func (o ApiOutput) License() ApiLicensePtrOutput {
return o.ApplyT(func(v *Api) ApiLicensePtrOutput { return v.License }).(ApiLicensePtrOutput)
}
// The name of the API Management API. Changing this forces a new resource to be created.
func (o ApiOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// An `oauth2Authorization` block as documented below.
func (o ApiOutput) Oauth2Authorization() ApiOauth2AuthorizationPtrOutput {
return o.ApplyT(func(v *Api) ApiOauth2AuthorizationPtrOutput { return v.Oauth2Authorization }).(ApiOauth2AuthorizationPtrOutput)
}
// An `openidAuthentication` block as documented below.
func (o ApiOutput) OpenidAuthentication() ApiOpenidAuthenticationPtrOutput {
return o.ApplyT(func(v *Api) ApiOpenidAuthenticationPtrOutput { return v.OpenidAuthentication }).(ApiOpenidAuthenticationPtrOutput)
}
// The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of its resource paths within the API Management Service.
func (o ApiOutput) Path() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.Path }).(pulumi.StringOutput)
}
// A list of protocols the operations in this API can be invoked. Possible values are `http`, `https`, `ws`, and `wss`.
//
// > **Note:** `displayName`, `path` and `protocols` are required when `sourceApiId` is not set.
func (o ApiOutput) Protocols() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Api) pulumi.StringArrayOutput { return v.Protocols }).(pulumi.StringArrayOutput)
}
// The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
func (o ApiOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Revision which used for this API. Changing this forces a new resource to be created.
func (o ApiOutput) Revision() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.Revision }).(pulumi.StringOutput)
}
// The description of the API Revision of the API Management API.
func (o ApiOutput) RevisionDescription() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Api) pulumi.StringPtrOutput { return v.RevisionDescription }).(pulumi.StringPtrOutput)
}
// Absolute URL of the backend service implementing this API.
//
// > **Note:** The `serviceUrl` is required when `apiType` is specified as `websocket`.
func (o ApiOutput) ServiceUrl() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.ServiceUrl }).(pulumi.StringOutput)
}
// The API id of the source API, which could be in format `azurerm_api_management_api.example.id` or in format `azurerm_api_management_api.example.id;rev=1`
func (o ApiOutput) SourceApiId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Api) pulumi.StringPtrOutput { return v.SourceApiId }).(pulumi.StringPtrOutput)
}
// A `subscriptionKeyParameterNames` block as documented below.
func (o ApiOutput) SubscriptionKeyParameterNames() ApiSubscriptionKeyParameterNamesOutput {
return o.ApplyT(func(v *Api) ApiSubscriptionKeyParameterNamesOutput { return v.SubscriptionKeyParameterNames }).(ApiSubscriptionKeyParameterNamesOutput)
}
// Should this API require a subscription key? Defaults to `true`.
func (o ApiOutput) SubscriptionRequired() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Api) pulumi.BoolPtrOutput { return v.SubscriptionRequired }).(pulumi.BoolPtrOutput)
}
// Absolute URL of the Terms of Service for the API.
func (o ApiOutput) TermsOfServiceUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Api) pulumi.StringPtrOutput { return v.TermsOfServiceUrl }).(pulumi.StringPtrOutput)
}
// The Version number of this API, if this API is versioned.
func (o ApiOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput)
}
// The description of the API Version of the API Management API.
func (o ApiOutput) VersionDescription() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Api) pulumi.StringPtrOutput { return v.VersionDescription }).(pulumi.StringPtrOutput)
}
// The ID of the Version Set which this API is associated with.
//
// > **Note:** When `version` is set, `versionSetId` must also be specified
func (o ApiOutput) VersionSetId() pulumi.StringOutput {
return o.ApplyT(func(v *Api) pulumi.StringOutput { return v.VersionSetId }).(pulumi.StringOutput)
}
type ApiArrayOutput struct{ *pulumi.OutputState }
func (ApiArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Api)(nil)).Elem()
}
func (o ApiArrayOutput) ToApiArrayOutput() ApiArrayOutput {
return o
}
func (o ApiArrayOutput) ToApiArrayOutputWithContext(ctx context.Context) ApiArrayOutput {
return o
}
func (o ApiArrayOutput) Index(i pulumi.IntInput) ApiOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Api {
return vs[0].([]*Api)[vs[1].(int)]
}).(ApiOutput)
}
type ApiMapOutput struct{ *pulumi.OutputState }
func (ApiMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Api)(nil)).Elem()
}
func (o ApiMapOutput) ToApiMapOutput() ApiMapOutput {
return o
}
func (o ApiMapOutput) ToApiMapOutputWithContext(ctx context.Context) ApiMapOutput {
return o
}
func (o ApiMapOutput) MapIndex(k pulumi.StringInput) ApiOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Api {
return vs[0].(map[string]*Api)[vs[1].(string)]
}).(ApiOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiInput)(nil)).Elem(), &Api{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiArrayInput)(nil)).Elem(), ApiArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiMapInput)(nil)).Elem(), ApiMap{})
pulumi.RegisterOutputType(ApiOutput{})
pulumi.RegisterOutputType(ApiArrayOutput{})
pulumi.RegisterOutputType(ApiMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/authorizationServer.go | sdk/go/azure/apimanagement/authorizationServer.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Authorization Server within an API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
// Name: "search-api",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewAuthorizationServer(ctx, "example", &apimanagement.AuthorizationServerArgs{
// Name: pulumi.String("test-server"),
// ApiManagementName: pulumi.String(example.Name),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// DisplayName: pulumi.String("Test Server"),
// AuthorizationEndpoint: pulumi.String("https://example.mydomain.com/client/authorize"),
// ClientId: pulumi.String("42424242-4242-4242-4242-424242424242"),
// ClientRegistrationEndpoint: pulumi.String("https://example.mydomain.com/client/register"),
// GrantTypes: pulumi.StringArray{
// pulumi.String("authorizationCode"),
// },
// AuthorizationMethods: pulumi.StringArray{
// pulumi.String("GET"),
// },
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Authorization Servers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/authorizationServer:AuthorizationServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/authorizationServers/server1
// ```
type AuthorizationServer struct {
pulumi.CustomResourceState
// The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The OAUTH Authorization Endpoint.
AuthorizationEndpoint pulumi.StringOutput `pulumi:"authorizationEndpoint"`
// The HTTP Verbs supported by the Authorization Endpoint. Possible values are `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, `PUT` and `TRACE`.
//
// > **Note:** `GET` must always be present.
AuthorizationMethods pulumi.StringArrayOutput `pulumi:"authorizationMethods"`
// The mechanism by which Access Tokens are passed to the API. Possible values are `authorizationHeader` and `query`.
BearerTokenSendingMethods pulumi.StringArrayOutput `pulumi:"bearerTokenSendingMethods"`
// The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are `Basic` and `Body`.
ClientAuthenticationMethods pulumi.StringArrayOutput `pulumi:"clientAuthenticationMethods"`
// The Client/App ID registered with this Authorization Server.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The URI of page where Client/App Registration is performed for this Authorization Server.
ClientRegistrationEndpoint pulumi.StringOutput `pulumi:"clientRegistrationEndpoint"`
// The Client/App Secret registered with this Authorization Server.
ClientSecret pulumi.StringPtrOutput `pulumi:"clientSecret"`
// The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.
DefaultScope pulumi.StringPtrOutput `pulumi:"defaultScope"`
// A description of the Authorization Server, which may contain HTML formatting tags.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The user-friendly name of this Authorization Server.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Form of Authorization Grants required when requesting an Access Token. Possible values are `authorizationCode`, `clientCredentials`, `implicit` and `resourceOwnerPassword`.
GrantTypes pulumi.StringArrayOutput `pulumi:"grantTypes"`
// The name of this Authorization Server. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The password associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerPassword pulumi.StringPtrOutput `pulumi:"resourceOwnerPassword"`
// The username associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerUsername pulumi.StringPtrOutput `pulumi:"resourceOwnerUsername"`
// Does this Authorization Server support State? If this is set to `true` the client may use the state parameter to raise protocol security.
SupportState pulumi.BoolPtrOutput `pulumi:"supportState"`
// A `tokenBodyParameter` block as defined below.
TokenBodyParameters AuthorizationServerTokenBodyParameterArrayOutput `pulumi:"tokenBodyParameters"`
// The OAUTH Token Endpoint.
TokenEndpoint pulumi.StringPtrOutput `pulumi:"tokenEndpoint"`
}
// NewAuthorizationServer registers a new resource with the given unique name, arguments, and options.
func NewAuthorizationServer(ctx *pulumi.Context,
name string, args *AuthorizationServerArgs, opts ...pulumi.ResourceOption) (*AuthorizationServer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.AuthorizationEndpoint == nil {
return nil, errors.New("invalid value for required argument 'AuthorizationEndpoint'")
}
if args.AuthorizationMethods == nil {
return nil, errors.New("invalid value for required argument 'AuthorizationMethods'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientRegistrationEndpoint == nil {
return nil, errors.New("invalid value for required argument 'ClientRegistrationEndpoint'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.GrantTypes == nil {
return nil, errors.New("invalid value for required argument 'GrantTypes'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringPtrInput)
}
if args.ResourceOwnerPassword != nil {
args.ResourceOwnerPassword = pulumi.ToSecret(args.ResourceOwnerPassword).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
"resourceOwnerPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AuthorizationServer
err := ctx.RegisterResource("azure:apimanagement/authorizationServer:AuthorizationServer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAuthorizationServer gets an existing AuthorizationServer resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAuthorizationServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AuthorizationServerState, opts ...pulumi.ResourceOption) (*AuthorizationServer, error) {
var resource AuthorizationServer
err := ctx.ReadResource("azure:apimanagement/authorizationServer:AuthorizationServer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AuthorizationServer resources.
type authorizationServerState struct {
// The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The OAUTH Authorization Endpoint.
AuthorizationEndpoint *string `pulumi:"authorizationEndpoint"`
// The HTTP Verbs supported by the Authorization Endpoint. Possible values are `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, `PUT` and `TRACE`.
//
// > **Note:** `GET` must always be present.
AuthorizationMethods []string `pulumi:"authorizationMethods"`
// The mechanism by which Access Tokens are passed to the API. Possible values are `authorizationHeader` and `query`.
BearerTokenSendingMethods []string `pulumi:"bearerTokenSendingMethods"`
// The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are `Basic` and `Body`.
ClientAuthenticationMethods []string `pulumi:"clientAuthenticationMethods"`
// The Client/App ID registered with this Authorization Server.
ClientId *string `pulumi:"clientId"`
// The URI of page where Client/App Registration is performed for this Authorization Server.
ClientRegistrationEndpoint *string `pulumi:"clientRegistrationEndpoint"`
// The Client/App Secret registered with this Authorization Server.
ClientSecret *string `pulumi:"clientSecret"`
// The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.
DefaultScope *string `pulumi:"defaultScope"`
// A description of the Authorization Server, which may contain HTML formatting tags.
Description *string `pulumi:"description"`
// The user-friendly name of this Authorization Server.
DisplayName *string `pulumi:"displayName"`
// Form of Authorization Grants required when requesting an Access Token. Possible values are `authorizationCode`, `clientCredentials`, `implicit` and `resourceOwnerPassword`.
GrantTypes []string `pulumi:"grantTypes"`
// The name of this Authorization Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The password associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerPassword *string `pulumi:"resourceOwnerPassword"`
// The username associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerUsername *string `pulumi:"resourceOwnerUsername"`
// Does this Authorization Server support State? If this is set to `true` the client may use the state parameter to raise protocol security.
SupportState *bool `pulumi:"supportState"`
// A `tokenBodyParameter` block as defined below.
TokenBodyParameters []AuthorizationServerTokenBodyParameter `pulumi:"tokenBodyParameters"`
// The OAUTH Token Endpoint.
TokenEndpoint *string `pulumi:"tokenEndpoint"`
}
type AuthorizationServerState struct {
// The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The OAUTH Authorization Endpoint.
AuthorizationEndpoint pulumi.StringPtrInput
// The HTTP Verbs supported by the Authorization Endpoint. Possible values are `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, `PUT` and `TRACE`.
//
// > **Note:** `GET` must always be present.
AuthorizationMethods pulumi.StringArrayInput
// The mechanism by which Access Tokens are passed to the API. Possible values are `authorizationHeader` and `query`.
BearerTokenSendingMethods pulumi.StringArrayInput
// The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are `Basic` and `Body`.
ClientAuthenticationMethods pulumi.StringArrayInput
// The Client/App ID registered with this Authorization Server.
ClientId pulumi.StringPtrInput
// The URI of page where Client/App Registration is performed for this Authorization Server.
ClientRegistrationEndpoint pulumi.StringPtrInput
// The Client/App Secret registered with this Authorization Server.
ClientSecret pulumi.StringPtrInput
// The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.
DefaultScope pulumi.StringPtrInput
// A description of the Authorization Server, which may contain HTML formatting tags.
Description pulumi.StringPtrInput
// The user-friendly name of this Authorization Server.
DisplayName pulumi.StringPtrInput
// Form of Authorization Grants required when requesting an Access Token. Possible values are `authorizationCode`, `clientCredentials`, `implicit` and `resourceOwnerPassword`.
GrantTypes pulumi.StringArrayInput
// The name of this Authorization Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The password associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerPassword pulumi.StringPtrInput
// The username associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerUsername pulumi.StringPtrInput
// Does this Authorization Server support State? If this is set to `true` the client may use the state parameter to raise protocol security.
SupportState pulumi.BoolPtrInput
// A `tokenBodyParameter` block as defined below.
TokenBodyParameters AuthorizationServerTokenBodyParameterArrayInput
// The OAUTH Token Endpoint.
TokenEndpoint pulumi.StringPtrInput
}
func (AuthorizationServerState) ElementType() reflect.Type {
return reflect.TypeOf((*authorizationServerState)(nil)).Elem()
}
type authorizationServerArgs struct {
// The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The OAUTH Authorization Endpoint.
AuthorizationEndpoint string `pulumi:"authorizationEndpoint"`
// The HTTP Verbs supported by the Authorization Endpoint. Possible values are `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, `PUT` and `TRACE`.
//
// > **Note:** `GET` must always be present.
AuthorizationMethods []string `pulumi:"authorizationMethods"`
// The mechanism by which Access Tokens are passed to the API. Possible values are `authorizationHeader` and `query`.
BearerTokenSendingMethods []string `pulumi:"bearerTokenSendingMethods"`
// The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are `Basic` and `Body`.
ClientAuthenticationMethods []string `pulumi:"clientAuthenticationMethods"`
// The Client/App ID registered with this Authorization Server.
ClientId string `pulumi:"clientId"`
// The URI of page where Client/App Registration is performed for this Authorization Server.
ClientRegistrationEndpoint string `pulumi:"clientRegistrationEndpoint"`
// The Client/App Secret registered with this Authorization Server.
ClientSecret *string `pulumi:"clientSecret"`
// The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.
DefaultScope *string `pulumi:"defaultScope"`
// A description of the Authorization Server, which may contain HTML formatting tags.
Description *string `pulumi:"description"`
// The user-friendly name of this Authorization Server.
DisplayName string `pulumi:"displayName"`
// Form of Authorization Grants required when requesting an Access Token. Possible values are `authorizationCode`, `clientCredentials`, `implicit` and `resourceOwnerPassword`.
GrantTypes []string `pulumi:"grantTypes"`
// The name of this Authorization Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The password associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerPassword *string `pulumi:"resourceOwnerPassword"`
// The username associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerUsername *string `pulumi:"resourceOwnerUsername"`
// Does this Authorization Server support State? If this is set to `true` the client may use the state parameter to raise protocol security.
SupportState *bool `pulumi:"supportState"`
// A `tokenBodyParameter` block as defined below.
TokenBodyParameters []AuthorizationServerTokenBodyParameter `pulumi:"tokenBodyParameters"`
// The OAUTH Token Endpoint.
TokenEndpoint *string `pulumi:"tokenEndpoint"`
}
// The set of arguments for constructing a AuthorizationServer resource.
type AuthorizationServerArgs struct {
// The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The OAUTH Authorization Endpoint.
AuthorizationEndpoint pulumi.StringInput
// The HTTP Verbs supported by the Authorization Endpoint. Possible values are `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, `PUT` and `TRACE`.
//
// > **Note:** `GET` must always be present.
AuthorizationMethods pulumi.StringArrayInput
// The mechanism by which Access Tokens are passed to the API. Possible values are `authorizationHeader` and `query`.
BearerTokenSendingMethods pulumi.StringArrayInput
// The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are `Basic` and `Body`.
ClientAuthenticationMethods pulumi.StringArrayInput
// The Client/App ID registered with this Authorization Server.
ClientId pulumi.StringInput
// The URI of page where Client/App Registration is performed for this Authorization Server.
ClientRegistrationEndpoint pulumi.StringInput
// The Client/App Secret registered with this Authorization Server.
ClientSecret pulumi.StringPtrInput
// The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.
DefaultScope pulumi.StringPtrInput
// A description of the Authorization Server, which may contain HTML formatting tags.
Description pulumi.StringPtrInput
// The user-friendly name of this Authorization Server.
DisplayName pulumi.StringInput
// Form of Authorization Grants required when requesting an Access Token. Possible values are `authorizationCode`, `clientCredentials`, `implicit` and `resourceOwnerPassword`.
GrantTypes pulumi.StringArrayInput
// The name of this Authorization Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The password associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerPassword pulumi.StringPtrInput
// The username associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
ResourceOwnerUsername pulumi.StringPtrInput
// Does this Authorization Server support State? If this is set to `true` the client may use the state parameter to raise protocol security.
SupportState pulumi.BoolPtrInput
// A `tokenBodyParameter` block as defined below.
TokenBodyParameters AuthorizationServerTokenBodyParameterArrayInput
// The OAUTH Token Endpoint.
TokenEndpoint pulumi.StringPtrInput
}
func (AuthorizationServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*authorizationServerArgs)(nil)).Elem()
}
type AuthorizationServerInput interface {
pulumi.Input
ToAuthorizationServerOutput() AuthorizationServerOutput
ToAuthorizationServerOutputWithContext(ctx context.Context) AuthorizationServerOutput
}
func (*AuthorizationServer) ElementType() reflect.Type {
return reflect.TypeOf((**AuthorizationServer)(nil)).Elem()
}
func (i *AuthorizationServer) ToAuthorizationServerOutput() AuthorizationServerOutput {
return i.ToAuthorizationServerOutputWithContext(context.Background())
}
func (i *AuthorizationServer) ToAuthorizationServerOutputWithContext(ctx context.Context) AuthorizationServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthorizationServerOutput)
}
// AuthorizationServerArrayInput is an input type that accepts AuthorizationServerArray and AuthorizationServerArrayOutput values.
// You can construct a concrete instance of `AuthorizationServerArrayInput` via:
//
// AuthorizationServerArray{ AuthorizationServerArgs{...} }
type AuthorizationServerArrayInput interface {
pulumi.Input
ToAuthorizationServerArrayOutput() AuthorizationServerArrayOutput
ToAuthorizationServerArrayOutputWithContext(context.Context) AuthorizationServerArrayOutput
}
type AuthorizationServerArray []AuthorizationServerInput
func (AuthorizationServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AuthorizationServer)(nil)).Elem()
}
func (i AuthorizationServerArray) ToAuthorizationServerArrayOutput() AuthorizationServerArrayOutput {
return i.ToAuthorizationServerArrayOutputWithContext(context.Background())
}
func (i AuthorizationServerArray) ToAuthorizationServerArrayOutputWithContext(ctx context.Context) AuthorizationServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthorizationServerArrayOutput)
}
// AuthorizationServerMapInput is an input type that accepts AuthorizationServerMap and AuthorizationServerMapOutput values.
// You can construct a concrete instance of `AuthorizationServerMapInput` via:
//
// AuthorizationServerMap{ "key": AuthorizationServerArgs{...} }
type AuthorizationServerMapInput interface {
pulumi.Input
ToAuthorizationServerMapOutput() AuthorizationServerMapOutput
ToAuthorizationServerMapOutputWithContext(context.Context) AuthorizationServerMapOutput
}
type AuthorizationServerMap map[string]AuthorizationServerInput
func (AuthorizationServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AuthorizationServer)(nil)).Elem()
}
func (i AuthorizationServerMap) ToAuthorizationServerMapOutput() AuthorizationServerMapOutput {
return i.ToAuthorizationServerMapOutputWithContext(context.Background())
}
func (i AuthorizationServerMap) ToAuthorizationServerMapOutputWithContext(ctx context.Context) AuthorizationServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthorizationServerMapOutput)
}
type AuthorizationServerOutput struct{ *pulumi.OutputState }
func (AuthorizationServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AuthorizationServer)(nil)).Elem()
}
func (o AuthorizationServerOutput) ToAuthorizationServerOutput() AuthorizationServerOutput {
return o
}
func (o AuthorizationServerOutput) ToAuthorizationServerOutputWithContext(ctx context.Context) AuthorizationServerOutput {
return o
}
// The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.
func (o AuthorizationServerOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The OAUTH Authorization Endpoint.
func (o AuthorizationServerOutput) AuthorizationEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringOutput { return v.AuthorizationEndpoint }).(pulumi.StringOutput)
}
// The HTTP Verbs supported by the Authorization Endpoint. Possible values are `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, `PUT` and `TRACE`.
//
// > **Note:** `GET` must always be present.
func (o AuthorizationServerOutput) AuthorizationMethods() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringArrayOutput { return v.AuthorizationMethods }).(pulumi.StringArrayOutput)
}
// The mechanism by which Access Tokens are passed to the API. Possible values are `authorizationHeader` and `query`.
func (o AuthorizationServerOutput) BearerTokenSendingMethods() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringArrayOutput { return v.BearerTokenSendingMethods }).(pulumi.StringArrayOutput)
}
// The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are `Basic` and `Body`.
func (o AuthorizationServerOutput) ClientAuthenticationMethods() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringArrayOutput { return v.ClientAuthenticationMethods }).(pulumi.StringArrayOutput)
}
// The Client/App ID registered with this Authorization Server.
func (o AuthorizationServerOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// The URI of page where Client/App Registration is performed for this Authorization Server.
func (o AuthorizationServerOutput) ClientRegistrationEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringOutput { return v.ClientRegistrationEndpoint }).(pulumi.StringOutput)
}
// The Client/App Secret registered with this Authorization Server.
func (o AuthorizationServerOutput) ClientSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringPtrOutput { return v.ClientSecret }).(pulumi.StringPtrOutput)
}
// The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.
func (o AuthorizationServerOutput) DefaultScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringPtrOutput { return v.DefaultScope }).(pulumi.StringPtrOutput)
}
// A description of the Authorization Server, which may contain HTML formatting tags.
func (o AuthorizationServerOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The user-friendly name of this Authorization Server.
func (o AuthorizationServerOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Form of Authorization Grants required when requesting an Access Token. Possible values are `authorizationCode`, `clientCredentials`, `implicit` and `resourceOwnerPassword`.
func (o AuthorizationServerOutput) GrantTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringArrayOutput { return v.GrantTypes }).(pulumi.StringArrayOutput)
}
// The name of this Authorization Server. Changing this forces a new resource to be created.
func (o AuthorizationServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o AuthorizationServerOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The password associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
func (o AuthorizationServerOutput) ResourceOwnerPassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringPtrOutput { return v.ResourceOwnerPassword }).(pulumi.StringPtrOutput)
}
// The username associated with the Resource Owner.
//
// > **Note:** This can only be specified when `grantType` includes `resourceOwnerPassword`.
func (o AuthorizationServerOutput) ResourceOwnerUsername() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringPtrOutput { return v.ResourceOwnerUsername }).(pulumi.StringPtrOutput)
}
// Does this Authorization Server support State? If this is set to `true` the client may use the state parameter to raise protocol security.
func (o AuthorizationServerOutput) SupportState() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.BoolPtrOutput { return v.SupportState }).(pulumi.BoolPtrOutput)
}
// A `tokenBodyParameter` block as defined below.
func (o AuthorizationServerOutput) TokenBodyParameters() AuthorizationServerTokenBodyParameterArrayOutput {
return o.ApplyT(func(v *AuthorizationServer) AuthorizationServerTokenBodyParameterArrayOutput {
return v.TokenBodyParameters
}).(AuthorizationServerTokenBodyParameterArrayOutput)
}
// The OAUTH Token Endpoint.
func (o AuthorizationServerOutput) TokenEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AuthorizationServer) pulumi.StringPtrOutput { return v.TokenEndpoint }).(pulumi.StringPtrOutput)
}
type AuthorizationServerArrayOutput struct{ *pulumi.OutputState }
func (AuthorizationServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AuthorizationServer)(nil)).Elem()
}
func (o AuthorizationServerArrayOutput) ToAuthorizationServerArrayOutput() AuthorizationServerArrayOutput {
return o
}
func (o AuthorizationServerArrayOutput) ToAuthorizationServerArrayOutputWithContext(ctx context.Context) AuthorizationServerArrayOutput {
return o
}
func (o AuthorizationServerArrayOutput) Index(i pulumi.IntInput) AuthorizationServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AuthorizationServer {
return vs[0].([]*AuthorizationServer)[vs[1].(int)]
}).(AuthorizationServerOutput)
}
type AuthorizationServerMapOutput struct{ *pulumi.OutputState }
func (AuthorizationServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AuthorizationServer)(nil)).Elem()
}
func (o AuthorizationServerMapOutput) ToAuthorizationServerMapOutput() AuthorizationServerMapOutput {
return o
}
func (o AuthorizationServerMapOutput) ToAuthorizationServerMapOutputWithContext(ctx context.Context) AuthorizationServerMapOutput {
return o
}
func (o AuthorizationServerMapOutput) MapIndex(k pulumi.StringInput) AuthorizationServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AuthorizationServer {
return vs[0].(map[string]*AuthorizationServer)[vs[1].(string)]
}).(AuthorizationServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationServerInput)(nil)).Elem(), &AuthorizationServer{})
pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationServerArrayInput)(nil)).Elem(), AuthorizationServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationServerMapInput)(nil)).Elem(), AuthorizationServerMap{})
pulumi.RegisterOutputType(AuthorizationServerOutput{})
pulumi.RegisterOutputType(AuthorizationServerArrayOutput{})
pulumi.RegisterOutputType(AuthorizationServerMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/namedValue.go | sdk/go/azure/apimanagement/namedValue.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Named Value.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewNamedValue(ctx, "example", &apimanagement.NamedValueArgs{
// Name: pulumi.String("example-apimg"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// DisplayName: pulumi.String("ExampleProperty"),
// Value: pulumi.String("Example Value"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Properties can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/namedValue:NamedValue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ApiManagement/service/example-apim/namedValues/example-apimp
// ```
type NamedValue struct {
pulumi.CustomResourceState
// The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The display name of this API Management Named Value.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The name of the API Management Named Value. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies whether the API Management Named Value is secret. Valid values are `true` or `false`. The default value is `false`.
//
// > **NOTE:** setting the field `secret` to `true` doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.
Secret pulumi.BoolPtrOutput `pulumi:"secret"`
// A list of tags to be applied to the API Management Named Value.
Tags pulumi.StringArrayOutput `pulumi:"tags"`
// The value of this API Management Named Value.
Value pulumi.StringPtrOutput `pulumi:"value"`
// A `valueFromKeyVault` block as defined below. If specified, `secret` must also be set to `true`.
ValueFromKeyVault NamedValueValueFromKeyVaultPtrOutput `pulumi:"valueFromKeyVault"`
}
// NewNamedValue registers a new resource with the given unique name, arguments, and options.
func NewNamedValue(ctx *pulumi.Context,
name string, args *NamedValueArgs, opts ...pulumi.ResourceOption) (*NamedValue, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Value != nil {
args.Value = pulumi.ToSecret(args.Value).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"value",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource NamedValue
err := ctx.RegisterResource("azure:apimanagement/namedValue:NamedValue", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamedValue gets an existing NamedValue resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetNamedValue(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamedValueState, opts ...pulumi.ResourceOption) (*NamedValue, error) {
var resource NamedValue
err := ctx.ReadResource("azure:apimanagement/namedValue:NamedValue", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NamedValue resources.
type namedValueState struct {
// The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The display name of this API Management Named Value.
DisplayName *string `pulumi:"displayName"`
// The name of the API Management Named Value. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies whether the API Management Named Value is secret. Valid values are `true` or `false`. The default value is `false`.
//
// > **NOTE:** setting the field `secret` to `true` doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.
Secret *bool `pulumi:"secret"`
// A list of tags to be applied to the API Management Named Value.
Tags []string `pulumi:"tags"`
// The value of this API Management Named Value.
Value *string `pulumi:"value"`
// A `valueFromKeyVault` block as defined below. If specified, `secret` must also be set to `true`.
ValueFromKeyVault *NamedValueValueFromKeyVault `pulumi:"valueFromKeyVault"`
}
type NamedValueState struct {
// The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The display name of this API Management Named Value.
DisplayName pulumi.StringPtrInput
// The name of the API Management Named Value. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Specifies whether the API Management Named Value is secret. Valid values are `true` or `false`. The default value is `false`.
//
// > **NOTE:** setting the field `secret` to `true` doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.
Secret pulumi.BoolPtrInput
// A list of tags to be applied to the API Management Named Value.
Tags pulumi.StringArrayInput
// The value of this API Management Named Value.
Value pulumi.StringPtrInput
// A `valueFromKeyVault` block as defined below. If specified, `secret` must also be set to `true`.
ValueFromKeyVault NamedValueValueFromKeyVaultPtrInput
}
func (NamedValueState) ElementType() reflect.Type {
return reflect.TypeOf((*namedValueState)(nil)).Elem()
}
type namedValueArgs struct {
// The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The display name of this API Management Named Value.
DisplayName string `pulumi:"displayName"`
// The name of the API Management Named Value. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies whether the API Management Named Value is secret. Valid values are `true` or `false`. The default value is `false`.
//
// > **NOTE:** setting the field `secret` to `true` doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.
Secret *bool `pulumi:"secret"`
// A list of tags to be applied to the API Management Named Value.
Tags []string `pulumi:"tags"`
// The value of this API Management Named Value.
Value *string `pulumi:"value"`
// A `valueFromKeyVault` block as defined below. If specified, `secret` must also be set to `true`.
ValueFromKeyVault *NamedValueValueFromKeyVault `pulumi:"valueFromKeyVault"`
}
// The set of arguments for constructing a NamedValue resource.
type NamedValueArgs struct {
// The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The display name of this API Management Named Value.
DisplayName pulumi.StringInput
// The name of the API Management Named Value. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies whether the API Management Named Value is secret. Valid values are `true` or `false`. The default value is `false`.
//
// > **NOTE:** setting the field `secret` to `true` doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.
Secret pulumi.BoolPtrInput
// A list of tags to be applied to the API Management Named Value.
Tags pulumi.StringArrayInput
// The value of this API Management Named Value.
Value pulumi.StringPtrInput
// A `valueFromKeyVault` block as defined below. If specified, `secret` must also be set to `true`.
ValueFromKeyVault NamedValueValueFromKeyVaultPtrInput
}
func (NamedValueArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namedValueArgs)(nil)).Elem()
}
type NamedValueInput interface {
pulumi.Input
ToNamedValueOutput() NamedValueOutput
ToNamedValueOutputWithContext(ctx context.Context) NamedValueOutput
}
func (*NamedValue) ElementType() reflect.Type {
return reflect.TypeOf((**NamedValue)(nil)).Elem()
}
func (i *NamedValue) ToNamedValueOutput() NamedValueOutput {
return i.ToNamedValueOutputWithContext(context.Background())
}
func (i *NamedValue) ToNamedValueOutputWithContext(ctx context.Context) NamedValueOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamedValueOutput)
}
// NamedValueArrayInput is an input type that accepts NamedValueArray and NamedValueArrayOutput values.
// You can construct a concrete instance of `NamedValueArrayInput` via:
//
// NamedValueArray{ NamedValueArgs{...} }
type NamedValueArrayInput interface {
pulumi.Input
ToNamedValueArrayOutput() NamedValueArrayOutput
ToNamedValueArrayOutputWithContext(context.Context) NamedValueArrayOutput
}
type NamedValueArray []NamedValueInput
func (NamedValueArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamedValue)(nil)).Elem()
}
func (i NamedValueArray) ToNamedValueArrayOutput() NamedValueArrayOutput {
return i.ToNamedValueArrayOutputWithContext(context.Background())
}
func (i NamedValueArray) ToNamedValueArrayOutputWithContext(ctx context.Context) NamedValueArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamedValueArrayOutput)
}
// NamedValueMapInput is an input type that accepts NamedValueMap and NamedValueMapOutput values.
// You can construct a concrete instance of `NamedValueMapInput` via:
//
// NamedValueMap{ "key": NamedValueArgs{...} }
type NamedValueMapInput interface {
pulumi.Input
ToNamedValueMapOutput() NamedValueMapOutput
ToNamedValueMapOutputWithContext(context.Context) NamedValueMapOutput
}
type NamedValueMap map[string]NamedValueInput
func (NamedValueMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamedValue)(nil)).Elem()
}
func (i NamedValueMap) ToNamedValueMapOutput() NamedValueMapOutput {
return i.ToNamedValueMapOutputWithContext(context.Background())
}
func (i NamedValueMap) ToNamedValueMapOutputWithContext(ctx context.Context) NamedValueMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamedValueMapOutput)
}
type NamedValueOutput struct{ *pulumi.OutputState }
func (NamedValueOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamedValue)(nil)).Elem()
}
func (o NamedValueOutput) ToNamedValueOutput() NamedValueOutput {
return o
}
func (o NamedValueOutput) ToNamedValueOutputWithContext(ctx context.Context) NamedValueOutput {
return o
}
// The name of the API Management Service in which the API Management Named Value should exist. Changing this forces a new resource to be created.
func (o NamedValueOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *NamedValue) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The display name of this API Management Named Value.
func (o NamedValueOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *NamedValue) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The name of the API Management Named Value. Changing this forces a new resource to be created.
func (o NamedValueOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NamedValue) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Named Value should exist. Changing this forces a new resource to be created.
func (o NamedValueOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *NamedValue) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies whether the API Management Named Value is secret. Valid values are `true` or `false`. The default value is `false`.
//
// > **NOTE:** setting the field `secret` to `true` doesn't make this field sensitive in the provider, instead it marks the value as secret and encrypts the value in Azure.
func (o NamedValueOutput) Secret() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamedValue) pulumi.BoolPtrOutput { return v.Secret }).(pulumi.BoolPtrOutput)
}
// A list of tags to be applied to the API Management Named Value.
func (o NamedValueOutput) Tags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *NamedValue) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput)
}
// The value of this API Management Named Value.
func (o NamedValueOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamedValue) pulumi.StringPtrOutput { return v.Value }).(pulumi.StringPtrOutput)
}
// A `valueFromKeyVault` block as defined below. If specified, `secret` must also be set to `true`.
func (o NamedValueOutput) ValueFromKeyVault() NamedValueValueFromKeyVaultPtrOutput {
return o.ApplyT(func(v *NamedValue) NamedValueValueFromKeyVaultPtrOutput { return v.ValueFromKeyVault }).(NamedValueValueFromKeyVaultPtrOutput)
}
type NamedValueArrayOutput struct{ *pulumi.OutputState }
func (NamedValueArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamedValue)(nil)).Elem()
}
func (o NamedValueArrayOutput) ToNamedValueArrayOutput() NamedValueArrayOutput {
return o
}
func (o NamedValueArrayOutput) ToNamedValueArrayOutputWithContext(ctx context.Context) NamedValueArrayOutput {
return o
}
func (o NamedValueArrayOutput) Index(i pulumi.IntInput) NamedValueOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NamedValue {
return vs[0].([]*NamedValue)[vs[1].(int)]
}).(NamedValueOutput)
}
type NamedValueMapOutput struct{ *pulumi.OutputState }
func (NamedValueMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamedValue)(nil)).Elem()
}
func (o NamedValueMapOutput) ToNamedValueMapOutput() NamedValueMapOutput {
return o
}
func (o NamedValueMapOutput) ToNamedValueMapOutputWithContext(ctx context.Context) NamedValueMapOutput {
return o
}
func (o NamedValueMapOutput) MapIndex(k pulumi.StringInput) NamedValueOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NamedValue {
return vs[0].(map[string]*NamedValue)[vs[1].(string)]
}).(NamedValueOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamedValueInput)(nil)).Elem(), &NamedValue{})
pulumi.RegisterInputType(reflect.TypeOf((*NamedValueArrayInput)(nil)).Elem(), NamedValueArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamedValueMapInput)(nil)).Elem(), NamedValueMap{})
pulumi.RegisterOutputType(NamedValueOutput{})
pulumi.RegisterOutputType(NamedValueArrayOutput{})
pulumi.RegisterOutputType(NamedValueMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/notificationRecipientEmail.go | sdk/go/azure/apimanagement/notificationRecipientEmail.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management Notification Recipient Email.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewNotificationRecipientEmail(ctx, "example", &apimanagement.NotificationRecipientEmailArgs{
// ApiManagementId: exampleService.ID(),
// NotificationType: pulumi.String("AccountClosedPublisher"),
// Email: pulumi.String("foo@bar.com"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Notification Recipient Emails can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/notificationRecipientEmail:NotificationRecipientEmail example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/notifications/notificationName1/recipientEmails/email1
// ```
type NotificationRecipientEmail struct {
pulumi.CustomResourceState
// The ID of the API Management Service from which to create this Notification Recipient Email. Changing this forces a new API Management Notification Recipient Email to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created.
Email pulumi.StringOutput `pulumi:"email"`
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType pulumi.StringOutput `pulumi:"notificationType"`
}
// NewNotificationRecipientEmail registers a new resource with the given unique name, arguments, and options.
func NewNotificationRecipientEmail(ctx *pulumi.Context,
name string, args *NotificationRecipientEmailArgs, opts ...pulumi.ResourceOption) (*NotificationRecipientEmail, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
if args.Email == nil {
return nil, errors.New("invalid value for required argument 'Email'")
}
if args.NotificationType == nil {
return nil, errors.New("invalid value for required argument 'NotificationType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NotificationRecipientEmail
err := ctx.RegisterResource("azure:apimanagement/notificationRecipientEmail:NotificationRecipientEmail", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNotificationRecipientEmail gets an existing NotificationRecipientEmail resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetNotificationRecipientEmail(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NotificationRecipientEmailState, opts ...pulumi.ResourceOption) (*NotificationRecipientEmail, error) {
var resource NotificationRecipientEmail
err := ctx.ReadResource("azure:apimanagement/notificationRecipientEmail:NotificationRecipientEmail", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NotificationRecipientEmail resources.
type notificationRecipientEmailState struct {
// The ID of the API Management Service from which to create this Notification Recipient Email. Changing this forces a new API Management Notification Recipient Email to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created.
Email *string `pulumi:"email"`
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType *string `pulumi:"notificationType"`
}
type NotificationRecipientEmailState struct {
// The ID of the API Management Service from which to create this Notification Recipient Email. Changing this forces a new API Management Notification Recipient Email to be created.
ApiManagementId pulumi.StringPtrInput
// The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created.
Email pulumi.StringPtrInput
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType pulumi.StringPtrInput
}
func (NotificationRecipientEmailState) ElementType() reflect.Type {
return reflect.TypeOf((*notificationRecipientEmailState)(nil)).Elem()
}
type notificationRecipientEmailArgs struct {
// The ID of the API Management Service from which to create this Notification Recipient Email. Changing this forces a new API Management Notification Recipient Email to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created.
Email string `pulumi:"email"`
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType string `pulumi:"notificationType"`
}
// The set of arguments for constructing a NotificationRecipientEmail resource.
type NotificationRecipientEmailArgs struct {
// The ID of the API Management Service from which to create this Notification Recipient Email. Changing this forces a new API Management Notification Recipient Email to be created.
ApiManagementId pulumi.StringInput
// The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created.
Email pulumi.StringInput
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType pulumi.StringInput
}
func (NotificationRecipientEmailArgs) ElementType() reflect.Type {
return reflect.TypeOf((*notificationRecipientEmailArgs)(nil)).Elem()
}
type NotificationRecipientEmailInput interface {
pulumi.Input
ToNotificationRecipientEmailOutput() NotificationRecipientEmailOutput
ToNotificationRecipientEmailOutputWithContext(ctx context.Context) NotificationRecipientEmailOutput
}
func (*NotificationRecipientEmail) ElementType() reflect.Type {
return reflect.TypeOf((**NotificationRecipientEmail)(nil)).Elem()
}
func (i *NotificationRecipientEmail) ToNotificationRecipientEmailOutput() NotificationRecipientEmailOutput {
return i.ToNotificationRecipientEmailOutputWithContext(context.Background())
}
func (i *NotificationRecipientEmail) ToNotificationRecipientEmailOutputWithContext(ctx context.Context) NotificationRecipientEmailOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationRecipientEmailOutput)
}
// NotificationRecipientEmailArrayInput is an input type that accepts NotificationRecipientEmailArray and NotificationRecipientEmailArrayOutput values.
// You can construct a concrete instance of `NotificationRecipientEmailArrayInput` via:
//
// NotificationRecipientEmailArray{ NotificationRecipientEmailArgs{...} }
type NotificationRecipientEmailArrayInput interface {
pulumi.Input
ToNotificationRecipientEmailArrayOutput() NotificationRecipientEmailArrayOutput
ToNotificationRecipientEmailArrayOutputWithContext(context.Context) NotificationRecipientEmailArrayOutput
}
type NotificationRecipientEmailArray []NotificationRecipientEmailInput
func (NotificationRecipientEmailArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NotificationRecipientEmail)(nil)).Elem()
}
func (i NotificationRecipientEmailArray) ToNotificationRecipientEmailArrayOutput() NotificationRecipientEmailArrayOutput {
return i.ToNotificationRecipientEmailArrayOutputWithContext(context.Background())
}
func (i NotificationRecipientEmailArray) ToNotificationRecipientEmailArrayOutputWithContext(ctx context.Context) NotificationRecipientEmailArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationRecipientEmailArrayOutput)
}
// NotificationRecipientEmailMapInput is an input type that accepts NotificationRecipientEmailMap and NotificationRecipientEmailMapOutput values.
// You can construct a concrete instance of `NotificationRecipientEmailMapInput` via:
//
// NotificationRecipientEmailMap{ "key": NotificationRecipientEmailArgs{...} }
type NotificationRecipientEmailMapInput interface {
pulumi.Input
ToNotificationRecipientEmailMapOutput() NotificationRecipientEmailMapOutput
ToNotificationRecipientEmailMapOutputWithContext(context.Context) NotificationRecipientEmailMapOutput
}
type NotificationRecipientEmailMap map[string]NotificationRecipientEmailInput
func (NotificationRecipientEmailMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NotificationRecipientEmail)(nil)).Elem()
}
func (i NotificationRecipientEmailMap) ToNotificationRecipientEmailMapOutput() NotificationRecipientEmailMapOutput {
return i.ToNotificationRecipientEmailMapOutputWithContext(context.Background())
}
func (i NotificationRecipientEmailMap) ToNotificationRecipientEmailMapOutputWithContext(ctx context.Context) NotificationRecipientEmailMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationRecipientEmailMapOutput)
}
type NotificationRecipientEmailOutput struct{ *pulumi.OutputState }
func (NotificationRecipientEmailOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NotificationRecipientEmail)(nil)).Elem()
}
func (o NotificationRecipientEmailOutput) ToNotificationRecipientEmailOutput() NotificationRecipientEmailOutput {
return o
}
func (o NotificationRecipientEmailOutput) ToNotificationRecipientEmailOutputWithContext(ctx context.Context) NotificationRecipientEmailOutput {
return o
}
// The ID of the API Management Service from which to create this Notification Recipient Email. Changing this forces a new API Management Notification Recipient Email to be created.
func (o NotificationRecipientEmailOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *NotificationRecipientEmail) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created.
func (o NotificationRecipientEmailOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v *NotificationRecipientEmail) pulumi.StringOutput { return v.Email }).(pulumi.StringOutput)
}
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
func (o NotificationRecipientEmailOutput) NotificationType() pulumi.StringOutput {
return o.ApplyT(func(v *NotificationRecipientEmail) pulumi.StringOutput { return v.NotificationType }).(pulumi.StringOutput)
}
type NotificationRecipientEmailArrayOutput struct{ *pulumi.OutputState }
func (NotificationRecipientEmailArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NotificationRecipientEmail)(nil)).Elem()
}
func (o NotificationRecipientEmailArrayOutput) ToNotificationRecipientEmailArrayOutput() NotificationRecipientEmailArrayOutput {
return o
}
func (o NotificationRecipientEmailArrayOutput) ToNotificationRecipientEmailArrayOutputWithContext(ctx context.Context) NotificationRecipientEmailArrayOutput {
return o
}
func (o NotificationRecipientEmailArrayOutput) Index(i pulumi.IntInput) NotificationRecipientEmailOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NotificationRecipientEmail {
return vs[0].([]*NotificationRecipientEmail)[vs[1].(int)]
}).(NotificationRecipientEmailOutput)
}
type NotificationRecipientEmailMapOutput struct{ *pulumi.OutputState }
func (NotificationRecipientEmailMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NotificationRecipientEmail)(nil)).Elem()
}
func (o NotificationRecipientEmailMapOutput) ToNotificationRecipientEmailMapOutput() NotificationRecipientEmailMapOutput {
return o
}
func (o NotificationRecipientEmailMapOutput) ToNotificationRecipientEmailMapOutputWithContext(ctx context.Context) NotificationRecipientEmailMapOutput {
return o
}
func (o NotificationRecipientEmailMapOutput) MapIndex(k pulumi.StringInput) NotificationRecipientEmailOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NotificationRecipientEmail {
return vs[0].(map[string]*NotificationRecipientEmail)[vs[1].(string)]
}).(NotificationRecipientEmailOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NotificationRecipientEmailInput)(nil)).Elem(), &NotificationRecipientEmail{})
pulumi.RegisterInputType(reflect.TypeOf((*NotificationRecipientEmailArrayInput)(nil)).Elem(), NotificationRecipientEmailArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NotificationRecipientEmailMapInput)(nil)).Elem(), NotificationRecipientEmailMap{})
pulumi.RegisterOutputType(NotificationRecipientEmailOutput{})
pulumi.RegisterOutputType(NotificationRecipientEmailArrayOutput{})
pulumi.RegisterOutputType(NotificationRecipientEmailMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/identityProviderMicrosoft.go | sdk/go/azure/apimanagement/identityProviderMicrosoft.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Microsoft Identity Provider.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@mycompany.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewIdentityProviderMicrosoft(ctx, "example", &apimanagement.IdentityProviderMicrosoftArgs{
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// ClientId: pulumi.String("00000000-0000-0000-0000-000000000000"),
// ClientSecret: pulumi.String("00000000000000000000000000000000"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Microsoft Identity Provider can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/identityProviderMicrosoft:IdentityProviderMicrosoft example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/identityProviders/microsoft
// ```
type IdentityProviderMicrosoft struct {
pulumi.CustomResourceState
// The Name of the API Management Service where this Microsoft Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// Client Id of the Azure AD Application.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// Client secret of the Azure AD Application.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewIdentityProviderMicrosoft registers a new resource with the given unique name, arguments, and options.
func NewIdentityProviderMicrosoft(ctx *pulumi.Context,
name string, args *IdentityProviderMicrosoftArgs, opts ...pulumi.ResourceOption) (*IdentityProviderMicrosoft, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource IdentityProviderMicrosoft
err := ctx.RegisterResource("azure:apimanagement/identityProviderMicrosoft:IdentityProviderMicrosoft", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProviderMicrosoft gets an existing IdentityProviderMicrosoft resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIdentityProviderMicrosoft(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderMicrosoftState, opts ...pulumi.ResourceOption) (*IdentityProviderMicrosoft, error) {
var resource IdentityProviderMicrosoft
err := ctx.ReadResource("azure:apimanagement/identityProviderMicrosoft:IdentityProviderMicrosoft", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProviderMicrosoft resources.
type identityProviderMicrosoftState struct {
// The Name of the API Management Service where this Microsoft Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// Client Id of the Azure AD Application.
ClientId *string `pulumi:"clientId"`
// Client secret of the Azure AD Application.
ClientSecret *string `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type IdentityProviderMicrosoftState struct {
// The Name of the API Management Service where this Microsoft Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// Client Id of the Azure AD Application.
ClientId pulumi.StringPtrInput
// Client secret of the Azure AD Application.
ClientSecret pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (IdentityProviderMicrosoftState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderMicrosoftState)(nil)).Elem()
}
type identityProviderMicrosoftArgs struct {
// The Name of the API Management Service where this Microsoft Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// Client Id of the Azure AD Application.
ClientId string `pulumi:"clientId"`
// Client secret of the Azure AD Application.
ClientSecret string `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a IdentityProviderMicrosoft resource.
type IdentityProviderMicrosoftArgs struct {
// The Name of the API Management Service where this Microsoft Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// Client Id of the Azure AD Application.
ClientId pulumi.StringInput
// Client secret of the Azure AD Application.
ClientSecret pulumi.StringInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (IdentityProviderMicrosoftArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderMicrosoftArgs)(nil)).Elem()
}
type IdentityProviderMicrosoftInput interface {
pulumi.Input
ToIdentityProviderMicrosoftOutput() IdentityProviderMicrosoftOutput
ToIdentityProviderMicrosoftOutputWithContext(ctx context.Context) IdentityProviderMicrosoftOutput
}
func (*IdentityProviderMicrosoft) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderMicrosoft)(nil)).Elem()
}
func (i *IdentityProviderMicrosoft) ToIdentityProviderMicrosoftOutput() IdentityProviderMicrosoftOutput {
return i.ToIdentityProviderMicrosoftOutputWithContext(context.Background())
}
func (i *IdentityProviderMicrosoft) ToIdentityProviderMicrosoftOutputWithContext(ctx context.Context) IdentityProviderMicrosoftOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderMicrosoftOutput)
}
// IdentityProviderMicrosoftArrayInput is an input type that accepts IdentityProviderMicrosoftArray and IdentityProviderMicrosoftArrayOutput values.
// You can construct a concrete instance of `IdentityProviderMicrosoftArrayInput` via:
//
// IdentityProviderMicrosoftArray{ IdentityProviderMicrosoftArgs{...} }
type IdentityProviderMicrosoftArrayInput interface {
pulumi.Input
ToIdentityProviderMicrosoftArrayOutput() IdentityProviderMicrosoftArrayOutput
ToIdentityProviderMicrosoftArrayOutputWithContext(context.Context) IdentityProviderMicrosoftArrayOutput
}
type IdentityProviderMicrosoftArray []IdentityProviderMicrosoftInput
func (IdentityProviderMicrosoftArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderMicrosoft)(nil)).Elem()
}
func (i IdentityProviderMicrosoftArray) ToIdentityProviderMicrosoftArrayOutput() IdentityProviderMicrosoftArrayOutput {
return i.ToIdentityProviderMicrosoftArrayOutputWithContext(context.Background())
}
func (i IdentityProviderMicrosoftArray) ToIdentityProviderMicrosoftArrayOutputWithContext(ctx context.Context) IdentityProviderMicrosoftArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderMicrosoftArrayOutput)
}
// IdentityProviderMicrosoftMapInput is an input type that accepts IdentityProviderMicrosoftMap and IdentityProviderMicrosoftMapOutput values.
// You can construct a concrete instance of `IdentityProviderMicrosoftMapInput` via:
//
// IdentityProviderMicrosoftMap{ "key": IdentityProviderMicrosoftArgs{...} }
type IdentityProviderMicrosoftMapInput interface {
pulumi.Input
ToIdentityProviderMicrosoftMapOutput() IdentityProviderMicrosoftMapOutput
ToIdentityProviderMicrosoftMapOutputWithContext(context.Context) IdentityProviderMicrosoftMapOutput
}
type IdentityProviderMicrosoftMap map[string]IdentityProviderMicrosoftInput
func (IdentityProviderMicrosoftMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderMicrosoft)(nil)).Elem()
}
func (i IdentityProviderMicrosoftMap) ToIdentityProviderMicrosoftMapOutput() IdentityProviderMicrosoftMapOutput {
return i.ToIdentityProviderMicrosoftMapOutputWithContext(context.Background())
}
func (i IdentityProviderMicrosoftMap) ToIdentityProviderMicrosoftMapOutputWithContext(ctx context.Context) IdentityProviderMicrosoftMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderMicrosoftMapOutput)
}
type IdentityProviderMicrosoftOutput struct{ *pulumi.OutputState }
func (IdentityProviderMicrosoftOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderMicrosoft)(nil)).Elem()
}
func (o IdentityProviderMicrosoftOutput) ToIdentityProviderMicrosoftOutput() IdentityProviderMicrosoftOutput {
return o
}
func (o IdentityProviderMicrosoftOutput) ToIdentityProviderMicrosoftOutputWithContext(ctx context.Context) IdentityProviderMicrosoftOutput {
return o
}
// The Name of the API Management Service where this Microsoft Identity Provider should be created. Changing this forces a new resource to be created.
func (o IdentityProviderMicrosoftOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderMicrosoft) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// Client Id of the Azure AD Application.
func (o IdentityProviderMicrosoftOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderMicrosoft) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// Client secret of the Azure AD Application.
func (o IdentityProviderMicrosoftOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderMicrosoft) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o IdentityProviderMicrosoftOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderMicrosoft) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type IdentityProviderMicrosoftArrayOutput struct{ *pulumi.OutputState }
func (IdentityProviderMicrosoftArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderMicrosoft)(nil)).Elem()
}
func (o IdentityProviderMicrosoftArrayOutput) ToIdentityProviderMicrosoftArrayOutput() IdentityProviderMicrosoftArrayOutput {
return o
}
func (o IdentityProviderMicrosoftArrayOutput) ToIdentityProviderMicrosoftArrayOutputWithContext(ctx context.Context) IdentityProviderMicrosoftArrayOutput {
return o
}
func (o IdentityProviderMicrosoftArrayOutput) Index(i pulumi.IntInput) IdentityProviderMicrosoftOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IdentityProviderMicrosoft {
return vs[0].([]*IdentityProviderMicrosoft)[vs[1].(int)]
}).(IdentityProviderMicrosoftOutput)
}
type IdentityProviderMicrosoftMapOutput struct{ *pulumi.OutputState }
func (IdentityProviderMicrosoftMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderMicrosoft)(nil)).Elem()
}
func (o IdentityProviderMicrosoftMapOutput) ToIdentityProviderMicrosoftMapOutput() IdentityProviderMicrosoftMapOutput {
return o
}
func (o IdentityProviderMicrosoftMapOutput) ToIdentityProviderMicrosoftMapOutputWithContext(ctx context.Context) IdentityProviderMicrosoftMapOutput {
return o
}
func (o IdentityProviderMicrosoftMapOutput) MapIndex(k pulumi.StringInput) IdentityProviderMicrosoftOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IdentityProviderMicrosoft {
return vs[0].(map[string]*IdentityProviderMicrosoft)[vs[1].(string)]
}).(IdentityProviderMicrosoftOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderMicrosoftInput)(nil)).Elem(), &IdentityProviderMicrosoft{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderMicrosoftArrayInput)(nil)).Elem(), IdentityProviderMicrosoftArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderMicrosoftMapInput)(nil)).Elem(), IdentityProviderMicrosoftMap{})
pulumi.RegisterOutputType(IdentityProviderMicrosoftOutput{})
pulumi.RegisterOutputType(IdentityProviderMicrosoftArrayOutput{})
pulumi.RegisterOutputType(IdentityProviderMicrosoftMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/identityProviderFacebook.go | sdk/go/azure/apimanagement/identityProviderFacebook.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Facebook Identity Provider.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@mycompany.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewIdentityProviderFacebook(ctx, "example", &apimanagement.IdentityProviderFacebookArgs{
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// AppId: pulumi.String("00000000000000000000000000000000"),
// AppSecret: pulumi.String("00000000000000000000000000000000"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Facebook Identity Provider can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/identityProviderFacebook:IdentityProviderFacebook example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/identityProviders/facebook
// ```
type IdentityProviderFacebook struct {
pulumi.CustomResourceState
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// App ID for Facebook.
AppId pulumi.StringOutput `pulumi:"appId"`
// App Secret for Facebook.
AppSecret pulumi.StringOutput `pulumi:"appSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewIdentityProviderFacebook registers a new resource with the given unique name, arguments, and options.
func NewIdentityProviderFacebook(ctx *pulumi.Context,
name string, args *IdentityProviderFacebookArgs, opts ...pulumi.ResourceOption) (*IdentityProviderFacebook, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.AppId == nil {
return nil, errors.New("invalid value for required argument 'AppId'")
}
if args.AppSecret == nil {
return nil, errors.New("invalid value for required argument 'AppSecret'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.AppSecret != nil {
args.AppSecret = pulumi.ToSecret(args.AppSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"appSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource IdentityProviderFacebook
err := ctx.RegisterResource("azure:apimanagement/identityProviderFacebook:IdentityProviderFacebook", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProviderFacebook gets an existing IdentityProviderFacebook resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIdentityProviderFacebook(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderFacebookState, opts ...pulumi.ResourceOption) (*IdentityProviderFacebook, error) {
var resource IdentityProviderFacebook
err := ctx.ReadResource("azure:apimanagement/identityProviderFacebook:IdentityProviderFacebook", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProviderFacebook resources.
type identityProviderFacebookState struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// App ID for Facebook.
AppId *string `pulumi:"appId"`
// App Secret for Facebook.
AppSecret *string `pulumi:"appSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type IdentityProviderFacebookState struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// App ID for Facebook.
AppId pulumi.StringPtrInput
// App Secret for Facebook.
AppSecret pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (IdentityProviderFacebookState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderFacebookState)(nil)).Elem()
}
type identityProviderFacebookArgs struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// App ID for Facebook.
AppId string `pulumi:"appId"`
// App Secret for Facebook.
AppSecret string `pulumi:"appSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a IdentityProviderFacebook resource.
type IdentityProviderFacebookArgs struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// App ID for Facebook.
AppId pulumi.StringInput
// App Secret for Facebook.
AppSecret pulumi.StringInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (IdentityProviderFacebookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderFacebookArgs)(nil)).Elem()
}
type IdentityProviderFacebookInput interface {
pulumi.Input
ToIdentityProviderFacebookOutput() IdentityProviderFacebookOutput
ToIdentityProviderFacebookOutputWithContext(ctx context.Context) IdentityProviderFacebookOutput
}
func (*IdentityProviderFacebook) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderFacebook)(nil)).Elem()
}
func (i *IdentityProviderFacebook) ToIdentityProviderFacebookOutput() IdentityProviderFacebookOutput {
return i.ToIdentityProviderFacebookOutputWithContext(context.Background())
}
func (i *IdentityProviderFacebook) ToIdentityProviderFacebookOutputWithContext(ctx context.Context) IdentityProviderFacebookOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderFacebookOutput)
}
// IdentityProviderFacebookArrayInput is an input type that accepts IdentityProviderFacebookArray and IdentityProviderFacebookArrayOutput values.
// You can construct a concrete instance of `IdentityProviderFacebookArrayInput` via:
//
// IdentityProviderFacebookArray{ IdentityProviderFacebookArgs{...} }
type IdentityProviderFacebookArrayInput interface {
pulumi.Input
ToIdentityProviderFacebookArrayOutput() IdentityProviderFacebookArrayOutput
ToIdentityProviderFacebookArrayOutputWithContext(context.Context) IdentityProviderFacebookArrayOutput
}
type IdentityProviderFacebookArray []IdentityProviderFacebookInput
func (IdentityProviderFacebookArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderFacebook)(nil)).Elem()
}
func (i IdentityProviderFacebookArray) ToIdentityProviderFacebookArrayOutput() IdentityProviderFacebookArrayOutput {
return i.ToIdentityProviderFacebookArrayOutputWithContext(context.Background())
}
func (i IdentityProviderFacebookArray) ToIdentityProviderFacebookArrayOutputWithContext(ctx context.Context) IdentityProviderFacebookArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderFacebookArrayOutput)
}
// IdentityProviderFacebookMapInput is an input type that accepts IdentityProviderFacebookMap and IdentityProviderFacebookMapOutput values.
// You can construct a concrete instance of `IdentityProviderFacebookMapInput` via:
//
// IdentityProviderFacebookMap{ "key": IdentityProviderFacebookArgs{...} }
type IdentityProviderFacebookMapInput interface {
pulumi.Input
ToIdentityProviderFacebookMapOutput() IdentityProviderFacebookMapOutput
ToIdentityProviderFacebookMapOutputWithContext(context.Context) IdentityProviderFacebookMapOutput
}
type IdentityProviderFacebookMap map[string]IdentityProviderFacebookInput
func (IdentityProviderFacebookMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderFacebook)(nil)).Elem()
}
func (i IdentityProviderFacebookMap) ToIdentityProviderFacebookMapOutput() IdentityProviderFacebookMapOutput {
return i.ToIdentityProviderFacebookMapOutputWithContext(context.Background())
}
func (i IdentityProviderFacebookMap) ToIdentityProviderFacebookMapOutputWithContext(ctx context.Context) IdentityProviderFacebookMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderFacebookMapOutput)
}
type IdentityProviderFacebookOutput struct{ *pulumi.OutputState }
func (IdentityProviderFacebookOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderFacebook)(nil)).Elem()
}
func (o IdentityProviderFacebookOutput) ToIdentityProviderFacebookOutput() IdentityProviderFacebookOutput {
return o
}
func (o IdentityProviderFacebookOutput) ToIdentityProviderFacebookOutputWithContext(ctx context.Context) IdentityProviderFacebookOutput {
return o
}
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
func (o IdentityProviderFacebookOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderFacebook) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// App ID for Facebook.
func (o IdentityProviderFacebookOutput) AppId() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderFacebook) pulumi.StringOutput { return v.AppId }).(pulumi.StringOutput)
}
// App Secret for Facebook.
func (o IdentityProviderFacebookOutput) AppSecret() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderFacebook) pulumi.StringOutput { return v.AppSecret }).(pulumi.StringOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o IdentityProviderFacebookOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderFacebook) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type IdentityProviderFacebookArrayOutput struct{ *pulumi.OutputState }
func (IdentityProviderFacebookArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderFacebook)(nil)).Elem()
}
func (o IdentityProviderFacebookArrayOutput) ToIdentityProviderFacebookArrayOutput() IdentityProviderFacebookArrayOutput {
return o
}
func (o IdentityProviderFacebookArrayOutput) ToIdentityProviderFacebookArrayOutputWithContext(ctx context.Context) IdentityProviderFacebookArrayOutput {
return o
}
func (o IdentityProviderFacebookArrayOutput) Index(i pulumi.IntInput) IdentityProviderFacebookOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IdentityProviderFacebook {
return vs[0].([]*IdentityProviderFacebook)[vs[1].(int)]
}).(IdentityProviderFacebookOutput)
}
type IdentityProviderFacebookMapOutput struct{ *pulumi.OutputState }
func (IdentityProviderFacebookMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderFacebook)(nil)).Elem()
}
func (o IdentityProviderFacebookMapOutput) ToIdentityProviderFacebookMapOutput() IdentityProviderFacebookMapOutput {
return o
}
func (o IdentityProviderFacebookMapOutput) ToIdentityProviderFacebookMapOutputWithContext(ctx context.Context) IdentityProviderFacebookMapOutput {
return o
}
func (o IdentityProviderFacebookMapOutput) MapIndex(k pulumi.StringInput) IdentityProviderFacebookOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IdentityProviderFacebook {
return vs[0].(map[string]*IdentityProviderFacebook)[vs[1].(string)]
}).(IdentityProviderFacebookOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderFacebookInput)(nil)).Elem(), &IdentityProviderFacebook{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderFacebookArrayInput)(nil)).Elem(), IdentityProviderFacebookArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderFacebookMapInput)(nil)).Elem(), IdentityProviderFacebookMap{})
pulumi.RegisterOutputType(IdentityProviderFacebookOutput{})
pulumi.RegisterOutputType(IdentityProviderFacebookArrayOutput{})
pulumi.RegisterOutputType(IdentityProviderFacebookMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/group.go | sdk/go/azure/apimanagement/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 apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewGroup(ctx, "example", &apimanagement.GroupArgs{
// Name: pulumi.String("example-apimg"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// DisplayName: pulumi.String("Example Group"),
// Description: pulumi.String("This is an example API management 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/group:Group example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ApiManagement/service/example-apim/groups/example-apimg
// ```
type Group struct {
pulumi.CustomResourceState
// The name of the API Management Service in which the API Management Group should exist. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The description of this API Management Group.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The display name of this API Management Group.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The identifier of the external Group. For example, an Azure Active Directory group `aad://<tenant id>/groups/<group object id>`. Changing this forces a new resource to be created.
ExternalId pulumi.StringPtrOutput `pulumi:"externalId"`
// The name of the API Management Group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group in which the API Management Group should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created.
Type pulumi.StringPtrOutput `pulumi:"type"`
}
// 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 {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Group
err := ctx.RegisterResource("azure:apimanagement/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:apimanagement/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 {
// The name of the API Management Service in which the API Management Group should exist. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The description of this API Management Group.
Description *string `pulumi:"description"`
// The display name of this API Management Group.
DisplayName *string `pulumi:"displayName"`
// The identifier of the external Group. For example, an Azure Active Directory group `aad://<tenant id>/groups/<group object id>`. Changing this forces a new resource to be created.
ExternalId *string `pulumi:"externalId"`
// The name of the API Management Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Group should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created.
Type *string `pulumi:"type"`
}
type GroupState struct {
// The name of the API Management Service in which the API Management Group should exist. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The description of this API Management Group.
Description pulumi.StringPtrInput
// The display name of this API Management Group.
DisplayName pulumi.StringPtrInput
// The identifier of the external Group. For example, an Azure Active Directory group `aad://<tenant id>/groups/<group object id>`. Changing this forces a new resource to be created.
ExternalId pulumi.StringPtrInput
// The name of the API Management Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Group should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created.
Type pulumi.StringPtrInput
}
func (GroupState) ElementType() reflect.Type {
return reflect.TypeOf((*groupState)(nil)).Elem()
}
type groupArgs struct {
// The name of the API Management Service in which the API Management Group should exist. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The description of this API Management Group.
Description *string `pulumi:"description"`
// The display name of this API Management Group.
DisplayName string `pulumi:"displayName"`
// The identifier of the external Group. For example, an Azure Active Directory group `aad://<tenant id>/groups/<group object id>`. Changing this forces a new resource to be created.
ExternalId *string `pulumi:"externalId"`
// The name of the API Management Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Group should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created.
Type *string `pulumi:"type"`
}
// The set of arguments for constructing a Group resource.
type GroupArgs struct {
// The name of the API Management Service in which the API Management Group should exist. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The description of this API Management Group.
Description pulumi.StringPtrInput
// The display name of this API Management Group.
DisplayName pulumi.StringInput
// The identifier of the external Group. For example, an Azure Active Directory group `aad://<tenant id>/groups/<group object id>`. Changing this forces a new resource to be created.
ExternalId pulumi.StringPtrInput
// The name of the API Management Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Group should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created.
Type pulumi.StringPtrInput
}
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
}
// The name of the API Management Service in which the API Management Group should exist. Changing this forces a new resource to be created.
func (o GroupOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The description of this API Management Group.
func (o GroupOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of this API Management Group.
func (o GroupOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The identifier of the external Group. For example, an Azure Active Directory group `aad://<tenant id>/groups/<group object id>`. Changing this forces a new resource to be created.
func (o GroupOutput) ExternalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.ExternalId }).(pulumi.StringPtrOutput)
}
// The name of the API Management Group. 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 name of the Resource Group in which the API Management Group should exist. Changing this forces a new resource to be created.
func (o GroupOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created.
func (o GroupOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput)
}
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/apimanagement/service.go | sdk/go/azure/apimanagement/service.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@exmaple.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2024-05-01, 2022-08-01
//
// ## Import
//
// API Management Services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1
// ```
type Service struct {
pulumi.CustomResourceState
// One or more `additionalLocation` blocks as defined below.
AdditionalLocations ServiceAdditionalLocationArrayOutput `pulumi:"additionalLocations"`
// One or more `certificate` blocks (up to 10) as defined below.
Certificates ServiceCertificateArrayOutput `pulumi:"certificates"`
// Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
ClientCertificateEnabled pulumi.BoolPtrOutput `pulumi:"clientCertificateEnabled"`
// A `delegation` block as defined below.
Delegation ServiceDelegationOutput `pulumi:"delegation"`
// The URL for the Developer Portal associated with this API Management service.
DeveloperPortalUrl pulumi.StringOutput `pulumi:"developerPortalUrl"`
// Disable the gateway in main region? This is only supported when `additionalLocation` is set.
GatewayDisabled pulumi.BoolPtrOutput `pulumi:"gatewayDisabled"`
// The URL of the Regional Gateway for the API Management Service in the specified region.
GatewayRegionalUrl pulumi.StringOutput `pulumi:"gatewayRegionalUrl"`
// The URL of the Gateway for the API Management Service.
GatewayUrl pulumi.StringOutput `pulumi:"gatewayUrl"`
// A `hostnameConfiguration` block as defined below.
HostnameConfiguration ServiceHostnameConfigurationOutput `pulumi:"hostnameConfiguration"`
// An `identity` block as defined below.
Identity ServiceIdentityPtrOutput `pulumi:"identity"`
// The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The URL for the Management API associated with this API Management service.
ManagementApiUrl pulumi.StringOutput `pulumi:"managementApiUrl"`
// The version which the control plane API calls to API Management service are limited with version equal to or newer than.
MinApiVersion pulumi.StringPtrOutput `pulumi:"minApiVersion"`
// The name of the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Email address from which the notification will be sent.
NotificationSenderEmail pulumi.StringOutput `pulumi:"notificationSenderEmail"`
// The URL for the Publisher Portal associated with this API Management service.
PortalUrl pulumi.StringOutput `pulumi:"portalUrl"`
// The Private IP addresses of the API Management Service. Available only when the API Manager instance is using Virtual Network mode.
PrivateIpAddresses pulumi.StringArrayOutput `pulumi:"privateIpAddresses"`
// A `protocols` block as defined below.
Protocols ServiceProtocolsOutput `pulumi:"protocols"`
// ID of a standard SKU IPv4 Public IP.
//
// > **Note:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
PublicIpAddressId pulumi.StringPtrOutput `pulumi:"publicIpAddressId"`
// Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU.
PublicIpAddresses pulumi.StringArrayOutput `pulumi:"publicIpAddresses"`
// Is public access to the service allowed? Defaults to `true`.
//
// > **Note:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The email of publisher/company.
PublisherEmail pulumi.StringOutput `pulumi:"publisherEmail"`
// The name of publisher/company.
PublisherName pulumi.StringOutput `pulumi:"publisherName"`
// The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The URL for the SCM (Source Code Management) Endpoint associated with this API Management service.
ScmUrl pulumi.StringOutput `pulumi:"scmUrl"`
// A `security` block as defined below.
Security ServiceSecurityOutput `pulumi:"security"`
// A `signIn` block as defined below.
SignIn ServiceSignInOutput `pulumi:"signIn"`
// A `signUp` block as defined below.
SignUp ServiceSignUpOutput `pulumi:"signUp"`
// `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
//
// > **Note:** Premium SKUs are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
//
// > **Note:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A mapping of tags assigned to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `tenantAccess` block as defined below.
TenantAccess ServiceTenantAccessOutput `pulumi:"tenantAccess"`
// A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`.
VirtualNetworkConfiguration ServiceVirtualNetworkConfigurationPtrOutput `pulumi:"virtualNetworkConfiguration"`
// The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
//
// > **Note:** Please ensure that in the subnet, inbound port 3443 is open when `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
VirtualNetworkType pulumi.StringPtrOutput `pulumi:"virtualNetworkType"`
// Specifies a list of Availability Zones in which this API Management service should be located.
//
// > **Note:** Availability zones are only supported in the Premium tier.
Zones pulumi.StringArrayOutput `pulumi:"zones"`
}
// NewService registers a new resource with the given unique name, arguments, and options.
func NewService(ctx *pulumi.Context,
name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PublisherEmail == nil {
return nil, errors.New("invalid value for required argument 'PublisherEmail'")
}
if args.PublisherName == nil {
return nil, errors.New("invalid value for required argument 'PublisherName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Service
err := ctx.RegisterResource("azure:apimanagement/service:Service", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetService gets an existing Service resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceState, opts ...pulumi.ResourceOption) (*Service, error) {
var resource Service
err := ctx.ReadResource("azure:apimanagement/service:Service", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Service resources.
type serviceState struct {
// One or more `additionalLocation` blocks as defined below.
AdditionalLocations []ServiceAdditionalLocation `pulumi:"additionalLocations"`
// One or more `certificate` blocks (up to 10) as defined below.
Certificates []ServiceCertificate `pulumi:"certificates"`
// Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
ClientCertificateEnabled *bool `pulumi:"clientCertificateEnabled"`
// A `delegation` block as defined below.
Delegation *ServiceDelegation `pulumi:"delegation"`
// The URL for the Developer Portal associated with this API Management service.
DeveloperPortalUrl *string `pulumi:"developerPortalUrl"`
// Disable the gateway in main region? This is only supported when `additionalLocation` is set.
GatewayDisabled *bool `pulumi:"gatewayDisabled"`
// The URL of the Regional Gateway for the API Management Service in the specified region.
GatewayRegionalUrl *string `pulumi:"gatewayRegionalUrl"`
// The URL of the Gateway for the API Management Service.
GatewayUrl *string `pulumi:"gatewayUrl"`
// A `hostnameConfiguration` block as defined below.
HostnameConfiguration *ServiceHostnameConfiguration `pulumi:"hostnameConfiguration"`
// An `identity` block as defined below.
Identity *ServiceIdentity `pulumi:"identity"`
// The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The URL for the Management API associated with this API Management service.
ManagementApiUrl *string `pulumi:"managementApiUrl"`
// The version which the control plane API calls to API Management service are limited with version equal to or newer than.
MinApiVersion *string `pulumi:"minApiVersion"`
// The name of the API Management Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Email address from which the notification will be sent.
NotificationSenderEmail *string `pulumi:"notificationSenderEmail"`
// The URL for the Publisher Portal associated with this API Management service.
PortalUrl *string `pulumi:"portalUrl"`
// The Private IP addresses of the API Management Service. Available only when the API Manager instance is using Virtual Network mode.
PrivateIpAddresses []string `pulumi:"privateIpAddresses"`
// A `protocols` block as defined below.
Protocols *ServiceProtocols `pulumi:"protocols"`
// ID of a standard SKU IPv4 Public IP.
//
// > **Note:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
PublicIpAddressId *string `pulumi:"publicIpAddressId"`
// Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU.
PublicIpAddresses []string `pulumi:"publicIpAddresses"`
// Is public access to the service allowed? Defaults to `true`.
//
// > **Note:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The email of publisher/company.
PublisherEmail *string `pulumi:"publisherEmail"`
// The name of publisher/company.
PublisherName *string `pulumi:"publisherName"`
// The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The URL for the SCM (Source Code Management) Endpoint associated with this API Management service.
ScmUrl *string `pulumi:"scmUrl"`
// A `security` block as defined below.
Security *ServiceSecurity `pulumi:"security"`
// A `signIn` block as defined below.
SignIn *ServiceSignIn `pulumi:"signIn"`
// A `signUp` block as defined below.
SignUp *ServiceSignUp `pulumi:"signUp"`
// `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
//
// > **Note:** Premium SKUs are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
//
// > **Note:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
SkuName *string `pulumi:"skuName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// A `tenantAccess` block as defined below.
TenantAccess *ServiceTenantAccess `pulumi:"tenantAccess"`
// A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`.
VirtualNetworkConfiguration *ServiceVirtualNetworkConfiguration `pulumi:"virtualNetworkConfiguration"`
// The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
//
// > **Note:** Please ensure that in the subnet, inbound port 3443 is open when `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
VirtualNetworkType *string `pulumi:"virtualNetworkType"`
// Specifies a list of Availability Zones in which this API Management service should be located.
//
// > **Note:** Availability zones are only supported in the Premium tier.
Zones []string `pulumi:"zones"`
}
type ServiceState struct {
// One or more `additionalLocation` blocks as defined below.
AdditionalLocations ServiceAdditionalLocationArrayInput
// One or more `certificate` blocks (up to 10) as defined below.
Certificates ServiceCertificateArrayInput
// Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
ClientCertificateEnabled pulumi.BoolPtrInput
// A `delegation` block as defined below.
Delegation ServiceDelegationPtrInput
// The URL for the Developer Portal associated with this API Management service.
DeveloperPortalUrl pulumi.StringPtrInput
// Disable the gateway in main region? This is only supported when `additionalLocation` is set.
GatewayDisabled pulumi.BoolPtrInput
// The URL of the Regional Gateway for the API Management Service in the specified region.
GatewayRegionalUrl pulumi.StringPtrInput
// The URL of the Gateway for the API Management Service.
GatewayUrl pulumi.StringPtrInput
// A `hostnameConfiguration` block as defined below.
HostnameConfiguration ServiceHostnameConfigurationPtrInput
// An `identity` block as defined below.
Identity ServiceIdentityPtrInput
// The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The URL for the Management API associated with this API Management service.
ManagementApiUrl pulumi.StringPtrInput
// The version which the control plane API calls to API Management service are limited with version equal to or newer than.
MinApiVersion pulumi.StringPtrInput
// The name of the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Email address from which the notification will be sent.
NotificationSenderEmail pulumi.StringPtrInput
// The URL for the Publisher Portal associated with this API Management service.
PortalUrl pulumi.StringPtrInput
// The Private IP addresses of the API Management Service. Available only when the API Manager instance is using Virtual Network mode.
PrivateIpAddresses pulumi.StringArrayInput
// A `protocols` block as defined below.
Protocols ServiceProtocolsPtrInput
// ID of a standard SKU IPv4 Public IP.
//
// > **Note:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
PublicIpAddressId pulumi.StringPtrInput
// Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU.
PublicIpAddresses pulumi.StringArrayInput
// Is public access to the service allowed? Defaults to `true`.
//
// > **Note:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The email of publisher/company.
PublisherEmail pulumi.StringPtrInput
// The name of publisher/company.
PublisherName pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The URL for the SCM (Source Code Management) Endpoint associated with this API Management service.
ScmUrl pulumi.StringPtrInput
// A `security` block as defined below.
Security ServiceSecurityPtrInput
// A `signIn` block as defined below.
SignIn ServiceSignInPtrInput
// A `signUp` block as defined below.
SignUp ServiceSignUpPtrInput
// `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
//
// > **Note:** Premium SKUs are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
//
// > **Note:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
SkuName pulumi.StringPtrInput
// A mapping of tags assigned to the resource.
Tags pulumi.StringMapInput
// A `tenantAccess` block as defined below.
TenantAccess ServiceTenantAccessPtrInput
// A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`.
VirtualNetworkConfiguration ServiceVirtualNetworkConfigurationPtrInput
// The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
//
// > **Note:** Please ensure that in the subnet, inbound port 3443 is open when `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
VirtualNetworkType pulumi.StringPtrInput
// Specifies a list of Availability Zones in which this API Management service should be located.
//
// > **Note:** Availability zones are only supported in the Premium tier.
Zones pulumi.StringArrayInput
}
func (ServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceState)(nil)).Elem()
}
type serviceArgs struct {
// One or more `additionalLocation` blocks as defined below.
AdditionalLocations []ServiceAdditionalLocation `pulumi:"additionalLocations"`
// One or more `certificate` blocks (up to 10) as defined below.
Certificates []ServiceCertificate `pulumi:"certificates"`
// Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
ClientCertificateEnabled *bool `pulumi:"clientCertificateEnabled"`
// A `delegation` block as defined below.
Delegation *ServiceDelegation `pulumi:"delegation"`
// Disable the gateway in main region? This is only supported when `additionalLocation` is set.
GatewayDisabled *bool `pulumi:"gatewayDisabled"`
// A `hostnameConfiguration` block as defined below.
HostnameConfiguration *ServiceHostnameConfiguration `pulumi:"hostnameConfiguration"`
// An `identity` block as defined below.
Identity *ServiceIdentity `pulumi:"identity"`
// The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The version which the control plane API calls to API Management service are limited with version equal to or newer than.
MinApiVersion *string `pulumi:"minApiVersion"`
// The name of the API Management Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Email address from which the notification will be sent.
NotificationSenderEmail *string `pulumi:"notificationSenderEmail"`
// A `protocols` block as defined below.
Protocols *ServiceProtocols `pulumi:"protocols"`
// ID of a standard SKU IPv4 Public IP.
//
// > **Note:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
PublicIpAddressId *string `pulumi:"publicIpAddressId"`
// Is public access to the service allowed? Defaults to `true`.
//
// > **Note:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The email of publisher/company.
PublisherEmail string `pulumi:"publisherEmail"`
// The name of publisher/company.
PublisherName string `pulumi:"publisherName"`
// The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `security` block as defined below.
Security *ServiceSecurity `pulumi:"security"`
// A `signIn` block as defined below.
SignIn *ServiceSignIn `pulumi:"signIn"`
// A `signUp` block as defined below.
SignUp *ServiceSignUp `pulumi:"signUp"`
// `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
//
// > **Note:** Premium SKUs are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
//
// > **Note:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
SkuName string `pulumi:"skuName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// A `tenantAccess` block as defined below.
TenantAccess *ServiceTenantAccess `pulumi:"tenantAccess"`
// A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`.
VirtualNetworkConfiguration *ServiceVirtualNetworkConfiguration `pulumi:"virtualNetworkConfiguration"`
// The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
//
// > **Note:** Please ensure that in the subnet, inbound port 3443 is open when `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
VirtualNetworkType *string `pulumi:"virtualNetworkType"`
// Specifies a list of Availability Zones in which this API Management service should be located.
//
// > **Note:** Availability zones are only supported in the Premium tier.
Zones []string `pulumi:"zones"`
}
// The set of arguments for constructing a Service resource.
type ServiceArgs struct {
// One or more `additionalLocation` blocks as defined below.
AdditionalLocations ServiceAdditionalLocationArrayInput
// One or more `certificate` blocks (up to 10) as defined below.
Certificates ServiceCertificateArrayInput
// Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
ClientCertificateEnabled pulumi.BoolPtrInput
// A `delegation` block as defined below.
Delegation ServiceDelegationPtrInput
// Disable the gateway in main region? This is only supported when `additionalLocation` is set.
GatewayDisabled pulumi.BoolPtrInput
// A `hostnameConfiguration` block as defined below.
HostnameConfiguration ServiceHostnameConfigurationPtrInput
// An `identity` block as defined below.
Identity ServiceIdentityPtrInput
// The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The version which the control plane API calls to API Management service are limited with version equal to or newer than.
MinApiVersion pulumi.StringPtrInput
// The name of the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Email address from which the notification will be sent.
NotificationSenderEmail pulumi.StringPtrInput
// A `protocols` block as defined below.
Protocols ServiceProtocolsPtrInput
// ID of a standard SKU IPv4 Public IP.
//
// > **Note:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
PublicIpAddressId pulumi.StringPtrInput
// Is public access to the service allowed? Defaults to `true`.
//
// > **Note:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The email of publisher/company.
PublisherEmail pulumi.StringInput
// The name of publisher/company.
PublisherName pulumi.StringInput
// The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `security` block as defined below.
Security ServiceSecurityPtrInput
// A `signIn` block as defined below.
SignIn ServiceSignInPtrInput
// A `signUp` block as defined below.
SignUp ServiceSignUpPtrInput
// `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
//
// > **Note:** Premium SKUs are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
//
// > **Note:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
SkuName pulumi.StringInput
// A mapping of tags assigned to the resource.
Tags pulumi.StringMapInput
// A `tenantAccess` block as defined below.
TenantAccess ServiceTenantAccessPtrInput
// A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`.
VirtualNetworkConfiguration ServiceVirtualNetworkConfigurationPtrInput
// The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
//
// > **Note:** Please ensure that in the subnet, inbound port 3443 is open when `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
VirtualNetworkType pulumi.StringPtrInput
// Specifies a list of Availability Zones in which this API Management service should be located.
//
// > **Note:** Availability zones are only supported in the Premium tier.
Zones pulumi.StringArrayInput
}
func (ServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceArgs)(nil)).Elem()
}
type ServiceInput interface {
pulumi.Input
ToServiceOutput() ServiceOutput
ToServiceOutputWithContext(ctx context.Context) ServiceOutput
}
func (*Service) ElementType() reflect.Type {
return reflect.TypeOf((**Service)(nil)).Elem()
}
func (i *Service) ToServiceOutput() ServiceOutput {
return i.ToServiceOutputWithContext(context.Background())
}
func (i *Service) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceOutput)
}
// ServiceArrayInput is an input type that accepts ServiceArray and ServiceArrayOutput values.
// You can construct a concrete instance of `ServiceArrayInput` via:
//
// ServiceArray{ ServiceArgs{...} }
type ServiceArrayInput interface {
pulumi.Input
ToServiceArrayOutput() ServiceArrayOutput
ToServiceArrayOutputWithContext(context.Context) ServiceArrayOutput
}
type ServiceArray []ServiceInput
func (ServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Service)(nil)).Elem()
}
func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput {
return i.ToServiceArrayOutputWithContext(context.Background())
}
func (i ServiceArray) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceArrayOutput)
}
// ServiceMapInput is an input type that accepts ServiceMap and ServiceMapOutput values.
// You can construct a concrete instance of `ServiceMapInput` via:
//
// ServiceMap{ "key": ServiceArgs{...} }
type ServiceMapInput interface {
pulumi.Input
ToServiceMapOutput() ServiceMapOutput
ToServiceMapOutputWithContext(context.Context) ServiceMapOutput
}
type ServiceMap map[string]ServiceInput
func (ServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Service)(nil)).Elem()
}
func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput {
return i.ToServiceMapOutputWithContext(context.Background())
}
func (i ServiceMap) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceMapOutput)
}
type ServiceOutput struct{ *pulumi.OutputState }
func (ServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Service)(nil)).Elem()
}
func (o ServiceOutput) ToServiceOutput() ServiceOutput {
return o
}
func (o ServiceOutput) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
return o
}
// One or more `additionalLocation` blocks as defined below.
func (o ServiceOutput) AdditionalLocations() ServiceAdditionalLocationArrayOutput {
return o.ApplyT(func(v *Service) ServiceAdditionalLocationArrayOutput { return v.AdditionalLocations }).(ServiceAdditionalLocationArrayOutput)
}
// One or more `certificate` blocks (up to 10) as defined below.
func (o ServiceOutput) Certificates() ServiceCertificateArrayOutput {
return o.ApplyT(func(v *Service) ServiceCertificateArrayOutput { return v.Certificates }).(ServiceCertificateArrayOutput)
}
| 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/apimanagement/identityProviderTwitter.go | sdk/go/azure/apimanagement/identityProviderTwitter.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Twitter Identity Provider.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@mycompany.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewIdentityProviderTwitter(ctx, "example", &apimanagement.IdentityProviderTwitterArgs{
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// ApiKey: pulumi.String("00000000000000000000000000000000"),
// ApiSecretKey: pulumi.String("00000000000000000000000000000000"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Twitter Identity Provider can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/identityProviderTwitter:IdentityProviderTwitter example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/identityProviders/twitter
// ```
type IdentityProviderTwitter struct {
pulumi.CustomResourceState
// App Consumer API key for Twitter.
ApiKey pulumi.StringOutput `pulumi:"apiKey"`
// The Name of the API Management Service where this Twitter Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// App Consumer API secret key for Twitter.
ApiSecretKey pulumi.StringOutput `pulumi:"apiSecretKey"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewIdentityProviderTwitter registers a new resource with the given unique name, arguments, and options.
func NewIdentityProviderTwitter(ctx *pulumi.Context,
name string, args *IdentityProviderTwitterArgs, opts ...pulumi.ResourceOption) (*IdentityProviderTwitter, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiKey == nil {
return nil, errors.New("invalid value for required argument 'ApiKey'")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ApiSecretKey == nil {
return nil, errors.New("invalid value for required argument 'ApiSecretKey'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ApiKey != nil {
args.ApiKey = pulumi.ToSecret(args.ApiKey).(pulumi.StringInput)
}
if args.ApiSecretKey != nil {
args.ApiSecretKey = pulumi.ToSecret(args.ApiSecretKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"apiKey",
"apiSecretKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource IdentityProviderTwitter
err := ctx.RegisterResource("azure:apimanagement/identityProviderTwitter:IdentityProviderTwitter", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProviderTwitter gets an existing IdentityProviderTwitter resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIdentityProviderTwitter(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderTwitterState, opts ...pulumi.ResourceOption) (*IdentityProviderTwitter, error) {
var resource IdentityProviderTwitter
err := ctx.ReadResource("azure:apimanagement/identityProviderTwitter:IdentityProviderTwitter", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProviderTwitter resources.
type identityProviderTwitterState struct {
// App Consumer API key for Twitter.
ApiKey *string `pulumi:"apiKey"`
// The Name of the API Management Service where this Twitter Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// App Consumer API secret key for Twitter.
ApiSecretKey *string `pulumi:"apiSecretKey"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type IdentityProviderTwitterState struct {
// App Consumer API key for Twitter.
ApiKey pulumi.StringPtrInput
// The Name of the API Management Service where this Twitter Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// App Consumer API secret key for Twitter.
ApiSecretKey pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (IdentityProviderTwitterState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderTwitterState)(nil)).Elem()
}
type identityProviderTwitterArgs struct {
// App Consumer API key for Twitter.
ApiKey string `pulumi:"apiKey"`
// The Name of the API Management Service where this Twitter Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// App Consumer API secret key for Twitter.
ApiSecretKey string `pulumi:"apiSecretKey"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a IdentityProviderTwitter resource.
type IdentityProviderTwitterArgs struct {
// App Consumer API key for Twitter.
ApiKey pulumi.StringInput
// The Name of the API Management Service where this Twitter Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// App Consumer API secret key for Twitter.
ApiSecretKey pulumi.StringInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (IdentityProviderTwitterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderTwitterArgs)(nil)).Elem()
}
type IdentityProviderTwitterInput interface {
pulumi.Input
ToIdentityProviderTwitterOutput() IdentityProviderTwitterOutput
ToIdentityProviderTwitterOutputWithContext(ctx context.Context) IdentityProviderTwitterOutput
}
func (*IdentityProviderTwitter) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderTwitter)(nil)).Elem()
}
func (i *IdentityProviderTwitter) ToIdentityProviderTwitterOutput() IdentityProviderTwitterOutput {
return i.ToIdentityProviderTwitterOutputWithContext(context.Background())
}
func (i *IdentityProviderTwitter) ToIdentityProviderTwitterOutputWithContext(ctx context.Context) IdentityProviderTwitterOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderTwitterOutput)
}
// IdentityProviderTwitterArrayInput is an input type that accepts IdentityProviderTwitterArray and IdentityProviderTwitterArrayOutput values.
// You can construct a concrete instance of `IdentityProviderTwitterArrayInput` via:
//
// IdentityProviderTwitterArray{ IdentityProviderTwitterArgs{...} }
type IdentityProviderTwitterArrayInput interface {
pulumi.Input
ToIdentityProviderTwitterArrayOutput() IdentityProviderTwitterArrayOutput
ToIdentityProviderTwitterArrayOutputWithContext(context.Context) IdentityProviderTwitterArrayOutput
}
type IdentityProviderTwitterArray []IdentityProviderTwitterInput
func (IdentityProviderTwitterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderTwitter)(nil)).Elem()
}
func (i IdentityProviderTwitterArray) ToIdentityProviderTwitterArrayOutput() IdentityProviderTwitterArrayOutput {
return i.ToIdentityProviderTwitterArrayOutputWithContext(context.Background())
}
func (i IdentityProviderTwitterArray) ToIdentityProviderTwitterArrayOutputWithContext(ctx context.Context) IdentityProviderTwitterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderTwitterArrayOutput)
}
// IdentityProviderTwitterMapInput is an input type that accepts IdentityProviderTwitterMap and IdentityProviderTwitterMapOutput values.
// You can construct a concrete instance of `IdentityProviderTwitterMapInput` via:
//
// IdentityProviderTwitterMap{ "key": IdentityProviderTwitterArgs{...} }
type IdentityProviderTwitterMapInput interface {
pulumi.Input
ToIdentityProviderTwitterMapOutput() IdentityProviderTwitterMapOutput
ToIdentityProviderTwitterMapOutputWithContext(context.Context) IdentityProviderTwitterMapOutput
}
type IdentityProviderTwitterMap map[string]IdentityProviderTwitterInput
func (IdentityProviderTwitterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderTwitter)(nil)).Elem()
}
func (i IdentityProviderTwitterMap) ToIdentityProviderTwitterMapOutput() IdentityProviderTwitterMapOutput {
return i.ToIdentityProviderTwitterMapOutputWithContext(context.Background())
}
func (i IdentityProviderTwitterMap) ToIdentityProviderTwitterMapOutputWithContext(ctx context.Context) IdentityProviderTwitterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderTwitterMapOutput)
}
type IdentityProviderTwitterOutput struct{ *pulumi.OutputState }
func (IdentityProviderTwitterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderTwitter)(nil)).Elem()
}
func (o IdentityProviderTwitterOutput) ToIdentityProviderTwitterOutput() IdentityProviderTwitterOutput {
return o
}
func (o IdentityProviderTwitterOutput) ToIdentityProviderTwitterOutputWithContext(ctx context.Context) IdentityProviderTwitterOutput {
return o
}
// App Consumer API key for Twitter.
func (o IdentityProviderTwitterOutput) ApiKey() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderTwitter) pulumi.StringOutput { return v.ApiKey }).(pulumi.StringOutput)
}
// The Name of the API Management Service where this Twitter Identity Provider should be created. Changing this forces a new resource to be created.
func (o IdentityProviderTwitterOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderTwitter) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// App Consumer API secret key for Twitter.
func (o IdentityProviderTwitterOutput) ApiSecretKey() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderTwitter) pulumi.StringOutput { return v.ApiSecretKey }).(pulumi.StringOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o IdentityProviderTwitterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderTwitter) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type IdentityProviderTwitterArrayOutput struct{ *pulumi.OutputState }
func (IdentityProviderTwitterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderTwitter)(nil)).Elem()
}
func (o IdentityProviderTwitterArrayOutput) ToIdentityProviderTwitterArrayOutput() IdentityProviderTwitterArrayOutput {
return o
}
func (o IdentityProviderTwitterArrayOutput) ToIdentityProviderTwitterArrayOutputWithContext(ctx context.Context) IdentityProviderTwitterArrayOutput {
return o
}
func (o IdentityProviderTwitterArrayOutput) Index(i pulumi.IntInput) IdentityProviderTwitterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IdentityProviderTwitter {
return vs[0].([]*IdentityProviderTwitter)[vs[1].(int)]
}).(IdentityProviderTwitterOutput)
}
type IdentityProviderTwitterMapOutput struct{ *pulumi.OutputState }
func (IdentityProviderTwitterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderTwitter)(nil)).Elem()
}
func (o IdentityProviderTwitterMapOutput) ToIdentityProviderTwitterMapOutput() IdentityProviderTwitterMapOutput {
return o
}
func (o IdentityProviderTwitterMapOutput) ToIdentityProviderTwitterMapOutputWithContext(ctx context.Context) IdentityProviderTwitterMapOutput {
return o
}
func (o IdentityProviderTwitterMapOutput) MapIndex(k pulumi.StringInput) IdentityProviderTwitterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IdentityProviderTwitter {
return vs[0].(map[string]*IdentityProviderTwitter)[vs[1].(string)]
}).(IdentityProviderTwitterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderTwitterInput)(nil)).Elem(), &IdentityProviderTwitter{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderTwitterArrayInput)(nil)).Elem(), IdentityProviderTwitterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderTwitterMapInput)(nil)).Elem(), IdentityProviderTwitterMap{})
pulumi.RegisterOutputType(IdentityProviderTwitterOutput{})
pulumi.RegisterOutputType(IdentityProviderTwitterArrayOutput{})
pulumi.RegisterOutputType(IdentityProviderTwitterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/customDomain.go | sdk/go/azure/apimanagement/customDomain.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management Custom Domain.
//
// ## Disclaimers
//
// > **Note:** It's possible to define Custom Domains both within the `apimanagement.Service` resource via the `hostnameConfigurations` block and by using this resource. However it's not possible to use both methods to manage Custom Domains within an API Management Service, since there will be conflicts.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{
// Name: "mykeyvault",
// ResourceGroupName: "some-resource-group",
// }, nil)
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// exampleCertificate, err := keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{
// Name: pulumi.String("example-certificate"),
// KeyVaultId: pulumi.String(example.Id),
// CertificatePolicy: &keyvault.CertificateCertificatePolicyArgs{
// IssuerParameters: &keyvault.CertificateCertificatePolicyIssuerParametersArgs{
// Name: pulumi.String("Self"),
// },
// KeyProperties: &keyvault.CertificateCertificatePolicyKeyPropertiesArgs{
// Exportable: pulumi.Bool(true),
// KeySize: pulumi.Int(2048),
// KeyType: pulumi.String("RSA"),
// ReuseKey: pulumi.Bool(true),
// },
// LifetimeActions: keyvault.CertificateCertificatePolicyLifetimeActionArray{
// &keyvault.CertificateCertificatePolicyLifetimeActionArgs{
// Action: &keyvault.CertificateCertificatePolicyLifetimeActionActionArgs{
// ActionType: pulumi.String("AutoRenew"),
// },
// Trigger: &keyvault.CertificateCertificatePolicyLifetimeActionTriggerArgs{
// DaysBeforeExpiry: pulumi.Int(30),
// },
// },
// },
// SecretProperties: &keyvault.CertificateCertificatePolicySecretPropertiesArgs{
// ContentType: pulumi.String("application/x-pkcs12"),
// },
// X509CertificateProperties: &keyvault.CertificateCertificatePolicyX509CertificatePropertiesArgs{
// KeyUsages: pulumi.StringArray{
// pulumi.String("cRLSign"),
// pulumi.String("dataEncipherment"),
// pulumi.String("digitalSignature"),
// pulumi.String("keyAgreement"),
// pulumi.String("keyCertSign"),
// pulumi.String("keyEncipherment"),
// },
// Subject: pulumi.String("CN=api.example.com"),
// ValidityInMonths: pulumi.Int(12),
// SubjectAlternativeNames: &keyvault.CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs{
// DnsNames: pulumi.StringArray{
// pulumi.String("api.example.com"),
// pulumi.String("portal.example.com"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewCustomDomain(ctx, "example", &apimanagement.CustomDomainArgs{
// ApiManagementId: exampleService.ID(),
// Gateways: apimanagement.CustomDomainGatewayArray{
// &apimanagement.CustomDomainGatewayArgs{
// HostName: pulumi.String("api.example.com"),
// KeyVaultId: exampleCertificate.VersionlessSecretId,
// },
// },
// DeveloperPortals: apimanagement.CustomDomainDeveloperPortalArray{
// &apimanagement.CustomDomainDeveloperPortalArgs{
// HostName: pulumi.String("portal.example.com"),
// KeyVaultId: exampleCertificate.VersionlessSecretId,
// },
// },
// })
// 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.ApiManagement` - 2024-05-01
//
// ## Import
//
// API Management Custom Domains can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/customDomain:CustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/customDomains/default
// ```
type CustomDomain struct {
pulumi.CustomResourceState
// The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// One or more `developerPortal` blocks as defined below.
DeveloperPortals CustomDomainDeveloperPortalArrayOutput `pulumi:"developerPortals"`
// One or more `gateway` blocks as defined below.
Gateways CustomDomainGatewayArrayOutput `pulumi:"gateways"`
// One or more `management` blocks as defined below.
Managements CustomDomainManagementArrayOutput `pulumi:"managements"`
// One or more `portal` blocks as defined below.
Portals CustomDomainPortalArrayOutput `pulumi:"portals"`
// One or more `scm` blocks as defined below.
Scms CustomDomainScmArrayOutput `pulumi:"scms"`
}
// NewCustomDomain registers a new resource with the given unique name, arguments, and options.
func NewCustomDomain(ctx *pulumi.Context,
name string, args *CustomDomainArgs, opts ...pulumi.ResourceOption) (*CustomDomain, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CustomDomain
err := ctx.RegisterResource("azure:apimanagement/customDomain:CustomDomain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCustomDomain gets an existing CustomDomain resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCustomDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CustomDomainState, opts ...pulumi.ResourceOption) (*CustomDomain, error) {
var resource CustomDomain
err := ctx.ReadResource("azure:apimanagement/customDomain:CustomDomain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CustomDomain resources.
type customDomainState struct {
// The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// One or more `developerPortal` blocks as defined below.
DeveloperPortals []CustomDomainDeveloperPortal `pulumi:"developerPortals"`
// One or more `gateway` blocks as defined below.
Gateways []CustomDomainGateway `pulumi:"gateways"`
// One or more `management` blocks as defined below.
Managements []CustomDomainManagement `pulumi:"managements"`
// One or more `portal` blocks as defined below.
Portals []CustomDomainPortal `pulumi:"portals"`
// One or more `scm` blocks as defined below.
Scms []CustomDomainScm `pulumi:"scms"`
}
type CustomDomainState struct {
// The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
ApiManagementId pulumi.StringPtrInput
// One or more `developerPortal` blocks as defined below.
DeveloperPortals CustomDomainDeveloperPortalArrayInput
// One or more `gateway` blocks as defined below.
Gateways CustomDomainGatewayArrayInput
// One or more `management` blocks as defined below.
Managements CustomDomainManagementArrayInput
// One or more `portal` blocks as defined below.
Portals CustomDomainPortalArrayInput
// One or more `scm` blocks as defined below.
Scms CustomDomainScmArrayInput
}
func (CustomDomainState) ElementType() reflect.Type {
return reflect.TypeOf((*customDomainState)(nil)).Elem()
}
type customDomainArgs struct {
// The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// One or more `developerPortal` blocks as defined below.
DeveloperPortals []CustomDomainDeveloperPortal `pulumi:"developerPortals"`
// One or more `gateway` blocks as defined below.
Gateways []CustomDomainGateway `pulumi:"gateways"`
// One or more `management` blocks as defined below.
Managements []CustomDomainManagement `pulumi:"managements"`
// One or more `portal` blocks as defined below.
Portals []CustomDomainPortal `pulumi:"portals"`
// One or more `scm` blocks as defined below.
Scms []CustomDomainScm `pulumi:"scms"`
}
// The set of arguments for constructing a CustomDomain resource.
type CustomDomainArgs struct {
// The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
ApiManagementId pulumi.StringInput
// One or more `developerPortal` blocks as defined below.
DeveloperPortals CustomDomainDeveloperPortalArrayInput
// One or more `gateway` blocks as defined below.
Gateways CustomDomainGatewayArrayInput
// One or more `management` blocks as defined below.
Managements CustomDomainManagementArrayInput
// One or more `portal` blocks as defined below.
Portals CustomDomainPortalArrayInput
// One or more `scm` blocks as defined below.
Scms CustomDomainScmArrayInput
}
func (CustomDomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*customDomainArgs)(nil)).Elem()
}
type CustomDomainInput interface {
pulumi.Input
ToCustomDomainOutput() CustomDomainOutput
ToCustomDomainOutputWithContext(ctx context.Context) CustomDomainOutput
}
func (*CustomDomain) ElementType() reflect.Type {
return reflect.TypeOf((**CustomDomain)(nil)).Elem()
}
func (i *CustomDomain) ToCustomDomainOutput() CustomDomainOutput {
return i.ToCustomDomainOutputWithContext(context.Background())
}
func (i *CustomDomain) ToCustomDomainOutputWithContext(ctx context.Context) CustomDomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomDomainOutput)
}
// CustomDomainArrayInput is an input type that accepts CustomDomainArray and CustomDomainArrayOutput values.
// You can construct a concrete instance of `CustomDomainArrayInput` via:
//
// CustomDomainArray{ CustomDomainArgs{...} }
type CustomDomainArrayInput interface {
pulumi.Input
ToCustomDomainArrayOutput() CustomDomainArrayOutput
ToCustomDomainArrayOutputWithContext(context.Context) CustomDomainArrayOutput
}
type CustomDomainArray []CustomDomainInput
func (CustomDomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomDomain)(nil)).Elem()
}
func (i CustomDomainArray) ToCustomDomainArrayOutput() CustomDomainArrayOutput {
return i.ToCustomDomainArrayOutputWithContext(context.Background())
}
func (i CustomDomainArray) ToCustomDomainArrayOutputWithContext(ctx context.Context) CustomDomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomDomainArrayOutput)
}
// CustomDomainMapInput is an input type that accepts CustomDomainMap and CustomDomainMapOutput values.
// You can construct a concrete instance of `CustomDomainMapInput` via:
//
// CustomDomainMap{ "key": CustomDomainArgs{...} }
type CustomDomainMapInput interface {
pulumi.Input
ToCustomDomainMapOutput() CustomDomainMapOutput
ToCustomDomainMapOutputWithContext(context.Context) CustomDomainMapOutput
}
type CustomDomainMap map[string]CustomDomainInput
func (CustomDomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomDomain)(nil)).Elem()
}
func (i CustomDomainMap) ToCustomDomainMapOutput() CustomDomainMapOutput {
return i.ToCustomDomainMapOutputWithContext(context.Background())
}
func (i CustomDomainMap) ToCustomDomainMapOutputWithContext(ctx context.Context) CustomDomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomDomainMapOutput)
}
type CustomDomainOutput struct{ *pulumi.OutputState }
func (CustomDomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CustomDomain)(nil)).Elem()
}
func (o CustomDomainOutput) ToCustomDomainOutput() CustomDomainOutput {
return o
}
func (o CustomDomainOutput) ToCustomDomainOutputWithContext(ctx context.Context) CustomDomainOutput {
return o
}
// The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created.
func (o CustomDomainOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *CustomDomain) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// One or more `developerPortal` blocks as defined below.
func (o CustomDomainOutput) DeveloperPortals() CustomDomainDeveloperPortalArrayOutput {
return o.ApplyT(func(v *CustomDomain) CustomDomainDeveloperPortalArrayOutput { return v.DeveloperPortals }).(CustomDomainDeveloperPortalArrayOutput)
}
// One or more `gateway` blocks as defined below.
func (o CustomDomainOutput) Gateways() CustomDomainGatewayArrayOutput {
return o.ApplyT(func(v *CustomDomain) CustomDomainGatewayArrayOutput { return v.Gateways }).(CustomDomainGatewayArrayOutput)
}
// One or more `management` blocks as defined below.
func (o CustomDomainOutput) Managements() CustomDomainManagementArrayOutput {
return o.ApplyT(func(v *CustomDomain) CustomDomainManagementArrayOutput { return v.Managements }).(CustomDomainManagementArrayOutput)
}
// One or more `portal` blocks as defined below.
func (o CustomDomainOutput) Portals() CustomDomainPortalArrayOutput {
return o.ApplyT(func(v *CustomDomain) CustomDomainPortalArrayOutput { return v.Portals }).(CustomDomainPortalArrayOutput)
}
// One or more `scm` blocks as defined below.
func (o CustomDomainOutput) Scms() CustomDomainScmArrayOutput {
return o.ApplyT(func(v *CustomDomain) CustomDomainScmArrayOutput { return v.Scms }).(CustomDomainScmArrayOutput)
}
type CustomDomainArrayOutput struct{ *pulumi.OutputState }
func (CustomDomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomDomain)(nil)).Elem()
}
func (o CustomDomainArrayOutput) ToCustomDomainArrayOutput() CustomDomainArrayOutput {
return o
}
func (o CustomDomainArrayOutput) ToCustomDomainArrayOutputWithContext(ctx context.Context) CustomDomainArrayOutput {
return o
}
func (o CustomDomainArrayOutput) Index(i pulumi.IntInput) CustomDomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CustomDomain {
return vs[0].([]*CustomDomain)[vs[1].(int)]
}).(CustomDomainOutput)
}
type CustomDomainMapOutput struct{ *pulumi.OutputState }
func (CustomDomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomDomain)(nil)).Elem()
}
func (o CustomDomainMapOutput) ToCustomDomainMapOutput() CustomDomainMapOutput {
return o
}
func (o CustomDomainMapOutput) ToCustomDomainMapOutputWithContext(ctx context.Context) CustomDomainMapOutput {
return o
}
func (o CustomDomainMapOutput) MapIndex(k pulumi.StringInput) CustomDomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CustomDomain {
return vs[0].(map[string]*CustomDomain)[vs[1].(string)]
}).(CustomDomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CustomDomainInput)(nil)).Elem(), &CustomDomain{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomDomainArrayInput)(nil)).Elem(), CustomDomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomDomainMapInput)(nil)).Elem(), CustomDomainMap{})
pulumi.RegisterOutputType(CustomDomainOutput{})
pulumi.RegisterOutputType(CustomDomainArrayOutput{})
pulumi.RegisterOutputType(CustomDomainMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/notificationRecipientUser.go | sdk/go/azure/apimanagement/notificationRecipientUser.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management Notification Recipient User.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// exampleUser, err := apimanagement.NewUser(ctx, "example", &apimanagement.UserArgs{
// UserId: pulumi.String("123"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// FirstName: pulumi.String("Example"),
// LastName: pulumi.String("User"),
// Email: pulumi.String("foo@bar.com"),
// State: pulumi.String("active"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewNotificationRecipientUser(ctx, "example", &apimanagement.NotificationRecipientUserArgs{
// ApiManagementId: exampleService.ID(),
// NotificationType: pulumi.String("AccountClosedPublisher"),
// UserId: exampleUser.UserId,
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Notification Recipient Users can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/notificationRecipientUser:NotificationRecipientUser example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/notifications/notificationName1/recipientUsers/userid1
// ```
type NotificationRecipientUser struct {
pulumi.CustomResourceState
// The ID of the API Management Service from which to create this Notification Recipient User. Changing this forces a new API Management Notification Recipient User to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType pulumi.StringOutput `pulumi:"notificationType"`
// The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created.
UserId pulumi.StringOutput `pulumi:"userId"`
}
// NewNotificationRecipientUser registers a new resource with the given unique name, arguments, and options.
func NewNotificationRecipientUser(ctx *pulumi.Context,
name string, args *NotificationRecipientUserArgs, opts ...pulumi.ResourceOption) (*NotificationRecipientUser, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
if args.NotificationType == nil {
return nil, errors.New("invalid value for required argument 'NotificationType'")
}
if args.UserId == nil {
return nil, errors.New("invalid value for required argument 'UserId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NotificationRecipientUser
err := ctx.RegisterResource("azure:apimanagement/notificationRecipientUser:NotificationRecipientUser", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNotificationRecipientUser gets an existing NotificationRecipientUser resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetNotificationRecipientUser(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NotificationRecipientUserState, opts ...pulumi.ResourceOption) (*NotificationRecipientUser, error) {
var resource NotificationRecipientUser
err := ctx.ReadResource("azure:apimanagement/notificationRecipientUser:NotificationRecipientUser", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NotificationRecipientUser resources.
type notificationRecipientUserState struct {
// The ID of the API Management Service from which to create this Notification Recipient User. Changing this forces a new API Management Notification Recipient User to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType *string `pulumi:"notificationType"`
// The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created.
UserId *string `pulumi:"userId"`
}
type NotificationRecipientUserState struct {
// The ID of the API Management Service from which to create this Notification Recipient User. Changing this forces a new API Management Notification Recipient User to be created.
ApiManagementId pulumi.StringPtrInput
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType pulumi.StringPtrInput
// The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created.
UserId pulumi.StringPtrInput
}
func (NotificationRecipientUserState) ElementType() reflect.Type {
return reflect.TypeOf((*notificationRecipientUserState)(nil)).Elem()
}
type notificationRecipientUserArgs struct {
// The ID of the API Management Service from which to create this Notification Recipient User. Changing this forces a new API Management Notification Recipient User to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType string `pulumi:"notificationType"`
// The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created.
UserId string `pulumi:"userId"`
}
// The set of arguments for constructing a NotificationRecipientUser resource.
type NotificationRecipientUserArgs struct {
// The ID of the API Management Service from which to create this Notification Recipient User. Changing this forces a new API Management Notification Recipient User to be created.
ApiManagementId pulumi.StringInput
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
NotificationType pulumi.StringInput
// The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created.
UserId pulumi.StringInput
}
func (NotificationRecipientUserArgs) ElementType() reflect.Type {
return reflect.TypeOf((*notificationRecipientUserArgs)(nil)).Elem()
}
type NotificationRecipientUserInput interface {
pulumi.Input
ToNotificationRecipientUserOutput() NotificationRecipientUserOutput
ToNotificationRecipientUserOutputWithContext(ctx context.Context) NotificationRecipientUserOutput
}
func (*NotificationRecipientUser) ElementType() reflect.Type {
return reflect.TypeOf((**NotificationRecipientUser)(nil)).Elem()
}
func (i *NotificationRecipientUser) ToNotificationRecipientUserOutput() NotificationRecipientUserOutput {
return i.ToNotificationRecipientUserOutputWithContext(context.Background())
}
func (i *NotificationRecipientUser) ToNotificationRecipientUserOutputWithContext(ctx context.Context) NotificationRecipientUserOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationRecipientUserOutput)
}
// NotificationRecipientUserArrayInput is an input type that accepts NotificationRecipientUserArray and NotificationRecipientUserArrayOutput values.
// You can construct a concrete instance of `NotificationRecipientUserArrayInput` via:
//
// NotificationRecipientUserArray{ NotificationRecipientUserArgs{...} }
type NotificationRecipientUserArrayInput interface {
pulumi.Input
ToNotificationRecipientUserArrayOutput() NotificationRecipientUserArrayOutput
ToNotificationRecipientUserArrayOutputWithContext(context.Context) NotificationRecipientUserArrayOutput
}
type NotificationRecipientUserArray []NotificationRecipientUserInput
func (NotificationRecipientUserArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NotificationRecipientUser)(nil)).Elem()
}
func (i NotificationRecipientUserArray) ToNotificationRecipientUserArrayOutput() NotificationRecipientUserArrayOutput {
return i.ToNotificationRecipientUserArrayOutputWithContext(context.Background())
}
func (i NotificationRecipientUserArray) ToNotificationRecipientUserArrayOutputWithContext(ctx context.Context) NotificationRecipientUserArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationRecipientUserArrayOutput)
}
// NotificationRecipientUserMapInput is an input type that accepts NotificationRecipientUserMap and NotificationRecipientUserMapOutput values.
// You can construct a concrete instance of `NotificationRecipientUserMapInput` via:
//
// NotificationRecipientUserMap{ "key": NotificationRecipientUserArgs{...} }
type NotificationRecipientUserMapInput interface {
pulumi.Input
ToNotificationRecipientUserMapOutput() NotificationRecipientUserMapOutput
ToNotificationRecipientUserMapOutputWithContext(context.Context) NotificationRecipientUserMapOutput
}
type NotificationRecipientUserMap map[string]NotificationRecipientUserInput
func (NotificationRecipientUserMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NotificationRecipientUser)(nil)).Elem()
}
func (i NotificationRecipientUserMap) ToNotificationRecipientUserMapOutput() NotificationRecipientUserMapOutput {
return i.ToNotificationRecipientUserMapOutputWithContext(context.Background())
}
func (i NotificationRecipientUserMap) ToNotificationRecipientUserMapOutputWithContext(ctx context.Context) NotificationRecipientUserMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationRecipientUserMapOutput)
}
type NotificationRecipientUserOutput struct{ *pulumi.OutputState }
func (NotificationRecipientUserOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NotificationRecipientUser)(nil)).Elem()
}
func (o NotificationRecipientUserOutput) ToNotificationRecipientUserOutput() NotificationRecipientUserOutput {
return o
}
func (o NotificationRecipientUserOutput) ToNotificationRecipientUserOutputWithContext(ctx context.Context) NotificationRecipientUserOutput {
return o
}
// The ID of the API Management Service from which to create this Notification Recipient User. Changing this forces a new API Management Notification Recipient User to be created.
func (o NotificationRecipientUserOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *NotificationRecipientUser) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`.
func (o NotificationRecipientUserOutput) NotificationType() pulumi.StringOutput {
return o.ApplyT(func(v *NotificationRecipientUser) pulumi.StringOutput { return v.NotificationType }).(pulumi.StringOutput)
}
// The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created.
func (o NotificationRecipientUserOutput) UserId() pulumi.StringOutput {
return o.ApplyT(func(v *NotificationRecipientUser) pulumi.StringOutput { return v.UserId }).(pulumi.StringOutput)
}
type NotificationRecipientUserArrayOutput struct{ *pulumi.OutputState }
func (NotificationRecipientUserArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NotificationRecipientUser)(nil)).Elem()
}
func (o NotificationRecipientUserArrayOutput) ToNotificationRecipientUserArrayOutput() NotificationRecipientUserArrayOutput {
return o
}
func (o NotificationRecipientUserArrayOutput) ToNotificationRecipientUserArrayOutputWithContext(ctx context.Context) NotificationRecipientUserArrayOutput {
return o
}
func (o NotificationRecipientUserArrayOutput) Index(i pulumi.IntInput) NotificationRecipientUserOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NotificationRecipientUser {
return vs[0].([]*NotificationRecipientUser)[vs[1].(int)]
}).(NotificationRecipientUserOutput)
}
type NotificationRecipientUserMapOutput struct{ *pulumi.OutputState }
func (NotificationRecipientUserMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NotificationRecipientUser)(nil)).Elem()
}
func (o NotificationRecipientUserMapOutput) ToNotificationRecipientUserMapOutput() NotificationRecipientUserMapOutput {
return o
}
func (o NotificationRecipientUserMapOutput) ToNotificationRecipientUserMapOutputWithContext(ctx context.Context) NotificationRecipientUserMapOutput {
return o
}
func (o NotificationRecipientUserMapOutput) MapIndex(k pulumi.StringInput) NotificationRecipientUserOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NotificationRecipientUser {
return vs[0].(map[string]*NotificationRecipientUser)[vs[1].(string)]
}).(NotificationRecipientUserOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NotificationRecipientUserInput)(nil)).Elem(), &NotificationRecipientUser{})
pulumi.RegisterInputType(reflect.TypeOf((*NotificationRecipientUserArrayInput)(nil)).Elem(), NotificationRecipientUserArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NotificationRecipientUserMapInput)(nil)).Elem(), NotificationRecipientUserMap{})
pulumi.RegisterOutputType(NotificationRecipientUserOutput{})
pulumi.RegisterOutputType(NotificationRecipientUserArrayOutput{})
pulumi.RegisterOutputType(NotificationRecipientUserMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/apiOperationPolicy.go | sdk/go/azure/apimanagement/apiOperationPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management API Operation Policy
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// exampleApi, err := apimanagement.NewApi(ctx, "example", &apimanagement.ApiArgs{
// Name: pulumi.String("example-api"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// Revision: pulumi.String("1"),
// })
// if err != nil {
// return err
// }
// exampleApiOperation, err := apimanagement.NewApiOperation(ctx, "example", &apimanagement.ApiOperationArgs{
// OperationId: pulumi.String("acctest-operation"),
// ApiName: exampleApi.Name,
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// DisplayName: pulumi.String("DELETE Resource"),
// Method: pulumi.String("DELETE"),
// UrlTemplate: pulumi.String("/resource"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApiOperationPolicy(ctx, "example", &apimanagement.ApiOperationPolicyArgs{
// ApiName: exampleApiOperation.ApiName,
// ApiManagementName: exampleApiOperation.ApiManagementName,
// ResourceGroupName: exampleApiOperation.ResourceGroupName,
// OperationId: exampleApiOperation.OperationId,
// XmlContent: pulumi.String(`<policies>
// <inbound>
// <find-and-replace from=\"xyz\" to=\"abc\" />
// </inbound>
//
// </policies>
// `),
//
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management API Operation Policy can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/apiOperationPolicy:ApiOperationPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/operations/operation1
// ```
type ApiOperationPolicy struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The name of the API within the API Management Service where the Operation exists. Changing this forces a new resource to be created.
ApiName pulumi.StringOutput `pulumi:"apiName"`
// The operation identifier within an API. Must be unique in the current API Management service instance. Changing this forces a new resource to be created.
OperationId pulumi.StringOutput `pulumi:"operationId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The XML Content for this Policy.
XmlContent pulumi.StringOutput `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrOutput `pulumi:"xmlLink"`
}
// NewApiOperationPolicy registers a new resource with the given unique name, arguments, and options.
func NewApiOperationPolicy(ctx *pulumi.Context,
name string, args *ApiOperationPolicyArgs, opts ...pulumi.ResourceOption) (*ApiOperationPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ApiName == nil {
return nil, errors.New("invalid value for required argument 'ApiName'")
}
if args.OperationId == nil {
return nil, errors.New("invalid value for required argument 'OperationId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiOperationPolicy
err := ctx.RegisterResource("azure:apimanagement/apiOperationPolicy:ApiOperationPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiOperationPolicy gets an existing ApiOperationPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiOperationPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiOperationPolicyState, opts ...pulumi.ResourceOption) (*ApiOperationPolicy, error) {
var resource ApiOperationPolicy
err := ctx.ReadResource("azure:apimanagement/apiOperationPolicy:ApiOperationPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiOperationPolicy resources.
type apiOperationPolicyState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The name of the API within the API Management Service where the Operation exists. Changing this forces a new resource to be created.
ApiName *string `pulumi:"apiName"`
// The operation identifier within an API. Must be unique in the current API Management service instance. Changing this forces a new resource to be created.
OperationId *string `pulumi:"operationId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The XML Content for this Policy.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
type ApiOperationPolicyState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The name of the API within the API Management Service where the Operation exists. Changing this forces a new resource to be created.
ApiName pulumi.StringPtrInput
// The operation identifier within an API. Must be unique in the current API Management service instance. Changing this forces a new resource to be created.
OperationId pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The XML Content for this Policy.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (ApiOperationPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*apiOperationPolicyState)(nil)).Elem()
}
type apiOperationPolicyArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The name of the API within the API Management Service where the Operation exists. Changing this forces a new resource to be created.
ApiName string `pulumi:"apiName"`
// The operation identifier within an API. Must be unique in the current API Management service instance. Changing this forces a new resource to be created.
OperationId string `pulumi:"operationId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The XML Content for this Policy.
XmlContent *string `pulumi:"xmlContent"`
// A link to a Policy XML Document, which must be publicly available.
XmlLink *string `pulumi:"xmlLink"`
}
// The set of arguments for constructing a ApiOperationPolicy resource.
type ApiOperationPolicyArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The name of the API within the API Management Service where the Operation exists. Changing this forces a new resource to be created.
ApiName pulumi.StringInput
// The operation identifier within an API. Must be unique in the current API Management service instance. Changing this forces a new resource to be created.
OperationId pulumi.StringInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The XML Content for this Policy.
XmlContent pulumi.StringPtrInput
// A link to a Policy XML Document, which must be publicly available.
XmlLink pulumi.StringPtrInput
}
func (ApiOperationPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiOperationPolicyArgs)(nil)).Elem()
}
type ApiOperationPolicyInput interface {
pulumi.Input
ToApiOperationPolicyOutput() ApiOperationPolicyOutput
ToApiOperationPolicyOutputWithContext(ctx context.Context) ApiOperationPolicyOutput
}
func (*ApiOperationPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ApiOperationPolicy)(nil)).Elem()
}
func (i *ApiOperationPolicy) ToApiOperationPolicyOutput() ApiOperationPolicyOutput {
return i.ToApiOperationPolicyOutputWithContext(context.Background())
}
func (i *ApiOperationPolicy) ToApiOperationPolicyOutputWithContext(ctx context.Context) ApiOperationPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiOperationPolicyOutput)
}
// ApiOperationPolicyArrayInput is an input type that accepts ApiOperationPolicyArray and ApiOperationPolicyArrayOutput values.
// You can construct a concrete instance of `ApiOperationPolicyArrayInput` via:
//
// ApiOperationPolicyArray{ ApiOperationPolicyArgs{...} }
type ApiOperationPolicyArrayInput interface {
pulumi.Input
ToApiOperationPolicyArrayOutput() ApiOperationPolicyArrayOutput
ToApiOperationPolicyArrayOutputWithContext(context.Context) ApiOperationPolicyArrayOutput
}
type ApiOperationPolicyArray []ApiOperationPolicyInput
func (ApiOperationPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiOperationPolicy)(nil)).Elem()
}
func (i ApiOperationPolicyArray) ToApiOperationPolicyArrayOutput() ApiOperationPolicyArrayOutput {
return i.ToApiOperationPolicyArrayOutputWithContext(context.Background())
}
func (i ApiOperationPolicyArray) ToApiOperationPolicyArrayOutputWithContext(ctx context.Context) ApiOperationPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiOperationPolicyArrayOutput)
}
// ApiOperationPolicyMapInput is an input type that accepts ApiOperationPolicyMap and ApiOperationPolicyMapOutput values.
// You can construct a concrete instance of `ApiOperationPolicyMapInput` via:
//
// ApiOperationPolicyMap{ "key": ApiOperationPolicyArgs{...} }
type ApiOperationPolicyMapInput interface {
pulumi.Input
ToApiOperationPolicyMapOutput() ApiOperationPolicyMapOutput
ToApiOperationPolicyMapOutputWithContext(context.Context) ApiOperationPolicyMapOutput
}
type ApiOperationPolicyMap map[string]ApiOperationPolicyInput
func (ApiOperationPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiOperationPolicy)(nil)).Elem()
}
func (i ApiOperationPolicyMap) ToApiOperationPolicyMapOutput() ApiOperationPolicyMapOutput {
return i.ToApiOperationPolicyMapOutputWithContext(context.Background())
}
func (i ApiOperationPolicyMap) ToApiOperationPolicyMapOutputWithContext(ctx context.Context) ApiOperationPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiOperationPolicyMapOutput)
}
type ApiOperationPolicyOutput struct{ *pulumi.OutputState }
func (ApiOperationPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiOperationPolicy)(nil)).Elem()
}
func (o ApiOperationPolicyOutput) ToApiOperationPolicyOutput() ApiOperationPolicyOutput {
return o
}
func (o ApiOperationPolicyOutput) ToApiOperationPolicyOutputWithContext(ctx context.Context) ApiOperationPolicyOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o ApiOperationPolicyOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperationPolicy) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The name of the API within the API Management Service where the Operation exists. Changing this forces a new resource to be created.
func (o ApiOperationPolicyOutput) ApiName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperationPolicy) pulumi.StringOutput { return v.ApiName }).(pulumi.StringOutput)
}
// The operation identifier within an API. Must be unique in the current API Management service instance. Changing this forces a new resource to be created.
func (o ApiOperationPolicyOutput) OperationId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperationPolicy) pulumi.StringOutput { return v.OperationId }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o ApiOperationPolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperationPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The XML Content for this Policy.
func (o ApiOperationPolicyOutput) XmlContent() pulumi.StringOutput {
return o.ApplyT(func(v *ApiOperationPolicy) pulumi.StringOutput { return v.XmlContent }).(pulumi.StringOutput)
}
// A link to a Policy XML Document, which must be publicly available.
func (o ApiOperationPolicyOutput) XmlLink() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiOperationPolicy) pulumi.StringPtrOutput { return v.XmlLink }).(pulumi.StringPtrOutput)
}
type ApiOperationPolicyArrayOutput struct{ *pulumi.OutputState }
func (ApiOperationPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiOperationPolicy)(nil)).Elem()
}
func (o ApiOperationPolicyArrayOutput) ToApiOperationPolicyArrayOutput() ApiOperationPolicyArrayOutput {
return o
}
func (o ApiOperationPolicyArrayOutput) ToApiOperationPolicyArrayOutputWithContext(ctx context.Context) ApiOperationPolicyArrayOutput {
return o
}
func (o ApiOperationPolicyArrayOutput) Index(i pulumi.IntInput) ApiOperationPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiOperationPolicy {
return vs[0].([]*ApiOperationPolicy)[vs[1].(int)]
}).(ApiOperationPolicyOutput)
}
type ApiOperationPolicyMapOutput struct{ *pulumi.OutputState }
func (ApiOperationPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiOperationPolicy)(nil)).Elem()
}
func (o ApiOperationPolicyMapOutput) ToApiOperationPolicyMapOutput() ApiOperationPolicyMapOutput {
return o
}
func (o ApiOperationPolicyMapOutput) ToApiOperationPolicyMapOutputWithContext(ctx context.Context) ApiOperationPolicyMapOutput {
return o
}
func (o ApiOperationPolicyMapOutput) MapIndex(k pulumi.StringInput) ApiOperationPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiOperationPolicy {
return vs[0].(map[string]*ApiOperationPolicy)[vs[1].(string)]
}).(ApiOperationPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiOperationPolicyInput)(nil)).Elem(), &ApiOperationPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiOperationPolicyArrayInput)(nil)).Elem(), ApiOperationPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiOperationPolicyMapInput)(nil)).Elem(), ApiOperationPolicyMap{})
pulumi.RegisterOutputType(ApiOperationPolicyOutput{})
pulumi.RegisterOutputType(ApiOperationPolicyArrayOutput{})
pulumi.RegisterOutputType(ApiOperationPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/product.go | sdk/go/azure/apimanagement/product.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Product.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@exmaple.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewProduct(ctx, "example", &apimanagement.ProductArgs{
// ProductId: pulumi.String("test-product"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// DisplayName: pulumi.String("Test Product"),
// SubscriptionRequired: pulumi.Bool(true),
// ApprovalRequired: pulumi.Bool(true),
// Published: 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Products can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/product:Product example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/products/myproduct
// ```
type Product struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// Do subscribers need to be approved prior to being able to use the Product?
//
// > **Note:** `approvalRequired` can only be set when `subscriptionRequired` is set to `true`.
ApprovalRequired pulumi.BoolPtrOutput `pulumi:"approvalRequired"`
// A description of this Product, which may include HTML formatting tags.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The Display Name for this API Management Product.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Identifier for this Product, which must be unique within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringOutput `pulumi:"productId"`
// Is this Product Published?
Published pulumi.BoolOutput `pulumi:"published"`
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Is a Subscription required to access API's included in this Product? Defaults to `true`.
SubscriptionRequired pulumi.BoolPtrOutput `pulumi:"subscriptionRequired"`
// The number of subscriptions a user can have to this Product at the same time.
//
// > **Note:** `subscriptionsLimit` can only be set when `subscriptionRequired` is set to `true`.
SubscriptionsLimit pulumi.IntPtrOutput `pulumi:"subscriptionsLimit"`
// The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
Terms pulumi.StringPtrOutput `pulumi:"terms"`
}
// NewProduct registers a new resource with the given unique name, arguments, and options.
func NewProduct(ctx *pulumi.Context,
name string, args *ProductArgs, opts ...pulumi.ResourceOption) (*Product, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ProductId == nil {
return nil, errors.New("invalid value for required argument 'ProductId'")
}
if args.Published == nil {
return nil, errors.New("invalid value for required argument 'Published'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Product
err := ctx.RegisterResource("azure:apimanagement/product:Product", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProduct gets an existing Product resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetProduct(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProductState, opts ...pulumi.ResourceOption) (*Product, error) {
var resource Product
err := ctx.ReadResource("azure:apimanagement/product:Product", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Product resources.
type productState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// Do subscribers need to be approved prior to being able to use the Product?
//
// > **Note:** `approvalRequired` can only be set when `subscriptionRequired` is set to `true`.
ApprovalRequired *bool `pulumi:"approvalRequired"`
// A description of this Product, which may include HTML formatting tags.
Description *string `pulumi:"description"`
// The Display Name for this API Management Product.
DisplayName *string `pulumi:"displayName"`
// The Identifier for this Product, which must be unique within the API Management Service. Changing this forces a new resource to be created.
ProductId *string `pulumi:"productId"`
// Is this Product Published?
Published *bool `pulumi:"published"`
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Is a Subscription required to access API's included in this Product? Defaults to `true`.
SubscriptionRequired *bool `pulumi:"subscriptionRequired"`
// The number of subscriptions a user can have to this Product at the same time.
//
// > **Note:** `subscriptionsLimit` can only be set when `subscriptionRequired` is set to `true`.
SubscriptionsLimit *int `pulumi:"subscriptionsLimit"`
// The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
Terms *string `pulumi:"terms"`
}
type ProductState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// Do subscribers need to be approved prior to being able to use the Product?
//
// > **Note:** `approvalRequired` can only be set when `subscriptionRequired` is set to `true`.
ApprovalRequired pulumi.BoolPtrInput
// A description of this Product, which may include HTML formatting tags.
Description pulumi.StringPtrInput
// The Display Name for this API Management Product.
DisplayName pulumi.StringPtrInput
// The Identifier for this Product, which must be unique within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringPtrInput
// Is this Product Published?
Published pulumi.BoolPtrInput
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Is a Subscription required to access API's included in this Product? Defaults to `true`.
SubscriptionRequired pulumi.BoolPtrInput
// The number of subscriptions a user can have to this Product at the same time.
//
// > **Note:** `subscriptionsLimit` can only be set when `subscriptionRequired` is set to `true`.
SubscriptionsLimit pulumi.IntPtrInput
// The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
Terms pulumi.StringPtrInput
}
func (ProductState) ElementType() reflect.Type {
return reflect.TypeOf((*productState)(nil)).Elem()
}
type productArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// Do subscribers need to be approved prior to being able to use the Product?
//
// > **Note:** `approvalRequired` can only be set when `subscriptionRequired` is set to `true`.
ApprovalRequired *bool `pulumi:"approvalRequired"`
// A description of this Product, which may include HTML formatting tags.
Description *string `pulumi:"description"`
// The Display Name for this API Management Product.
DisplayName string `pulumi:"displayName"`
// The Identifier for this Product, which must be unique within the API Management Service. Changing this forces a new resource to be created.
ProductId string `pulumi:"productId"`
// Is this Product Published?
Published bool `pulumi:"published"`
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Is a Subscription required to access API's included in this Product? Defaults to `true`.
SubscriptionRequired *bool `pulumi:"subscriptionRequired"`
// The number of subscriptions a user can have to this Product at the same time.
//
// > **Note:** `subscriptionsLimit` can only be set when `subscriptionRequired` is set to `true`.
SubscriptionsLimit *int `pulumi:"subscriptionsLimit"`
// The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
Terms *string `pulumi:"terms"`
}
// The set of arguments for constructing a Product resource.
type ProductArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// Do subscribers need to be approved prior to being able to use the Product?
//
// > **Note:** `approvalRequired` can only be set when `subscriptionRequired` is set to `true`.
ApprovalRequired pulumi.BoolPtrInput
// A description of this Product, which may include HTML formatting tags.
Description pulumi.StringPtrInput
// The Display Name for this API Management Product.
DisplayName pulumi.StringInput
// The Identifier for this Product, which must be unique within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringInput
// Is this Product Published?
Published pulumi.BoolInput
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Is a Subscription required to access API's included in this Product? Defaults to `true`.
SubscriptionRequired pulumi.BoolPtrInput
// The number of subscriptions a user can have to this Product at the same time.
//
// > **Note:** `subscriptionsLimit` can only be set when `subscriptionRequired` is set to `true`.
SubscriptionsLimit pulumi.IntPtrInput
// The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
Terms pulumi.StringPtrInput
}
func (ProductArgs) ElementType() reflect.Type {
return reflect.TypeOf((*productArgs)(nil)).Elem()
}
type ProductInput interface {
pulumi.Input
ToProductOutput() ProductOutput
ToProductOutputWithContext(ctx context.Context) ProductOutput
}
func (*Product) ElementType() reflect.Type {
return reflect.TypeOf((**Product)(nil)).Elem()
}
func (i *Product) ToProductOutput() ProductOutput {
return i.ToProductOutputWithContext(context.Background())
}
func (i *Product) ToProductOutputWithContext(ctx context.Context) ProductOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductOutput)
}
// ProductArrayInput is an input type that accepts ProductArray and ProductArrayOutput values.
// You can construct a concrete instance of `ProductArrayInput` via:
//
// ProductArray{ ProductArgs{...} }
type ProductArrayInput interface {
pulumi.Input
ToProductArrayOutput() ProductArrayOutput
ToProductArrayOutputWithContext(context.Context) ProductArrayOutput
}
type ProductArray []ProductInput
func (ProductArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Product)(nil)).Elem()
}
func (i ProductArray) ToProductArrayOutput() ProductArrayOutput {
return i.ToProductArrayOutputWithContext(context.Background())
}
func (i ProductArray) ToProductArrayOutputWithContext(ctx context.Context) ProductArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductArrayOutput)
}
// ProductMapInput is an input type that accepts ProductMap and ProductMapOutput values.
// You can construct a concrete instance of `ProductMapInput` via:
//
// ProductMap{ "key": ProductArgs{...} }
type ProductMapInput interface {
pulumi.Input
ToProductMapOutput() ProductMapOutput
ToProductMapOutputWithContext(context.Context) ProductMapOutput
}
type ProductMap map[string]ProductInput
func (ProductMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Product)(nil)).Elem()
}
func (i ProductMap) ToProductMapOutput() ProductMapOutput {
return i.ToProductMapOutputWithContext(context.Background())
}
func (i ProductMap) ToProductMapOutputWithContext(ctx context.Context) ProductMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductMapOutput)
}
type ProductOutput struct{ *pulumi.OutputState }
func (ProductOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Product)(nil)).Elem()
}
func (o ProductOutput) ToProductOutput() ProductOutput {
return o
}
func (o ProductOutput) ToProductOutputWithContext(ctx context.Context) ProductOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o ProductOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *Product) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// Do subscribers need to be approved prior to being able to use the Product?
//
// > **Note:** `approvalRequired` can only be set when `subscriptionRequired` is set to `true`.
func (o ProductOutput) ApprovalRequired() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Product) pulumi.BoolPtrOutput { return v.ApprovalRequired }).(pulumi.BoolPtrOutput)
}
// A description of this Product, which may include HTML formatting tags.
func (o ProductOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Product) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The Display Name for this API Management Product.
func (o ProductOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Product) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The Identifier for this Product, which must be unique within the API Management Service. Changing this forces a new resource to be created.
func (o ProductOutput) ProductId() pulumi.StringOutput {
return o.ApplyT(func(v *Product) pulumi.StringOutput { return v.ProductId }).(pulumi.StringOutput)
}
// Is this Product Published?
func (o ProductOutput) Published() pulumi.BoolOutput {
return o.ApplyT(func(v *Product) pulumi.BoolOutput { return v.Published }).(pulumi.BoolOutput)
}
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
func (o ProductOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Product) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Is a Subscription required to access API's included in this Product? Defaults to `true`.
func (o ProductOutput) SubscriptionRequired() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Product) pulumi.BoolPtrOutput { return v.SubscriptionRequired }).(pulumi.BoolPtrOutput)
}
// The number of subscriptions a user can have to this Product at the same time.
//
// > **Note:** `subscriptionsLimit` can only be set when `subscriptionRequired` is set to `true`.
func (o ProductOutput) SubscriptionsLimit() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Product) pulumi.IntPtrOutput { return v.SubscriptionsLimit }).(pulumi.IntPtrOutput)
}
// The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
func (o ProductOutput) Terms() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Product) pulumi.StringPtrOutput { return v.Terms }).(pulumi.StringPtrOutput)
}
type ProductArrayOutput struct{ *pulumi.OutputState }
func (ProductArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Product)(nil)).Elem()
}
func (o ProductArrayOutput) ToProductArrayOutput() ProductArrayOutput {
return o
}
func (o ProductArrayOutput) ToProductArrayOutputWithContext(ctx context.Context) ProductArrayOutput {
return o
}
func (o ProductArrayOutput) Index(i pulumi.IntInput) ProductOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Product {
return vs[0].([]*Product)[vs[1].(int)]
}).(ProductOutput)
}
type ProductMapOutput struct{ *pulumi.OutputState }
func (ProductMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Product)(nil)).Elem()
}
func (o ProductMapOutput) ToProductMapOutput() ProductMapOutput {
return o
}
func (o ProductMapOutput) ToProductMapOutputWithContext(ctx context.Context) ProductMapOutput {
return o
}
func (o ProductMapOutput) MapIndex(k pulumi.StringInput) ProductOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Product {
return vs[0].(map[string]*Product)[vs[1].(string)]
}).(ProductOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProductInput)(nil)).Elem(), &Product{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductArrayInput)(nil)).Elem(), ProductArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductMapInput)(nil)).Elem(), ProductMap{})
pulumi.RegisterOutputType(ProductOutput{})
pulumi.RegisterOutputType(ProductArrayOutput{})
pulumi.RegisterOutputType(ProductMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/workspacePolicy.go | sdk/go/azure/apimanagement/workspacePolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Workspace Policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apimanagement"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Premium_1"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := apimanagement.NewWorkspace(ctx, "example", &apimanagement.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// ApiManagementId: exampleService.ID(),
// DisplayName: pulumi.String("my workspace"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewWorkspacePolicy(ctx, "example", &apimanagement.WorkspacePolicyArgs{
// ApiManagementWorkspaceId: exampleWorkspace.ID(),
// XmlContent: pulumi.String(`<policies>
// <inbound>
// <find-and-replace from=\"abc\" to=\"xyz\" />
// </inbound>
//
// </policies>
// `),
//
// })
// 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.ApiManagement` - 2024-05-01
//
// ## Import
//
// API Management Workspace Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/workspacePolicy:WorkspacePolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/workspaces/workspace1
// ```
type WorkspacePolicy struct {
pulumi.CustomResourceState
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringOutput `pulumi:"apiManagementWorkspaceId"`
// Specifies the API Management Workspace Policy as an XML string.
XmlContent pulumi.StringOutput `pulumi:"xmlContent"`
// Specifies a publicly accessible URL to a policy XML document.
//
// > **Note:** Exactly one of `xmlContent` or `xmlLink` must be specified.
XmlLink pulumi.StringPtrOutput `pulumi:"xmlLink"`
}
// NewWorkspacePolicy registers a new resource with the given unique name, arguments, and options.
func NewWorkspacePolicy(ctx *pulumi.Context,
name string, args *WorkspacePolicyArgs, opts ...pulumi.ResourceOption) (*WorkspacePolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementWorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspacePolicy
err := ctx.RegisterResource("azure:apimanagement/workspacePolicy:WorkspacePolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspacePolicy gets an existing WorkspacePolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspacePolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspacePolicyState, opts ...pulumi.ResourceOption) (*WorkspacePolicy, error) {
var resource WorkspacePolicy
err := ctx.ReadResource("azure:apimanagement/workspacePolicy:WorkspacePolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspacePolicy resources.
type workspacePolicyState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId *string `pulumi:"apiManagementWorkspaceId"`
// Specifies the API Management Workspace Policy as an XML string.
XmlContent *string `pulumi:"xmlContent"`
// Specifies a publicly accessible URL to a policy XML document.
//
// > **Note:** Exactly one of `xmlContent` or `xmlLink` must be specified.
XmlLink *string `pulumi:"xmlLink"`
}
type WorkspacePolicyState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringPtrInput
// Specifies the API Management Workspace Policy as an XML string.
XmlContent pulumi.StringPtrInput
// Specifies a publicly accessible URL to a policy XML document.
//
// > **Note:** Exactly one of `xmlContent` or `xmlLink` must be specified.
XmlLink pulumi.StringPtrInput
}
func (WorkspacePolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*workspacePolicyState)(nil)).Elem()
}
type workspacePolicyArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId string `pulumi:"apiManagementWorkspaceId"`
// Specifies the API Management Workspace Policy as an XML string.
XmlContent *string `pulumi:"xmlContent"`
// Specifies a publicly accessible URL to a policy XML document.
//
// > **Note:** Exactly one of `xmlContent` or `xmlLink` must be specified.
XmlLink *string `pulumi:"xmlLink"`
}
// The set of arguments for constructing a WorkspacePolicy resource.
type WorkspacePolicyArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringInput
// Specifies the API Management Workspace Policy as an XML string.
XmlContent pulumi.StringPtrInput
// Specifies a publicly accessible URL to a policy XML document.
//
// > **Note:** Exactly one of `xmlContent` or `xmlLink` must be specified.
XmlLink pulumi.StringPtrInput
}
func (WorkspacePolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspacePolicyArgs)(nil)).Elem()
}
type WorkspacePolicyInput interface {
pulumi.Input
ToWorkspacePolicyOutput() WorkspacePolicyOutput
ToWorkspacePolicyOutputWithContext(ctx context.Context) WorkspacePolicyOutput
}
func (*WorkspacePolicy) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspacePolicy)(nil)).Elem()
}
func (i *WorkspacePolicy) ToWorkspacePolicyOutput() WorkspacePolicyOutput {
return i.ToWorkspacePolicyOutputWithContext(context.Background())
}
func (i *WorkspacePolicy) ToWorkspacePolicyOutputWithContext(ctx context.Context) WorkspacePolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspacePolicyOutput)
}
// WorkspacePolicyArrayInput is an input type that accepts WorkspacePolicyArray and WorkspacePolicyArrayOutput values.
// You can construct a concrete instance of `WorkspacePolicyArrayInput` via:
//
// WorkspacePolicyArray{ WorkspacePolicyArgs{...} }
type WorkspacePolicyArrayInput interface {
pulumi.Input
ToWorkspacePolicyArrayOutput() WorkspacePolicyArrayOutput
ToWorkspacePolicyArrayOutputWithContext(context.Context) WorkspacePolicyArrayOutput
}
type WorkspacePolicyArray []WorkspacePolicyInput
func (WorkspacePolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspacePolicy)(nil)).Elem()
}
func (i WorkspacePolicyArray) ToWorkspacePolicyArrayOutput() WorkspacePolicyArrayOutput {
return i.ToWorkspacePolicyArrayOutputWithContext(context.Background())
}
func (i WorkspacePolicyArray) ToWorkspacePolicyArrayOutputWithContext(ctx context.Context) WorkspacePolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspacePolicyArrayOutput)
}
// WorkspacePolicyMapInput is an input type that accepts WorkspacePolicyMap and WorkspacePolicyMapOutput values.
// You can construct a concrete instance of `WorkspacePolicyMapInput` via:
//
// WorkspacePolicyMap{ "key": WorkspacePolicyArgs{...} }
type WorkspacePolicyMapInput interface {
pulumi.Input
ToWorkspacePolicyMapOutput() WorkspacePolicyMapOutput
ToWorkspacePolicyMapOutputWithContext(context.Context) WorkspacePolicyMapOutput
}
type WorkspacePolicyMap map[string]WorkspacePolicyInput
func (WorkspacePolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspacePolicy)(nil)).Elem()
}
func (i WorkspacePolicyMap) ToWorkspacePolicyMapOutput() WorkspacePolicyMapOutput {
return i.ToWorkspacePolicyMapOutputWithContext(context.Background())
}
func (i WorkspacePolicyMap) ToWorkspacePolicyMapOutputWithContext(ctx context.Context) WorkspacePolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspacePolicyMapOutput)
}
type WorkspacePolicyOutput struct{ *pulumi.OutputState }
func (WorkspacePolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspacePolicy)(nil)).Elem()
}
func (o WorkspacePolicyOutput) ToWorkspacePolicyOutput() WorkspacePolicyOutput {
return o
}
func (o WorkspacePolicyOutput) ToWorkspacePolicyOutputWithContext(ctx context.Context) WorkspacePolicyOutput {
return o
}
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
func (o WorkspacePolicyOutput) ApiManagementWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspacePolicy) pulumi.StringOutput { return v.ApiManagementWorkspaceId }).(pulumi.StringOutput)
}
// Specifies the API Management Workspace Policy as an XML string.
func (o WorkspacePolicyOutput) XmlContent() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspacePolicy) pulumi.StringOutput { return v.XmlContent }).(pulumi.StringOutput)
}
// Specifies a publicly accessible URL to a policy XML document.
//
// > **Note:** Exactly one of `xmlContent` or `xmlLink` must be specified.
func (o WorkspacePolicyOutput) XmlLink() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspacePolicy) pulumi.StringPtrOutput { return v.XmlLink }).(pulumi.StringPtrOutput)
}
type WorkspacePolicyArrayOutput struct{ *pulumi.OutputState }
func (WorkspacePolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspacePolicy)(nil)).Elem()
}
func (o WorkspacePolicyArrayOutput) ToWorkspacePolicyArrayOutput() WorkspacePolicyArrayOutput {
return o
}
func (o WorkspacePolicyArrayOutput) ToWorkspacePolicyArrayOutputWithContext(ctx context.Context) WorkspacePolicyArrayOutput {
return o
}
func (o WorkspacePolicyArrayOutput) Index(i pulumi.IntInput) WorkspacePolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspacePolicy {
return vs[0].([]*WorkspacePolicy)[vs[1].(int)]
}).(WorkspacePolicyOutput)
}
type WorkspacePolicyMapOutput struct{ *pulumi.OutputState }
func (WorkspacePolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspacePolicy)(nil)).Elem()
}
func (o WorkspacePolicyMapOutput) ToWorkspacePolicyMapOutput() WorkspacePolicyMapOutput {
return o
}
func (o WorkspacePolicyMapOutput) ToWorkspacePolicyMapOutputWithContext(ctx context.Context) WorkspacePolicyMapOutput {
return o
}
func (o WorkspacePolicyMapOutput) MapIndex(k pulumi.StringInput) WorkspacePolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspacePolicy {
return vs[0].(map[string]*WorkspacePolicy)[vs[1].(string)]
}).(WorkspacePolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspacePolicyInput)(nil)).Elem(), &WorkspacePolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspacePolicyArrayInput)(nil)).Elem(), WorkspacePolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspacePolicyMapInput)(nil)).Elem(), WorkspacePolicyMap{})
pulumi.RegisterOutputType(WorkspacePolicyOutput{})
pulumi.RegisterOutputType(WorkspacePolicyArrayOutput{})
pulumi.RegisterOutputType(WorkspacePolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/diagnostic.go | sdk/go/azure/apimanagement/diagnostic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Service Diagnostic.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example-appinsights"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@mycompany.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// exampleLogger, err := apimanagement.NewLogger(ctx, "example", &apimanagement.LoggerArgs{
// Name: pulumi.String("example-apimlogger"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// ApplicationInsights: &apimanagement.LoggerApplicationInsightsArgs{
// InstrumentationKey: exampleInsights.InstrumentationKey,
// },
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewDiagnostic(ctx, "example", &apimanagement.DiagnosticArgs{
// Identifier: pulumi.String("applicationinsights"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// ApiManagementLoggerId: exampleLogger.ID(),
// SamplingPercentage: pulumi.Float64(5),
// AlwaysLogErrors: pulumi.Bool(true),
// LogClientIp: pulumi.Bool(true),
// Verbosity: pulumi.String("verbose"),
// HttpCorrelationProtocol: pulumi.String("W3C"),
// FrontendRequest: &apimanagement.DiagnosticFrontendRequestArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("accept"),
// pulumi.String("origin"),
// },
// },
// FrontendResponse: &apimanagement.DiagnosticFrontendResponseArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("content-length"),
// pulumi.String("origin"),
// },
// },
// BackendRequest: &apimanagement.DiagnosticBackendRequestArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("accept"),
// pulumi.String("origin"),
// },
// },
// BackendResponse: &apimanagement.DiagnosticBackendResponseArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("content-length"),
// pulumi.String("origin"),
// },
// },
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Diagnostics can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/diagnostic:Diagnostic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/diagnostics/applicationinsights
// ```
type Diagnostic struct {
pulumi.CustomResourceState
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors pulumi.BoolOutput `pulumi:"alwaysLogErrors"`
// The id of the target API Management Logger where the API Management Diagnostic should be saved.
ApiManagementLoggerId pulumi.StringOutput `pulumi:"apiManagementLoggerId"`
// The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// A `backendRequest` block as defined below.
BackendRequest DiagnosticBackendRequestOutput `pulumi:"backendRequest"`
// A `backendResponse` block as defined below.
BackendResponse DiagnosticBackendResponseOutput `pulumi:"backendResponse"`
// A `frontendRequest` block as defined below.
FrontendRequest DiagnosticFrontendRequestOutput `pulumi:"frontendRequest"`
// A `frontendResponse` block as defined below.
FrontendResponse DiagnosticFrontendResponseOutput `pulumi:"frontendResponse"`
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol pulumi.StringOutput `pulumi:"httpCorrelationProtocol"`
// The diagnostic identifier for the API Management Service. At this time the supported values are `applicationinsights` and `azuremonitor`. Changing this forces a new resource to be created.
Identifier pulumi.StringOutput `pulumi:"identifier"`
// Log client IP address.
LogClientIp pulumi.BoolOutput `pulumi:"logClientIp"`
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`.
OperationNameFormat pulumi.StringPtrOutput `pulumi:"operationNameFormat"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage pulumi.Float64Output `pulumi:"samplingPercentage"`
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity pulumi.StringOutput `pulumi:"verbosity"`
}
// NewDiagnostic registers a new resource with the given unique name, arguments, and options.
func NewDiagnostic(ctx *pulumi.Context,
name string, args *DiagnosticArgs, opts ...pulumi.ResourceOption) (*Diagnostic, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementLoggerId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementLoggerId'")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.Identifier == nil {
return nil, errors.New("invalid value for required argument 'Identifier'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Diagnostic
err := ctx.RegisterResource("azure:apimanagement/diagnostic:Diagnostic", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDiagnostic gets an existing Diagnostic resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDiagnostic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DiagnosticState, opts ...pulumi.ResourceOption) (*Diagnostic, error) {
var resource Diagnostic
err := ctx.ReadResource("azure:apimanagement/diagnostic:Diagnostic", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Diagnostic resources.
type diagnosticState struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors *bool `pulumi:"alwaysLogErrors"`
// The id of the target API Management Logger where the API Management Diagnostic should be saved.
ApiManagementLoggerId *string `pulumi:"apiManagementLoggerId"`
// The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// A `backendRequest` block as defined below.
BackendRequest *DiagnosticBackendRequest `pulumi:"backendRequest"`
// A `backendResponse` block as defined below.
BackendResponse *DiagnosticBackendResponse `pulumi:"backendResponse"`
// A `frontendRequest` block as defined below.
FrontendRequest *DiagnosticFrontendRequest `pulumi:"frontendRequest"`
// A `frontendResponse` block as defined below.
FrontendResponse *DiagnosticFrontendResponse `pulumi:"frontendResponse"`
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol *string `pulumi:"httpCorrelationProtocol"`
// The diagnostic identifier for the API Management Service. At this time the supported values are `applicationinsights` and `azuremonitor`. Changing this forces a new resource to be created.
Identifier *string `pulumi:"identifier"`
// Log client IP address.
LogClientIp *bool `pulumi:"logClientIp"`
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`.
OperationNameFormat *string `pulumi:"operationNameFormat"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage *float64 `pulumi:"samplingPercentage"`
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity *string `pulumi:"verbosity"`
}
type DiagnosticState struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors pulumi.BoolPtrInput
// The id of the target API Management Logger where the API Management Diagnostic should be saved.
ApiManagementLoggerId pulumi.StringPtrInput
// The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// A `backendRequest` block as defined below.
BackendRequest DiagnosticBackendRequestPtrInput
// A `backendResponse` block as defined below.
BackendResponse DiagnosticBackendResponsePtrInput
// A `frontendRequest` block as defined below.
FrontendRequest DiagnosticFrontendRequestPtrInput
// A `frontendResponse` block as defined below.
FrontendResponse DiagnosticFrontendResponsePtrInput
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol pulumi.StringPtrInput
// The diagnostic identifier for the API Management Service. At this time the supported values are `applicationinsights` and `azuremonitor`. Changing this forces a new resource to be created.
Identifier pulumi.StringPtrInput
// Log client IP address.
LogClientIp pulumi.BoolPtrInput
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`.
OperationNameFormat pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage pulumi.Float64PtrInput
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity pulumi.StringPtrInput
}
func (DiagnosticState) ElementType() reflect.Type {
return reflect.TypeOf((*diagnosticState)(nil)).Elem()
}
type diagnosticArgs struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors *bool `pulumi:"alwaysLogErrors"`
// The id of the target API Management Logger where the API Management Diagnostic should be saved.
ApiManagementLoggerId string `pulumi:"apiManagementLoggerId"`
// The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// A `backendRequest` block as defined below.
BackendRequest *DiagnosticBackendRequest `pulumi:"backendRequest"`
// A `backendResponse` block as defined below.
BackendResponse *DiagnosticBackendResponse `pulumi:"backendResponse"`
// A `frontendRequest` block as defined below.
FrontendRequest *DiagnosticFrontendRequest `pulumi:"frontendRequest"`
// A `frontendResponse` block as defined below.
FrontendResponse *DiagnosticFrontendResponse `pulumi:"frontendResponse"`
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol *string `pulumi:"httpCorrelationProtocol"`
// The diagnostic identifier for the API Management Service. At this time the supported values are `applicationinsights` and `azuremonitor`. Changing this forces a new resource to be created.
Identifier string `pulumi:"identifier"`
// Log client IP address.
LogClientIp *bool `pulumi:"logClientIp"`
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`.
OperationNameFormat *string `pulumi:"operationNameFormat"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage *float64 `pulumi:"samplingPercentage"`
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity *string `pulumi:"verbosity"`
}
// The set of arguments for constructing a Diagnostic resource.
type DiagnosticArgs struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors pulumi.BoolPtrInput
// The id of the target API Management Logger where the API Management Diagnostic should be saved.
ApiManagementLoggerId pulumi.StringInput
// The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// A `backendRequest` block as defined below.
BackendRequest DiagnosticBackendRequestPtrInput
// A `backendResponse` block as defined below.
BackendResponse DiagnosticBackendResponsePtrInput
// A `frontendRequest` block as defined below.
FrontendRequest DiagnosticFrontendRequestPtrInput
// A `frontendResponse` block as defined below.
FrontendResponse DiagnosticFrontendResponsePtrInput
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol pulumi.StringPtrInput
// The diagnostic identifier for the API Management Service. At this time the supported values are `applicationinsights` and `azuremonitor`. Changing this forces a new resource to be created.
Identifier pulumi.StringInput
// Log client IP address.
LogClientIp pulumi.BoolPtrInput
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`.
OperationNameFormat pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage pulumi.Float64PtrInput
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity pulumi.StringPtrInput
}
func (DiagnosticArgs) ElementType() reflect.Type {
return reflect.TypeOf((*diagnosticArgs)(nil)).Elem()
}
type DiagnosticInput interface {
pulumi.Input
ToDiagnosticOutput() DiagnosticOutput
ToDiagnosticOutputWithContext(ctx context.Context) DiagnosticOutput
}
func (*Diagnostic) ElementType() reflect.Type {
return reflect.TypeOf((**Diagnostic)(nil)).Elem()
}
func (i *Diagnostic) ToDiagnosticOutput() DiagnosticOutput {
return i.ToDiagnosticOutputWithContext(context.Background())
}
func (i *Diagnostic) ToDiagnosticOutputWithContext(ctx context.Context) DiagnosticOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiagnosticOutput)
}
// DiagnosticArrayInput is an input type that accepts DiagnosticArray and DiagnosticArrayOutput values.
// You can construct a concrete instance of `DiagnosticArrayInput` via:
//
// DiagnosticArray{ DiagnosticArgs{...} }
type DiagnosticArrayInput interface {
pulumi.Input
ToDiagnosticArrayOutput() DiagnosticArrayOutput
ToDiagnosticArrayOutputWithContext(context.Context) DiagnosticArrayOutput
}
type DiagnosticArray []DiagnosticInput
func (DiagnosticArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Diagnostic)(nil)).Elem()
}
func (i DiagnosticArray) ToDiagnosticArrayOutput() DiagnosticArrayOutput {
return i.ToDiagnosticArrayOutputWithContext(context.Background())
}
func (i DiagnosticArray) ToDiagnosticArrayOutputWithContext(ctx context.Context) DiagnosticArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiagnosticArrayOutput)
}
// DiagnosticMapInput is an input type that accepts DiagnosticMap and DiagnosticMapOutput values.
// You can construct a concrete instance of `DiagnosticMapInput` via:
//
// DiagnosticMap{ "key": DiagnosticArgs{...} }
type DiagnosticMapInput interface {
pulumi.Input
ToDiagnosticMapOutput() DiagnosticMapOutput
ToDiagnosticMapOutputWithContext(context.Context) DiagnosticMapOutput
}
type DiagnosticMap map[string]DiagnosticInput
func (DiagnosticMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Diagnostic)(nil)).Elem()
}
func (i DiagnosticMap) ToDiagnosticMapOutput() DiagnosticMapOutput {
return i.ToDiagnosticMapOutputWithContext(context.Background())
}
func (i DiagnosticMap) ToDiagnosticMapOutputWithContext(ctx context.Context) DiagnosticMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiagnosticMapOutput)
}
type DiagnosticOutput struct{ *pulumi.OutputState }
func (DiagnosticOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Diagnostic)(nil)).Elem()
}
func (o DiagnosticOutput) ToDiagnosticOutput() DiagnosticOutput {
return o
}
func (o DiagnosticOutput) ToDiagnosticOutputWithContext(ctx context.Context) DiagnosticOutput {
return o
}
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
func (o DiagnosticOutput) AlwaysLogErrors() pulumi.BoolOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.BoolOutput { return v.AlwaysLogErrors }).(pulumi.BoolOutput)
}
// The id of the target API Management Logger where the API Management Diagnostic should be saved.
func (o DiagnosticOutput) ApiManagementLoggerId() pulumi.StringOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.StringOutput { return v.ApiManagementLoggerId }).(pulumi.StringOutput)
}
// The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
func (o DiagnosticOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// A `backendRequest` block as defined below.
func (o DiagnosticOutput) BackendRequest() DiagnosticBackendRequestOutput {
return o.ApplyT(func(v *Diagnostic) DiagnosticBackendRequestOutput { return v.BackendRequest }).(DiagnosticBackendRequestOutput)
}
// A `backendResponse` block as defined below.
func (o DiagnosticOutput) BackendResponse() DiagnosticBackendResponseOutput {
return o.ApplyT(func(v *Diagnostic) DiagnosticBackendResponseOutput { return v.BackendResponse }).(DiagnosticBackendResponseOutput)
}
// A `frontendRequest` block as defined below.
func (o DiagnosticOutput) FrontendRequest() DiagnosticFrontendRequestOutput {
return o.ApplyT(func(v *Diagnostic) DiagnosticFrontendRequestOutput { return v.FrontendRequest }).(DiagnosticFrontendRequestOutput)
}
// A `frontendResponse` block as defined below.
func (o DiagnosticOutput) FrontendResponse() DiagnosticFrontendResponseOutput {
return o.ApplyT(func(v *Diagnostic) DiagnosticFrontendResponseOutput { return v.FrontendResponse }).(DiagnosticFrontendResponseOutput)
}
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
func (o DiagnosticOutput) HttpCorrelationProtocol() pulumi.StringOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.StringOutput { return v.HttpCorrelationProtocol }).(pulumi.StringOutput)
}
// The diagnostic identifier for the API Management Service. At this time the supported values are `applicationinsights` and `azuremonitor`. Changing this forces a new resource to be created.
func (o DiagnosticOutput) Identifier() pulumi.StringOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.StringOutput { return v.Identifier }).(pulumi.StringOutput)
}
// Log client IP address.
func (o DiagnosticOutput) LogClientIp() pulumi.BoolOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.BoolOutput { return v.LogClientIp }).(pulumi.BoolOutput)
}
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`.
func (o DiagnosticOutput) OperationNameFormat() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.StringPtrOutput { return v.OperationNameFormat }).(pulumi.StringPtrOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o DiagnosticOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
func (o DiagnosticOutput) SamplingPercentage() pulumi.Float64Output {
return o.ApplyT(func(v *Diagnostic) pulumi.Float64Output { return v.SamplingPercentage }).(pulumi.Float64Output)
}
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
func (o DiagnosticOutput) Verbosity() pulumi.StringOutput {
return o.ApplyT(func(v *Diagnostic) pulumi.StringOutput { return v.Verbosity }).(pulumi.StringOutput)
}
type DiagnosticArrayOutput struct{ *pulumi.OutputState }
func (DiagnosticArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Diagnostic)(nil)).Elem()
}
func (o DiagnosticArrayOutput) ToDiagnosticArrayOutput() DiagnosticArrayOutput {
return o
}
func (o DiagnosticArrayOutput) ToDiagnosticArrayOutputWithContext(ctx context.Context) DiagnosticArrayOutput {
return o
}
func (o DiagnosticArrayOutput) Index(i pulumi.IntInput) DiagnosticOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Diagnostic {
return vs[0].([]*Diagnostic)[vs[1].(int)]
}).(DiagnosticOutput)
}
type DiagnosticMapOutput struct{ *pulumi.OutputState }
func (DiagnosticMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Diagnostic)(nil)).Elem()
}
func (o DiagnosticMapOutput) ToDiagnosticMapOutput() DiagnosticMapOutput {
return o
}
func (o DiagnosticMapOutput) ToDiagnosticMapOutputWithContext(ctx context.Context) DiagnosticMapOutput {
return o
}
func (o DiagnosticMapOutput) MapIndex(k pulumi.StringInput) DiagnosticOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Diagnostic {
return vs[0].(map[string]*Diagnostic)[vs[1].(string)]
}).(DiagnosticOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DiagnosticInput)(nil)).Elem(), &Diagnostic{})
pulumi.RegisterInputType(reflect.TypeOf((*DiagnosticArrayInput)(nil)).Elem(), DiagnosticArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DiagnosticMapInput)(nil)).Elem(), DiagnosticMap{})
pulumi.RegisterOutputType(DiagnosticOutput{})
pulumi.RegisterOutputType(DiagnosticArrayOutput{})
pulumi.RegisterOutputType(DiagnosticMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/workspacePolicyFragment.go | sdk/go/azure/apimanagement/workspacePolicyFragment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Workspace Policy Fragment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Premium_1"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := apimanagement.NewWorkspace(ctx, "example", &apimanagement.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// ApiManagementId: exampleService.ID(),
// DisplayName: pulumi.String("Example Workspace"),
// Description: pulumi.String("Example API Management Workspace"),
// })
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "policy-fragment-1.xml",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewWorkspacePolicyFragment(ctx, "example", &apimanagement.WorkspacePolicyFragmentArgs{
// Name: pulumi.String("example-policy-fragment"),
// ApiManagementWorkspaceId: exampleWorkspace.ID(),
// XmlFormat: pulumi.String("xml"),
// XmlContent: pulumi.String(invokeFile.Result),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2024-05-01
//
// ## Import
//
// API Management Workspace Policy Fragments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/workspacePolicyFragment:WorkspacePolicyFragment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/workspaces/workspace1/policyFragments/policyFragment1
// ```
type WorkspacePolicyFragment struct {
pulumi.CustomResourceState
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringOutput `pulumi:"apiManagementWorkspaceId"`
// Specifies the description for the API Management Workspace Policy Fragment.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name of the API Management Workspace Policy Fragment. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the XML content of the API Management Workspace Policy Fragment.
XmlContent pulumi.StringOutput `pulumi:"xmlContent"`
// Specifies the XML format of the API Management Workspace Policy Fragment. Possible values are `xml` or `rawxml`. Defaults to `xml`.
XmlFormat pulumi.StringPtrOutput `pulumi:"xmlFormat"`
}
// NewWorkspacePolicyFragment registers a new resource with the given unique name, arguments, and options.
func NewWorkspacePolicyFragment(ctx *pulumi.Context,
name string, args *WorkspacePolicyFragmentArgs, opts ...pulumi.ResourceOption) (*WorkspacePolicyFragment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementWorkspaceId'")
}
if args.XmlContent == nil {
return nil, errors.New("invalid value for required argument 'XmlContent'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspacePolicyFragment
err := ctx.RegisterResource("azure:apimanagement/workspacePolicyFragment:WorkspacePolicyFragment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspacePolicyFragment gets an existing WorkspacePolicyFragment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspacePolicyFragment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspacePolicyFragmentState, opts ...pulumi.ResourceOption) (*WorkspacePolicyFragment, error) {
var resource WorkspacePolicyFragment
err := ctx.ReadResource("azure:apimanagement/workspacePolicyFragment:WorkspacePolicyFragment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspacePolicyFragment resources.
type workspacePolicyFragmentState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId *string `pulumi:"apiManagementWorkspaceId"`
// Specifies the description for the API Management Workspace Policy Fragment.
Description *string `pulumi:"description"`
// Specifies the name of the API Management Workspace Policy Fragment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the XML content of the API Management Workspace Policy Fragment.
XmlContent *string `pulumi:"xmlContent"`
// Specifies the XML format of the API Management Workspace Policy Fragment. Possible values are `xml` or `rawxml`. Defaults to `xml`.
XmlFormat *string `pulumi:"xmlFormat"`
}
type WorkspacePolicyFragmentState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringPtrInput
// Specifies the description for the API Management Workspace Policy Fragment.
Description pulumi.StringPtrInput
// Specifies the name of the API Management Workspace Policy Fragment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the XML content of the API Management Workspace Policy Fragment.
XmlContent pulumi.StringPtrInput
// Specifies the XML format of the API Management Workspace Policy Fragment. Possible values are `xml` or `rawxml`. Defaults to `xml`.
XmlFormat pulumi.StringPtrInput
}
func (WorkspacePolicyFragmentState) ElementType() reflect.Type {
return reflect.TypeOf((*workspacePolicyFragmentState)(nil)).Elem()
}
type workspacePolicyFragmentArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId string `pulumi:"apiManagementWorkspaceId"`
// Specifies the description for the API Management Workspace Policy Fragment.
Description *string `pulumi:"description"`
// Specifies the name of the API Management Workspace Policy Fragment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the XML content of the API Management Workspace Policy Fragment.
XmlContent string `pulumi:"xmlContent"`
// Specifies the XML format of the API Management Workspace Policy Fragment. Possible values are `xml` or `rawxml`. Defaults to `xml`.
XmlFormat *string `pulumi:"xmlFormat"`
}
// The set of arguments for constructing a WorkspacePolicyFragment resource.
type WorkspacePolicyFragmentArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringInput
// Specifies the description for the API Management Workspace Policy Fragment.
Description pulumi.StringPtrInput
// Specifies the name of the API Management Workspace Policy Fragment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the XML content of the API Management Workspace Policy Fragment.
XmlContent pulumi.StringInput
// Specifies the XML format of the API Management Workspace Policy Fragment. Possible values are `xml` or `rawxml`. Defaults to `xml`.
XmlFormat pulumi.StringPtrInput
}
func (WorkspacePolicyFragmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspacePolicyFragmentArgs)(nil)).Elem()
}
type WorkspacePolicyFragmentInput interface {
pulumi.Input
ToWorkspacePolicyFragmentOutput() WorkspacePolicyFragmentOutput
ToWorkspacePolicyFragmentOutputWithContext(ctx context.Context) WorkspacePolicyFragmentOutput
}
func (*WorkspacePolicyFragment) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspacePolicyFragment)(nil)).Elem()
}
func (i *WorkspacePolicyFragment) ToWorkspacePolicyFragmentOutput() WorkspacePolicyFragmentOutput {
return i.ToWorkspacePolicyFragmentOutputWithContext(context.Background())
}
func (i *WorkspacePolicyFragment) ToWorkspacePolicyFragmentOutputWithContext(ctx context.Context) WorkspacePolicyFragmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspacePolicyFragmentOutput)
}
// WorkspacePolicyFragmentArrayInput is an input type that accepts WorkspacePolicyFragmentArray and WorkspacePolicyFragmentArrayOutput values.
// You can construct a concrete instance of `WorkspacePolicyFragmentArrayInput` via:
//
// WorkspacePolicyFragmentArray{ WorkspacePolicyFragmentArgs{...} }
type WorkspacePolicyFragmentArrayInput interface {
pulumi.Input
ToWorkspacePolicyFragmentArrayOutput() WorkspacePolicyFragmentArrayOutput
ToWorkspacePolicyFragmentArrayOutputWithContext(context.Context) WorkspacePolicyFragmentArrayOutput
}
type WorkspacePolicyFragmentArray []WorkspacePolicyFragmentInput
func (WorkspacePolicyFragmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspacePolicyFragment)(nil)).Elem()
}
func (i WorkspacePolicyFragmentArray) ToWorkspacePolicyFragmentArrayOutput() WorkspacePolicyFragmentArrayOutput {
return i.ToWorkspacePolicyFragmentArrayOutputWithContext(context.Background())
}
func (i WorkspacePolicyFragmentArray) ToWorkspacePolicyFragmentArrayOutputWithContext(ctx context.Context) WorkspacePolicyFragmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspacePolicyFragmentArrayOutput)
}
// WorkspacePolicyFragmentMapInput is an input type that accepts WorkspacePolicyFragmentMap and WorkspacePolicyFragmentMapOutput values.
// You can construct a concrete instance of `WorkspacePolicyFragmentMapInput` via:
//
// WorkspacePolicyFragmentMap{ "key": WorkspacePolicyFragmentArgs{...} }
type WorkspacePolicyFragmentMapInput interface {
pulumi.Input
ToWorkspacePolicyFragmentMapOutput() WorkspacePolicyFragmentMapOutput
ToWorkspacePolicyFragmentMapOutputWithContext(context.Context) WorkspacePolicyFragmentMapOutput
}
type WorkspacePolicyFragmentMap map[string]WorkspacePolicyFragmentInput
func (WorkspacePolicyFragmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspacePolicyFragment)(nil)).Elem()
}
func (i WorkspacePolicyFragmentMap) ToWorkspacePolicyFragmentMapOutput() WorkspacePolicyFragmentMapOutput {
return i.ToWorkspacePolicyFragmentMapOutputWithContext(context.Background())
}
func (i WorkspacePolicyFragmentMap) ToWorkspacePolicyFragmentMapOutputWithContext(ctx context.Context) WorkspacePolicyFragmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspacePolicyFragmentMapOutput)
}
type WorkspacePolicyFragmentOutput struct{ *pulumi.OutputState }
func (WorkspacePolicyFragmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspacePolicyFragment)(nil)).Elem()
}
func (o WorkspacePolicyFragmentOutput) ToWorkspacePolicyFragmentOutput() WorkspacePolicyFragmentOutput {
return o
}
func (o WorkspacePolicyFragmentOutput) ToWorkspacePolicyFragmentOutputWithContext(ctx context.Context) WorkspacePolicyFragmentOutput {
return o
}
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
func (o WorkspacePolicyFragmentOutput) ApiManagementWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspacePolicyFragment) pulumi.StringOutput { return v.ApiManagementWorkspaceId }).(pulumi.StringOutput)
}
// Specifies the description for the API Management Workspace Policy Fragment.
func (o WorkspacePolicyFragmentOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspacePolicyFragment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name of the API Management Workspace Policy Fragment. Changing this forces a new resource to be created.
func (o WorkspacePolicyFragmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspacePolicyFragment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the XML content of the API Management Workspace Policy Fragment.
func (o WorkspacePolicyFragmentOutput) XmlContent() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspacePolicyFragment) pulumi.StringOutput { return v.XmlContent }).(pulumi.StringOutput)
}
// Specifies the XML format of the API Management Workspace Policy Fragment. Possible values are `xml` or `rawxml`. Defaults to `xml`.
func (o WorkspacePolicyFragmentOutput) XmlFormat() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspacePolicyFragment) pulumi.StringPtrOutput { return v.XmlFormat }).(pulumi.StringPtrOutput)
}
type WorkspacePolicyFragmentArrayOutput struct{ *pulumi.OutputState }
func (WorkspacePolicyFragmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspacePolicyFragment)(nil)).Elem()
}
func (o WorkspacePolicyFragmentArrayOutput) ToWorkspacePolicyFragmentArrayOutput() WorkspacePolicyFragmentArrayOutput {
return o
}
func (o WorkspacePolicyFragmentArrayOutput) ToWorkspacePolicyFragmentArrayOutputWithContext(ctx context.Context) WorkspacePolicyFragmentArrayOutput {
return o
}
func (o WorkspacePolicyFragmentArrayOutput) Index(i pulumi.IntInput) WorkspacePolicyFragmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspacePolicyFragment {
return vs[0].([]*WorkspacePolicyFragment)[vs[1].(int)]
}).(WorkspacePolicyFragmentOutput)
}
type WorkspacePolicyFragmentMapOutput struct{ *pulumi.OutputState }
func (WorkspacePolicyFragmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspacePolicyFragment)(nil)).Elem()
}
func (o WorkspacePolicyFragmentMapOutput) ToWorkspacePolicyFragmentMapOutput() WorkspacePolicyFragmentMapOutput {
return o
}
func (o WorkspacePolicyFragmentMapOutput) ToWorkspacePolicyFragmentMapOutputWithContext(ctx context.Context) WorkspacePolicyFragmentMapOutput {
return o
}
func (o WorkspacePolicyFragmentMapOutput) MapIndex(k pulumi.StringInput) WorkspacePolicyFragmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspacePolicyFragment {
return vs[0].(map[string]*WorkspacePolicyFragment)[vs[1].(string)]
}).(WorkspacePolicyFragmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspacePolicyFragmentInput)(nil)).Elem(), &WorkspacePolicyFragment{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspacePolicyFragmentArrayInput)(nil)).Elem(), WorkspacePolicyFragmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspacePolicyFragmentMapInput)(nil)).Elem(), WorkspacePolicyFragmentMap{})
pulumi.RegisterOutputType(WorkspacePolicyFragmentOutput{})
pulumi.RegisterOutputType(WorkspacePolicyFragmentArrayOutput{})
pulumi.RegisterOutputType(WorkspacePolicyFragmentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/getGateway.go | sdk/go/azure/apimanagement/getGateway.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
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 API Management Gateway.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
// Name: "example-apim",
// ResourceGroupName: "example-rg",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.LookupGateway(ctx, &apimanagement.LookupGatewayArgs{
// Name: "example-api-gateway",
// ApiManagementId: 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.ApiManagement` - 2022-08-01
func LookupGateway(ctx *pulumi.Context, args *LookupGatewayArgs, opts ...pulumi.InvokeOption) (*LookupGatewayResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupGatewayResult
err := ctx.Invoke("azure:apimanagement/getGateway:getGateway", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getGateway.
type LookupGatewayArgs struct {
// The ID of the API Management Service in which the Gateway exists.
ApiManagementId string `pulumi:"apiManagementId"`
// The name of the API Management Gateway.
Name string `pulumi:"name"`
}
// A collection of values returned by getGateway.
type LookupGatewayResult struct {
ApiManagementId string `pulumi:"apiManagementId"`
// The description of the API Management Gateway.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `locationData` block as documented below.
LocationDatas []GetGatewayLocationData `pulumi:"locationDatas"`
// A canonical name for the geographic or physical location.
Name string `pulumi:"name"`
}
func LookupGatewayOutput(ctx *pulumi.Context, args LookupGatewayOutputArgs, opts ...pulumi.InvokeOption) LookupGatewayResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupGatewayResultOutput, error) {
args := v.(LookupGatewayArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:apimanagement/getGateway:getGateway", args, LookupGatewayResultOutput{}, options).(LookupGatewayResultOutput), nil
}).(LookupGatewayResultOutput)
}
// A collection of arguments for invoking getGateway.
type LookupGatewayOutputArgs struct {
// The ID of the API Management Service in which the Gateway exists.
ApiManagementId pulumi.StringInput `pulumi:"apiManagementId"`
// The name of the API Management Gateway.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupGatewayOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGatewayArgs)(nil)).Elem()
}
// A collection of values returned by getGateway.
type LookupGatewayResultOutput struct{ *pulumi.OutputState }
func (LookupGatewayResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGatewayResult)(nil)).Elem()
}
func (o LookupGatewayResultOutput) ToLookupGatewayResultOutput() LookupGatewayResultOutput {
return o
}
func (o LookupGatewayResultOutput) ToLookupGatewayResultOutputWithContext(ctx context.Context) LookupGatewayResultOutput {
return o
}
func (o LookupGatewayResultOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v LookupGatewayResult) string { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The description of the API Management Gateway.
func (o LookupGatewayResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupGatewayResult) string { return v.Description }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupGatewayResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupGatewayResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `locationData` block as documented below.
func (o LookupGatewayResultOutput) LocationDatas() GetGatewayLocationDataArrayOutput {
return o.ApplyT(func(v LookupGatewayResult) []GetGatewayLocationData { return v.LocationDatas }).(GetGatewayLocationDataArrayOutput)
}
// A canonical name for the geographic or physical location.
func (o LookupGatewayResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupGatewayResult) string { return v.Name }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupGatewayResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/getSubscription.go | sdk/go/azure/apimanagement/getSubscription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
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 API Management Subscription.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupSubscription(ctx, &apimanagement.LookupSubscriptionArgs{
// ApiManagementId: "example-apim",
// SubscriptionId: "example-subscription-id",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.SubscriptionId)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
func LookupSubscription(ctx *pulumi.Context, args *LookupSubscriptionArgs, opts ...pulumi.InvokeOption) (*LookupSubscriptionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSubscriptionResult
err := ctx.Invoke("azure:apimanagement/getSubscription:getSubscription", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSubscription.
type LookupSubscriptionArgs struct {
// The ID of the API Management Service in which this Subscription exists.
ApiManagementId string `pulumi:"apiManagementId"`
// The Identifier for the API Management Subscription.
SubscriptionId string `pulumi:"subscriptionId"`
}
// A collection of values returned by getSubscription.
type LookupSubscriptionResult struct {
// Indicates whether tracing is enabled.
AllowTracing bool `pulumi:"allowTracing"`
// The ID of the API assigned to this Subscription.
ApiId string `pulumi:"apiId"`
ApiManagementId string `pulumi:"apiManagementId"`
// The display name of this Subscription.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The primary key for this subscription.
PrimaryKey string `pulumi:"primaryKey"`
// The ID of the Product assigned to this Subscription.
ProductId string `pulumi:"productId"`
// The secondary key for this subscription.
SecondaryKey string `pulumi:"secondaryKey"`
// The state of this Subscription.
State string `pulumi:"state"`
SubscriptionId string `pulumi:"subscriptionId"`
// The ID of the User assigned to this Subscription.
UserId string `pulumi:"userId"`
}
func LookupSubscriptionOutput(ctx *pulumi.Context, args LookupSubscriptionOutputArgs, opts ...pulumi.InvokeOption) LookupSubscriptionResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSubscriptionResultOutput, error) {
args := v.(LookupSubscriptionArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:apimanagement/getSubscription:getSubscription", args, LookupSubscriptionResultOutput{}, options).(LookupSubscriptionResultOutput), nil
}).(LookupSubscriptionResultOutput)
}
// A collection of arguments for invoking getSubscription.
type LookupSubscriptionOutputArgs struct {
// The ID of the API Management Service in which this Subscription exists.
ApiManagementId pulumi.StringInput `pulumi:"apiManagementId"`
// The Identifier for the API Management Subscription.
SubscriptionId pulumi.StringInput `pulumi:"subscriptionId"`
}
func (LookupSubscriptionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSubscriptionArgs)(nil)).Elem()
}
// A collection of values returned by getSubscription.
type LookupSubscriptionResultOutput struct{ *pulumi.OutputState }
func (LookupSubscriptionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSubscriptionResult)(nil)).Elem()
}
func (o LookupSubscriptionResultOutput) ToLookupSubscriptionResultOutput() LookupSubscriptionResultOutput {
return o
}
func (o LookupSubscriptionResultOutput) ToLookupSubscriptionResultOutputWithContext(ctx context.Context) LookupSubscriptionResultOutput {
return o
}
// Indicates whether tracing is enabled.
func (o LookupSubscriptionResultOutput) AllowTracing() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSubscriptionResult) bool { return v.AllowTracing }).(pulumi.BoolOutput)
}
// The ID of the API assigned to this Subscription.
func (o LookupSubscriptionResultOutput) ApiId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.ApiId }).(pulumi.StringOutput)
}
func (o LookupSubscriptionResultOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The display name of this Subscription.
func (o LookupSubscriptionResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSubscriptionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The primary key for this subscription.
func (o LookupSubscriptionResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The ID of the Product assigned to this Subscription.
func (o LookupSubscriptionResultOutput) ProductId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.ProductId }).(pulumi.StringOutput)
}
// The secondary key for this subscription.
func (o LookupSubscriptionResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
// The state of this Subscription.
func (o LookupSubscriptionResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.State }).(pulumi.StringOutput)
}
func (o LookupSubscriptionResultOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.SubscriptionId }).(pulumi.StringOutput)
}
// The ID of the User assigned to this Subscription.
func (o LookupSubscriptionResultOutput) UserId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.UserId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSubscriptionResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/redisCache.go | sdk/go/azure/apimanagement/redisCache.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management Redis Cache.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/redis"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Consumption_0"),
// })
// if err != nil {
// return err
// }
// exampleCache, err := redis.NewCache(ctx, "example", &redis.CacheArgs{
// Name: pulumi.String("example-cache"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Capacity: pulumi.Int(1),
// Family: pulumi.String("C"),
// SkuName: pulumi.String("Basic"),
// EnableNonSslPort: false,
// MinimumTlsVersion: pulumi.String("1.2"),
// RedisConfiguration: &redis.CacheRedisConfigurationArgs{},
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewRedisCache(ctx, "example", &apimanagement.RedisCacheArgs{
// Name: pulumi.String("example-Redis-Cache"),
// ApiManagementId: exampleService.ID(),
// ConnectionString: exampleCache.PrimaryConnectionString,
// Description: pulumi.String("Redis cache instances"),
// RedisCacheId: exampleCache.ID(),
// CacheLocation: pulumi.String("East Us"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Redis Caches can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/redisCache:RedisCache example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/caches/cache1
// ```
type RedisCache struct {
pulumi.CustomResourceState
// The resource ID of the API Management Service from which to create this external cache. Changing this forces a new API Management Redis Cache to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The location where to use cache from. Possible values are `default` and valid Azure regions. Defaults to `default`.
CacheLocation pulumi.StringPtrOutput `pulumi:"cacheLocation"`
// The connection string to the Cache for Redis.
ConnectionString pulumi.StringOutput `pulumi:"connectionString"`
// The description of the API Management Redis Cache.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the Cache for Redis.
RedisCacheId pulumi.StringPtrOutput `pulumi:"redisCacheId"`
}
// NewRedisCache registers a new resource with the given unique name, arguments, and options.
func NewRedisCache(ctx *pulumi.Context,
name string, args *RedisCacheArgs, opts ...pulumi.ResourceOption) (*RedisCache, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
if args.ConnectionString == nil {
return nil, errors.New("invalid value for required argument 'ConnectionString'")
}
if args.ConnectionString != nil {
args.ConnectionString = pulumi.ToSecret(args.ConnectionString).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"connectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource RedisCache
err := ctx.RegisterResource("azure:apimanagement/redisCache:RedisCache", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRedisCache gets an existing RedisCache resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetRedisCache(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RedisCacheState, opts ...pulumi.ResourceOption) (*RedisCache, error) {
var resource RedisCache
err := ctx.ReadResource("azure:apimanagement/redisCache:RedisCache", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RedisCache resources.
type redisCacheState struct {
// The resource ID of the API Management Service from which to create this external cache. Changing this forces a new API Management Redis Cache to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The location where to use cache from. Possible values are `default` and valid Azure regions. Defaults to `default`.
CacheLocation *string `pulumi:"cacheLocation"`
// The connection string to the Cache for Redis.
ConnectionString *string `pulumi:"connectionString"`
// The description of the API Management Redis Cache.
Description *string `pulumi:"description"`
// The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created.
Name *string `pulumi:"name"`
// The resource ID of the Cache for Redis.
RedisCacheId *string `pulumi:"redisCacheId"`
}
type RedisCacheState struct {
// The resource ID of the API Management Service from which to create this external cache. Changing this forces a new API Management Redis Cache to be created.
ApiManagementId pulumi.StringPtrInput
// The location where to use cache from. Possible values are `default` and valid Azure regions. Defaults to `default`.
CacheLocation pulumi.StringPtrInput
// The connection string to the Cache for Redis.
ConnectionString pulumi.StringPtrInput
// The description of the API Management Redis Cache.
Description pulumi.StringPtrInput
// The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created.
Name pulumi.StringPtrInput
// The resource ID of the Cache for Redis.
RedisCacheId pulumi.StringPtrInput
}
func (RedisCacheState) ElementType() reflect.Type {
return reflect.TypeOf((*redisCacheState)(nil)).Elem()
}
type redisCacheArgs struct {
// The resource ID of the API Management Service from which to create this external cache. Changing this forces a new API Management Redis Cache to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The location where to use cache from. Possible values are `default` and valid Azure regions. Defaults to `default`.
CacheLocation *string `pulumi:"cacheLocation"`
// The connection string to the Cache for Redis.
ConnectionString string `pulumi:"connectionString"`
// The description of the API Management Redis Cache.
Description *string `pulumi:"description"`
// The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created.
Name *string `pulumi:"name"`
// The resource ID of the Cache for Redis.
RedisCacheId *string `pulumi:"redisCacheId"`
}
// The set of arguments for constructing a RedisCache resource.
type RedisCacheArgs struct {
// The resource ID of the API Management Service from which to create this external cache. Changing this forces a new API Management Redis Cache to be created.
ApiManagementId pulumi.StringInput
// The location where to use cache from. Possible values are `default` and valid Azure regions. Defaults to `default`.
CacheLocation pulumi.StringPtrInput
// The connection string to the Cache for Redis.
ConnectionString pulumi.StringInput
// The description of the API Management Redis Cache.
Description pulumi.StringPtrInput
// The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created.
Name pulumi.StringPtrInput
// The resource ID of the Cache for Redis.
RedisCacheId pulumi.StringPtrInput
}
func (RedisCacheArgs) ElementType() reflect.Type {
return reflect.TypeOf((*redisCacheArgs)(nil)).Elem()
}
type RedisCacheInput interface {
pulumi.Input
ToRedisCacheOutput() RedisCacheOutput
ToRedisCacheOutputWithContext(ctx context.Context) RedisCacheOutput
}
func (*RedisCache) ElementType() reflect.Type {
return reflect.TypeOf((**RedisCache)(nil)).Elem()
}
func (i *RedisCache) ToRedisCacheOutput() RedisCacheOutput {
return i.ToRedisCacheOutputWithContext(context.Background())
}
func (i *RedisCache) ToRedisCacheOutputWithContext(ctx context.Context) RedisCacheOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedisCacheOutput)
}
// RedisCacheArrayInput is an input type that accepts RedisCacheArray and RedisCacheArrayOutput values.
// You can construct a concrete instance of `RedisCacheArrayInput` via:
//
// RedisCacheArray{ RedisCacheArgs{...} }
type RedisCacheArrayInput interface {
pulumi.Input
ToRedisCacheArrayOutput() RedisCacheArrayOutput
ToRedisCacheArrayOutputWithContext(context.Context) RedisCacheArrayOutput
}
type RedisCacheArray []RedisCacheInput
func (RedisCacheArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RedisCache)(nil)).Elem()
}
func (i RedisCacheArray) ToRedisCacheArrayOutput() RedisCacheArrayOutput {
return i.ToRedisCacheArrayOutputWithContext(context.Background())
}
func (i RedisCacheArray) ToRedisCacheArrayOutputWithContext(ctx context.Context) RedisCacheArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedisCacheArrayOutput)
}
// RedisCacheMapInput is an input type that accepts RedisCacheMap and RedisCacheMapOutput values.
// You can construct a concrete instance of `RedisCacheMapInput` via:
//
// RedisCacheMap{ "key": RedisCacheArgs{...} }
type RedisCacheMapInput interface {
pulumi.Input
ToRedisCacheMapOutput() RedisCacheMapOutput
ToRedisCacheMapOutputWithContext(context.Context) RedisCacheMapOutput
}
type RedisCacheMap map[string]RedisCacheInput
func (RedisCacheMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RedisCache)(nil)).Elem()
}
func (i RedisCacheMap) ToRedisCacheMapOutput() RedisCacheMapOutput {
return i.ToRedisCacheMapOutputWithContext(context.Background())
}
func (i RedisCacheMap) ToRedisCacheMapOutputWithContext(ctx context.Context) RedisCacheMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedisCacheMapOutput)
}
type RedisCacheOutput struct{ *pulumi.OutputState }
func (RedisCacheOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RedisCache)(nil)).Elem()
}
func (o RedisCacheOutput) ToRedisCacheOutput() RedisCacheOutput {
return o
}
func (o RedisCacheOutput) ToRedisCacheOutputWithContext(ctx context.Context) RedisCacheOutput {
return o
}
// The resource ID of the API Management Service from which to create this external cache. Changing this forces a new API Management Redis Cache to be created.
func (o RedisCacheOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *RedisCache) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The location where to use cache from. Possible values are `default` and valid Azure regions. Defaults to `default`.
func (o RedisCacheOutput) CacheLocation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RedisCache) pulumi.StringPtrOutput { return v.CacheLocation }).(pulumi.StringPtrOutput)
}
// The connection string to the Cache for Redis.
func (o RedisCacheOutput) ConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *RedisCache) pulumi.StringOutput { return v.ConnectionString }).(pulumi.StringOutput)
}
// The description of the API Management Redis Cache.
func (o RedisCacheOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RedisCache) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created.
func (o RedisCacheOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RedisCache) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the Cache for Redis.
func (o RedisCacheOutput) RedisCacheId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RedisCache) pulumi.StringPtrOutput { return v.RedisCacheId }).(pulumi.StringPtrOutput)
}
type RedisCacheArrayOutput struct{ *pulumi.OutputState }
func (RedisCacheArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RedisCache)(nil)).Elem()
}
func (o RedisCacheArrayOutput) ToRedisCacheArrayOutput() RedisCacheArrayOutput {
return o
}
func (o RedisCacheArrayOutput) ToRedisCacheArrayOutputWithContext(ctx context.Context) RedisCacheArrayOutput {
return o
}
func (o RedisCacheArrayOutput) Index(i pulumi.IntInput) RedisCacheOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RedisCache {
return vs[0].([]*RedisCache)[vs[1].(int)]
}).(RedisCacheOutput)
}
type RedisCacheMapOutput struct{ *pulumi.OutputState }
func (RedisCacheMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RedisCache)(nil)).Elem()
}
func (o RedisCacheMapOutput) ToRedisCacheMapOutput() RedisCacheMapOutput {
return o
}
func (o RedisCacheMapOutput) ToRedisCacheMapOutputWithContext(ctx context.Context) RedisCacheMapOutput {
return o
}
func (o RedisCacheMapOutput) MapIndex(k pulumi.StringInput) RedisCacheOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RedisCache {
return vs[0].(map[string]*RedisCache)[vs[1].(string)]
}).(RedisCacheOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RedisCacheInput)(nil)).Elem(), &RedisCache{})
pulumi.RegisterInputType(reflect.TypeOf((*RedisCacheArrayInput)(nil)).Elem(), RedisCacheArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RedisCacheMapInput)(nil)).Elem(), RedisCacheMap{})
pulumi.RegisterOutputType(RedisCacheOutput{})
pulumi.RegisterOutputType(RedisCacheArrayOutput{})
pulumi.RegisterOutputType(RedisCacheMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/identityProviderAadb2c.go | sdk/go/azure/apimanagement/identityProviderAadb2c.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Azure AD B2C Identity Provider.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// exampleApplication, err := azuread.NewApplication(ctx, "example", &azuread.ApplicationArgs{
// DisplayName: pulumi.String("acctestam-example"),
// })
// if err != nil {
// return err
// }
// exampleApplicationPassword, err := azuread.NewApplicationPassword(ctx, "example", &azuread.ApplicationPasswordArgs{
// ApplicationObjectId: exampleApplication.ObjectId,
// EndDateRelative: pulumi.String("36h"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewIdentityProviderAadb2c(ctx, "example", &apimanagement.IdentityProviderAadb2cArgs{
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// ClientId: exampleApplication.ApplicationId,
// ClientSecret: pulumi.String("P@55w0rD!"),
// AllowedTenant: pulumi.String("myb2ctenant.onmicrosoft.com"),
// SigninTenant: pulumi.String("myb2ctenant.onmicrosoft.com"),
// Authority: pulumi.String("myb2ctenant.b2clogin.com"),
// SigninPolicy: pulumi.String("B2C_1_Login"),
// SignupPolicy: pulumi.String("B2C_1_Signup"),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleApplicationPassword,
// }))
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Azure AD B2C Identity Providers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/identityProviderAadb2c:IdentityProviderAadb2c example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/service1/identityProviders/aadB2C
// ```
type IdentityProviderAadb2c struct {
pulumi.CustomResourceState
// The allowed AAD tenant, usually your B2C tenant domain.
AllowedTenant pulumi.StringOutput `pulumi:"allowedTenant"`
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
Authority pulumi.StringOutput `pulumi:"authority"`
// Client ID of the Application in your B2C tenant.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The client library to be used in the Azure AD B2C Identity Provider.
ClientLibrary pulumi.StringPtrOutput `pulumi:"clientLibrary"`
// Client secret of the Application in your B2C tenant.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// Password reset Policy Name.
PasswordResetPolicy pulumi.StringPtrOutput `pulumi:"passwordResetPolicy"`
// Profile editing Policy Name.
ProfileEditingPolicy pulumi.StringPtrOutput `pulumi:"profileEditingPolicy"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Signin Policy Name.
SigninPolicy pulumi.StringOutput `pulumi:"signinPolicy"`
// The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
SigninTenant pulumi.StringOutput `pulumi:"signinTenant"`
// Signup Policy Name.
SignupPolicy pulumi.StringOutput `pulumi:"signupPolicy"`
}
// NewIdentityProviderAadb2c registers a new resource with the given unique name, arguments, and options.
func NewIdentityProviderAadb2c(ctx *pulumi.Context,
name string, args *IdentityProviderAadb2cArgs, opts ...pulumi.ResourceOption) (*IdentityProviderAadb2c, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AllowedTenant == nil {
return nil, errors.New("invalid value for required argument 'AllowedTenant'")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.Authority == nil {
return nil, errors.New("invalid value for required argument 'Authority'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SigninPolicy == nil {
return nil, errors.New("invalid value for required argument 'SigninPolicy'")
}
if args.SigninTenant == nil {
return nil, errors.New("invalid value for required argument 'SigninTenant'")
}
if args.SignupPolicy == nil {
return nil, errors.New("invalid value for required argument 'SignupPolicy'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource IdentityProviderAadb2c
err := ctx.RegisterResource("azure:apimanagement/identityProviderAadb2c:IdentityProviderAadb2c", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProviderAadb2c gets an existing IdentityProviderAadb2c resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIdentityProviderAadb2c(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderAadb2cState, opts ...pulumi.ResourceOption) (*IdentityProviderAadb2c, error) {
var resource IdentityProviderAadb2c
err := ctx.ReadResource("azure:apimanagement/identityProviderAadb2c:IdentityProviderAadb2c", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProviderAadb2c resources.
type identityProviderAadb2cState struct {
// The allowed AAD tenant, usually your B2C tenant domain.
AllowedTenant *string `pulumi:"allowedTenant"`
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
Authority *string `pulumi:"authority"`
// Client ID of the Application in your B2C tenant.
ClientId *string `pulumi:"clientId"`
// The client library to be used in the Azure AD B2C Identity Provider.
ClientLibrary *string `pulumi:"clientLibrary"`
// Client secret of the Application in your B2C tenant.
ClientSecret *string `pulumi:"clientSecret"`
// Password reset Policy Name.
PasswordResetPolicy *string `pulumi:"passwordResetPolicy"`
// Profile editing Policy Name.
ProfileEditingPolicy *string `pulumi:"profileEditingPolicy"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Signin Policy Name.
SigninPolicy *string `pulumi:"signinPolicy"`
// The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
SigninTenant *string `pulumi:"signinTenant"`
// Signup Policy Name.
SignupPolicy *string `pulumi:"signupPolicy"`
}
type IdentityProviderAadb2cState struct {
// The allowed AAD tenant, usually your B2C tenant domain.
AllowedTenant pulumi.StringPtrInput
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
Authority pulumi.StringPtrInput
// Client ID of the Application in your B2C tenant.
ClientId pulumi.StringPtrInput
// The client library to be used in the Azure AD B2C Identity Provider.
ClientLibrary pulumi.StringPtrInput
// Client secret of the Application in your B2C tenant.
ClientSecret pulumi.StringPtrInput
// Password reset Policy Name.
PasswordResetPolicy pulumi.StringPtrInput
// Profile editing Policy Name.
ProfileEditingPolicy pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Signin Policy Name.
SigninPolicy pulumi.StringPtrInput
// The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
SigninTenant pulumi.StringPtrInput
// Signup Policy Name.
SignupPolicy pulumi.StringPtrInput
}
func (IdentityProviderAadb2cState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderAadb2cState)(nil)).Elem()
}
type identityProviderAadb2cArgs struct {
// The allowed AAD tenant, usually your B2C tenant domain.
AllowedTenant string `pulumi:"allowedTenant"`
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
Authority string `pulumi:"authority"`
// Client ID of the Application in your B2C tenant.
ClientId string `pulumi:"clientId"`
// The client library to be used in the Azure AD B2C Identity Provider.
ClientLibrary *string `pulumi:"clientLibrary"`
// Client secret of the Application in your B2C tenant.
ClientSecret string `pulumi:"clientSecret"`
// Password reset Policy Name.
PasswordResetPolicy *string `pulumi:"passwordResetPolicy"`
// Profile editing Policy Name.
ProfileEditingPolicy *string `pulumi:"profileEditingPolicy"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Signin Policy Name.
SigninPolicy string `pulumi:"signinPolicy"`
// The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
SigninTenant string `pulumi:"signinTenant"`
// Signup Policy Name.
SignupPolicy string `pulumi:"signupPolicy"`
}
// The set of arguments for constructing a IdentityProviderAadb2c resource.
type IdentityProviderAadb2cArgs struct {
// The allowed AAD tenant, usually your B2C tenant domain.
AllowedTenant pulumi.StringInput
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
Authority pulumi.StringInput
// Client ID of the Application in your B2C tenant.
ClientId pulumi.StringInput
// The client library to be used in the Azure AD B2C Identity Provider.
ClientLibrary pulumi.StringPtrInput
// Client secret of the Application in your B2C tenant.
ClientSecret pulumi.StringInput
// Password reset Policy Name.
PasswordResetPolicy pulumi.StringPtrInput
// Profile editing Policy Name.
ProfileEditingPolicy pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Signin Policy Name.
SigninPolicy pulumi.StringInput
// The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
SigninTenant pulumi.StringInput
// Signup Policy Name.
SignupPolicy pulumi.StringInput
}
func (IdentityProviderAadb2cArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderAadb2cArgs)(nil)).Elem()
}
type IdentityProviderAadb2cInput interface {
pulumi.Input
ToIdentityProviderAadb2cOutput() IdentityProviderAadb2cOutput
ToIdentityProviderAadb2cOutputWithContext(ctx context.Context) IdentityProviderAadb2cOutput
}
func (*IdentityProviderAadb2c) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderAadb2c)(nil)).Elem()
}
func (i *IdentityProviderAadb2c) ToIdentityProviderAadb2cOutput() IdentityProviderAadb2cOutput {
return i.ToIdentityProviderAadb2cOutputWithContext(context.Background())
}
func (i *IdentityProviderAadb2c) ToIdentityProviderAadb2cOutputWithContext(ctx context.Context) IdentityProviderAadb2cOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderAadb2cOutput)
}
// IdentityProviderAadb2cArrayInput is an input type that accepts IdentityProviderAadb2cArray and IdentityProviderAadb2cArrayOutput values.
// You can construct a concrete instance of `IdentityProviderAadb2cArrayInput` via:
//
// IdentityProviderAadb2cArray{ IdentityProviderAadb2cArgs{...} }
type IdentityProviderAadb2cArrayInput interface {
pulumi.Input
ToIdentityProviderAadb2cArrayOutput() IdentityProviderAadb2cArrayOutput
ToIdentityProviderAadb2cArrayOutputWithContext(context.Context) IdentityProviderAadb2cArrayOutput
}
type IdentityProviderAadb2cArray []IdentityProviderAadb2cInput
func (IdentityProviderAadb2cArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderAadb2c)(nil)).Elem()
}
func (i IdentityProviderAadb2cArray) ToIdentityProviderAadb2cArrayOutput() IdentityProviderAadb2cArrayOutput {
return i.ToIdentityProviderAadb2cArrayOutputWithContext(context.Background())
}
func (i IdentityProviderAadb2cArray) ToIdentityProviderAadb2cArrayOutputWithContext(ctx context.Context) IdentityProviderAadb2cArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderAadb2cArrayOutput)
}
// IdentityProviderAadb2cMapInput is an input type that accepts IdentityProviderAadb2cMap and IdentityProviderAadb2cMapOutput values.
// You can construct a concrete instance of `IdentityProviderAadb2cMapInput` via:
//
// IdentityProviderAadb2cMap{ "key": IdentityProviderAadb2cArgs{...} }
type IdentityProviderAadb2cMapInput interface {
pulumi.Input
ToIdentityProviderAadb2cMapOutput() IdentityProviderAadb2cMapOutput
ToIdentityProviderAadb2cMapOutputWithContext(context.Context) IdentityProviderAadb2cMapOutput
}
type IdentityProviderAadb2cMap map[string]IdentityProviderAadb2cInput
func (IdentityProviderAadb2cMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderAadb2c)(nil)).Elem()
}
func (i IdentityProviderAadb2cMap) ToIdentityProviderAadb2cMapOutput() IdentityProviderAadb2cMapOutput {
return i.ToIdentityProviderAadb2cMapOutputWithContext(context.Background())
}
func (i IdentityProviderAadb2cMap) ToIdentityProviderAadb2cMapOutputWithContext(ctx context.Context) IdentityProviderAadb2cMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderAadb2cMapOutput)
}
type IdentityProviderAadb2cOutput struct{ *pulumi.OutputState }
func (IdentityProviderAadb2cOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderAadb2c)(nil)).Elem()
}
func (o IdentityProviderAadb2cOutput) ToIdentityProviderAadb2cOutput() IdentityProviderAadb2cOutput {
return o
}
func (o IdentityProviderAadb2cOutput) ToIdentityProviderAadb2cOutputWithContext(ctx context.Context) IdentityProviderAadb2cOutput {
return o
}
// The allowed AAD tenant, usually your B2C tenant domain.
func (o IdentityProviderAadb2cOutput) AllowedTenant() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.AllowedTenant }).(pulumi.StringOutput)
}
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
func (o IdentityProviderAadb2cOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// OpenID Connect discovery endpoint hostname, usually your b2clogin.com domain.
func (o IdentityProviderAadb2cOutput) Authority() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.Authority }).(pulumi.StringOutput)
}
// Client ID of the Application in your B2C tenant.
func (o IdentityProviderAadb2cOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// The client library to be used in the Azure AD B2C Identity Provider.
func (o IdentityProviderAadb2cOutput) ClientLibrary() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringPtrOutput { return v.ClientLibrary }).(pulumi.StringPtrOutput)
}
// Client secret of the Application in your B2C tenant.
func (o IdentityProviderAadb2cOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// Password reset Policy Name.
func (o IdentityProviderAadb2cOutput) PasswordResetPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringPtrOutput { return v.PasswordResetPolicy }).(pulumi.StringPtrOutput)
}
// Profile editing Policy Name.
func (o IdentityProviderAadb2cOutput) ProfileEditingPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringPtrOutput { return v.ProfileEditingPolicy }).(pulumi.StringPtrOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o IdentityProviderAadb2cOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Signin Policy Name.
func (o IdentityProviderAadb2cOutput) SigninPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.SigninPolicy }).(pulumi.StringOutput)
}
// The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain.
func (o IdentityProviderAadb2cOutput) SigninTenant() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.SigninTenant }).(pulumi.StringOutput)
}
// Signup Policy Name.
func (o IdentityProviderAadb2cOutput) SignupPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAadb2c) pulumi.StringOutput { return v.SignupPolicy }).(pulumi.StringOutput)
}
type IdentityProviderAadb2cArrayOutput struct{ *pulumi.OutputState }
func (IdentityProviderAadb2cArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderAadb2c)(nil)).Elem()
}
func (o IdentityProviderAadb2cArrayOutput) ToIdentityProviderAadb2cArrayOutput() IdentityProviderAadb2cArrayOutput {
return o
}
func (o IdentityProviderAadb2cArrayOutput) ToIdentityProviderAadb2cArrayOutputWithContext(ctx context.Context) IdentityProviderAadb2cArrayOutput {
return o
}
func (o IdentityProviderAadb2cArrayOutput) Index(i pulumi.IntInput) IdentityProviderAadb2cOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IdentityProviderAadb2c {
return vs[0].([]*IdentityProviderAadb2c)[vs[1].(int)]
}).(IdentityProviderAadb2cOutput)
}
type IdentityProviderAadb2cMapOutput struct{ *pulumi.OutputState }
func (IdentityProviderAadb2cMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderAadb2c)(nil)).Elem()
}
func (o IdentityProviderAadb2cMapOutput) ToIdentityProviderAadb2cMapOutput() IdentityProviderAadb2cMapOutput {
return o
}
func (o IdentityProviderAadb2cMapOutput) ToIdentityProviderAadb2cMapOutputWithContext(ctx context.Context) IdentityProviderAadb2cMapOutput {
return o
}
func (o IdentityProviderAadb2cMapOutput) MapIndex(k pulumi.StringInput) IdentityProviderAadb2cOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IdentityProviderAadb2c {
return vs[0].(map[string]*IdentityProviderAadb2c)[vs[1].(string)]
}).(IdentityProviderAadb2cOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderAadb2cInput)(nil)).Elem(), &IdentityProviderAadb2c{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderAadb2cArrayInput)(nil)).Elem(), IdentityProviderAadb2cArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderAadb2cMapInput)(nil)).Elem(), IdentityProviderAadb2cMap{})
pulumi.RegisterOutputType(IdentityProviderAadb2cOutput{})
pulumi.RegisterOutputType(IdentityProviderAadb2cArrayOutput{})
pulumi.RegisterOutputType(IdentityProviderAadb2cMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/subscription.go | sdk/go/azure/apimanagement/subscription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Subscription within a API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
// Name: "example-apim",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// exampleGetProduct, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
// ProductId: "00000000-0000-0000-0000-000000000000",
// ApiManagementName: example.Name,
// ResourceGroupName: example.ResourceGroupName,
// }, nil)
// if err != nil {
// return err
// }
// exampleGetUser, err := apimanagement.LookupUser(ctx, &apimanagement.LookupUserArgs{
// UserId: "11111111-1111-1111-1111-111111111111",
// ApiManagementName: example.Name,
// ResourceGroupName: example.ResourceGroupName,
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewSubscription(ctx, "example", &apimanagement.SubscriptionArgs{
// ApiManagementName: pulumi.String(example.Name),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// UserId: pulumi.String(exampleGetUser.Id),
// ProductId: pulumi.String(exampleGetProduct.Id),
// DisplayName: pulumi.String("Parser API"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Subscriptions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/subscription:Subscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ApiManagement/service/example-apim/subscriptions/subscription-name
// ```
type Subscription struct {
pulumi.CustomResourceState
// Determines whether tracing can be enabled. Defaults to `true`.
AllowTracing pulumi.BoolPtrOutput `pulumi:"allowTracing"`
// The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `/apis` scope is used for the subscription and all apis are accessible.
ApiId pulumi.StringPtrOutput `pulumi:"apiId"`
// The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The display name of this Subscription.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The primary subscription key to use for the subscription.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `allApis` scope is used for the subscription.
ProductId pulumi.StringPtrOutput `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary subscription key to use for the subscription.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// The state of this Subscription. Possible values are `active`, `cancelled`, `expired`, `rejected`, `submitted` and `suspended`. Defaults to `submitted`.
State pulumi.StringPtrOutput `pulumi:"state"`
// An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
// The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
UserId pulumi.StringPtrOutput `pulumi:"userId"`
}
// NewSubscription registers a new resource with the given unique name, arguments, and options.
func NewSubscription(ctx *pulumi.Context,
name string, args *SubscriptionArgs, opts ...pulumi.ResourceOption) (*Subscription, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.PrimaryKey != nil {
args.PrimaryKey = pulumi.ToSecret(args.PrimaryKey).(pulumi.StringPtrInput)
}
if args.SecondaryKey != nil {
args.SecondaryKey = pulumi.ToSecret(args.SecondaryKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryKey",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Subscription
err := ctx.RegisterResource("azure:apimanagement/subscription:Subscription", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSubscription gets an existing Subscription resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSubscription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SubscriptionState, opts ...pulumi.ResourceOption) (*Subscription, error) {
var resource Subscription
err := ctx.ReadResource("azure:apimanagement/subscription:Subscription", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Subscription resources.
type subscriptionState struct {
// Determines whether tracing can be enabled. Defaults to `true`.
AllowTracing *bool `pulumi:"allowTracing"`
// The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `/apis` scope is used for the subscription and all apis are accessible.
ApiId *string `pulumi:"apiId"`
// The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The display name of this Subscription.
DisplayName *string `pulumi:"displayName"`
// The primary subscription key to use for the subscription.
PrimaryKey *string `pulumi:"primaryKey"`
// The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `allApis` scope is used for the subscription.
ProductId *string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary subscription key to use for the subscription.
SecondaryKey *string `pulumi:"secondaryKey"`
// The state of this Subscription. Possible values are `active`, `cancelled`, `expired`, `rejected`, `submitted` and `suspended`. Defaults to `submitted`.
State *string `pulumi:"state"`
// An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
SubscriptionId *string `pulumi:"subscriptionId"`
// The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
UserId *string `pulumi:"userId"`
}
type SubscriptionState struct {
// Determines whether tracing can be enabled. Defaults to `true`.
AllowTracing pulumi.BoolPtrInput
// The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `/apis` scope is used for the subscription and all apis are accessible.
ApiId pulumi.StringPtrInput
// The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The display name of this Subscription.
DisplayName pulumi.StringPtrInput
// The primary subscription key to use for the subscription.
PrimaryKey pulumi.StringPtrInput
// The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `allApis` scope is used for the subscription.
ProductId pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary subscription key to use for the subscription.
SecondaryKey pulumi.StringPtrInput
// The state of this Subscription. Possible values are `active`, `cancelled`, `expired`, `rejected`, `submitted` and `suspended`. Defaults to `submitted`.
State pulumi.StringPtrInput
// An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringPtrInput
// The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
UserId pulumi.StringPtrInput
}
func (SubscriptionState) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionState)(nil)).Elem()
}
type subscriptionArgs struct {
// Determines whether tracing can be enabled. Defaults to `true`.
AllowTracing *bool `pulumi:"allowTracing"`
// The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `/apis` scope is used for the subscription and all apis are accessible.
ApiId *string `pulumi:"apiId"`
// The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The display name of this Subscription.
DisplayName string `pulumi:"displayName"`
// The primary subscription key to use for the subscription.
PrimaryKey *string `pulumi:"primaryKey"`
// The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `allApis` scope is used for the subscription.
ProductId *string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary subscription key to use for the subscription.
SecondaryKey *string `pulumi:"secondaryKey"`
// The state of this Subscription. Possible values are `active`, `cancelled`, `expired`, `rejected`, `submitted` and `suspended`. Defaults to `submitted`.
State *string `pulumi:"state"`
// An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
SubscriptionId *string `pulumi:"subscriptionId"`
// The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
UserId *string `pulumi:"userId"`
}
// The set of arguments for constructing a Subscription resource.
type SubscriptionArgs struct {
// Determines whether tracing can be enabled. Defaults to `true`.
AllowTracing pulumi.BoolPtrInput
// The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `/apis` scope is used for the subscription and all apis are accessible.
ApiId pulumi.StringPtrInput
// The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The display name of this Subscription.
DisplayName pulumi.StringInput
// The primary subscription key to use for the subscription.
PrimaryKey pulumi.StringPtrInput
// The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `allApis` scope is used for the subscription.
ProductId pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The secondary subscription key to use for the subscription.
SecondaryKey pulumi.StringPtrInput
// The state of this Subscription. Possible values are `active`, `cancelled`, `expired`, `rejected`, `submitted` and `suspended`. Defaults to `submitted`.
State pulumi.StringPtrInput
// An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringPtrInput
// The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
UserId pulumi.StringPtrInput
}
func (SubscriptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionArgs)(nil)).Elem()
}
type SubscriptionInput interface {
pulumi.Input
ToSubscriptionOutput() SubscriptionOutput
ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
}
func (*Subscription) ElementType() reflect.Type {
return reflect.TypeOf((**Subscription)(nil)).Elem()
}
func (i *Subscription) ToSubscriptionOutput() SubscriptionOutput {
return i.ToSubscriptionOutputWithContext(context.Background())
}
func (i *Subscription) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionOutput)
}
// SubscriptionArrayInput is an input type that accepts SubscriptionArray and SubscriptionArrayOutput values.
// You can construct a concrete instance of `SubscriptionArrayInput` via:
//
// SubscriptionArray{ SubscriptionArgs{...} }
type SubscriptionArrayInput interface {
pulumi.Input
ToSubscriptionArrayOutput() SubscriptionArrayOutput
ToSubscriptionArrayOutputWithContext(context.Context) SubscriptionArrayOutput
}
type SubscriptionArray []SubscriptionInput
func (SubscriptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Subscription)(nil)).Elem()
}
func (i SubscriptionArray) ToSubscriptionArrayOutput() SubscriptionArrayOutput {
return i.ToSubscriptionArrayOutputWithContext(context.Background())
}
func (i SubscriptionArray) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionArrayOutput)
}
// SubscriptionMapInput is an input type that accepts SubscriptionMap and SubscriptionMapOutput values.
// You can construct a concrete instance of `SubscriptionMapInput` via:
//
// SubscriptionMap{ "key": SubscriptionArgs{...} }
type SubscriptionMapInput interface {
pulumi.Input
ToSubscriptionMapOutput() SubscriptionMapOutput
ToSubscriptionMapOutputWithContext(context.Context) SubscriptionMapOutput
}
type SubscriptionMap map[string]SubscriptionInput
func (SubscriptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem()
}
func (i SubscriptionMap) ToSubscriptionMapOutput() SubscriptionMapOutput {
return i.ToSubscriptionMapOutputWithContext(context.Background())
}
func (i SubscriptionMap) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionMapOutput)
}
type SubscriptionOutput struct{ *pulumi.OutputState }
func (SubscriptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Subscription)(nil)).Elem()
}
func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput {
return o
}
func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput {
return o
}
// Determines whether tracing can be enabled. Defaults to `true`.
func (o SubscriptionOutput) AllowTracing() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.AllowTracing }).(pulumi.BoolPtrOutput)
}
// The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `/apis` scope is used for the subscription and all apis are accessible.
func (o SubscriptionOutput) ApiId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.ApiId }).(pulumi.StringPtrOutput)
}
// The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
func (o SubscriptionOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The display name of this Subscription.
func (o SubscriptionOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The primary subscription key to use for the subscription.
func (o SubscriptionOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
//
// > **Note:** Only one of `productId` and `apiId` can be set. If both are missing `allApis` scope is used for the subscription.
func (o SubscriptionOutput) ProductId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.ProductId }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o SubscriptionOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary subscription key to use for the subscription.
func (o SubscriptionOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// The state of this Subscription. Possible values are `active`, `cancelled`, `expired`, `rejected`, `submitted` and `suspended`. Defaults to `submitted`.
func (o SubscriptionOutput) State() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.State }).(pulumi.StringPtrOutput)
}
// An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
func (o SubscriptionOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
// The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
func (o SubscriptionOutput) UserId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.UserId }).(pulumi.StringPtrOutput)
}
type SubscriptionArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Subscription)(nil)).Elem()
}
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput {
return o
}
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput {
return o
}
func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Subscription {
return vs[0].([]*Subscription)[vs[1].(int)]
}).(SubscriptionOutput)
}
type SubscriptionMapOutput struct{ *pulumi.OutputState }
func (SubscriptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem()
}
func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput {
return o
}
func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput {
return o
}
func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Subscription {
return vs[0].(map[string]*Subscription)[vs[1].(string)]
}).(SubscriptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionInput)(nil)).Elem(), &Subscription{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionArrayInput)(nil)).Elem(), SubscriptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionMapInput)(nil)).Elem(), SubscriptionMap{})
pulumi.RegisterOutputType(SubscriptionOutput{})
pulumi.RegisterOutputType(SubscriptionArrayOutput{})
pulumi.RegisterOutputType(SubscriptionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/emailTemplate.go | sdk/go/azure/apimanagement/emailTemplate.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management Email Template.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewEmailTemplate(ctx, "example", &apimanagement.EmailTemplateArgs{
// TemplateName: pulumi.String("ConfirmSignUpIdentityDefault"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// Subject: pulumi.String("Customized confirmation email for your new $OrganizationName API account"),
// Body: pulumi.String(`<!DOCTYPE html >
//
// <html>
// <head>
//
// <meta charset=\"UTF-8\" />
// <title>Customized Letter Title</title>
//
// </head>
// <body>
//
// <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>
//
// </body>
// </html>
// `),
//
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Email Templates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/emailTemplate:EmailTemplate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/templates/template1
// ```
type EmailTemplate struct {
pulumi.CustomResourceState
// The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The body of the Email. Its format has to be a well-formed HTML document.
//
// > **Note:** In `subject` and `body` predefined parameters can be used. The available parameters depend on the template. Schema to use a parameter: `$` followed by the `parameter.name` - `$<parameter.name>`. The available parameters can be seen in the Notification templates section of the API-Management Service instance within the Azure Portal.
Body pulumi.StringOutput `pulumi:"body"`
// The description of the Email Template.
Description pulumi.StringOutput `pulumi:"description"`
// The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The subject of the Email.
Subject pulumi.StringOutput `pulumi:"subject"`
// The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created.
TemplateName pulumi.StringOutput `pulumi:"templateName"`
// The title of the Email Template.
Title pulumi.StringOutput `pulumi:"title"`
}
// NewEmailTemplate registers a new resource with the given unique name, arguments, and options.
func NewEmailTemplate(ctx *pulumi.Context,
name string, args *EmailTemplateArgs, opts ...pulumi.ResourceOption) (*EmailTemplate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.Body == nil {
return nil, errors.New("invalid value for required argument 'Body'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Subject == nil {
return nil, errors.New("invalid value for required argument 'Subject'")
}
if args.TemplateName == nil {
return nil, errors.New("invalid value for required argument 'TemplateName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EmailTemplate
err := ctx.RegisterResource("azure:apimanagement/emailTemplate:EmailTemplate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEmailTemplate gets an existing EmailTemplate resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEmailTemplate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EmailTemplateState, opts ...pulumi.ResourceOption) (*EmailTemplate, error) {
var resource EmailTemplate
err := ctx.ReadResource("azure:apimanagement/emailTemplate:EmailTemplate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EmailTemplate resources.
type emailTemplateState struct {
// The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The body of the Email. Its format has to be a well-formed HTML document.
//
// > **Note:** In `subject` and `body` predefined parameters can be used. The available parameters depend on the template. Schema to use a parameter: `$` followed by the `parameter.name` - `$<parameter.name>`. The available parameters can be seen in the Notification templates section of the API-Management Service instance within the Azure Portal.
Body *string `pulumi:"body"`
// The description of the Email Template.
Description *string `pulumi:"description"`
// The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The subject of the Email.
Subject *string `pulumi:"subject"`
// The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created.
TemplateName *string `pulumi:"templateName"`
// The title of the Email Template.
Title *string `pulumi:"title"`
}
type EmailTemplateState struct {
// The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created.
ApiManagementName pulumi.StringPtrInput
// The body of the Email. Its format has to be a well-formed HTML document.
//
// > **Note:** In `subject` and `body` predefined parameters can be used. The available parameters depend on the template. Schema to use a parameter: `$` followed by the `parameter.name` - `$<parameter.name>`. The available parameters can be seen in the Notification templates section of the API-Management Service instance within the Azure Portal.
Body pulumi.StringPtrInput
// The description of the Email Template.
Description pulumi.StringPtrInput
// The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created.
ResourceGroupName pulumi.StringPtrInput
// The subject of the Email.
Subject pulumi.StringPtrInput
// The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created.
TemplateName pulumi.StringPtrInput
// The title of the Email Template.
Title pulumi.StringPtrInput
}
func (EmailTemplateState) ElementType() reflect.Type {
return reflect.TypeOf((*emailTemplateState)(nil)).Elem()
}
type emailTemplateArgs struct {
// The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The body of the Email. Its format has to be a well-formed HTML document.
//
// > **Note:** In `subject` and `body` predefined parameters can be used. The available parameters depend on the template. Schema to use a parameter: `$` followed by the `parameter.name` - `$<parameter.name>`. The available parameters can be seen in the Notification templates section of the API-Management Service instance within the Azure Portal.
Body string `pulumi:"body"`
// The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The subject of the Email.
Subject string `pulumi:"subject"`
// The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created.
TemplateName string `pulumi:"templateName"`
}
// The set of arguments for constructing a EmailTemplate resource.
type EmailTemplateArgs struct {
// The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created.
ApiManagementName pulumi.StringInput
// The body of the Email. Its format has to be a well-formed HTML document.
//
// > **Note:** In `subject` and `body` predefined parameters can be used. The available parameters depend on the template. Schema to use a parameter: `$` followed by the `parameter.name` - `$<parameter.name>`. The available parameters can be seen in the Notification templates section of the API-Management Service instance within the Azure Portal.
Body pulumi.StringInput
// The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created.
ResourceGroupName pulumi.StringInput
// The subject of the Email.
Subject pulumi.StringInput
// The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created.
TemplateName pulumi.StringInput
}
func (EmailTemplateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*emailTemplateArgs)(nil)).Elem()
}
type EmailTemplateInput interface {
pulumi.Input
ToEmailTemplateOutput() EmailTemplateOutput
ToEmailTemplateOutputWithContext(ctx context.Context) EmailTemplateOutput
}
func (*EmailTemplate) ElementType() reflect.Type {
return reflect.TypeOf((**EmailTemplate)(nil)).Elem()
}
func (i *EmailTemplate) ToEmailTemplateOutput() EmailTemplateOutput {
return i.ToEmailTemplateOutputWithContext(context.Background())
}
func (i *EmailTemplate) ToEmailTemplateOutputWithContext(ctx context.Context) EmailTemplateOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailTemplateOutput)
}
// EmailTemplateArrayInput is an input type that accepts EmailTemplateArray and EmailTemplateArrayOutput values.
// You can construct a concrete instance of `EmailTemplateArrayInput` via:
//
// EmailTemplateArray{ EmailTemplateArgs{...} }
type EmailTemplateArrayInput interface {
pulumi.Input
ToEmailTemplateArrayOutput() EmailTemplateArrayOutput
ToEmailTemplateArrayOutputWithContext(context.Context) EmailTemplateArrayOutput
}
type EmailTemplateArray []EmailTemplateInput
func (EmailTemplateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EmailTemplate)(nil)).Elem()
}
func (i EmailTemplateArray) ToEmailTemplateArrayOutput() EmailTemplateArrayOutput {
return i.ToEmailTemplateArrayOutputWithContext(context.Background())
}
func (i EmailTemplateArray) ToEmailTemplateArrayOutputWithContext(ctx context.Context) EmailTemplateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailTemplateArrayOutput)
}
// EmailTemplateMapInput is an input type that accepts EmailTemplateMap and EmailTemplateMapOutput values.
// You can construct a concrete instance of `EmailTemplateMapInput` via:
//
// EmailTemplateMap{ "key": EmailTemplateArgs{...} }
type EmailTemplateMapInput interface {
pulumi.Input
ToEmailTemplateMapOutput() EmailTemplateMapOutput
ToEmailTemplateMapOutputWithContext(context.Context) EmailTemplateMapOutput
}
type EmailTemplateMap map[string]EmailTemplateInput
func (EmailTemplateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EmailTemplate)(nil)).Elem()
}
func (i EmailTemplateMap) ToEmailTemplateMapOutput() EmailTemplateMapOutput {
return i.ToEmailTemplateMapOutputWithContext(context.Background())
}
func (i EmailTemplateMap) ToEmailTemplateMapOutputWithContext(ctx context.Context) EmailTemplateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EmailTemplateMapOutput)
}
type EmailTemplateOutput struct{ *pulumi.OutputState }
func (EmailTemplateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EmailTemplate)(nil)).Elem()
}
func (o EmailTemplateOutput) ToEmailTemplateOutput() EmailTemplateOutput {
return o
}
func (o EmailTemplateOutput) ToEmailTemplateOutputWithContext(ctx context.Context) EmailTemplateOutput {
return o
}
// The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created.
func (o EmailTemplateOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *EmailTemplate) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The body of the Email. Its format has to be a well-formed HTML document.
//
// > **Note:** In `subject` and `body` predefined parameters can be used. The available parameters depend on the template. Schema to use a parameter: `$` followed by the `parameter.name` - `$<parameter.name>`. The available parameters can be seen in the Notification templates section of the API-Management Service instance within the Azure Portal.
func (o EmailTemplateOutput) Body() pulumi.StringOutput {
return o.ApplyT(func(v *EmailTemplate) pulumi.StringOutput { return v.Body }).(pulumi.StringOutput)
}
// The description of the Email Template.
func (o EmailTemplateOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *EmailTemplate) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created.
func (o EmailTemplateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EmailTemplate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The subject of the Email.
func (o EmailTemplateOutput) Subject() pulumi.StringOutput {
return o.ApplyT(func(v *EmailTemplate) pulumi.StringOutput { return v.Subject }).(pulumi.StringOutput)
}
// The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created.
func (o EmailTemplateOutput) TemplateName() pulumi.StringOutput {
return o.ApplyT(func(v *EmailTemplate) pulumi.StringOutput { return v.TemplateName }).(pulumi.StringOutput)
}
// The title of the Email Template.
func (o EmailTemplateOutput) Title() pulumi.StringOutput {
return o.ApplyT(func(v *EmailTemplate) pulumi.StringOutput { return v.Title }).(pulumi.StringOutput)
}
type EmailTemplateArrayOutput struct{ *pulumi.OutputState }
func (EmailTemplateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EmailTemplate)(nil)).Elem()
}
func (o EmailTemplateArrayOutput) ToEmailTemplateArrayOutput() EmailTemplateArrayOutput {
return o
}
func (o EmailTemplateArrayOutput) ToEmailTemplateArrayOutputWithContext(ctx context.Context) EmailTemplateArrayOutput {
return o
}
func (o EmailTemplateArrayOutput) Index(i pulumi.IntInput) EmailTemplateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EmailTemplate {
return vs[0].([]*EmailTemplate)[vs[1].(int)]
}).(EmailTemplateOutput)
}
type EmailTemplateMapOutput struct{ *pulumi.OutputState }
func (EmailTemplateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EmailTemplate)(nil)).Elem()
}
func (o EmailTemplateMapOutput) ToEmailTemplateMapOutput() EmailTemplateMapOutput {
return o
}
func (o EmailTemplateMapOutput) ToEmailTemplateMapOutputWithContext(ctx context.Context) EmailTemplateMapOutput {
return o
}
func (o EmailTemplateMapOutput) MapIndex(k pulumi.StringInput) EmailTemplateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EmailTemplate {
return vs[0].(map[string]*EmailTemplate)[vs[1].(string)]
}).(EmailTemplateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EmailTemplateInput)(nil)).Elem(), &EmailTemplate{})
pulumi.RegisterInputType(reflect.TypeOf((*EmailTemplateArrayInput)(nil)).Elem(), EmailTemplateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EmailTemplateMapInput)(nil)).Elem(), EmailTemplateMap{})
pulumi.RegisterOutputType(EmailTemplateOutput{})
pulumi.RegisterOutputType(EmailTemplateArrayOutput{})
pulumi.RegisterOutputType(EmailTemplateMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/identityProviderAad.go | sdk/go/azure/apimanagement/identityProviderAad.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management AAD Identity Provider.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@mycompany.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewIdentityProviderAad(ctx, "example", &apimanagement.IdentityProviderAadArgs{
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// ClientId: pulumi.String("00000000-0000-0000-0000-000000000000"),
// ClientSecret: pulumi.String("00000000000000000000000000000000"),
// AllowedTenants: pulumi.StringArray{
// pulumi.String("00000000-0000-0000-0000-000000000000"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management AAD Identity Provider can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/identityProviderAad:IdentityProviderAad example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/identityProviders/aad
// ```
type IdentityProviderAad struct {
pulumi.CustomResourceState
// List of allowed AAD Tenants.
AllowedTenants pulumi.StringArrayOutput `pulumi:"allowedTenants"`
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// Client Id of the Application in the AAD Identity Provider.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The client library to be used in the AAD Identity Provider.
ClientLibrary pulumi.StringPtrOutput `pulumi:"clientLibrary"`
// Client secret of the Application in the AAD Identity Provider.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The AAD Tenant to use instead of Common when logging into Active Directory.
SigninTenant pulumi.StringPtrOutput `pulumi:"signinTenant"`
}
// NewIdentityProviderAad registers a new resource with the given unique name, arguments, and options.
func NewIdentityProviderAad(ctx *pulumi.Context,
name string, args *IdentityProviderAadArgs, opts ...pulumi.ResourceOption) (*IdentityProviderAad, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AllowedTenants == nil {
return nil, errors.New("invalid value for required argument 'AllowedTenants'")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource IdentityProviderAad
err := ctx.RegisterResource("azure:apimanagement/identityProviderAad:IdentityProviderAad", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProviderAad gets an existing IdentityProviderAad resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIdentityProviderAad(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderAadState, opts ...pulumi.ResourceOption) (*IdentityProviderAad, error) {
var resource IdentityProviderAad
err := ctx.ReadResource("azure:apimanagement/identityProviderAad:IdentityProviderAad", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProviderAad resources.
type identityProviderAadState struct {
// List of allowed AAD Tenants.
AllowedTenants []string `pulumi:"allowedTenants"`
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// Client Id of the Application in the AAD Identity Provider.
ClientId *string `pulumi:"clientId"`
// The client library to be used in the AAD Identity Provider.
ClientLibrary *string `pulumi:"clientLibrary"`
// Client secret of the Application in the AAD Identity Provider.
ClientSecret *string `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The AAD Tenant to use instead of Common when logging into Active Directory.
SigninTenant *string `pulumi:"signinTenant"`
}
type IdentityProviderAadState struct {
// List of allowed AAD Tenants.
AllowedTenants pulumi.StringArrayInput
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// Client Id of the Application in the AAD Identity Provider.
ClientId pulumi.StringPtrInput
// The client library to be used in the AAD Identity Provider.
ClientLibrary pulumi.StringPtrInput
// Client secret of the Application in the AAD Identity Provider.
ClientSecret pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The AAD Tenant to use instead of Common when logging into Active Directory.
SigninTenant pulumi.StringPtrInput
}
func (IdentityProviderAadState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderAadState)(nil)).Elem()
}
type identityProviderAadArgs struct {
// List of allowed AAD Tenants.
AllowedTenants []string `pulumi:"allowedTenants"`
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// Client Id of the Application in the AAD Identity Provider.
ClientId string `pulumi:"clientId"`
// The client library to be used in the AAD Identity Provider.
ClientLibrary *string `pulumi:"clientLibrary"`
// Client secret of the Application in the AAD Identity Provider.
ClientSecret string `pulumi:"clientSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The AAD Tenant to use instead of Common when logging into Active Directory.
SigninTenant *string `pulumi:"signinTenant"`
}
// The set of arguments for constructing a IdentityProviderAad resource.
type IdentityProviderAadArgs struct {
// List of allowed AAD Tenants.
AllowedTenants pulumi.StringArrayInput
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// Client Id of the Application in the AAD Identity Provider.
ClientId pulumi.StringInput
// The client library to be used in the AAD Identity Provider.
ClientLibrary pulumi.StringPtrInput
// Client secret of the Application in the AAD Identity Provider.
ClientSecret pulumi.StringInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The AAD Tenant to use instead of Common when logging into Active Directory.
SigninTenant pulumi.StringPtrInput
}
func (IdentityProviderAadArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderAadArgs)(nil)).Elem()
}
type IdentityProviderAadInput interface {
pulumi.Input
ToIdentityProviderAadOutput() IdentityProviderAadOutput
ToIdentityProviderAadOutputWithContext(ctx context.Context) IdentityProviderAadOutput
}
func (*IdentityProviderAad) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderAad)(nil)).Elem()
}
func (i *IdentityProviderAad) ToIdentityProviderAadOutput() IdentityProviderAadOutput {
return i.ToIdentityProviderAadOutputWithContext(context.Background())
}
func (i *IdentityProviderAad) ToIdentityProviderAadOutputWithContext(ctx context.Context) IdentityProviderAadOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderAadOutput)
}
// IdentityProviderAadArrayInput is an input type that accepts IdentityProviderAadArray and IdentityProviderAadArrayOutput values.
// You can construct a concrete instance of `IdentityProviderAadArrayInput` via:
//
// IdentityProviderAadArray{ IdentityProviderAadArgs{...} }
type IdentityProviderAadArrayInput interface {
pulumi.Input
ToIdentityProviderAadArrayOutput() IdentityProviderAadArrayOutput
ToIdentityProviderAadArrayOutputWithContext(context.Context) IdentityProviderAadArrayOutput
}
type IdentityProviderAadArray []IdentityProviderAadInput
func (IdentityProviderAadArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderAad)(nil)).Elem()
}
func (i IdentityProviderAadArray) ToIdentityProviderAadArrayOutput() IdentityProviderAadArrayOutput {
return i.ToIdentityProviderAadArrayOutputWithContext(context.Background())
}
func (i IdentityProviderAadArray) ToIdentityProviderAadArrayOutputWithContext(ctx context.Context) IdentityProviderAadArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderAadArrayOutput)
}
// IdentityProviderAadMapInput is an input type that accepts IdentityProviderAadMap and IdentityProviderAadMapOutput values.
// You can construct a concrete instance of `IdentityProviderAadMapInput` via:
//
// IdentityProviderAadMap{ "key": IdentityProviderAadArgs{...} }
type IdentityProviderAadMapInput interface {
pulumi.Input
ToIdentityProviderAadMapOutput() IdentityProviderAadMapOutput
ToIdentityProviderAadMapOutputWithContext(context.Context) IdentityProviderAadMapOutput
}
type IdentityProviderAadMap map[string]IdentityProviderAadInput
func (IdentityProviderAadMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderAad)(nil)).Elem()
}
func (i IdentityProviderAadMap) ToIdentityProviderAadMapOutput() IdentityProviderAadMapOutput {
return i.ToIdentityProviderAadMapOutputWithContext(context.Background())
}
func (i IdentityProviderAadMap) ToIdentityProviderAadMapOutputWithContext(ctx context.Context) IdentityProviderAadMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderAadMapOutput)
}
type IdentityProviderAadOutput struct{ *pulumi.OutputState }
func (IdentityProviderAadOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IdentityProviderAad)(nil)).Elem()
}
func (o IdentityProviderAadOutput) ToIdentityProviderAadOutput() IdentityProviderAadOutput {
return o
}
func (o IdentityProviderAadOutput) ToIdentityProviderAadOutputWithContext(ctx context.Context) IdentityProviderAadOutput {
return o
}
// List of allowed AAD Tenants.
func (o IdentityProviderAadOutput) AllowedTenants() pulumi.StringArrayOutput {
return o.ApplyT(func(v *IdentityProviderAad) pulumi.StringArrayOutput { return v.AllowedTenants }).(pulumi.StringArrayOutput)
}
// The Name of the API Management Service where this AAD Identity Provider should be created. Changing this forces a new resource to be created.
func (o IdentityProviderAadOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAad) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// Client Id of the Application in the AAD Identity Provider.
func (o IdentityProviderAadOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAad) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// The client library to be used in the AAD Identity Provider.
func (o IdentityProviderAadOutput) ClientLibrary() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IdentityProviderAad) pulumi.StringPtrOutput { return v.ClientLibrary }).(pulumi.StringPtrOutput)
}
// Client secret of the Application in the AAD Identity Provider.
func (o IdentityProviderAadOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAad) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o IdentityProviderAadOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IdentityProviderAad) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The AAD Tenant to use instead of Common when logging into Active Directory.
func (o IdentityProviderAadOutput) SigninTenant() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IdentityProviderAad) pulumi.StringPtrOutput { return v.SigninTenant }).(pulumi.StringPtrOutput)
}
type IdentityProviderAadArrayOutput struct{ *pulumi.OutputState }
func (IdentityProviderAadArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IdentityProviderAad)(nil)).Elem()
}
func (o IdentityProviderAadArrayOutput) ToIdentityProviderAadArrayOutput() IdentityProviderAadArrayOutput {
return o
}
func (o IdentityProviderAadArrayOutput) ToIdentityProviderAadArrayOutputWithContext(ctx context.Context) IdentityProviderAadArrayOutput {
return o
}
func (o IdentityProviderAadArrayOutput) Index(i pulumi.IntInput) IdentityProviderAadOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IdentityProviderAad {
return vs[0].([]*IdentityProviderAad)[vs[1].(int)]
}).(IdentityProviderAadOutput)
}
type IdentityProviderAadMapOutput struct{ *pulumi.OutputState }
func (IdentityProviderAadMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IdentityProviderAad)(nil)).Elem()
}
func (o IdentityProviderAadMapOutput) ToIdentityProviderAadMapOutput() IdentityProviderAadMapOutput {
return o
}
func (o IdentityProviderAadMapOutput) ToIdentityProviderAadMapOutputWithContext(ctx context.Context) IdentityProviderAadMapOutput {
return o
}
func (o IdentityProviderAadMapOutput) MapIndex(k pulumi.StringInput) IdentityProviderAadOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IdentityProviderAad {
return vs[0].(map[string]*IdentityProviderAad)[vs[1].(string)]
}).(IdentityProviderAadOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderAadInput)(nil)).Elem(), &IdentityProviderAad{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderAadArrayInput)(nil)).Elem(), IdentityProviderAadArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IdentityProviderAadMapInput)(nil)).Elem(), IdentityProviderAadMap{})
pulumi.RegisterOutputType(IdentityProviderAadOutput{})
pulumi.RegisterOutputType(IdentityProviderAadArrayOutput{})
pulumi.RegisterOutputType(IdentityProviderAadMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/productApi.go | sdk/go/azure/apimanagement/productApi.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management API Assignment to a Product.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
// Name: "example-api",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// exampleGetApi, err := apimanagement.LookupApi(ctx, &apimanagement.LookupApiArgs{
// Name: "search-api",
// ApiManagementName: example.Name,
// ResourceGroupName: example.ResourceGroupName,
// Revision: "2",
// }, nil)
// if err != nil {
// return err
// }
// exampleGetProduct, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
// ProductId: "my-product",
// ApiManagementName: example.Name,
// ResourceGroupName: example.ResourceGroupName,
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewProductApi(ctx, "example", &apimanagement.ProductApiArgs{
// ApiName: pulumi.String(exampleGetApi.Name),
// ProductId: pulumi.String(exampleGetProduct.ProductId),
// ApiManagementName: pulumi.String(example.Name),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Product API's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/productApi:ProductApi example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/products/exampleId/apis/apiId
// ```
type ProductApi struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The Name of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName pulumi.StringOutput `pulumi:"apiName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringOutput `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewProductApi registers a new resource with the given unique name, arguments, and options.
func NewProductApi(ctx *pulumi.Context,
name string, args *ProductApiArgs, opts ...pulumi.ResourceOption) (*ProductApi, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ApiName == nil {
return nil, errors.New("invalid value for required argument 'ApiName'")
}
if args.ProductId == nil {
return nil, errors.New("invalid value for required argument 'ProductId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ProductApi
err := ctx.RegisterResource("azure:apimanagement/productApi:ProductApi", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProductApi gets an existing ProductApi resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetProductApi(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProductApiState, opts ...pulumi.ResourceOption) (*ProductApi, error) {
var resource ProductApi
err := ctx.ReadResource("azure:apimanagement/productApi:ProductApi", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ProductApi resources.
type productApiState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The Name of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName *string `pulumi:"apiName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId *string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ProductApiState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The Name of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName pulumi.StringPtrInput
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ProductApiState) ElementType() reflect.Type {
return reflect.TypeOf((*productApiState)(nil)).Elem()
}
type productApiArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The Name of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName string `pulumi:"apiName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ProductApi resource.
type ProductApiArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The Name of the API Management API within the API Management Service. Changing this forces a new resource to be created.
ApiName pulumi.StringInput
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ProductApiArgs) ElementType() reflect.Type {
return reflect.TypeOf((*productApiArgs)(nil)).Elem()
}
type ProductApiInput interface {
pulumi.Input
ToProductApiOutput() ProductApiOutput
ToProductApiOutputWithContext(ctx context.Context) ProductApiOutput
}
func (*ProductApi) ElementType() reflect.Type {
return reflect.TypeOf((**ProductApi)(nil)).Elem()
}
func (i *ProductApi) ToProductApiOutput() ProductApiOutput {
return i.ToProductApiOutputWithContext(context.Background())
}
func (i *ProductApi) ToProductApiOutputWithContext(ctx context.Context) ProductApiOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductApiOutput)
}
// ProductApiArrayInput is an input type that accepts ProductApiArray and ProductApiArrayOutput values.
// You can construct a concrete instance of `ProductApiArrayInput` via:
//
// ProductApiArray{ ProductApiArgs{...} }
type ProductApiArrayInput interface {
pulumi.Input
ToProductApiArrayOutput() ProductApiArrayOutput
ToProductApiArrayOutputWithContext(context.Context) ProductApiArrayOutput
}
type ProductApiArray []ProductApiInput
func (ProductApiArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductApi)(nil)).Elem()
}
func (i ProductApiArray) ToProductApiArrayOutput() ProductApiArrayOutput {
return i.ToProductApiArrayOutputWithContext(context.Background())
}
func (i ProductApiArray) ToProductApiArrayOutputWithContext(ctx context.Context) ProductApiArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductApiArrayOutput)
}
// ProductApiMapInput is an input type that accepts ProductApiMap and ProductApiMapOutput values.
// You can construct a concrete instance of `ProductApiMapInput` via:
//
// ProductApiMap{ "key": ProductApiArgs{...} }
type ProductApiMapInput interface {
pulumi.Input
ToProductApiMapOutput() ProductApiMapOutput
ToProductApiMapOutputWithContext(context.Context) ProductApiMapOutput
}
type ProductApiMap map[string]ProductApiInput
func (ProductApiMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductApi)(nil)).Elem()
}
func (i ProductApiMap) ToProductApiMapOutput() ProductApiMapOutput {
return i.ToProductApiMapOutputWithContext(context.Background())
}
func (i ProductApiMap) ToProductApiMapOutputWithContext(ctx context.Context) ProductApiMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductApiMapOutput)
}
type ProductApiOutput struct{ *pulumi.OutputState }
func (ProductApiOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ProductApi)(nil)).Elem()
}
func (o ProductApiOutput) ToProductApiOutput() ProductApiOutput {
return o
}
func (o ProductApiOutput) ToProductApiOutputWithContext(ctx context.Context) ProductApiOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o ProductApiOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductApi) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The Name of the API Management API within the API Management Service. Changing this forces a new resource to be created.
func (o ProductApiOutput) ApiName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductApi) pulumi.StringOutput { return v.ApiName }).(pulumi.StringOutput)
}
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
func (o ProductApiOutput) ProductId() pulumi.StringOutput {
return o.ApplyT(func(v *ProductApi) pulumi.StringOutput { return v.ProductId }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o ProductApiOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductApi) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ProductApiArrayOutput struct{ *pulumi.OutputState }
func (ProductApiArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductApi)(nil)).Elem()
}
func (o ProductApiArrayOutput) ToProductApiArrayOutput() ProductApiArrayOutput {
return o
}
func (o ProductApiArrayOutput) ToProductApiArrayOutputWithContext(ctx context.Context) ProductApiArrayOutput {
return o
}
func (o ProductApiArrayOutput) Index(i pulumi.IntInput) ProductApiOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProductApi {
return vs[0].([]*ProductApi)[vs[1].(int)]
}).(ProductApiOutput)
}
type ProductApiMapOutput struct{ *pulumi.OutputState }
func (ProductApiMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductApi)(nil)).Elem()
}
func (o ProductApiMapOutput) ToProductApiMapOutput() ProductApiMapOutput {
return o
}
func (o ProductApiMapOutput) ToProductApiMapOutputWithContext(ctx context.Context) ProductApiMapOutput {
return o
}
func (o ProductApiMapOutput) MapIndex(k pulumi.StringInput) ProductApiOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProductApi {
return vs[0].(map[string]*ProductApi)[vs[1].(string)]
}).(ProductApiOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProductApiInput)(nil)).Elem(), &ProductApi{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductApiArrayInput)(nil)).Elem(), ProductApiArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductApiMapInput)(nil)).Elem(), ProductApiMap{})
pulumi.RegisterOutputType(ProductApiOutput{})
pulumi.RegisterOutputType(ProductApiArrayOutput{})
pulumi.RegisterOutputType(ProductApiMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/getGroup.go | sdk/go/azure/apimanagement/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 apimanagement
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 API Management Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupGroup(ctx, &apimanagement.LookupGroupArgs{
// Name: "my-group",
// ApiManagementName: "example-apim",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("groupType", example.Type)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
func LookupGroup(ctx *pulumi.Context, args *LookupGroupArgs, opts ...pulumi.InvokeOption) (*LookupGroupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupGroupResult
err := ctx.Invoke("azure:apimanagement/getGroup:getGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getGroup.
type LookupGroupArgs struct {
// The Name of the API Management Service in which this Group exists.
ApiManagementName string `pulumi:"apiManagementName"`
// The Name of the API Management Group.
Name string `pulumi:"name"`
// The Name of the Resource Group in which the API Management Service exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getGroup.
type LookupGroupResult struct {
ApiManagementName string `pulumi:"apiManagementName"`
// The description of this API Management Group.
Description string `pulumi:"description"`
// The display name of this API Management Group.
DisplayName string `pulumi:"displayName"`
// The identifier of the external Group.
ExternalId string `pulumi:"externalId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The type of this API Management Group, such as `custom` or `external`.
Type string `pulumi:"type"`
}
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:apimanagement/getGroup:getGroup", args, LookupGroupResultOutput{}, options).(LookupGroupResultOutput), nil
}).(LookupGroupResultOutput)
}
// A collection of arguments for invoking getGroup.
type LookupGroupOutputArgs struct {
// The Name of the API Management Service in which this Group exists.
ApiManagementName pulumi.StringInput `pulumi:"apiManagementName"`
// The Name of the API Management Group.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group in which the API Management Service exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
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
}
func (o LookupGroupResultOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The description of this API Management Group.
func (o LookupGroupResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.Description }).(pulumi.StringOutput)
}
// The display name of this API Management Group.
func (o LookupGroupResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The identifier of the external Group.
func (o LookupGroupResultOutput) ExternalId() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.ExternalId }).(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)
}
func (o LookupGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupGroupResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The type of this API Management Group, such as `custom` or `external`.
func (o LookupGroupResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.Type }).(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/apimanagement/policyFragment.go | sdk/go/azure/apimanagement/policyFragment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Api Management Policy Fragment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "policy-fragment-1.xml",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewPolicyFragment(ctx, "example", &apimanagement.PolicyFragmentArgs{
// ApiManagementId: exampleService.ID(),
// Name: pulumi.String("example-policy-fragment"),
// Format: pulumi.String("xml"),
// Value: pulumi.String(invokeFile.Result),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
//
// ## Import
//
// Api Management Policy Fragments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/policyFragment:PolicyFragment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/policyFragments/policyFragment1
// ```
type PolicyFragment struct {
pulumi.CustomResourceState
// The id of the API Management Service. Changing this forces a new Api Management Policy Fragment to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The description for the Policy Fragment.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The format of the Policy Fragment. Possible values are `xml` or `rawxml`. Default is `xml`.
//
// > **Note:** The `value` property will be updated to reflect the corresponding format when `format` is updated.
Format pulumi.StringPtrOutput `pulumi:"format"`
// The name which should be used for this Api Management Policy Fragment. Changing this forces a new Api Management Policy Fragment to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The value of the Policy Fragment.
//
// > **Note:** Be aware of the two format possibilities. If the `value` is not applied and continues to cause a diff the format could be wrong.
Value pulumi.StringOutput `pulumi:"value"`
}
// NewPolicyFragment registers a new resource with the given unique name, arguments, and options.
func NewPolicyFragment(ctx *pulumi.Context,
name string, args *PolicyFragmentArgs, opts ...pulumi.ResourceOption) (*PolicyFragment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
if args.Value == nil {
return nil, errors.New("invalid value for required argument 'Value'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource PolicyFragment
err := ctx.RegisterResource("azure:apimanagement/policyFragment:PolicyFragment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPolicyFragment gets an existing PolicyFragment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPolicyFragment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PolicyFragmentState, opts ...pulumi.ResourceOption) (*PolicyFragment, error) {
var resource PolicyFragment
err := ctx.ReadResource("azure:apimanagement/policyFragment:PolicyFragment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PolicyFragment resources.
type policyFragmentState struct {
// The id of the API Management Service. Changing this forces a new Api Management Policy Fragment to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The description for the Policy Fragment.
Description *string `pulumi:"description"`
// The format of the Policy Fragment. Possible values are `xml` or `rawxml`. Default is `xml`.
//
// > **Note:** The `value` property will be updated to reflect the corresponding format when `format` is updated.
Format *string `pulumi:"format"`
// The name which should be used for this Api Management Policy Fragment. Changing this forces a new Api Management Policy Fragment to be created.
Name *string `pulumi:"name"`
// The value of the Policy Fragment.
//
// > **Note:** Be aware of the two format possibilities. If the `value` is not applied and continues to cause a diff the format could be wrong.
Value *string `pulumi:"value"`
}
type PolicyFragmentState struct {
// The id of the API Management Service. Changing this forces a new Api Management Policy Fragment to be created.
ApiManagementId pulumi.StringPtrInput
// The description for the Policy Fragment.
Description pulumi.StringPtrInput
// The format of the Policy Fragment. Possible values are `xml` or `rawxml`. Default is `xml`.
//
// > **Note:** The `value` property will be updated to reflect the corresponding format when `format` is updated.
Format pulumi.StringPtrInput
// The name which should be used for this Api Management Policy Fragment. Changing this forces a new Api Management Policy Fragment to be created.
Name pulumi.StringPtrInput
// The value of the Policy Fragment.
//
// > **Note:** Be aware of the two format possibilities. If the `value` is not applied and continues to cause a diff the format could be wrong.
Value pulumi.StringPtrInput
}
func (PolicyFragmentState) ElementType() reflect.Type {
return reflect.TypeOf((*policyFragmentState)(nil)).Elem()
}
type policyFragmentArgs struct {
// The id of the API Management Service. Changing this forces a new Api Management Policy Fragment to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The description for the Policy Fragment.
Description *string `pulumi:"description"`
// The format of the Policy Fragment. Possible values are `xml` or `rawxml`. Default is `xml`.
//
// > **Note:** The `value` property will be updated to reflect the corresponding format when `format` is updated.
Format *string `pulumi:"format"`
// The name which should be used for this Api Management Policy Fragment. Changing this forces a new Api Management Policy Fragment to be created.
Name *string `pulumi:"name"`
// The value of the Policy Fragment.
//
// > **Note:** Be aware of the two format possibilities. If the `value` is not applied and continues to cause a diff the format could be wrong.
Value string `pulumi:"value"`
}
// The set of arguments for constructing a PolicyFragment resource.
type PolicyFragmentArgs struct {
// The id of the API Management Service. Changing this forces a new Api Management Policy Fragment to be created.
ApiManagementId pulumi.StringInput
// The description for the Policy Fragment.
Description pulumi.StringPtrInput
// The format of the Policy Fragment. Possible values are `xml` or `rawxml`. Default is `xml`.
//
// > **Note:** The `value` property will be updated to reflect the corresponding format when `format` is updated.
Format pulumi.StringPtrInput
// The name which should be used for this Api Management Policy Fragment. Changing this forces a new Api Management Policy Fragment to be created.
Name pulumi.StringPtrInput
// The value of the Policy Fragment.
//
// > **Note:** Be aware of the two format possibilities. If the `value` is not applied and continues to cause a diff the format could be wrong.
Value pulumi.StringInput
}
func (PolicyFragmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*policyFragmentArgs)(nil)).Elem()
}
type PolicyFragmentInput interface {
pulumi.Input
ToPolicyFragmentOutput() PolicyFragmentOutput
ToPolicyFragmentOutputWithContext(ctx context.Context) PolicyFragmentOutput
}
func (*PolicyFragment) ElementType() reflect.Type {
return reflect.TypeOf((**PolicyFragment)(nil)).Elem()
}
func (i *PolicyFragment) ToPolicyFragmentOutput() PolicyFragmentOutput {
return i.ToPolicyFragmentOutputWithContext(context.Background())
}
func (i *PolicyFragment) ToPolicyFragmentOutputWithContext(ctx context.Context) PolicyFragmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyFragmentOutput)
}
// PolicyFragmentArrayInput is an input type that accepts PolicyFragmentArray and PolicyFragmentArrayOutput values.
// You can construct a concrete instance of `PolicyFragmentArrayInput` via:
//
// PolicyFragmentArray{ PolicyFragmentArgs{...} }
type PolicyFragmentArrayInput interface {
pulumi.Input
ToPolicyFragmentArrayOutput() PolicyFragmentArrayOutput
ToPolicyFragmentArrayOutputWithContext(context.Context) PolicyFragmentArrayOutput
}
type PolicyFragmentArray []PolicyFragmentInput
func (PolicyFragmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PolicyFragment)(nil)).Elem()
}
func (i PolicyFragmentArray) ToPolicyFragmentArrayOutput() PolicyFragmentArrayOutput {
return i.ToPolicyFragmentArrayOutputWithContext(context.Background())
}
func (i PolicyFragmentArray) ToPolicyFragmentArrayOutputWithContext(ctx context.Context) PolicyFragmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyFragmentArrayOutput)
}
// PolicyFragmentMapInput is an input type that accepts PolicyFragmentMap and PolicyFragmentMapOutput values.
// You can construct a concrete instance of `PolicyFragmentMapInput` via:
//
// PolicyFragmentMap{ "key": PolicyFragmentArgs{...} }
type PolicyFragmentMapInput interface {
pulumi.Input
ToPolicyFragmentMapOutput() PolicyFragmentMapOutput
ToPolicyFragmentMapOutputWithContext(context.Context) PolicyFragmentMapOutput
}
type PolicyFragmentMap map[string]PolicyFragmentInput
func (PolicyFragmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PolicyFragment)(nil)).Elem()
}
func (i PolicyFragmentMap) ToPolicyFragmentMapOutput() PolicyFragmentMapOutput {
return i.ToPolicyFragmentMapOutputWithContext(context.Background())
}
func (i PolicyFragmentMap) ToPolicyFragmentMapOutputWithContext(ctx context.Context) PolicyFragmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PolicyFragmentMapOutput)
}
type PolicyFragmentOutput struct{ *pulumi.OutputState }
func (PolicyFragmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PolicyFragment)(nil)).Elem()
}
func (o PolicyFragmentOutput) ToPolicyFragmentOutput() PolicyFragmentOutput {
return o
}
func (o PolicyFragmentOutput) ToPolicyFragmentOutputWithContext(ctx context.Context) PolicyFragmentOutput {
return o
}
// The id of the API Management Service. Changing this forces a new Api Management Policy Fragment to be created.
func (o PolicyFragmentOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *PolicyFragment) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The description for the Policy Fragment.
func (o PolicyFragmentOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *PolicyFragment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The format of the Policy Fragment. Possible values are `xml` or `rawxml`. Default is `xml`.
//
// > **Note:** The `value` property will be updated to reflect the corresponding format when `format` is updated.
func (o PolicyFragmentOutput) Format() pulumi.StringPtrOutput {
return o.ApplyT(func(v *PolicyFragment) pulumi.StringPtrOutput { return v.Format }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Api Management Policy Fragment. Changing this forces a new Api Management Policy Fragment to be created.
func (o PolicyFragmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PolicyFragment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The value of the Policy Fragment.
//
// > **Note:** Be aware of the two format possibilities. If the `value` is not applied and continues to cause a diff the format could be wrong.
func (o PolicyFragmentOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v *PolicyFragment) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput)
}
type PolicyFragmentArrayOutput struct{ *pulumi.OutputState }
func (PolicyFragmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PolicyFragment)(nil)).Elem()
}
func (o PolicyFragmentArrayOutput) ToPolicyFragmentArrayOutput() PolicyFragmentArrayOutput {
return o
}
func (o PolicyFragmentArrayOutput) ToPolicyFragmentArrayOutputWithContext(ctx context.Context) PolicyFragmentArrayOutput {
return o
}
func (o PolicyFragmentArrayOutput) Index(i pulumi.IntInput) PolicyFragmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PolicyFragment {
return vs[0].([]*PolicyFragment)[vs[1].(int)]
}).(PolicyFragmentOutput)
}
type PolicyFragmentMapOutput struct{ *pulumi.OutputState }
func (PolicyFragmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PolicyFragment)(nil)).Elem()
}
func (o PolicyFragmentMapOutput) ToPolicyFragmentMapOutput() PolicyFragmentMapOutput {
return o
}
func (o PolicyFragmentMapOutput) ToPolicyFragmentMapOutputWithContext(ctx context.Context) PolicyFragmentMapOutput {
return o
}
func (o PolicyFragmentMapOutput) MapIndex(k pulumi.StringInput) PolicyFragmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PolicyFragment {
return vs[0].(map[string]*PolicyFragment)[vs[1].(string)]
}).(PolicyFragmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PolicyFragmentInput)(nil)).Elem(), &PolicyFragment{})
pulumi.RegisterInputType(reflect.TypeOf((*PolicyFragmentArrayInput)(nil)).Elem(), PolicyFragmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PolicyFragmentMapInput)(nil)).Elem(), PolicyFragmentMap{})
pulumi.RegisterOutputType(PolicyFragmentOutput{})
pulumi.RegisterOutputType(PolicyFragmentArrayOutput{})
pulumi.RegisterOutputType(PolicyFragmentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/gatewayCertificateAuthority.go | sdk/go/azure/apimanagement/gatewayCertificateAuthority.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Gateway Certificate Authority.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("pub1"),
// PublisherEmail: pulumi.String("pub1@email.com"),
// SkuName: pulumi.String("Consumption_0"),
// })
// if err != nil {
// return err
// }
// exampleGateway, err := apimanagement.NewGateway(ctx, "example", &apimanagement.GatewayArgs{
// Name: pulumi.String("example-gateway"),
// ApiManagementId: exampleService.ID(),
// Description: pulumi.String("Example API Management gateway"),
// LocationData: &apimanagement.GatewayLocationDataArgs{
// Name: pulumi.String("example name"),
// City: pulumi.String("example city"),
// District: pulumi.String("example district"),
// Region: pulumi.String("example region"),
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "example.pfx",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := apimanagement.NewCertificate(ctx, "example", &apimanagement.CertificateArgs{
// Name: pulumi.String("example-cert"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// Data: pulumi.String(invokeFilebase64.Result),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewGatewayCertificateAuthority(ctx, "example", &apimanagement.GatewayCertificateAuthorityArgs{
// ApiManagementId: exampleService.ID(),
// CertificateName: exampleCertificate.Name,
// GatewayName: exampleGateway.Name,
// IsTrusted: 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Gateway Certificate Authority can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/gatewayCertificateAuthority:GatewayCertificateAuthority example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/gateways/gateway1/certificateAuthorities/cert1
// ```
type GatewayCertificateAuthority struct {
pulumi.CustomResourceState
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The name of the API Management Certificate. Changing this forces a new resource to be created.
CertificateName pulumi.StringOutput `pulumi:"certificateName"`
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName pulumi.StringOutput `pulumi:"gatewayName"`
// Whether the API Management Gateway Certificate Authority is trusted.
IsTrusted pulumi.BoolPtrOutput `pulumi:"isTrusted"`
}
// NewGatewayCertificateAuthority registers a new resource with the given unique name, arguments, and options.
func NewGatewayCertificateAuthority(ctx *pulumi.Context,
name string, args *GatewayCertificateAuthorityArgs, opts ...pulumi.ResourceOption) (*GatewayCertificateAuthority, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
if args.CertificateName == nil {
return nil, errors.New("invalid value for required argument 'CertificateName'")
}
if args.GatewayName == nil {
return nil, errors.New("invalid value for required argument 'GatewayName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GatewayCertificateAuthority
err := ctx.RegisterResource("azure:apimanagement/gatewayCertificateAuthority:GatewayCertificateAuthority", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGatewayCertificateAuthority gets an existing GatewayCertificateAuthority resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGatewayCertificateAuthority(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GatewayCertificateAuthorityState, opts ...pulumi.ResourceOption) (*GatewayCertificateAuthority, error) {
var resource GatewayCertificateAuthority
err := ctx.ReadResource("azure:apimanagement/gatewayCertificateAuthority:GatewayCertificateAuthority", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GatewayCertificateAuthority resources.
type gatewayCertificateAuthorityState struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The name of the API Management Certificate. Changing this forces a new resource to be created.
CertificateName *string `pulumi:"certificateName"`
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName *string `pulumi:"gatewayName"`
// Whether the API Management Gateway Certificate Authority is trusted.
IsTrusted *bool `pulumi:"isTrusted"`
}
type GatewayCertificateAuthorityState struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId pulumi.StringPtrInput
// The name of the API Management Certificate. Changing this forces a new resource to be created.
CertificateName pulumi.StringPtrInput
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName pulumi.StringPtrInput
// Whether the API Management Gateway Certificate Authority is trusted.
IsTrusted pulumi.BoolPtrInput
}
func (GatewayCertificateAuthorityState) ElementType() reflect.Type {
return reflect.TypeOf((*gatewayCertificateAuthorityState)(nil)).Elem()
}
type gatewayCertificateAuthorityArgs struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The name of the API Management Certificate. Changing this forces a new resource to be created.
CertificateName string `pulumi:"certificateName"`
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName string `pulumi:"gatewayName"`
// Whether the API Management Gateway Certificate Authority is trusted.
IsTrusted *bool `pulumi:"isTrusted"`
}
// The set of arguments for constructing a GatewayCertificateAuthority resource.
type GatewayCertificateAuthorityArgs struct {
// The ID of the API Management Service. Changing this forces a new resource to be created.
ApiManagementId pulumi.StringInput
// The name of the API Management Certificate. Changing this forces a new resource to be created.
CertificateName pulumi.StringInput
// The name of the API Management Gateway. Changing this forces a new resource to be created.
GatewayName pulumi.StringInput
// Whether the API Management Gateway Certificate Authority is trusted.
IsTrusted pulumi.BoolPtrInput
}
func (GatewayCertificateAuthorityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*gatewayCertificateAuthorityArgs)(nil)).Elem()
}
type GatewayCertificateAuthorityInput interface {
pulumi.Input
ToGatewayCertificateAuthorityOutput() GatewayCertificateAuthorityOutput
ToGatewayCertificateAuthorityOutputWithContext(ctx context.Context) GatewayCertificateAuthorityOutput
}
func (*GatewayCertificateAuthority) ElementType() reflect.Type {
return reflect.TypeOf((**GatewayCertificateAuthority)(nil)).Elem()
}
func (i *GatewayCertificateAuthority) ToGatewayCertificateAuthorityOutput() GatewayCertificateAuthorityOutput {
return i.ToGatewayCertificateAuthorityOutputWithContext(context.Background())
}
func (i *GatewayCertificateAuthority) ToGatewayCertificateAuthorityOutputWithContext(ctx context.Context) GatewayCertificateAuthorityOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayCertificateAuthorityOutput)
}
// GatewayCertificateAuthorityArrayInput is an input type that accepts GatewayCertificateAuthorityArray and GatewayCertificateAuthorityArrayOutput values.
// You can construct a concrete instance of `GatewayCertificateAuthorityArrayInput` via:
//
// GatewayCertificateAuthorityArray{ GatewayCertificateAuthorityArgs{...} }
type GatewayCertificateAuthorityArrayInput interface {
pulumi.Input
ToGatewayCertificateAuthorityArrayOutput() GatewayCertificateAuthorityArrayOutput
ToGatewayCertificateAuthorityArrayOutputWithContext(context.Context) GatewayCertificateAuthorityArrayOutput
}
type GatewayCertificateAuthorityArray []GatewayCertificateAuthorityInput
func (GatewayCertificateAuthorityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GatewayCertificateAuthority)(nil)).Elem()
}
func (i GatewayCertificateAuthorityArray) ToGatewayCertificateAuthorityArrayOutput() GatewayCertificateAuthorityArrayOutput {
return i.ToGatewayCertificateAuthorityArrayOutputWithContext(context.Background())
}
func (i GatewayCertificateAuthorityArray) ToGatewayCertificateAuthorityArrayOutputWithContext(ctx context.Context) GatewayCertificateAuthorityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayCertificateAuthorityArrayOutput)
}
// GatewayCertificateAuthorityMapInput is an input type that accepts GatewayCertificateAuthorityMap and GatewayCertificateAuthorityMapOutput values.
// You can construct a concrete instance of `GatewayCertificateAuthorityMapInput` via:
//
// GatewayCertificateAuthorityMap{ "key": GatewayCertificateAuthorityArgs{...} }
type GatewayCertificateAuthorityMapInput interface {
pulumi.Input
ToGatewayCertificateAuthorityMapOutput() GatewayCertificateAuthorityMapOutput
ToGatewayCertificateAuthorityMapOutputWithContext(context.Context) GatewayCertificateAuthorityMapOutput
}
type GatewayCertificateAuthorityMap map[string]GatewayCertificateAuthorityInput
func (GatewayCertificateAuthorityMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GatewayCertificateAuthority)(nil)).Elem()
}
func (i GatewayCertificateAuthorityMap) ToGatewayCertificateAuthorityMapOutput() GatewayCertificateAuthorityMapOutput {
return i.ToGatewayCertificateAuthorityMapOutputWithContext(context.Background())
}
func (i GatewayCertificateAuthorityMap) ToGatewayCertificateAuthorityMapOutputWithContext(ctx context.Context) GatewayCertificateAuthorityMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GatewayCertificateAuthorityMapOutput)
}
type GatewayCertificateAuthorityOutput struct{ *pulumi.OutputState }
func (GatewayCertificateAuthorityOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GatewayCertificateAuthority)(nil)).Elem()
}
func (o GatewayCertificateAuthorityOutput) ToGatewayCertificateAuthorityOutput() GatewayCertificateAuthorityOutput {
return o
}
func (o GatewayCertificateAuthorityOutput) ToGatewayCertificateAuthorityOutputWithContext(ctx context.Context) GatewayCertificateAuthorityOutput {
return o
}
// The ID of the API Management Service. Changing this forces a new resource to be created.
func (o GatewayCertificateAuthorityOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayCertificateAuthority) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The name of the API Management Certificate. Changing this forces a new resource to be created.
func (o GatewayCertificateAuthorityOutput) CertificateName() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayCertificateAuthority) pulumi.StringOutput { return v.CertificateName }).(pulumi.StringOutput)
}
// The name of the API Management Gateway. Changing this forces a new resource to be created.
func (o GatewayCertificateAuthorityOutput) GatewayName() pulumi.StringOutput {
return o.ApplyT(func(v *GatewayCertificateAuthority) pulumi.StringOutput { return v.GatewayName }).(pulumi.StringOutput)
}
// Whether the API Management Gateway Certificate Authority is trusted.
func (o GatewayCertificateAuthorityOutput) IsTrusted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GatewayCertificateAuthority) pulumi.BoolPtrOutput { return v.IsTrusted }).(pulumi.BoolPtrOutput)
}
type GatewayCertificateAuthorityArrayOutput struct{ *pulumi.OutputState }
func (GatewayCertificateAuthorityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GatewayCertificateAuthority)(nil)).Elem()
}
func (o GatewayCertificateAuthorityArrayOutput) ToGatewayCertificateAuthorityArrayOutput() GatewayCertificateAuthorityArrayOutput {
return o
}
func (o GatewayCertificateAuthorityArrayOutput) ToGatewayCertificateAuthorityArrayOutputWithContext(ctx context.Context) GatewayCertificateAuthorityArrayOutput {
return o
}
func (o GatewayCertificateAuthorityArrayOutput) Index(i pulumi.IntInput) GatewayCertificateAuthorityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GatewayCertificateAuthority {
return vs[0].([]*GatewayCertificateAuthority)[vs[1].(int)]
}).(GatewayCertificateAuthorityOutput)
}
type GatewayCertificateAuthorityMapOutput struct{ *pulumi.OutputState }
func (GatewayCertificateAuthorityMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GatewayCertificateAuthority)(nil)).Elem()
}
func (o GatewayCertificateAuthorityMapOutput) ToGatewayCertificateAuthorityMapOutput() GatewayCertificateAuthorityMapOutput {
return o
}
func (o GatewayCertificateAuthorityMapOutput) ToGatewayCertificateAuthorityMapOutputWithContext(ctx context.Context) GatewayCertificateAuthorityMapOutput {
return o
}
func (o GatewayCertificateAuthorityMapOutput) MapIndex(k pulumi.StringInput) GatewayCertificateAuthorityOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GatewayCertificateAuthority {
return vs[0].(map[string]*GatewayCertificateAuthority)[vs[1].(string)]
}).(GatewayCertificateAuthorityOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GatewayCertificateAuthorityInput)(nil)).Elem(), &GatewayCertificateAuthority{})
pulumi.RegisterInputType(reflect.TypeOf((*GatewayCertificateAuthorityArrayInput)(nil)).Elem(), GatewayCertificateAuthorityArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GatewayCertificateAuthorityMapInput)(nil)).Elem(), GatewayCertificateAuthorityMap{})
pulumi.RegisterOutputType(GatewayCertificateAuthorityOutput{})
pulumi.RegisterOutputType(GatewayCertificateAuthorityArrayOutput{})
pulumi.RegisterOutputType(GatewayCertificateAuthorityMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/openIdConnectProvider.go | sdk/go/azure/apimanagement/openIdConnectProvider.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an OpenID Connect Provider within a API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@exmaple.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewOpenIdConnectProvider(ctx, "example", &apimanagement.OpenIdConnectProviderArgs{
// Name: pulumi.String("example-provider"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// ClientId: pulumi.String("00001111-2222-3333-4444-555566667777"),
// ClientSecret: pulumi.String("00001111-423egvwdcsjx-00001111"),
// DisplayName: pulumi.String("Example Provider"),
// MetadataEndpoint: pulumi.String("https://example.com/example"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management OpenID Connect Providers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/openIdConnectProvider:OpenIdConnectProvider example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/openidConnectProviders/provider1
// ```
type OpenIdConnectProvider struct {
pulumi.CustomResourceState
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The Client ID used for the Client Application.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The Client Secret used for the Client Application.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// A description of this OpenID Connect Provider.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A user-friendly name for this OpenID Connect Provider.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The URI of the Metadata endpoint.
MetadataEndpoint pulumi.StringOutput `pulumi:"metadataEndpoint"`
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewOpenIdConnectProvider registers a new resource with the given unique name, arguments, and options.
func NewOpenIdConnectProvider(ctx *pulumi.Context,
name string, args *OpenIdConnectProviderArgs, opts ...pulumi.ResourceOption) (*OpenIdConnectProvider, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.MetadataEndpoint == nil {
return nil, errors.New("invalid value for required argument 'MetadataEndpoint'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ClientId != nil {
args.ClientId = pulumi.ToSecret(args.ClientId).(pulumi.StringInput)
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientId",
"clientSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource OpenIdConnectProvider
err := ctx.RegisterResource("azure:apimanagement/openIdConnectProvider:OpenIdConnectProvider", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOpenIdConnectProvider gets an existing OpenIdConnectProvider resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetOpenIdConnectProvider(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OpenIdConnectProviderState, opts ...pulumi.ResourceOption) (*OpenIdConnectProvider, error) {
var resource OpenIdConnectProvider
err := ctx.ReadResource("azure:apimanagement/openIdConnectProvider:OpenIdConnectProvider", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OpenIdConnectProvider resources.
type openIdConnectProviderState struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The Client ID used for the Client Application.
ClientId *string `pulumi:"clientId"`
// The Client Secret used for the Client Application.
ClientSecret *string `pulumi:"clientSecret"`
// A description of this OpenID Connect Provider.
Description *string `pulumi:"description"`
// A user-friendly name for this OpenID Connect Provider.
DisplayName *string `pulumi:"displayName"`
// The URI of the Metadata endpoint.
MetadataEndpoint *string `pulumi:"metadataEndpoint"`
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type OpenIdConnectProviderState struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The Client ID used for the Client Application.
ClientId pulumi.StringPtrInput
// The Client Secret used for the Client Application.
ClientSecret pulumi.StringPtrInput
// A description of this OpenID Connect Provider.
Description pulumi.StringPtrInput
// A user-friendly name for this OpenID Connect Provider.
DisplayName pulumi.StringPtrInput
// The URI of the Metadata endpoint.
MetadataEndpoint pulumi.StringPtrInput
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (OpenIdConnectProviderState) ElementType() reflect.Type {
return reflect.TypeOf((*openIdConnectProviderState)(nil)).Elem()
}
type openIdConnectProviderArgs struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The Client ID used for the Client Application.
ClientId string `pulumi:"clientId"`
// The Client Secret used for the Client Application.
ClientSecret string `pulumi:"clientSecret"`
// A description of this OpenID Connect Provider.
Description *string `pulumi:"description"`
// A user-friendly name for this OpenID Connect Provider.
DisplayName string `pulumi:"displayName"`
// The URI of the Metadata endpoint.
MetadataEndpoint string `pulumi:"metadataEndpoint"`
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a OpenIdConnectProvider resource.
type OpenIdConnectProviderArgs struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The Client ID used for the Client Application.
ClientId pulumi.StringInput
// The Client Secret used for the Client Application.
ClientSecret pulumi.StringInput
// A description of this OpenID Connect Provider.
Description pulumi.StringPtrInput
// A user-friendly name for this OpenID Connect Provider.
DisplayName pulumi.StringInput
// The URI of the Metadata endpoint.
MetadataEndpoint pulumi.StringInput
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (OpenIdConnectProviderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*openIdConnectProviderArgs)(nil)).Elem()
}
type OpenIdConnectProviderInput interface {
pulumi.Input
ToOpenIdConnectProviderOutput() OpenIdConnectProviderOutput
ToOpenIdConnectProviderOutputWithContext(ctx context.Context) OpenIdConnectProviderOutput
}
func (*OpenIdConnectProvider) ElementType() reflect.Type {
return reflect.TypeOf((**OpenIdConnectProvider)(nil)).Elem()
}
func (i *OpenIdConnectProvider) ToOpenIdConnectProviderOutput() OpenIdConnectProviderOutput {
return i.ToOpenIdConnectProviderOutputWithContext(context.Background())
}
func (i *OpenIdConnectProvider) ToOpenIdConnectProviderOutputWithContext(ctx context.Context) OpenIdConnectProviderOutput {
return pulumi.ToOutputWithContext(ctx, i).(OpenIdConnectProviderOutput)
}
// OpenIdConnectProviderArrayInput is an input type that accepts OpenIdConnectProviderArray and OpenIdConnectProviderArrayOutput values.
// You can construct a concrete instance of `OpenIdConnectProviderArrayInput` via:
//
// OpenIdConnectProviderArray{ OpenIdConnectProviderArgs{...} }
type OpenIdConnectProviderArrayInput interface {
pulumi.Input
ToOpenIdConnectProviderArrayOutput() OpenIdConnectProviderArrayOutput
ToOpenIdConnectProviderArrayOutputWithContext(context.Context) OpenIdConnectProviderArrayOutput
}
type OpenIdConnectProviderArray []OpenIdConnectProviderInput
func (OpenIdConnectProviderArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OpenIdConnectProvider)(nil)).Elem()
}
func (i OpenIdConnectProviderArray) ToOpenIdConnectProviderArrayOutput() OpenIdConnectProviderArrayOutput {
return i.ToOpenIdConnectProviderArrayOutputWithContext(context.Background())
}
func (i OpenIdConnectProviderArray) ToOpenIdConnectProviderArrayOutputWithContext(ctx context.Context) OpenIdConnectProviderArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(OpenIdConnectProviderArrayOutput)
}
// OpenIdConnectProviderMapInput is an input type that accepts OpenIdConnectProviderMap and OpenIdConnectProviderMapOutput values.
// You can construct a concrete instance of `OpenIdConnectProviderMapInput` via:
//
// OpenIdConnectProviderMap{ "key": OpenIdConnectProviderArgs{...} }
type OpenIdConnectProviderMapInput interface {
pulumi.Input
ToOpenIdConnectProviderMapOutput() OpenIdConnectProviderMapOutput
ToOpenIdConnectProviderMapOutputWithContext(context.Context) OpenIdConnectProviderMapOutput
}
type OpenIdConnectProviderMap map[string]OpenIdConnectProviderInput
func (OpenIdConnectProviderMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OpenIdConnectProvider)(nil)).Elem()
}
func (i OpenIdConnectProviderMap) ToOpenIdConnectProviderMapOutput() OpenIdConnectProviderMapOutput {
return i.ToOpenIdConnectProviderMapOutputWithContext(context.Background())
}
func (i OpenIdConnectProviderMap) ToOpenIdConnectProviderMapOutputWithContext(ctx context.Context) OpenIdConnectProviderMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(OpenIdConnectProviderMapOutput)
}
type OpenIdConnectProviderOutput struct{ *pulumi.OutputState }
func (OpenIdConnectProviderOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OpenIdConnectProvider)(nil)).Elem()
}
func (o OpenIdConnectProviderOutput) ToOpenIdConnectProviderOutput() OpenIdConnectProviderOutput {
return o
}
func (o OpenIdConnectProviderOutput) ToOpenIdConnectProviderOutputWithContext(ctx context.Context) OpenIdConnectProviderOutput {
return o
}
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
func (o OpenIdConnectProviderOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The Client ID used for the Client Application.
func (o OpenIdConnectProviderOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// The Client Secret used for the Client Application.
func (o OpenIdConnectProviderOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// A description of this OpenID Connect Provider.
func (o OpenIdConnectProviderOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// A user-friendly name for this OpenID Connect Provider.
func (o OpenIdConnectProviderOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The URI of the Metadata endpoint.
func (o OpenIdConnectProviderOutput) MetadataEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringOutput { return v.MetadataEndpoint }).(pulumi.StringOutput)
}
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
func (o OpenIdConnectProviderOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
func (o OpenIdConnectProviderOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *OpenIdConnectProvider) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type OpenIdConnectProviderArrayOutput struct{ *pulumi.OutputState }
func (OpenIdConnectProviderArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OpenIdConnectProvider)(nil)).Elem()
}
func (o OpenIdConnectProviderArrayOutput) ToOpenIdConnectProviderArrayOutput() OpenIdConnectProviderArrayOutput {
return o
}
func (o OpenIdConnectProviderArrayOutput) ToOpenIdConnectProviderArrayOutputWithContext(ctx context.Context) OpenIdConnectProviderArrayOutput {
return o
}
func (o OpenIdConnectProviderArrayOutput) Index(i pulumi.IntInput) OpenIdConnectProviderOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OpenIdConnectProvider {
return vs[0].([]*OpenIdConnectProvider)[vs[1].(int)]
}).(OpenIdConnectProviderOutput)
}
type OpenIdConnectProviderMapOutput struct{ *pulumi.OutputState }
func (OpenIdConnectProviderMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OpenIdConnectProvider)(nil)).Elem()
}
func (o OpenIdConnectProviderMapOutput) ToOpenIdConnectProviderMapOutput() OpenIdConnectProviderMapOutput {
return o
}
func (o OpenIdConnectProviderMapOutput) ToOpenIdConnectProviderMapOutputWithContext(ctx context.Context) OpenIdConnectProviderMapOutput {
return o
}
func (o OpenIdConnectProviderMapOutput) MapIndex(k pulumi.StringInput) OpenIdConnectProviderOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OpenIdConnectProvider {
return vs[0].(map[string]*OpenIdConnectProvider)[vs[1].(string)]
}).(OpenIdConnectProviderOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OpenIdConnectProviderInput)(nil)).Elem(), &OpenIdConnectProvider{})
pulumi.RegisterInputType(reflect.TypeOf((*OpenIdConnectProviderArrayInput)(nil)).Elem(), OpenIdConnectProviderArray{})
pulumi.RegisterInputType(reflect.TypeOf((*OpenIdConnectProviderMapInput)(nil)).Elem(), OpenIdConnectProviderMap{})
pulumi.RegisterOutputType(OpenIdConnectProviderOutput{})
pulumi.RegisterOutputType(OpenIdConnectProviderArrayOutput{})
pulumi.RegisterOutputType(OpenIdConnectProviderMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/productTag.go | sdk/go/azure/apimanagement/productTag.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Product tag
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// exampleProduct, err := apimanagement.NewProduct(ctx, "example", &apimanagement.ProductArgs{
// ProductId: pulumi.String("test-product"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// DisplayName: pulumi.String("Test Product"),
// SubscriptionRequired: pulumi.Bool(true),
// ApprovalRequired: pulumi.Bool(true),
// Published: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleTag, err := apimanagement.NewTag(ctx, "example", &apimanagement.TagArgs{
// ApiManagementId: exampleService.ID(),
// Name: pulumi.String("example-tag"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewProductTag(ctx, "example", &apimanagement.ProductTagArgs{
// ApiManagementProductId: exampleProduct.ProductId,
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// Name: exampleTag.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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Products can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/productTag:ProductTag example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/products/myproduct/tags/mytag
// ```
type ProductTag struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The name of the API Management product. Changing this forces a new resource to be created.
ApiManagementProductId pulumi.StringOutput `pulumi:"apiManagementProductId"`
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewProductTag registers a new resource with the given unique name, arguments, and options.
func NewProductTag(ctx *pulumi.Context,
name string, args *ProductTagArgs, opts ...pulumi.ResourceOption) (*ProductTag, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ApiManagementProductId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementProductId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ProductTag
err := ctx.RegisterResource("azure:apimanagement/productTag:ProductTag", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProductTag gets an existing ProductTag resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetProductTag(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProductTagState, opts ...pulumi.ResourceOption) (*ProductTag, error) {
var resource ProductTag
err := ctx.ReadResource("azure:apimanagement/productTag:ProductTag", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ProductTag resources.
type productTagState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The name of the API Management product. Changing this forces a new resource to be created.
ApiManagementProductId *string `pulumi:"apiManagementProductId"`
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ProductTagState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The name of the API Management product. Changing this forces a new resource to be created.
ApiManagementProductId pulumi.StringPtrInput
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ProductTagState) ElementType() reflect.Type {
return reflect.TypeOf((*productTagState)(nil)).Elem()
}
type productTagArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The name of the API Management product. Changing this forces a new resource to be created.
ApiManagementProductId string `pulumi:"apiManagementProductId"`
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ProductTag resource.
type ProductTagArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The name of the API Management product. Changing this forces a new resource to be created.
ApiManagementProductId pulumi.StringInput
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ProductTagArgs) ElementType() reflect.Type {
return reflect.TypeOf((*productTagArgs)(nil)).Elem()
}
type ProductTagInput interface {
pulumi.Input
ToProductTagOutput() ProductTagOutput
ToProductTagOutputWithContext(ctx context.Context) ProductTagOutput
}
func (*ProductTag) ElementType() reflect.Type {
return reflect.TypeOf((**ProductTag)(nil)).Elem()
}
func (i *ProductTag) ToProductTagOutput() ProductTagOutput {
return i.ToProductTagOutputWithContext(context.Background())
}
func (i *ProductTag) ToProductTagOutputWithContext(ctx context.Context) ProductTagOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductTagOutput)
}
// ProductTagArrayInput is an input type that accepts ProductTagArray and ProductTagArrayOutput values.
// You can construct a concrete instance of `ProductTagArrayInput` via:
//
// ProductTagArray{ ProductTagArgs{...} }
type ProductTagArrayInput interface {
pulumi.Input
ToProductTagArrayOutput() ProductTagArrayOutput
ToProductTagArrayOutputWithContext(context.Context) ProductTagArrayOutput
}
type ProductTagArray []ProductTagInput
func (ProductTagArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductTag)(nil)).Elem()
}
func (i ProductTagArray) ToProductTagArrayOutput() ProductTagArrayOutput {
return i.ToProductTagArrayOutputWithContext(context.Background())
}
func (i ProductTagArray) ToProductTagArrayOutputWithContext(ctx context.Context) ProductTagArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductTagArrayOutput)
}
// ProductTagMapInput is an input type that accepts ProductTagMap and ProductTagMapOutput values.
// You can construct a concrete instance of `ProductTagMapInput` via:
//
// ProductTagMap{ "key": ProductTagArgs{...} }
type ProductTagMapInput interface {
pulumi.Input
ToProductTagMapOutput() ProductTagMapOutput
ToProductTagMapOutputWithContext(context.Context) ProductTagMapOutput
}
type ProductTagMap map[string]ProductTagInput
func (ProductTagMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductTag)(nil)).Elem()
}
func (i ProductTagMap) ToProductTagMapOutput() ProductTagMapOutput {
return i.ToProductTagMapOutputWithContext(context.Background())
}
func (i ProductTagMap) ToProductTagMapOutputWithContext(ctx context.Context) ProductTagMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductTagMapOutput)
}
type ProductTagOutput struct{ *pulumi.OutputState }
func (ProductTagOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ProductTag)(nil)).Elem()
}
func (o ProductTagOutput) ToProductTagOutput() ProductTagOutput {
return o
}
func (o ProductTagOutput) ToProductTagOutputWithContext(ctx context.Context) ProductTagOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o ProductTagOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductTag) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The name of the API Management product. Changing this forces a new resource to be created.
func (o ProductTagOutput) ApiManagementProductId() pulumi.StringOutput {
return o.ApplyT(func(v *ProductTag) pulumi.StringOutput { return v.ApiManagementProductId }).(pulumi.StringOutput)
}
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created.
func (o ProductTagOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ProductTag) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
func (o ProductTagOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductTag) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ProductTagArrayOutput struct{ *pulumi.OutputState }
func (ProductTagArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductTag)(nil)).Elem()
}
func (o ProductTagArrayOutput) ToProductTagArrayOutput() ProductTagArrayOutput {
return o
}
func (o ProductTagArrayOutput) ToProductTagArrayOutputWithContext(ctx context.Context) ProductTagArrayOutput {
return o
}
func (o ProductTagArrayOutput) Index(i pulumi.IntInput) ProductTagOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProductTag {
return vs[0].([]*ProductTag)[vs[1].(int)]
}).(ProductTagOutput)
}
type ProductTagMapOutput struct{ *pulumi.OutputState }
func (ProductTagMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductTag)(nil)).Elem()
}
func (o ProductTagMapOutput) ToProductTagMapOutput() ProductTagMapOutput {
return o
}
func (o ProductTagMapOutput) ToProductTagMapOutputWithContext(ctx context.Context) ProductTagMapOutput {
return o
}
func (o ProductTagMapOutput) MapIndex(k pulumi.StringInput) ProductTagOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProductTag {
return vs[0].(map[string]*ProductTag)[vs[1].(string)]
}).(ProductTagOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProductTagInput)(nil)).Elem(), &ProductTag{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductTagArrayInput)(nil)).Elem(), ProductTagArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductTagMapInput)(nil)).Elem(), ProductTagMap{})
pulumi.RegisterOutputType(ProductTagOutput{})
pulumi.RegisterOutputType(ProductTagArrayOutput{})
pulumi.RegisterOutputType(ProductTagMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/apiTag.go | sdk/go/azure/apimanagement/apiTag.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Assignment of an API Management API Tag to an API.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example := apimanagement.LookupServiceOutput(ctx, apimanagement.GetServiceOutputArgs{
// Name: pulumi.String("example-apim"),
// ResourceGroupName: exampleResourceGroup.Name,
// }, nil)
// exampleApi, err := apimanagement.NewApi(ctx, "example", &apimanagement.ApiArgs{
// Name: pulumi.String("example-api"),
// ResourceGroupName: exampleResourceGroup.Name,
// ApiManagementName: pulumi.String(example.ApplyT(func(example apimanagement.GetServiceResult) (*string, error) {
// return &example.Name, nil
// }).(pulumi.StringPtrOutput)),
// Revision: pulumi.String("1"),
// })
// if err != nil {
// return err
// }
// exampleTag, err := apimanagement.NewTag(ctx, "example", &apimanagement.TagArgs{
// ApiManagementId: pulumi.String(example.ApplyT(func(example apimanagement.GetServiceResult) (*string, error) {
// return &example.Id, nil
// }).(pulumi.StringPtrOutput)),
// Name: pulumi.String("example-tag"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApiTag(ctx, "example", &apimanagement.ApiTagArgs{
// ApiId: exampleApi.ID(),
// Name: exampleTag.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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management API Tags can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/apiTag:ApiTag example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/apis/api1/tags/tag1
// ```
type ApiTag struct {
pulumi.CustomResourceState
// The ID of the API Management API. Changing this forces a new API Management API Tag to be created.
ApiId pulumi.StringOutput `pulumi:"apiId"`
// The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewApiTag registers a new resource with the given unique name, arguments, and options.
func NewApiTag(ctx *pulumi.Context,
name string, args *ApiTagArgs, opts ...pulumi.ResourceOption) (*ApiTag, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiId == nil {
return nil, errors.New("invalid value for required argument 'ApiId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiTag
err := ctx.RegisterResource("azure:apimanagement/apiTag:ApiTag", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiTag gets an existing ApiTag resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiTag(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiTagState, opts ...pulumi.ResourceOption) (*ApiTag, error) {
var resource ApiTag
err := ctx.ReadResource("azure:apimanagement/apiTag:ApiTag", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiTag resources.
type apiTagState struct {
// The ID of the API Management API. Changing this forces a new API Management API Tag to be created.
ApiId *string `pulumi:"apiId"`
// The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created.
Name *string `pulumi:"name"`
}
type ApiTagState struct {
// The ID of the API Management API. Changing this forces a new API Management API Tag to be created.
ApiId pulumi.StringPtrInput
// The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created.
Name pulumi.StringPtrInput
}
func (ApiTagState) ElementType() reflect.Type {
return reflect.TypeOf((*apiTagState)(nil)).Elem()
}
type apiTagArgs struct {
// The ID of the API Management API. Changing this forces a new API Management API Tag to be created.
ApiId string `pulumi:"apiId"`
// The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a ApiTag resource.
type ApiTagArgs struct {
// The ID of the API Management API. Changing this forces a new API Management API Tag to be created.
ApiId pulumi.StringInput
// The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created.
Name pulumi.StringPtrInput
}
func (ApiTagArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiTagArgs)(nil)).Elem()
}
type ApiTagInput interface {
pulumi.Input
ToApiTagOutput() ApiTagOutput
ToApiTagOutputWithContext(ctx context.Context) ApiTagOutput
}
func (*ApiTag) ElementType() reflect.Type {
return reflect.TypeOf((**ApiTag)(nil)).Elem()
}
func (i *ApiTag) ToApiTagOutput() ApiTagOutput {
return i.ToApiTagOutputWithContext(context.Background())
}
func (i *ApiTag) ToApiTagOutputWithContext(ctx context.Context) ApiTagOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiTagOutput)
}
// ApiTagArrayInput is an input type that accepts ApiTagArray and ApiTagArrayOutput values.
// You can construct a concrete instance of `ApiTagArrayInput` via:
//
// ApiTagArray{ ApiTagArgs{...} }
type ApiTagArrayInput interface {
pulumi.Input
ToApiTagArrayOutput() ApiTagArrayOutput
ToApiTagArrayOutputWithContext(context.Context) ApiTagArrayOutput
}
type ApiTagArray []ApiTagInput
func (ApiTagArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiTag)(nil)).Elem()
}
func (i ApiTagArray) ToApiTagArrayOutput() ApiTagArrayOutput {
return i.ToApiTagArrayOutputWithContext(context.Background())
}
func (i ApiTagArray) ToApiTagArrayOutputWithContext(ctx context.Context) ApiTagArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiTagArrayOutput)
}
// ApiTagMapInput is an input type that accepts ApiTagMap and ApiTagMapOutput values.
// You can construct a concrete instance of `ApiTagMapInput` via:
//
// ApiTagMap{ "key": ApiTagArgs{...} }
type ApiTagMapInput interface {
pulumi.Input
ToApiTagMapOutput() ApiTagMapOutput
ToApiTagMapOutputWithContext(context.Context) ApiTagMapOutput
}
type ApiTagMap map[string]ApiTagInput
func (ApiTagMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiTag)(nil)).Elem()
}
func (i ApiTagMap) ToApiTagMapOutput() ApiTagMapOutput {
return i.ToApiTagMapOutputWithContext(context.Background())
}
func (i ApiTagMap) ToApiTagMapOutputWithContext(ctx context.Context) ApiTagMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiTagMapOutput)
}
type ApiTagOutput struct{ *pulumi.OutputState }
func (ApiTagOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiTag)(nil)).Elem()
}
func (o ApiTagOutput) ToApiTagOutput() ApiTagOutput {
return o
}
func (o ApiTagOutput) ToApiTagOutputWithContext(ctx context.Context) ApiTagOutput {
return o
}
// The ID of the API Management API. Changing this forces a new API Management API Tag to be created.
func (o ApiTagOutput) ApiId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiTag) pulumi.StringOutput { return v.ApiId }).(pulumi.StringOutput)
}
// The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created.
func (o ApiTagOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ApiTag) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type ApiTagArrayOutput struct{ *pulumi.OutputState }
func (ApiTagArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiTag)(nil)).Elem()
}
func (o ApiTagArrayOutput) ToApiTagArrayOutput() ApiTagArrayOutput {
return o
}
func (o ApiTagArrayOutput) ToApiTagArrayOutputWithContext(ctx context.Context) ApiTagArrayOutput {
return o
}
func (o ApiTagArrayOutput) Index(i pulumi.IntInput) ApiTagOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiTag {
return vs[0].([]*ApiTag)[vs[1].(int)]
}).(ApiTagOutput)
}
type ApiTagMapOutput struct{ *pulumi.OutputState }
func (ApiTagMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiTag)(nil)).Elem()
}
func (o ApiTagMapOutput) ToApiTagMapOutput() ApiTagMapOutput {
return o
}
func (o ApiTagMapOutput) ToApiTagMapOutputWithContext(ctx context.Context) ApiTagMapOutput {
return o
}
func (o ApiTagMapOutput) MapIndex(k pulumi.StringInput) ApiTagOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiTag {
return vs[0].(map[string]*ApiTag)[vs[1].(string)]
}).(ApiTagOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiTagInput)(nil)).Elem(), &ApiTag{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiTagArrayInput)(nil)).Elem(), ApiTagArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiTagMapInput)(nil)).Elem(), ApiTagMap{})
pulumi.RegisterOutputType(ApiTagOutput{})
pulumi.RegisterOutputType(ApiTagArrayOutput{})
pulumi.RegisterOutputType(ApiTagMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/apiTagDescription.go | sdk/go/azure/apimanagement/apiTagDescription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Tag Description within an API Management Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApi(ctx, "example", &apimanagement.ApiArgs{
// Name: pulumi.String("example-api"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// Revision: pulumi.String("1"),
// DisplayName: pulumi.String("Example API"),
// Path: pulumi.String("example"),
// Protocols: pulumi.StringArray{
// pulumi.String("https"),
// },
// Import: &apimanagement.ApiImportArgs{
// ContentFormat: pulumi.String("swagger-link-json"),
// ContentValue: pulumi.String("https://raw.githubusercontent.com/hashicorp/terraform-provider-azurerm/refs/heads/main/internal/services/apimanagement/testdata/api_management_api_swagger.json"),
// },
// })
// if err != nil {
// return err
// }
// exampleTag, err := apimanagement.NewTag(ctx, "example", &apimanagement.TagArgs{
// ApiManagementId: exampleService.ID(),
// Name: pulumi.String("example-Tag"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApiTagDescription(ctx, "example", &apimanagement.ApiTagDescriptionArgs{
// ApiTagId: exampleTag.ID(),
// Description: pulumi.String("This is an example description"),
// ExternalDocsUrl: "https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs",
// ExternalDocsDescription: "This is an example external docs 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management API Schema's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/apiTagDescription:ApiTagDescription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/tagDescriptions/tagDescriptionId1
// ```
type ApiTagDescription struct {
pulumi.CustomResourceState
// The The ID of the API Management API Tag. Changing this forces a new API Management API Tag Description to be created.
ApiTagId pulumi.StringOutput `pulumi:"apiTagId"`
// The description of the Tag.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The description of the external documentation resources describing the tag.
ExternalDocumentationDescription pulumi.StringPtrOutput `pulumi:"externalDocumentationDescription"`
// The URL of external documentation resources describing the tag.
ExternalDocumentationUrl pulumi.StringPtrOutput `pulumi:"externalDocumentationUrl"`
}
// NewApiTagDescription registers a new resource with the given unique name, arguments, and options.
func NewApiTagDescription(ctx *pulumi.Context,
name string, args *ApiTagDescriptionArgs, opts ...pulumi.ResourceOption) (*ApiTagDescription, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiTagId == nil {
return nil, errors.New("invalid value for required argument 'ApiTagId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiTagDescription
err := ctx.RegisterResource("azure:apimanagement/apiTagDescription:ApiTagDescription", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiTagDescription gets an existing ApiTagDescription resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiTagDescription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiTagDescriptionState, opts ...pulumi.ResourceOption) (*ApiTagDescription, error) {
var resource ApiTagDescription
err := ctx.ReadResource("azure:apimanagement/apiTagDescription:ApiTagDescription", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiTagDescription resources.
type apiTagDescriptionState struct {
// The The ID of the API Management API Tag. Changing this forces a new API Management API Tag Description to be created.
ApiTagId *string `pulumi:"apiTagId"`
// The description of the Tag.
Description *string `pulumi:"description"`
// The description of the external documentation resources describing the tag.
ExternalDocumentationDescription *string `pulumi:"externalDocumentationDescription"`
// The URL of external documentation resources describing the tag.
ExternalDocumentationUrl *string `pulumi:"externalDocumentationUrl"`
}
type ApiTagDescriptionState struct {
// The The ID of the API Management API Tag. Changing this forces a new API Management API Tag Description to be created.
ApiTagId pulumi.StringPtrInput
// The description of the Tag.
Description pulumi.StringPtrInput
// The description of the external documentation resources describing the tag.
ExternalDocumentationDescription pulumi.StringPtrInput
// The URL of external documentation resources describing the tag.
ExternalDocumentationUrl pulumi.StringPtrInput
}
func (ApiTagDescriptionState) ElementType() reflect.Type {
return reflect.TypeOf((*apiTagDescriptionState)(nil)).Elem()
}
type apiTagDescriptionArgs struct {
// The The ID of the API Management API Tag. Changing this forces a new API Management API Tag Description to be created.
ApiTagId string `pulumi:"apiTagId"`
// The description of the Tag.
Description *string `pulumi:"description"`
// The description of the external documentation resources describing the tag.
ExternalDocumentationDescription *string `pulumi:"externalDocumentationDescription"`
// The URL of external documentation resources describing the tag.
ExternalDocumentationUrl *string `pulumi:"externalDocumentationUrl"`
}
// The set of arguments for constructing a ApiTagDescription resource.
type ApiTagDescriptionArgs struct {
// The The ID of the API Management API Tag. Changing this forces a new API Management API Tag Description to be created.
ApiTagId pulumi.StringInput
// The description of the Tag.
Description pulumi.StringPtrInput
// The description of the external documentation resources describing the tag.
ExternalDocumentationDescription pulumi.StringPtrInput
// The URL of external documentation resources describing the tag.
ExternalDocumentationUrl pulumi.StringPtrInput
}
func (ApiTagDescriptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiTagDescriptionArgs)(nil)).Elem()
}
type ApiTagDescriptionInput interface {
pulumi.Input
ToApiTagDescriptionOutput() ApiTagDescriptionOutput
ToApiTagDescriptionOutputWithContext(ctx context.Context) ApiTagDescriptionOutput
}
func (*ApiTagDescription) ElementType() reflect.Type {
return reflect.TypeOf((**ApiTagDescription)(nil)).Elem()
}
func (i *ApiTagDescription) ToApiTagDescriptionOutput() ApiTagDescriptionOutput {
return i.ToApiTagDescriptionOutputWithContext(context.Background())
}
func (i *ApiTagDescription) ToApiTagDescriptionOutputWithContext(ctx context.Context) ApiTagDescriptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiTagDescriptionOutput)
}
// ApiTagDescriptionArrayInput is an input type that accepts ApiTagDescriptionArray and ApiTagDescriptionArrayOutput values.
// You can construct a concrete instance of `ApiTagDescriptionArrayInput` via:
//
// ApiTagDescriptionArray{ ApiTagDescriptionArgs{...} }
type ApiTagDescriptionArrayInput interface {
pulumi.Input
ToApiTagDescriptionArrayOutput() ApiTagDescriptionArrayOutput
ToApiTagDescriptionArrayOutputWithContext(context.Context) ApiTagDescriptionArrayOutput
}
type ApiTagDescriptionArray []ApiTagDescriptionInput
func (ApiTagDescriptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiTagDescription)(nil)).Elem()
}
func (i ApiTagDescriptionArray) ToApiTagDescriptionArrayOutput() ApiTagDescriptionArrayOutput {
return i.ToApiTagDescriptionArrayOutputWithContext(context.Background())
}
func (i ApiTagDescriptionArray) ToApiTagDescriptionArrayOutputWithContext(ctx context.Context) ApiTagDescriptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiTagDescriptionArrayOutput)
}
// ApiTagDescriptionMapInput is an input type that accepts ApiTagDescriptionMap and ApiTagDescriptionMapOutput values.
// You can construct a concrete instance of `ApiTagDescriptionMapInput` via:
//
// ApiTagDescriptionMap{ "key": ApiTagDescriptionArgs{...} }
type ApiTagDescriptionMapInput interface {
pulumi.Input
ToApiTagDescriptionMapOutput() ApiTagDescriptionMapOutput
ToApiTagDescriptionMapOutputWithContext(context.Context) ApiTagDescriptionMapOutput
}
type ApiTagDescriptionMap map[string]ApiTagDescriptionInput
func (ApiTagDescriptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiTagDescription)(nil)).Elem()
}
func (i ApiTagDescriptionMap) ToApiTagDescriptionMapOutput() ApiTagDescriptionMapOutput {
return i.ToApiTagDescriptionMapOutputWithContext(context.Background())
}
func (i ApiTagDescriptionMap) ToApiTagDescriptionMapOutputWithContext(ctx context.Context) ApiTagDescriptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiTagDescriptionMapOutput)
}
type ApiTagDescriptionOutput struct{ *pulumi.OutputState }
func (ApiTagDescriptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiTagDescription)(nil)).Elem()
}
func (o ApiTagDescriptionOutput) ToApiTagDescriptionOutput() ApiTagDescriptionOutput {
return o
}
func (o ApiTagDescriptionOutput) ToApiTagDescriptionOutputWithContext(ctx context.Context) ApiTagDescriptionOutput {
return o
}
// The The ID of the API Management API Tag. Changing this forces a new API Management API Tag Description to be created.
func (o ApiTagDescriptionOutput) ApiTagId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiTagDescription) pulumi.StringOutput { return v.ApiTagId }).(pulumi.StringOutput)
}
// The description of the Tag.
func (o ApiTagDescriptionOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiTagDescription) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The description of the external documentation resources describing the tag.
func (o ApiTagDescriptionOutput) ExternalDocumentationDescription() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiTagDescription) pulumi.StringPtrOutput { return v.ExternalDocumentationDescription }).(pulumi.StringPtrOutput)
}
// The URL of external documentation resources describing the tag.
func (o ApiTagDescriptionOutput) ExternalDocumentationUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiTagDescription) pulumi.StringPtrOutput { return v.ExternalDocumentationUrl }).(pulumi.StringPtrOutput)
}
type ApiTagDescriptionArrayOutput struct{ *pulumi.OutputState }
func (ApiTagDescriptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiTagDescription)(nil)).Elem()
}
func (o ApiTagDescriptionArrayOutput) ToApiTagDescriptionArrayOutput() ApiTagDescriptionArrayOutput {
return o
}
func (o ApiTagDescriptionArrayOutput) ToApiTagDescriptionArrayOutputWithContext(ctx context.Context) ApiTagDescriptionArrayOutput {
return o
}
func (o ApiTagDescriptionArrayOutput) Index(i pulumi.IntInput) ApiTagDescriptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiTagDescription {
return vs[0].([]*ApiTagDescription)[vs[1].(int)]
}).(ApiTagDescriptionOutput)
}
type ApiTagDescriptionMapOutput struct{ *pulumi.OutputState }
func (ApiTagDescriptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiTagDescription)(nil)).Elem()
}
func (o ApiTagDescriptionMapOutput) ToApiTagDescriptionMapOutput() ApiTagDescriptionMapOutput {
return o
}
func (o ApiTagDescriptionMapOutput) ToApiTagDescriptionMapOutputWithContext(ctx context.Context) ApiTagDescriptionMapOutput {
return o
}
func (o ApiTagDescriptionMapOutput) MapIndex(k pulumi.StringInput) ApiTagDescriptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiTagDescription {
return vs[0].(map[string]*ApiTagDescription)[vs[1].(string)]
}).(ApiTagDescriptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiTagDescriptionInput)(nil)).Elem(), &ApiTagDescription{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiTagDescriptionArrayInput)(nil)).Elem(), ApiTagDescriptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiTagDescriptionMapInput)(nil)).Elem(), ApiTagDescriptionMap{})
pulumi.RegisterOutputType(ApiTagDescriptionOutput{})
pulumi.RegisterOutputType(ApiTagDescriptionArrayOutput{})
pulumi.RegisterOutputType(ApiTagDescriptionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/workspaceApiVersionSet.go | sdk/go/azure/apimanagement/workspaceApiVersionSet.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Version Set within an API Management Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("Example Publisher"),
// PublisherEmail: pulumi.String("publisher@example.com"),
// SkuName: pulumi.String("Premium_1"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := apimanagement.NewWorkspace(ctx, "example", &apimanagement.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// ApiManagementId: exampleService.ID(),
// DisplayName: pulumi.String("Example Workspace"),
// Description: pulumi.String("Example workspace for development"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewWorkspaceApiVersionSet(ctx, "example", &apimanagement.WorkspaceApiVersionSetArgs{
// Name: pulumi.String("example-version-set"),
// ApiManagementWorkspaceId: exampleWorkspace.ID(),
// DisplayName: pulumi.String("Example API Version Set"),
// VersioningScheme: pulumi.String("Segment"),
// })
// 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.ApiManagement` - 2024-05-01
//
// ## Import
//
// API Management Workspace API Version Sets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/workspaceApiVersionSet:WorkspaceApiVersionSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/workspaces/workspace1/apiVersionSets/set1
// ```
type WorkspaceApiVersionSet struct {
pulumi.CustomResourceState
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringOutput `pulumi:"apiManagementWorkspaceId"`
// Specifies the description of the API Management Workspace API Version Set.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the display name of the API Management Workspace API Version Set.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Specifies the name of the API Management Workspace API Version Set. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the header to read from inbound requests to determine the API version.
VersionHeaderName pulumi.StringPtrOutput `pulumi:"versionHeaderName"`
// Specifies the name of the query string parameter to read from inbound requests to determine the API version.
VersionQueryName pulumi.StringPtrOutput `pulumi:"versionQueryName"`
// Specifies where in a request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme pulumi.StringOutput `pulumi:"versioningScheme"`
}
// NewWorkspaceApiVersionSet registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceApiVersionSet(ctx *pulumi.Context,
name string, args *WorkspaceApiVersionSetArgs, opts ...pulumi.ResourceOption) (*WorkspaceApiVersionSet, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementWorkspaceId'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.VersioningScheme == nil {
return nil, errors.New("invalid value for required argument 'VersioningScheme'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceApiVersionSet
err := ctx.RegisterResource("azure:apimanagement/workspaceApiVersionSet:WorkspaceApiVersionSet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceApiVersionSet gets an existing WorkspaceApiVersionSet resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceApiVersionSet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceApiVersionSetState, opts ...pulumi.ResourceOption) (*WorkspaceApiVersionSet, error) {
var resource WorkspaceApiVersionSet
err := ctx.ReadResource("azure:apimanagement/workspaceApiVersionSet:WorkspaceApiVersionSet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceApiVersionSet resources.
type workspaceApiVersionSetState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId *string `pulumi:"apiManagementWorkspaceId"`
// Specifies the description of the API Management Workspace API Version Set.
Description *string `pulumi:"description"`
// Specifies the display name of the API Management Workspace API Version Set.
DisplayName *string `pulumi:"displayName"`
// Specifies the name of the API Management Workspace API Version Set. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the header to read from inbound requests to determine the API version.
VersionHeaderName *string `pulumi:"versionHeaderName"`
// Specifies the name of the query string parameter to read from inbound requests to determine the API version.
VersionQueryName *string `pulumi:"versionQueryName"`
// Specifies where in a request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme *string `pulumi:"versioningScheme"`
}
type WorkspaceApiVersionSetState struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringPtrInput
// Specifies the description of the API Management Workspace API Version Set.
Description pulumi.StringPtrInput
// Specifies the display name of the API Management Workspace API Version Set.
DisplayName pulumi.StringPtrInput
// Specifies the name of the API Management Workspace API Version Set. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the header to read from inbound requests to determine the API version.
VersionHeaderName pulumi.StringPtrInput
// Specifies the name of the query string parameter to read from inbound requests to determine the API version.
VersionQueryName pulumi.StringPtrInput
// Specifies where in a request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme pulumi.StringPtrInput
}
func (WorkspaceApiVersionSetState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceApiVersionSetState)(nil)).Elem()
}
type workspaceApiVersionSetArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId string `pulumi:"apiManagementWorkspaceId"`
// Specifies the description of the API Management Workspace API Version Set.
Description *string `pulumi:"description"`
// Specifies the display name of the API Management Workspace API Version Set.
DisplayName string `pulumi:"displayName"`
// Specifies the name of the API Management Workspace API Version Set. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the header to read from inbound requests to determine the API version.
VersionHeaderName *string `pulumi:"versionHeaderName"`
// Specifies the name of the query string parameter to read from inbound requests to determine the API version.
VersionQueryName *string `pulumi:"versionQueryName"`
// Specifies where in a request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme string `pulumi:"versioningScheme"`
}
// The set of arguments for constructing a WorkspaceApiVersionSet resource.
type WorkspaceApiVersionSetArgs struct {
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
ApiManagementWorkspaceId pulumi.StringInput
// Specifies the description of the API Management Workspace API Version Set.
Description pulumi.StringPtrInput
// Specifies the display name of the API Management Workspace API Version Set.
DisplayName pulumi.StringInput
// Specifies the name of the API Management Workspace API Version Set. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the header to read from inbound requests to determine the API version.
VersionHeaderName pulumi.StringPtrInput
// Specifies the name of the query string parameter to read from inbound requests to determine the API version.
VersionQueryName pulumi.StringPtrInput
// Specifies where in a request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
VersioningScheme pulumi.StringInput
}
func (WorkspaceApiVersionSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceApiVersionSetArgs)(nil)).Elem()
}
type WorkspaceApiVersionSetInput interface {
pulumi.Input
ToWorkspaceApiVersionSetOutput() WorkspaceApiVersionSetOutput
ToWorkspaceApiVersionSetOutputWithContext(ctx context.Context) WorkspaceApiVersionSetOutput
}
func (*WorkspaceApiVersionSet) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceApiVersionSet)(nil)).Elem()
}
func (i *WorkspaceApiVersionSet) ToWorkspaceApiVersionSetOutput() WorkspaceApiVersionSetOutput {
return i.ToWorkspaceApiVersionSetOutputWithContext(context.Background())
}
func (i *WorkspaceApiVersionSet) ToWorkspaceApiVersionSetOutputWithContext(ctx context.Context) WorkspaceApiVersionSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceApiVersionSetOutput)
}
// WorkspaceApiVersionSetArrayInput is an input type that accepts WorkspaceApiVersionSetArray and WorkspaceApiVersionSetArrayOutput values.
// You can construct a concrete instance of `WorkspaceApiVersionSetArrayInput` via:
//
// WorkspaceApiVersionSetArray{ WorkspaceApiVersionSetArgs{...} }
type WorkspaceApiVersionSetArrayInput interface {
pulumi.Input
ToWorkspaceApiVersionSetArrayOutput() WorkspaceApiVersionSetArrayOutput
ToWorkspaceApiVersionSetArrayOutputWithContext(context.Context) WorkspaceApiVersionSetArrayOutput
}
type WorkspaceApiVersionSetArray []WorkspaceApiVersionSetInput
func (WorkspaceApiVersionSetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceApiVersionSet)(nil)).Elem()
}
func (i WorkspaceApiVersionSetArray) ToWorkspaceApiVersionSetArrayOutput() WorkspaceApiVersionSetArrayOutput {
return i.ToWorkspaceApiVersionSetArrayOutputWithContext(context.Background())
}
func (i WorkspaceApiVersionSetArray) ToWorkspaceApiVersionSetArrayOutputWithContext(ctx context.Context) WorkspaceApiVersionSetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceApiVersionSetArrayOutput)
}
// WorkspaceApiVersionSetMapInput is an input type that accepts WorkspaceApiVersionSetMap and WorkspaceApiVersionSetMapOutput values.
// You can construct a concrete instance of `WorkspaceApiVersionSetMapInput` via:
//
// WorkspaceApiVersionSetMap{ "key": WorkspaceApiVersionSetArgs{...} }
type WorkspaceApiVersionSetMapInput interface {
pulumi.Input
ToWorkspaceApiVersionSetMapOutput() WorkspaceApiVersionSetMapOutput
ToWorkspaceApiVersionSetMapOutputWithContext(context.Context) WorkspaceApiVersionSetMapOutput
}
type WorkspaceApiVersionSetMap map[string]WorkspaceApiVersionSetInput
func (WorkspaceApiVersionSetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceApiVersionSet)(nil)).Elem()
}
func (i WorkspaceApiVersionSetMap) ToWorkspaceApiVersionSetMapOutput() WorkspaceApiVersionSetMapOutput {
return i.ToWorkspaceApiVersionSetMapOutputWithContext(context.Background())
}
func (i WorkspaceApiVersionSetMap) ToWorkspaceApiVersionSetMapOutputWithContext(ctx context.Context) WorkspaceApiVersionSetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceApiVersionSetMapOutput)
}
type WorkspaceApiVersionSetOutput struct{ *pulumi.OutputState }
func (WorkspaceApiVersionSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceApiVersionSet)(nil)).Elem()
}
func (o WorkspaceApiVersionSetOutput) ToWorkspaceApiVersionSetOutput() WorkspaceApiVersionSetOutput {
return o
}
func (o WorkspaceApiVersionSetOutput) ToWorkspaceApiVersionSetOutputWithContext(ctx context.Context) WorkspaceApiVersionSetOutput {
return o
}
// Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created.
func (o WorkspaceApiVersionSetOutput) ApiManagementWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceApiVersionSet) pulumi.StringOutput { return v.ApiManagementWorkspaceId }).(pulumi.StringOutput)
}
// Specifies the description of the API Management Workspace API Version Set.
func (o WorkspaceApiVersionSetOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceApiVersionSet) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the display name of the API Management Workspace API Version Set.
func (o WorkspaceApiVersionSetOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceApiVersionSet) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Specifies the name of the API Management Workspace API Version Set. Changing this forces a new resource to be created.
func (o WorkspaceApiVersionSetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceApiVersionSet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the header to read from inbound requests to determine the API version.
func (o WorkspaceApiVersionSetOutput) VersionHeaderName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceApiVersionSet) pulumi.StringPtrOutput { return v.VersionHeaderName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the query string parameter to read from inbound requests to determine the API version.
func (o WorkspaceApiVersionSetOutput) VersionQueryName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceApiVersionSet) pulumi.StringPtrOutput { return v.VersionQueryName }).(pulumi.StringPtrOutput)
}
// Specifies where in a request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`.
func (o WorkspaceApiVersionSetOutput) VersioningScheme() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceApiVersionSet) pulumi.StringOutput { return v.VersioningScheme }).(pulumi.StringOutput)
}
type WorkspaceApiVersionSetArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceApiVersionSetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceApiVersionSet)(nil)).Elem()
}
func (o WorkspaceApiVersionSetArrayOutput) ToWorkspaceApiVersionSetArrayOutput() WorkspaceApiVersionSetArrayOutput {
return o
}
func (o WorkspaceApiVersionSetArrayOutput) ToWorkspaceApiVersionSetArrayOutputWithContext(ctx context.Context) WorkspaceApiVersionSetArrayOutput {
return o
}
func (o WorkspaceApiVersionSetArrayOutput) Index(i pulumi.IntInput) WorkspaceApiVersionSetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceApiVersionSet {
return vs[0].([]*WorkspaceApiVersionSet)[vs[1].(int)]
}).(WorkspaceApiVersionSetOutput)
}
type WorkspaceApiVersionSetMapOutput struct{ *pulumi.OutputState }
func (WorkspaceApiVersionSetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceApiVersionSet)(nil)).Elem()
}
func (o WorkspaceApiVersionSetMapOutput) ToWorkspaceApiVersionSetMapOutput() WorkspaceApiVersionSetMapOutput {
return o
}
func (o WorkspaceApiVersionSetMapOutput) ToWorkspaceApiVersionSetMapOutputWithContext(ctx context.Context) WorkspaceApiVersionSetMapOutput {
return o
}
func (o WorkspaceApiVersionSetMapOutput) MapIndex(k pulumi.StringInput) WorkspaceApiVersionSetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceApiVersionSet {
return vs[0].(map[string]*WorkspaceApiVersionSet)[vs[1].(string)]
}).(WorkspaceApiVersionSetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceApiVersionSetInput)(nil)).Elem(), &WorkspaceApiVersionSet{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceApiVersionSetArrayInput)(nil)).Elem(), WorkspaceApiVersionSetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceApiVersionSetMapInput)(nil)).Elem(), WorkspaceApiVersionSetMap{})
pulumi.RegisterOutputType(WorkspaceApiVersionSetOutput{})
pulumi.RegisterOutputType(WorkspaceApiVersionSetArrayOutput{})
pulumi.RegisterOutputType(WorkspaceApiVersionSetMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/standaloneGateway.go | sdk/go/azure/apimanagement/standaloneGateway.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
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 API Management Standalone Gateway.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("apim-delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Web/serverFarms"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewStandaloneGateway(ctx, "example", &apimanagement.StandaloneGatewayArgs{
// Name: pulumi.String("example-gateway-flexible"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualNetworkType: pulumi.String("External"),
// BackendSubnetId: exampleSubnet.ID(),
// Sku: &apimanagement.StandaloneGatewaySkuArgs{
// Capacity: pulumi.Int(1),
// Name: pulumi.String("WorkspaceGatewayPremium"),
// },
// Tags: pulumi.StringMap{
// "Hello": pulumi.String("World"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2024-05-01
//
// ## Import
//
// API Management Standalone Gateway can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/standaloneGateway:StandaloneGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/gateways/gateway1
// ```
type StandaloneGateway struct {
pulumi.CustomResourceState
// Specifies the subnet ID in which the backend systems are hosted. Changing this forces a new resource to be created.
BackendSubnetId pulumi.StringPtrOutput `pulumi:"backendSubnetId"`
// Specifies the Azure Region where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this API Management Standalone Gateway. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the Resource Group where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `sku` block as defined below.
Sku StandaloneGatewaySkuOutput `pulumi:"sku"`
// A mapping of tags which should be assigned to the API Management Standalone Gateway. Changing this forces a new resource to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies the type of VPN in which API Management gateway needs to be configured. Possible values are `External` and `Internal`. Changing this forces a new resource to be created.
VirtualNetworkType pulumi.StringPtrOutput `pulumi:"virtualNetworkType"`
}
// NewStandaloneGateway registers a new resource with the given unique name, arguments, and options.
func NewStandaloneGateway(ctx *pulumi.Context,
name string, args *StandaloneGatewayArgs, opts ...pulumi.ResourceOption) (*StandaloneGateway, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource StandaloneGateway
err := ctx.RegisterResource("azure:apimanagement/standaloneGateway:StandaloneGateway", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStandaloneGateway gets an existing StandaloneGateway resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetStandaloneGateway(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StandaloneGatewayState, opts ...pulumi.ResourceOption) (*StandaloneGateway, error) {
var resource StandaloneGateway
err := ctx.ReadResource("azure:apimanagement/standaloneGateway:StandaloneGateway", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StandaloneGateway resources.
type standaloneGatewayState struct {
// Specifies the subnet ID in which the backend systems are hosted. Changing this forces a new resource to be created.
BackendSubnetId *string `pulumi:"backendSubnetId"`
// Specifies the Azure Region where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this API Management Standalone Gateway. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `sku` block as defined below.
Sku *StandaloneGatewaySku `pulumi:"sku"`
// A mapping of tags which should be assigned to the API Management Standalone Gateway. Changing this forces a new resource to be created.
Tags map[string]string `pulumi:"tags"`
// Specifies the type of VPN in which API Management gateway needs to be configured. Possible values are `External` and `Internal`. Changing this forces a new resource to be created.
VirtualNetworkType *string `pulumi:"virtualNetworkType"`
}
type StandaloneGatewayState struct {
// Specifies the subnet ID in which the backend systems are hosted. Changing this forces a new resource to be created.
BackendSubnetId pulumi.StringPtrInput
// Specifies the Azure Region where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this API Management Standalone Gateway. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `sku` block as defined below.
Sku StandaloneGatewaySkuPtrInput
// A mapping of tags which should be assigned to the API Management Standalone Gateway. Changing this forces a new resource to be created.
Tags pulumi.StringMapInput
// Specifies the type of VPN in which API Management gateway needs to be configured. Possible values are `External` and `Internal`. Changing this forces a new resource to be created.
VirtualNetworkType pulumi.StringPtrInput
}
func (StandaloneGatewayState) ElementType() reflect.Type {
return reflect.TypeOf((*standaloneGatewayState)(nil)).Elem()
}
type standaloneGatewayArgs struct {
// Specifies the subnet ID in which the backend systems are hosted. Changing this forces a new resource to be created.
BackendSubnetId *string `pulumi:"backendSubnetId"`
// Specifies the Azure Region where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this API Management Standalone Gateway. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `sku` block as defined below.
Sku StandaloneGatewaySku `pulumi:"sku"`
// A mapping of tags which should be assigned to the API Management Standalone Gateway. Changing this forces a new resource to be created.
Tags map[string]string `pulumi:"tags"`
// Specifies the type of VPN in which API Management gateway needs to be configured. Possible values are `External` and `Internal`. Changing this forces a new resource to be created.
VirtualNetworkType *string `pulumi:"virtualNetworkType"`
}
// The set of arguments for constructing a StandaloneGateway resource.
type StandaloneGatewayArgs struct {
// Specifies the subnet ID in which the backend systems are hosted. Changing this forces a new resource to be created.
BackendSubnetId pulumi.StringPtrInput
// Specifies the Azure Region where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this API Management Standalone Gateway. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `sku` block as defined below.
Sku StandaloneGatewaySkuInput
// A mapping of tags which should be assigned to the API Management Standalone Gateway. Changing this forces a new resource to be created.
Tags pulumi.StringMapInput
// Specifies the type of VPN in which API Management gateway needs to be configured. Possible values are `External` and `Internal`. Changing this forces a new resource to be created.
VirtualNetworkType pulumi.StringPtrInput
}
func (StandaloneGatewayArgs) ElementType() reflect.Type {
return reflect.TypeOf((*standaloneGatewayArgs)(nil)).Elem()
}
type StandaloneGatewayInput interface {
pulumi.Input
ToStandaloneGatewayOutput() StandaloneGatewayOutput
ToStandaloneGatewayOutputWithContext(ctx context.Context) StandaloneGatewayOutput
}
func (*StandaloneGateway) ElementType() reflect.Type {
return reflect.TypeOf((**StandaloneGateway)(nil)).Elem()
}
func (i *StandaloneGateway) ToStandaloneGatewayOutput() StandaloneGatewayOutput {
return i.ToStandaloneGatewayOutputWithContext(context.Background())
}
func (i *StandaloneGateway) ToStandaloneGatewayOutputWithContext(ctx context.Context) StandaloneGatewayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StandaloneGatewayOutput)
}
// StandaloneGatewayArrayInput is an input type that accepts StandaloneGatewayArray and StandaloneGatewayArrayOutput values.
// You can construct a concrete instance of `StandaloneGatewayArrayInput` via:
//
// StandaloneGatewayArray{ StandaloneGatewayArgs{...} }
type StandaloneGatewayArrayInput interface {
pulumi.Input
ToStandaloneGatewayArrayOutput() StandaloneGatewayArrayOutput
ToStandaloneGatewayArrayOutputWithContext(context.Context) StandaloneGatewayArrayOutput
}
type StandaloneGatewayArray []StandaloneGatewayInput
func (StandaloneGatewayArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StandaloneGateway)(nil)).Elem()
}
func (i StandaloneGatewayArray) ToStandaloneGatewayArrayOutput() StandaloneGatewayArrayOutput {
return i.ToStandaloneGatewayArrayOutputWithContext(context.Background())
}
func (i StandaloneGatewayArray) ToStandaloneGatewayArrayOutputWithContext(ctx context.Context) StandaloneGatewayArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StandaloneGatewayArrayOutput)
}
// StandaloneGatewayMapInput is an input type that accepts StandaloneGatewayMap and StandaloneGatewayMapOutput values.
// You can construct a concrete instance of `StandaloneGatewayMapInput` via:
//
// StandaloneGatewayMap{ "key": StandaloneGatewayArgs{...} }
type StandaloneGatewayMapInput interface {
pulumi.Input
ToStandaloneGatewayMapOutput() StandaloneGatewayMapOutput
ToStandaloneGatewayMapOutputWithContext(context.Context) StandaloneGatewayMapOutput
}
type StandaloneGatewayMap map[string]StandaloneGatewayInput
func (StandaloneGatewayMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StandaloneGateway)(nil)).Elem()
}
func (i StandaloneGatewayMap) ToStandaloneGatewayMapOutput() StandaloneGatewayMapOutput {
return i.ToStandaloneGatewayMapOutputWithContext(context.Background())
}
func (i StandaloneGatewayMap) ToStandaloneGatewayMapOutputWithContext(ctx context.Context) StandaloneGatewayMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StandaloneGatewayMapOutput)
}
type StandaloneGatewayOutput struct{ *pulumi.OutputState }
func (StandaloneGatewayOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StandaloneGateway)(nil)).Elem()
}
func (o StandaloneGatewayOutput) ToStandaloneGatewayOutput() StandaloneGatewayOutput {
return o
}
func (o StandaloneGatewayOutput) ToStandaloneGatewayOutputWithContext(ctx context.Context) StandaloneGatewayOutput {
return o
}
// Specifies the subnet ID in which the backend systems are hosted. Changing this forces a new resource to be created.
func (o StandaloneGatewayOutput) BackendSubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StandaloneGateway) pulumi.StringPtrOutput { return v.BackendSubnetId }).(pulumi.StringPtrOutput)
}
// Specifies the Azure Region where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
func (o StandaloneGatewayOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *StandaloneGateway) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this API Management Standalone Gateway. Changing this forces a new resource to be created.
func (o StandaloneGatewayOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *StandaloneGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group where the API Management Standalone Gateway should exist. Changing this forces a new resource to be created.
func (o StandaloneGatewayOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *StandaloneGateway) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `sku` block as defined below.
func (o StandaloneGatewayOutput) Sku() StandaloneGatewaySkuOutput {
return o.ApplyT(func(v *StandaloneGateway) StandaloneGatewaySkuOutput { return v.Sku }).(StandaloneGatewaySkuOutput)
}
// A mapping of tags which should be assigned to the API Management Standalone Gateway. Changing this forces a new resource to be created.
func (o StandaloneGatewayOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *StandaloneGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Specifies the type of VPN in which API Management gateway needs to be configured. Possible values are `External` and `Internal`. Changing this forces a new resource to be created.
func (o StandaloneGatewayOutput) VirtualNetworkType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StandaloneGateway) pulumi.StringPtrOutput { return v.VirtualNetworkType }).(pulumi.StringPtrOutput)
}
type StandaloneGatewayArrayOutput struct{ *pulumi.OutputState }
func (StandaloneGatewayArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StandaloneGateway)(nil)).Elem()
}
func (o StandaloneGatewayArrayOutput) ToStandaloneGatewayArrayOutput() StandaloneGatewayArrayOutput {
return o
}
func (o StandaloneGatewayArrayOutput) ToStandaloneGatewayArrayOutputWithContext(ctx context.Context) StandaloneGatewayArrayOutput {
return o
}
func (o StandaloneGatewayArrayOutput) Index(i pulumi.IntInput) StandaloneGatewayOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StandaloneGateway {
return vs[0].([]*StandaloneGateway)[vs[1].(int)]
}).(StandaloneGatewayOutput)
}
type StandaloneGatewayMapOutput struct{ *pulumi.OutputState }
func (StandaloneGatewayMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StandaloneGateway)(nil)).Elem()
}
func (o StandaloneGatewayMapOutput) ToStandaloneGatewayMapOutput() StandaloneGatewayMapOutput {
return o
}
func (o StandaloneGatewayMapOutput) ToStandaloneGatewayMapOutputWithContext(ctx context.Context) StandaloneGatewayMapOutput {
return o
}
func (o StandaloneGatewayMapOutput) MapIndex(k pulumi.StringInput) StandaloneGatewayOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StandaloneGateway {
return vs[0].(map[string]*StandaloneGateway)[vs[1].(string)]
}).(StandaloneGatewayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StandaloneGatewayInput)(nil)).Elem(), &StandaloneGateway{})
pulumi.RegisterInputType(reflect.TypeOf((*StandaloneGatewayArrayInput)(nil)).Elem(), StandaloneGatewayArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StandaloneGatewayMapInput)(nil)).Elem(), StandaloneGatewayMap{})
pulumi.RegisterOutputType(StandaloneGatewayOutput{})
pulumi.RegisterOutputType(StandaloneGatewayArrayOutput{})
pulumi.RegisterOutputType(StandaloneGatewayMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/apiDiagnostic.go | sdk/go/azure/apimanagement/apiDiagnostic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management Service API Diagnostics Logs.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example-appinsights"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@mycompany.io"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// exampleApi, err := apimanagement.NewApi(ctx, "example", &apimanagement.ApiArgs{
// Name: pulumi.String("example-api"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// Revision: pulumi.String("1"),
// DisplayName: pulumi.String("Example API"),
// Path: pulumi.String("example"),
// Protocols: pulumi.StringArray{
// pulumi.String("https"),
// },
// Import: &apimanagement.ApiImportArgs{
// ContentFormat: pulumi.String("swagger-link-json"),
// ContentValue: pulumi.String("https://raw.githubusercontent.com/hashicorp/terraform-provider-azurerm/refs/heads/main/internal/services/apimanagement/testdata/api_management_api_swagger.json"),
// },
// })
// if err != nil {
// return err
// }
// exampleLogger, err := apimanagement.NewLogger(ctx, "example", &apimanagement.LoggerArgs{
// Name: pulumi.String("example-apimlogger"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// ApplicationInsights: &apimanagement.LoggerApplicationInsightsArgs{
// InstrumentationKey: exampleInsights.InstrumentationKey,
// },
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewApiDiagnostic(ctx, "example", &apimanagement.ApiDiagnosticArgs{
// Identifier: pulumi.String("applicationinsights"),
// ResourceGroupName: example.Name,
// ApiManagementName: exampleService.Name,
// ApiName: exampleApi.Name,
// ApiManagementLoggerId: exampleLogger.ID(),
// SamplingPercentage: pulumi.Float64(5),
// AlwaysLogErrors: pulumi.Bool(true),
// LogClientIp: pulumi.Bool(true),
// Verbosity: pulumi.String("verbose"),
// HttpCorrelationProtocol: pulumi.String("W3C"),
// FrontendRequest: &apimanagement.ApiDiagnosticFrontendRequestArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("accept"),
// pulumi.String("origin"),
// },
// },
// FrontendResponse: &apimanagement.ApiDiagnosticFrontendResponseArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("content-length"),
// pulumi.String("origin"),
// },
// },
// BackendRequest: &apimanagement.ApiDiagnosticBackendRequestArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("accept"),
// pulumi.String("origin"),
// },
// },
// BackendResponse: &apimanagement.ApiDiagnosticBackendResponseArgs{
// BodyBytes: pulumi.Int(32),
// HeadersToLogs: pulumi.StringArray{
// pulumi.String("content-type"),
// pulumi.String("content-length"),
// pulumi.String("origin"),
// },
// },
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Service API Diagnostics Logs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/apiDiagnostic:ApiDiagnostic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/diagnostics/diagnostic1
// ```
type ApiDiagnostic struct {
pulumi.CustomResourceState
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors pulumi.BoolOutput `pulumi:"alwaysLogErrors"`
// The ID (name) of the Diagnostics Logger.
ApiManagementLoggerId pulumi.StringOutput `pulumi:"apiManagementLoggerId"`
// The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiName pulumi.StringOutput `pulumi:"apiName"`
// A `backendRequest` block as defined below.
BackendRequest ApiDiagnosticBackendRequestOutput `pulumi:"backendRequest"`
// A `backendResponse` block as defined below.
BackendResponse ApiDiagnosticBackendResponseOutput `pulumi:"backendResponse"`
// A `frontendRequest` block as defined below.
FrontendRequest ApiDiagnosticFrontendRequestOutput `pulumi:"frontendRequest"`
// A `frontendResponse` block as defined below.
FrontendResponse ApiDiagnosticFrontendResponseOutput `pulumi:"frontendResponse"`
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol pulumi.StringOutput `pulumi:"httpCorrelationProtocol"`
// Identifier of the Diagnostics Logs. Possible values are `applicationinsights` and `azuremonitor`. Changing this forces a new API Management Service API Diagnostics Logs to be created.
Identifier pulumi.StringOutput `pulumi:"identifier"`
// Log client IP address.
LogClientIp pulumi.BoolOutput `pulumi:"logClientIp"`
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. Defaults to `Name`.
OperationNameFormat pulumi.StringPtrOutput `pulumi:"operationNameFormat"`
// The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage pulumi.Float64Output `pulumi:"samplingPercentage"`
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity pulumi.StringOutput `pulumi:"verbosity"`
}
// NewApiDiagnostic registers a new resource with the given unique name, arguments, and options.
func NewApiDiagnostic(ctx *pulumi.Context,
name string, args *ApiDiagnosticArgs, opts ...pulumi.ResourceOption) (*ApiDiagnostic, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementLoggerId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementLoggerId'")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ApiName == nil {
return nil, errors.New("invalid value for required argument 'ApiName'")
}
if args.Identifier == nil {
return nil, errors.New("invalid value for required argument 'Identifier'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApiDiagnostic
err := ctx.RegisterResource("azure:apimanagement/apiDiagnostic:ApiDiagnostic", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiDiagnostic gets an existing ApiDiagnostic resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApiDiagnostic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiDiagnosticState, opts ...pulumi.ResourceOption) (*ApiDiagnostic, error) {
var resource ApiDiagnostic
err := ctx.ReadResource("azure:apimanagement/apiDiagnostic:ApiDiagnostic", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiDiagnostic resources.
type apiDiagnosticState struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors *bool `pulumi:"alwaysLogErrors"`
// The ID (name) of the Diagnostics Logger.
ApiManagementLoggerId *string `pulumi:"apiManagementLoggerId"`
// The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiName *string `pulumi:"apiName"`
// A `backendRequest` block as defined below.
BackendRequest *ApiDiagnosticBackendRequest `pulumi:"backendRequest"`
// A `backendResponse` block as defined below.
BackendResponse *ApiDiagnosticBackendResponse `pulumi:"backendResponse"`
// A `frontendRequest` block as defined below.
FrontendRequest *ApiDiagnosticFrontendRequest `pulumi:"frontendRequest"`
// A `frontendResponse` block as defined below.
FrontendResponse *ApiDiagnosticFrontendResponse `pulumi:"frontendResponse"`
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol *string `pulumi:"httpCorrelationProtocol"`
// Identifier of the Diagnostics Logs. Possible values are `applicationinsights` and `azuremonitor`. Changing this forces a new API Management Service API Diagnostics Logs to be created.
Identifier *string `pulumi:"identifier"`
// Log client IP address.
LogClientIp *bool `pulumi:"logClientIp"`
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. Defaults to `Name`.
OperationNameFormat *string `pulumi:"operationNameFormat"`
// The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage *float64 `pulumi:"samplingPercentage"`
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity *string `pulumi:"verbosity"`
}
type ApiDiagnosticState struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors pulumi.BoolPtrInput
// The ID (name) of the Diagnostics Logger.
ApiManagementLoggerId pulumi.StringPtrInput
// The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiManagementName pulumi.StringPtrInput
// The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiName pulumi.StringPtrInput
// A `backendRequest` block as defined below.
BackendRequest ApiDiagnosticBackendRequestPtrInput
// A `backendResponse` block as defined below.
BackendResponse ApiDiagnosticBackendResponsePtrInput
// A `frontendRequest` block as defined below.
FrontendRequest ApiDiagnosticFrontendRequestPtrInput
// A `frontendResponse` block as defined below.
FrontendResponse ApiDiagnosticFrontendResponsePtrInput
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol pulumi.StringPtrInput
// Identifier of the Diagnostics Logs. Possible values are `applicationinsights` and `azuremonitor`. Changing this forces a new API Management Service API Diagnostics Logs to be created.
Identifier pulumi.StringPtrInput
// Log client IP address.
LogClientIp pulumi.BoolPtrInput
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. Defaults to `Name`.
OperationNameFormat pulumi.StringPtrInput
// The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ResourceGroupName pulumi.StringPtrInput
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage pulumi.Float64PtrInput
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity pulumi.StringPtrInput
}
func (ApiDiagnosticState) ElementType() reflect.Type {
return reflect.TypeOf((*apiDiagnosticState)(nil)).Elem()
}
type apiDiagnosticArgs struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors *bool `pulumi:"alwaysLogErrors"`
// The ID (name) of the Diagnostics Logger.
ApiManagementLoggerId string `pulumi:"apiManagementLoggerId"`
// The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiName string `pulumi:"apiName"`
// A `backendRequest` block as defined below.
BackendRequest *ApiDiagnosticBackendRequest `pulumi:"backendRequest"`
// A `backendResponse` block as defined below.
BackendResponse *ApiDiagnosticBackendResponse `pulumi:"backendResponse"`
// A `frontendRequest` block as defined below.
FrontendRequest *ApiDiagnosticFrontendRequest `pulumi:"frontendRequest"`
// A `frontendResponse` block as defined below.
FrontendResponse *ApiDiagnosticFrontendResponse `pulumi:"frontendResponse"`
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol *string `pulumi:"httpCorrelationProtocol"`
// Identifier of the Diagnostics Logs. Possible values are `applicationinsights` and `azuremonitor`. Changing this forces a new API Management Service API Diagnostics Logs to be created.
Identifier string `pulumi:"identifier"`
// Log client IP address.
LogClientIp *bool `pulumi:"logClientIp"`
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. Defaults to `Name`.
OperationNameFormat *string `pulumi:"operationNameFormat"`
// The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage *float64 `pulumi:"samplingPercentage"`
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity *string `pulumi:"verbosity"`
}
// The set of arguments for constructing a ApiDiagnostic resource.
type ApiDiagnosticArgs struct {
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
AlwaysLogErrors pulumi.BoolPtrInput
// The ID (name) of the Diagnostics Logger.
ApiManagementLoggerId pulumi.StringInput
// The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiManagementName pulumi.StringInput
// The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ApiName pulumi.StringInput
// A `backendRequest` block as defined below.
BackendRequest ApiDiagnosticBackendRequestPtrInput
// A `backendResponse` block as defined below.
BackendResponse ApiDiagnosticBackendResponsePtrInput
// A `frontendRequest` block as defined below.
FrontendRequest ApiDiagnosticFrontendRequestPtrInput
// A `frontendResponse` block as defined below.
FrontendResponse ApiDiagnosticFrontendResponsePtrInput
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
HttpCorrelationProtocol pulumi.StringPtrInput
// Identifier of the Diagnostics Logs. Possible values are `applicationinsights` and `azuremonitor`. Changing this forces a new API Management Service API Diagnostics Logs to be created.
Identifier pulumi.StringInput
// Log client IP address.
LogClientIp pulumi.BoolPtrInput
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. Defaults to `Name`.
OperationNameFormat pulumi.StringPtrInput
// The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
ResourceGroupName pulumi.StringInput
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
SamplingPercentage pulumi.Float64PtrInput
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
Verbosity pulumi.StringPtrInput
}
func (ApiDiagnosticArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiDiagnosticArgs)(nil)).Elem()
}
type ApiDiagnosticInput interface {
pulumi.Input
ToApiDiagnosticOutput() ApiDiagnosticOutput
ToApiDiagnosticOutputWithContext(ctx context.Context) ApiDiagnosticOutput
}
func (*ApiDiagnostic) ElementType() reflect.Type {
return reflect.TypeOf((**ApiDiagnostic)(nil)).Elem()
}
func (i *ApiDiagnostic) ToApiDiagnosticOutput() ApiDiagnosticOutput {
return i.ToApiDiagnosticOutputWithContext(context.Background())
}
func (i *ApiDiagnostic) ToApiDiagnosticOutputWithContext(ctx context.Context) ApiDiagnosticOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticOutput)
}
// ApiDiagnosticArrayInput is an input type that accepts ApiDiagnosticArray and ApiDiagnosticArrayOutput values.
// You can construct a concrete instance of `ApiDiagnosticArrayInput` via:
//
// ApiDiagnosticArray{ ApiDiagnosticArgs{...} }
type ApiDiagnosticArrayInput interface {
pulumi.Input
ToApiDiagnosticArrayOutput() ApiDiagnosticArrayOutput
ToApiDiagnosticArrayOutputWithContext(context.Context) ApiDiagnosticArrayOutput
}
type ApiDiagnosticArray []ApiDiagnosticInput
func (ApiDiagnosticArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiDiagnostic)(nil)).Elem()
}
func (i ApiDiagnosticArray) ToApiDiagnosticArrayOutput() ApiDiagnosticArrayOutput {
return i.ToApiDiagnosticArrayOutputWithContext(context.Background())
}
func (i ApiDiagnosticArray) ToApiDiagnosticArrayOutputWithContext(ctx context.Context) ApiDiagnosticArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticArrayOutput)
}
// ApiDiagnosticMapInput is an input type that accepts ApiDiagnosticMap and ApiDiagnosticMapOutput values.
// You can construct a concrete instance of `ApiDiagnosticMapInput` via:
//
// ApiDiagnosticMap{ "key": ApiDiagnosticArgs{...} }
type ApiDiagnosticMapInput interface {
pulumi.Input
ToApiDiagnosticMapOutput() ApiDiagnosticMapOutput
ToApiDiagnosticMapOutputWithContext(context.Context) ApiDiagnosticMapOutput
}
type ApiDiagnosticMap map[string]ApiDiagnosticInput
func (ApiDiagnosticMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiDiagnostic)(nil)).Elem()
}
func (i ApiDiagnosticMap) ToApiDiagnosticMapOutput() ApiDiagnosticMapOutput {
return i.ToApiDiagnosticMapOutputWithContext(context.Background())
}
func (i ApiDiagnosticMap) ToApiDiagnosticMapOutputWithContext(ctx context.Context) ApiDiagnosticMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiDiagnosticMapOutput)
}
type ApiDiagnosticOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApiDiagnostic)(nil)).Elem()
}
func (o ApiDiagnosticOutput) ToApiDiagnosticOutput() ApiDiagnosticOutput {
return o
}
func (o ApiDiagnosticOutput) ToApiDiagnosticOutputWithContext(ctx context.Context) ApiDiagnosticOutput {
return o
}
// Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
func (o ApiDiagnosticOutput) AlwaysLogErrors() pulumi.BoolOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.BoolOutput { return v.AlwaysLogErrors }).(pulumi.BoolOutput)
}
// The ID (name) of the Diagnostics Logger.
func (o ApiDiagnosticOutput) ApiManagementLoggerId() pulumi.StringOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringOutput { return v.ApiManagementLoggerId }).(pulumi.StringOutput)
}
// The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
func (o ApiDiagnosticOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
func (o ApiDiagnosticOutput) ApiName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringOutput { return v.ApiName }).(pulumi.StringOutput)
}
// A `backendRequest` block as defined below.
func (o ApiDiagnosticOutput) BackendRequest() ApiDiagnosticBackendRequestOutput {
return o.ApplyT(func(v *ApiDiagnostic) ApiDiagnosticBackendRequestOutput { return v.BackendRequest }).(ApiDiagnosticBackendRequestOutput)
}
// A `backendResponse` block as defined below.
func (o ApiDiagnosticOutput) BackendResponse() ApiDiagnosticBackendResponseOutput {
return o.ApplyT(func(v *ApiDiagnostic) ApiDiagnosticBackendResponseOutput { return v.BackendResponse }).(ApiDiagnosticBackendResponseOutput)
}
// A `frontendRequest` block as defined below.
func (o ApiDiagnosticOutput) FrontendRequest() ApiDiagnosticFrontendRequestOutput {
return o.ApplyT(func(v *ApiDiagnostic) ApiDiagnosticFrontendRequestOutput { return v.FrontendRequest }).(ApiDiagnosticFrontendRequestOutput)
}
// A `frontendResponse` block as defined below.
func (o ApiDiagnosticOutput) FrontendResponse() ApiDiagnosticFrontendResponseOutput {
return o.ApplyT(func(v *ApiDiagnostic) ApiDiagnosticFrontendResponseOutput { return v.FrontendResponse }).(ApiDiagnosticFrontendResponseOutput)
}
// The HTTP Correlation Protocol to use. Possible values are `None`, `Legacy` or `W3C`.
func (o ApiDiagnosticOutput) HttpCorrelationProtocol() pulumi.StringOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringOutput { return v.HttpCorrelationProtocol }).(pulumi.StringOutput)
}
// Identifier of the Diagnostics Logs. Possible values are `applicationinsights` and `azuremonitor`. Changing this forces a new API Management Service API Diagnostics Logs to be created.
func (o ApiDiagnosticOutput) Identifier() pulumi.StringOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringOutput { return v.Identifier }).(pulumi.StringOutput)
}
// Log client IP address.
func (o ApiDiagnosticOutput) LogClientIp() pulumi.BoolOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.BoolOutput { return v.LogClientIp }).(pulumi.BoolOutput)
}
// The format of the Operation Name for Application Insights telemetries. Possible values are `Name`, and `Url`. Defaults to `Name`.
func (o ApiDiagnosticOutput) OperationNameFormat() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringPtrOutput { return v.OperationNameFormat }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
func (o ApiDiagnosticOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`.
func (o ApiDiagnosticOutput) SamplingPercentage() pulumi.Float64Output {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.Float64Output { return v.SamplingPercentage }).(pulumi.Float64Output)
}
// Logging verbosity. Possible values are `verbose`, `information` or `error`.
func (o ApiDiagnosticOutput) Verbosity() pulumi.StringOutput {
return o.ApplyT(func(v *ApiDiagnostic) pulumi.StringOutput { return v.Verbosity }).(pulumi.StringOutput)
}
type ApiDiagnosticArrayOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApiDiagnostic)(nil)).Elem()
}
func (o ApiDiagnosticArrayOutput) ToApiDiagnosticArrayOutput() ApiDiagnosticArrayOutput {
return o
}
func (o ApiDiagnosticArrayOutput) ToApiDiagnosticArrayOutputWithContext(ctx context.Context) ApiDiagnosticArrayOutput {
return o
}
func (o ApiDiagnosticArrayOutput) Index(i pulumi.IntInput) ApiDiagnosticOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiDiagnostic {
return vs[0].([]*ApiDiagnostic)[vs[1].(int)]
}).(ApiDiagnosticOutput)
}
type ApiDiagnosticMapOutput struct{ *pulumi.OutputState }
func (ApiDiagnosticMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApiDiagnostic)(nil)).Elem()
}
func (o ApiDiagnosticMapOutput) ToApiDiagnosticMapOutput() ApiDiagnosticMapOutput {
return o
}
func (o ApiDiagnosticMapOutput) ToApiDiagnosticMapOutputWithContext(ctx context.Context) ApiDiagnosticMapOutput {
return o
}
func (o ApiDiagnosticMapOutput) MapIndex(k pulumi.StringInput) ApiDiagnosticOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiDiagnostic {
return vs[0].(map[string]*ApiDiagnostic)[vs[1].(string)]
}).(ApiDiagnosticOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApiDiagnosticInput)(nil)).Elem(), &ApiDiagnostic{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiDiagnosticArrayInput)(nil)).Elem(), ApiDiagnosticArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApiDiagnosticMapInput)(nil)).Elem(), ApiDiagnosticMap{})
pulumi.RegisterOutputType(ApiDiagnosticOutput{})
pulumi.RegisterOutputType(ApiDiagnosticArrayOutput{})
pulumi.RegisterOutputType(ApiDiagnosticMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/getProduct.go | sdk/go/azure/apimanagement/getProduct.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
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 API Management Product.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
// ProductId: "my-product",
// ApiManagementName: "example-apim",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("productTerms", example.Terms)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ApiManagement` - 2022-08-01
func LookupProduct(ctx *pulumi.Context, args *LookupProductArgs, opts ...pulumi.InvokeOption) (*LookupProductResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupProductResult
err := ctx.Invoke("azure:apimanagement/getProduct:getProduct", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getProduct.
type LookupProductArgs struct {
// The Name of the API Management Service in which this Product exists.
ApiManagementName string `pulumi:"apiManagementName"`
// The Identifier for the API Management Product.
ProductId string `pulumi:"productId"`
// The Name of the Resource Group in which the API Management Service exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getProduct.
type LookupProductResult struct {
ApiManagementName string `pulumi:"apiManagementName"`
// Do subscribers need to be approved prior to being able to use the Product?
ApprovalRequired bool `pulumi:"approvalRequired"`
// The description of this Product, which may include HTML formatting tags.
Description string `pulumi:"description"`
// The Display Name for this API Management Product.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
ProductId string `pulumi:"productId"`
// Is this Product Published?
Published bool `pulumi:"published"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// Is a Subscription required to access API's included in this Product?
SubscriptionRequired bool `pulumi:"subscriptionRequired"`
// The number of subscriptions a user can have to this Product at the same time.
SubscriptionsLimit int `pulumi:"subscriptionsLimit"`
// Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
Terms string `pulumi:"terms"`
}
func LookupProductOutput(ctx *pulumi.Context, args LookupProductOutputArgs, opts ...pulumi.InvokeOption) LookupProductResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupProductResultOutput, error) {
args := v.(LookupProductArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:apimanagement/getProduct:getProduct", args, LookupProductResultOutput{}, options).(LookupProductResultOutput), nil
}).(LookupProductResultOutput)
}
// A collection of arguments for invoking getProduct.
type LookupProductOutputArgs struct {
// The Name of the API Management Service in which this Product exists.
ApiManagementName pulumi.StringInput `pulumi:"apiManagementName"`
// The Identifier for the API Management Product.
ProductId pulumi.StringInput `pulumi:"productId"`
// The Name of the Resource Group in which the API Management Service exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupProductOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProductArgs)(nil)).Elem()
}
// A collection of values returned by getProduct.
type LookupProductResultOutput struct{ *pulumi.OutputState }
func (LookupProductResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProductResult)(nil)).Elem()
}
func (o LookupProductResultOutput) ToLookupProductResultOutput() LookupProductResultOutput {
return o
}
func (o LookupProductResultOutput) ToLookupProductResultOutputWithContext(ctx context.Context) LookupProductResultOutput {
return o
}
func (o LookupProductResultOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v LookupProductResult) string { return v.ApiManagementName }).(pulumi.StringOutput)
}
// Do subscribers need to be approved prior to being able to use the Product?
func (o LookupProductResultOutput) ApprovalRequired() pulumi.BoolOutput {
return o.ApplyT(func(v LookupProductResult) bool { return v.ApprovalRequired }).(pulumi.BoolOutput)
}
// The description of this Product, which may include HTML formatting tags.
func (o LookupProductResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupProductResult) string { return v.Description }).(pulumi.StringOutput)
}
// The Display Name for this API Management Product.
func (o LookupProductResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupProductResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupProductResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupProductResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupProductResultOutput) ProductId() pulumi.StringOutput {
return o.ApplyT(func(v LookupProductResult) string { return v.ProductId }).(pulumi.StringOutput)
}
// Is this Product Published?
func (o LookupProductResultOutput) Published() pulumi.BoolOutput {
return o.ApplyT(func(v LookupProductResult) bool { return v.Published }).(pulumi.BoolOutput)
}
func (o LookupProductResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupProductResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Is a Subscription required to access API's included in this Product?
func (o LookupProductResultOutput) SubscriptionRequired() pulumi.BoolOutput {
return o.ApplyT(func(v LookupProductResult) bool { return v.SubscriptionRequired }).(pulumi.BoolOutput)
}
// The number of subscriptions a user can have to this Product at the same time.
func (o LookupProductResultOutput) SubscriptionsLimit() pulumi.IntOutput {
return o.ApplyT(func(v LookupProductResult) int { return v.SubscriptionsLimit }).(pulumi.IntOutput)
}
// Any Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process.
func (o LookupProductResultOutput) Terms() pulumi.StringOutput {
return o.ApplyT(func(v LookupProductResult) string { return v.Terms }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupProductResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/tag.go | sdk/go/azure/apimanagement/tag.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a API Management Tag.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Consumption_0"),
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewTag(ctx, "example", &apimanagement.TagArgs{
// ApiManagementId: exampleService.ID(),
// Name: pulumi.String("example-Tag"),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Tags can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/tag:Tag example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/tags/tag1
// ```
type Tag struct {
pulumi.CustomResourceState
// The ID of the API Management. Changing this forces a new API Management Tag to be created.
ApiManagementId pulumi.StringOutput `pulumi:"apiManagementId"`
// The display name of the API Management Tag. Defaults to the `name`.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewTag registers a new resource with the given unique name, arguments, and options.
func NewTag(ctx *pulumi.Context,
name string, args *TagArgs, opts ...pulumi.ResourceOption) (*Tag, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementId == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Tag
err := ctx.RegisterResource("azure:apimanagement/tag:Tag", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTag gets an existing Tag resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTag(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TagState, opts ...pulumi.ResourceOption) (*Tag, error) {
var resource Tag
err := ctx.ReadResource("azure:apimanagement/tag:Tag", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Tag resources.
type tagState struct {
// The ID of the API Management. Changing this forces a new API Management Tag to be created.
ApiManagementId *string `pulumi:"apiManagementId"`
// The display name of the API Management Tag. Defaults to the `name`.
DisplayName *string `pulumi:"displayName"`
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service.
Name *string `pulumi:"name"`
}
type TagState struct {
// The ID of the API Management. Changing this forces a new API Management Tag to be created.
ApiManagementId pulumi.StringPtrInput
// The display name of the API Management Tag. Defaults to the `name`.
DisplayName pulumi.StringPtrInput
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service.
Name pulumi.StringPtrInput
}
func (TagState) ElementType() reflect.Type {
return reflect.TypeOf((*tagState)(nil)).Elem()
}
type tagArgs struct {
// The ID of the API Management. Changing this forces a new API Management Tag to be created.
ApiManagementId string `pulumi:"apiManagementId"`
// The display name of the API Management Tag. Defaults to the `name`.
DisplayName *string `pulumi:"displayName"`
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a Tag resource.
type TagArgs struct {
// The ID of the API Management. Changing this forces a new API Management Tag to be created.
ApiManagementId pulumi.StringInput
// The display name of the API Management Tag. Defaults to the `name`.
DisplayName pulumi.StringPtrInput
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service.
Name pulumi.StringPtrInput
}
func (TagArgs) ElementType() reflect.Type {
return reflect.TypeOf((*tagArgs)(nil)).Elem()
}
type TagInput interface {
pulumi.Input
ToTagOutput() TagOutput
ToTagOutputWithContext(ctx context.Context) TagOutput
}
func (*Tag) ElementType() reflect.Type {
return reflect.TypeOf((**Tag)(nil)).Elem()
}
func (i *Tag) ToTagOutput() TagOutput {
return i.ToTagOutputWithContext(context.Background())
}
func (i *Tag) ToTagOutputWithContext(ctx context.Context) TagOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagOutput)
}
// TagArrayInput is an input type that accepts TagArray and TagArrayOutput values.
// You can construct a concrete instance of `TagArrayInput` via:
//
// TagArray{ TagArgs{...} }
type TagArrayInput interface {
pulumi.Input
ToTagArrayOutput() TagArrayOutput
ToTagArrayOutputWithContext(context.Context) TagArrayOutput
}
type TagArray []TagInput
func (TagArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Tag)(nil)).Elem()
}
func (i TagArray) ToTagArrayOutput() TagArrayOutput {
return i.ToTagArrayOutputWithContext(context.Background())
}
func (i TagArray) ToTagArrayOutputWithContext(ctx context.Context) TagArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagArrayOutput)
}
// TagMapInput is an input type that accepts TagMap and TagMapOutput values.
// You can construct a concrete instance of `TagMapInput` via:
//
// TagMap{ "key": TagArgs{...} }
type TagMapInput interface {
pulumi.Input
ToTagMapOutput() TagMapOutput
ToTagMapOutputWithContext(context.Context) TagMapOutput
}
type TagMap map[string]TagInput
func (TagMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Tag)(nil)).Elem()
}
func (i TagMap) ToTagMapOutput() TagMapOutput {
return i.ToTagMapOutputWithContext(context.Background())
}
func (i TagMap) ToTagMapOutputWithContext(ctx context.Context) TagMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagMapOutput)
}
type TagOutput struct{ *pulumi.OutputState }
func (TagOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Tag)(nil)).Elem()
}
func (o TagOutput) ToTagOutput() TagOutput {
return o
}
func (o TagOutput) ToTagOutputWithContext(ctx context.Context) TagOutput {
return o
}
// The ID of the API Management. Changing this forces a new API Management Tag to be created.
func (o TagOutput) ApiManagementId() pulumi.StringOutput {
return o.ApplyT(func(v *Tag) pulumi.StringOutput { return v.ApiManagementId }).(pulumi.StringOutput)
}
// The display name of the API Management Tag. Defaults to the `name`.
func (o TagOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Tag) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service.
func (o TagOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Tag) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type TagArrayOutput struct{ *pulumi.OutputState }
func (TagArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Tag)(nil)).Elem()
}
func (o TagArrayOutput) ToTagArrayOutput() TagArrayOutput {
return o
}
func (o TagArrayOutput) ToTagArrayOutputWithContext(ctx context.Context) TagArrayOutput {
return o
}
func (o TagArrayOutput) Index(i pulumi.IntInput) TagOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Tag {
return vs[0].([]*Tag)[vs[1].(int)]
}).(TagOutput)
}
type TagMapOutput struct{ *pulumi.OutputState }
func (TagMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Tag)(nil)).Elem()
}
func (o TagMapOutput) ToTagMapOutput() TagMapOutput {
return o
}
func (o TagMapOutput) ToTagMapOutputWithContext(ctx context.Context) TagMapOutput {
return o
}
func (o TagMapOutput) MapIndex(k pulumi.StringInput) TagOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Tag {
return vs[0].(map[string]*Tag)[vs[1].(string)]
}).(TagOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TagInput)(nil)).Elem(), &Tag{})
pulumi.RegisterInputType(reflect.TypeOf((*TagArrayInput)(nil)).Elem(), TagArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TagMapInput)(nil)).Elem(), TagMap{})
pulumi.RegisterOutputType(TagOutput{})
pulumi.RegisterOutputType(TagArrayOutput{})
pulumi.RegisterOutputType(TagMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/certificate.go | sdk/go/azure/apimanagement/certificate.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Certificate within an API Management Service.
//
// ## Example Usage
//
// ### With Base64 Certificate)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@exmaple.com"),
// SkuName: pulumi.String("Developer_1"),
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "example.pfx",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewCertificate(ctx, "example", &apimanagement.CertificateArgs{
// Name: pulumi.String("example-cert"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// Data: pulumi.String(invokeFilebase64.Result),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Key Vault Certificate)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
// Name: pulumi.String("example-apim"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PublisherName: pulumi.String("My Company"),
// PublisherEmail: pulumi.String("company@terraform.io"),
// SkuName: pulumi.String("Developer_1"),
// Identity: &apimanagement.ServiceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("examplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// })
// if err != nil {
// return err
// }
// _, err = keyvault.NewAccessPolicy(ctx, "example", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(exampleService.Identity.ApplyT(func(identity apimanagement.ServiceIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput)),
// ObjectId: pulumi.String(exampleService.Identity.ApplyT(func(identity apimanagement.ServiceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// CertificatePermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "example_cert.pfx",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{
// Name: pulumi.String("example-cert"),
// KeyVaultId: exampleKeyVault.ID(),
// Certificate: &keyvault.CertificateCertificateArgs{
// Contents: pulumi.String(invokeFilebase64.Result),
// Password: pulumi.String("terraform"),
// },
// CertificatePolicy: &keyvault.CertificateCertificatePolicyArgs{
// IssuerParameters: &keyvault.CertificateCertificatePolicyIssuerParametersArgs{
// Name: pulumi.String("Self"),
// },
// KeyProperties: &keyvault.CertificateCertificatePolicyKeyPropertiesArgs{
// Exportable: pulumi.Bool(true),
// KeySize: pulumi.Int(2048),
// KeyType: pulumi.String("RSA"),
// ReuseKey: pulumi.Bool(false),
// },
// SecretProperties: &keyvault.CertificateCertificatePolicySecretPropertiesArgs{
// ContentType: pulumi.String("application/x-pkcs12"),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = apimanagement.NewCertificate(ctx, "example", &apimanagement.CertificateArgs{
// Name: pulumi.String("example-cert"),
// ApiManagementName: exampleService.Name,
// ResourceGroupName: example.Name,
// KeyVaultSecretId: exampleCertificate.SecretId,
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Certificates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/certificates/certificate1
// ```
type Certificate struct {
pulumi.CustomResourceState
// The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The base-64 encoded certificate data, which must be a PFX file.
Data pulumi.StringPtrOutput `pulumi:"data"`
// The Expiration Date of this Certificate, formatted as an RFC3339 string.
Expiration pulumi.StringOutput `pulumi:"expiration"`
// The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
//
// > **Note:** If not specified, will use System Assigned identity of the API Management Service.
KeyVaultIdentityClientId pulumi.StringPtrOutput `pulumi:"keyVaultIdentityClientId"`
// The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type `application/x-pkcs12`.
//
// > **Note:** Setting this field requires the `identity` block to be specified in API Management Service, since this identity is used to retrieve the Key Vault Certificate. Possible values are versioned or versionless secret ID. Auto-updating the Certificate from the Key Vault requires that Secret version isn't specified.
KeyVaultSecretId pulumi.StringPtrOutput `pulumi:"keyVaultSecretId"`
// The name of the API Management Certificate. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The password used for this certificate.
Password pulumi.StringPtrOutput `pulumi:"password"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
//
// > **Note:** Either `data` or `keyVaultSecretId` must be specified - but not both.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Subject of this Certificate.
Subject pulumi.StringOutput `pulumi:"subject"`
// The Thumbprint of this Certificate.
Thumbprint pulumi.StringOutput `pulumi:"thumbprint"`
}
// NewCertificate registers a new resource with the given unique name, arguments, and options.
func NewCertificate(ctx *pulumi.Context,
name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Data != nil {
args.Data = pulumi.ToSecret(args.Data).(pulumi.StringPtrInput)
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"data",
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Certificate
err := ctx.RegisterResource("azure:apimanagement/certificate:Certificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCertificate gets an existing Certificate resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error) {
var resource Certificate
err := ctx.ReadResource("azure:apimanagement/certificate:Certificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Certificate resources.
type certificateState struct {
// The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The base-64 encoded certificate data, which must be a PFX file.
Data *string `pulumi:"data"`
// The Expiration Date of this Certificate, formatted as an RFC3339 string.
Expiration *string `pulumi:"expiration"`
// The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
//
// > **Note:** If not specified, will use System Assigned identity of the API Management Service.
KeyVaultIdentityClientId *string `pulumi:"keyVaultIdentityClientId"`
// The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type `application/x-pkcs12`.
//
// > **Note:** Setting this field requires the `identity` block to be specified in API Management Service, since this identity is used to retrieve the Key Vault Certificate. Possible values are versioned or versionless secret ID. Auto-updating the Certificate from the Key Vault requires that Secret version isn't specified.
KeyVaultSecretId *string `pulumi:"keyVaultSecretId"`
// The name of the API Management Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The password used for this certificate.
Password *string `pulumi:"password"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
//
// > **Note:** Either `data` or `keyVaultSecretId` must be specified - but not both.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Subject of this Certificate.
Subject *string `pulumi:"subject"`
// The Thumbprint of this Certificate.
Thumbprint *string `pulumi:"thumbprint"`
}
type CertificateState struct {
// The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The base-64 encoded certificate data, which must be a PFX file.
Data pulumi.StringPtrInput
// The Expiration Date of this Certificate, formatted as an RFC3339 string.
Expiration pulumi.StringPtrInput
// The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
//
// > **Note:** If not specified, will use System Assigned identity of the API Management Service.
KeyVaultIdentityClientId pulumi.StringPtrInput
// The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type `application/x-pkcs12`.
//
// > **Note:** Setting this field requires the `identity` block to be specified in API Management Service, since this identity is used to retrieve the Key Vault Certificate. Possible values are versioned or versionless secret ID. Auto-updating the Certificate from the Key Vault requires that Secret version isn't specified.
KeyVaultSecretId pulumi.StringPtrInput
// The name of the API Management Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The password used for this certificate.
Password pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
//
// > **Note:** Either `data` or `keyVaultSecretId` must be specified - but not both.
ResourceGroupName pulumi.StringPtrInput
// The Subject of this Certificate.
Subject pulumi.StringPtrInput
// The Thumbprint of this Certificate.
Thumbprint pulumi.StringPtrInput
}
func (CertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*certificateState)(nil)).Elem()
}
type certificateArgs struct {
// The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The base-64 encoded certificate data, which must be a PFX file.
Data *string `pulumi:"data"`
// The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
//
// > **Note:** If not specified, will use System Assigned identity of the API Management Service.
KeyVaultIdentityClientId *string `pulumi:"keyVaultIdentityClientId"`
// The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type `application/x-pkcs12`.
//
// > **Note:** Setting this field requires the `identity` block to be specified in API Management Service, since this identity is used to retrieve the Key Vault Certificate. Possible values are versioned or versionless secret ID. Auto-updating the Certificate from the Key Vault requires that Secret version isn't specified.
KeyVaultSecretId *string `pulumi:"keyVaultSecretId"`
// The name of the API Management Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The password used for this certificate.
Password *string `pulumi:"password"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
//
// > **Note:** Either `data` or `keyVaultSecretId` must be specified - but not both.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a Certificate resource.
type CertificateArgs struct {
// The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The base-64 encoded certificate data, which must be a PFX file.
Data pulumi.StringPtrInput
// The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
//
// > **Note:** If not specified, will use System Assigned identity of the API Management Service.
KeyVaultIdentityClientId pulumi.StringPtrInput
// The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type `application/x-pkcs12`.
//
// > **Note:** Setting this field requires the `identity` block to be specified in API Management Service, since this identity is used to retrieve the Key Vault Certificate. Possible values are versioned or versionless secret ID. Auto-updating the Certificate from the Key Vault requires that Secret version isn't specified.
KeyVaultSecretId pulumi.StringPtrInput
// The name of the API Management Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The password used for this certificate.
Password pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
//
// > **Note:** Either `data` or `keyVaultSecretId` must be specified - but not both.
ResourceGroupName pulumi.StringInput
}
func (CertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*certificateArgs)(nil)).Elem()
}
type CertificateInput interface {
pulumi.Input
ToCertificateOutput() CertificateOutput
ToCertificateOutputWithContext(ctx context.Context) CertificateOutput
}
func (*Certificate) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (i *Certificate) ToCertificateOutput() CertificateOutput {
return i.ToCertificateOutputWithContext(context.Background())
}
func (i *Certificate) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateOutput)
}
// CertificateArrayInput is an input type that accepts CertificateArray and CertificateArrayOutput values.
// You can construct a concrete instance of `CertificateArrayInput` via:
//
// CertificateArray{ CertificateArgs{...} }
type CertificateArrayInput interface {
pulumi.Input
ToCertificateArrayOutput() CertificateArrayOutput
ToCertificateArrayOutputWithContext(context.Context) CertificateArrayOutput
}
type CertificateArray []CertificateInput
func (CertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (i CertificateArray) ToCertificateArrayOutput() CertificateArrayOutput {
return i.ToCertificateArrayOutputWithContext(context.Background())
}
func (i CertificateArray) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateArrayOutput)
}
// CertificateMapInput is an input type that accepts CertificateMap and CertificateMapOutput values.
// You can construct a concrete instance of `CertificateMapInput` via:
//
// CertificateMap{ "key": CertificateArgs{...} }
type CertificateMapInput interface {
pulumi.Input
ToCertificateMapOutput() CertificateMapOutput
ToCertificateMapOutputWithContext(context.Context) CertificateMapOutput
}
type CertificateMap map[string]CertificateInput
func (CertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (i CertificateMap) ToCertificateMapOutput() CertificateMapOutput {
return i.ToCertificateMapOutputWithContext(context.Background())
}
func (i CertificateMap) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateMapOutput)
}
type CertificateOutput struct{ *pulumi.OutputState }
func (CertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (o CertificateOutput) ToCertificateOutput() CertificateOutput {
return o
}
func (o CertificateOutput) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return o
}
// The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
func (o CertificateOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The base-64 encoded certificate data, which must be a PFX file.
func (o CertificateOutput) Data() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringPtrOutput { return v.Data }).(pulumi.StringPtrOutput)
}
// The Expiration Date of this Certificate, formatted as an RFC3339 string.
func (o CertificateOutput) Expiration() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Expiration }).(pulumi.StringOutput)
}
// The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
//
// > **Note:** If not specified, will use System Assigned identity of the API Management Service.
func (o CertificateOutput) KeyVaultIdentityClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringPtrOutput { return v.KeyVaultIdentityClientId }).(pulumi.StringPtrOutput)
}
// The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type `application/x-pkcs12`.
//
// > **Note:** Setting this field requires the `identity` block to be specified in API Management Service, since this identity is used to retrieve the Key Vault Certificate. Possible values are versioned or versionless secret ID. Auto-updating the Certificate from the Key Vault requires that Secret version isn't specified.
func (o CertificateOutput) KeyVaultSecretId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringPtrOutput { return v.KeyVaultSecretId }).(pulumi.StringPtrOutput)
}
// The name of the API Management Certificate. Changing this forces a new resource to be created.
func (o CertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The password used for this certificate.
func (o CertificateOutput) Password() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput)
}
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
//
// > **Note:** Either `data` or `keyVaultSecretId` must be specified - but not both.
func (o CertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Subject of this Certificate.
func (o CertificateOutput) Subject() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Subject }).(pulumi.StringOutput)
}
// The Thumbprint of this Certificate.
func (o CertificateOutput) Thumbprint() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Thumbprint }).(pulumi.StringOutput)
}
type CertificateArrayOutput struct{ *pulumi.OutputState }
func (CertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (o CertificateArrayOutput) ToCertificateArrayOutput() CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) Index(i pulumi.IntInput) CertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].([]*Certificate)[vs[1].(int)]
}).(CertificateOutput)
}
type CertificateMapOutput struct{ *pulumi.OutputState }
func (CertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (o CertificateMapOutput) ToCertificateMapOutput() CertificateMapOutput {
return o
}
func (o CertificateMapOutput) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return o
}
func (o CertificateMapOutput) MapIndex(k pulumi.StringInput) CertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].(map[string]*Certificate)[vs[1].(string)]
}).(CertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CertificateInput)(nil)).Elem(), &Certificate{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateArrayInput)(nil)).Elem(), CertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateMapInput)(nil)).Elem(), CertificateMap{})
pulumi.RegisterOutputType(CertificateOutput{})
pulumi.RegisterOutputType(CertificateArrayOutput{})
pulumi.RegisterOutputType(CertificateMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/groupUser.go | sdk/go/azure/apimanagement/groupUser.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management User Assignment to a Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupUser(ctx, &apimanagement.LookupUserArgs{
// UserId: "my-user",
// ApiManagementName: "example-apim",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewGroupUser(ctx, "example", &apimanagement.GroupUserArgs{
// UserId: pulumi.String(example.Id),
// GroupName: pulumi.String("example-group"),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// ApiManagementName: pulumi.String(example.ApiManagementName),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Group Users can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/groupUser:GroupUser example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/groups/groupId/users/user123
// ```
type GroupUser struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName pulumi.StringOutput `pulumi:"groupName"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
UserId pulumi.StringOutput `pulumi:"userId"`
}
// NewGroupUser registers a new resource with the given unique name, arguments, and options.
func NewGroupUser(ctx *pulumi.Context,
name string, args *GroupUserArgs, opts ...pulumi.ResourceOption) (*GroupUser, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.GroupName == nil {
return nil, errors.New("invalid value for required argument 'GroupName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.UserId == nil {
return nil, errors.New("invalid value for required argument 'UserId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GroupUser
err := ctx.RegisterResource("azure:apimanagement/groupUser:GroupUser", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupUser gets an existing GroupUser resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupUser(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupUserState, opts ...pulumi.ResourceOption) (*GroupUser, error) {
var resource GroupUser
err := ctx.ReadResource("azure:apimanagement/groupUser:GroupUser", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupUser resources.
type groupUserState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName *string `pulumi:"groupName"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
UserId *string `pulumi:"userId"`
}
type GroupUserState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
UserId pulumi.StringPtrInput
}
func (GroupUserState) ElementType() reflect.Type {
return reflect.TypeOf((*groupUserState)(nil)).Elem()
}
type groupUserArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName string `pulumi:"groupName"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
UserId string `pulumi:"userId"`
}
// The set of arguments for constructing a GroupUser resource.
type GroupUserArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName pulumi.StringInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
UserId pulumi.StringInput
}
func (GroupUserArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupUserArgs)(nil)).Elem()
}
type GroupUserInput interface {
pulumi.Input
ToGroupUserOutput() GroupUserOutput
ToGroupUserOutputWithContext(ctx context.Context) GroupUserOutput
}
func (*GroupUser) ElementType() reflect.Type {
return reflect.TypeOf((**GroupUser)(nil)).Elem()
}
func (i *GroupUser) ToGroupUserOutput() GroupUserOutput {
return i.ToGroupUserOutputWithContext(context.Background())
}
func (i *GroupUser) ToGroupUserOutputWithContext(ctx context.Context) GroupUserOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupUserOutput)
}
// GroupUserArrayInput is an input type that accepts GroupUserArray and GroupUserArrayOutput values.
// You can construct a concrete instance of `GroupUserArrayInput` via:
//
// GroupUserArray{ GroupUserArgs{...} }
type GroupUserArrayInput interface {
pulumi.Input
ToGroupUserArrayOutput() GroupUserArrayOutput
ToGroupUserArrayOutputWithContext(context.Context) GroupUserArrayOutput
}
type GroupUserArray []GroupUserInput
func (GroupUserArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupUser)(nil)).Elem()
}
func (i GroupUserArray) ToGroupUserArrayOutput() GroupUserArrayOutput {
return i.ToGroupUserArrayOutputWithContext(context.Background())
}
func (i GroupUserArray) ToGroupUserArrayOutputWithContext(ctx context.Context) GroupUserArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupUserArrayOutput)
}
// GroupUserMapInput is an input type that accepts GroupUserMap and GroupUserMapOutput values.
// You can construct a concrete instance of `GroupUserMapInput` via:
//
// GroupUserMap{ "key": GroupUserArgs{...} }
type GroupUserMapInput interface {
pulumi.Input
ToGroupUserMapOutput() GroupUserMapOutput
ToGroupUserMapOutputWithContext(context.Context) GroupUserMapOutput
}
type GroupUserMap map[string]GroupUserInput
func (GroupUserMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupUser)(nil)).Elem()
}
func (i GroupUserMap) ToGroupUserMapOutput() GroupUserMapOutput {
return i.ToGroupUserMapOutputWithContext(context.Background())
}
func (i GroupUserMap) ToGroupUserMapOutputWithContext(ctx context.Context) GroupUserMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupUserMapOutput)
}
type GroupUserOutput struct{ *pulumi.OutputState }
func (GroupUserOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupUser)(nil)).Elem()
}
func (o GroupUserOutput) ToGroupUserOutput() GroupUserOutput {
return o
}
func (o GroupUserOutput) ToGroupUserOutputWithContext(ctx context.Context) GroupUserOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o GroupUserOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *GroupUser) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
func (o GroupUserOutput) GroupName() pulumi.StringOutput {
return o.ApplyT(func(v *GroupUser) pulumi.StringOutput { return v.GroupName }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o GroupUserOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *GroupUser) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
func (o GroupUserOutput) UserId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupUser) pulumi.StringOutput { return v.UserId }).(pulumi.StringOutput)
}
type GroupUserArrayOutput struct{ *pulumi.OutputState }
func (GroupUserArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupUser)(nil)).Elem()
}
func (o GroupUserArrayOutput) ToGroupUserArrayOutput() GroupUserArrayOutput {
return o
}
func (o GroupUserArrayOutput) ToGroupUserArrayOutputWithContext(ctx context.Context) GroupUserArrayOutput {
return o
}
func (o GroupUserArrayOutput) Index(i pulumi.IntInput) GroupUserOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupUser {
return vs[0].([]*GroupUser)[vs[1].(int)]
}).(GroupUserOutput)
}
type GroupUserMapOutput struct{ *pulumi.OutputState }
func (GroupUserMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupUser)(nil)).Elem()
}
func (o GroupUserMapOutput) ToGroupUserMapOutput() GroupUserMapOutput {
return o
}
func (o GroupUserMapOutput) ToGroupUserMapOutputWithContext(ctx context.Context) GroupUserMapOutput {
return o
}
func (o GroupUserMapOutput) MapIndex(k pulumi.StringInput) GroupUserOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupUser {
return vs[0].(map[string]*GroupUser)[vs[1].(string)]
}).(GroupUserOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupUserInput)(nil)).Elem(), &GroupUser{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupUserArrayInput)(nil)).Elem(), GroupUserArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupUserMapInput)(nil)).Elem(), GroupUserMap{})
pulumi.RegisterOutputType(GroupUserOutput{})
pulumi.RegisterOutputType(GroupUserArrayOutput{})
pulumi.RegisterOutputType(GroupUserMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/apimanagement/productGroup.go | sdk/go/azure/apimanagement/productGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an API Management Product Assignment to a Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/apimanagement"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
// Name: "example-api",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// exampleGetProduct, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
// ProductId: "my-product",
// ApiManagementName: example.Name,
// ResourceGroupName: example.ResourceGroupName,
// }, nil)
// if err != nil {
// return err
// }
// exampleGetGroup, err := apimanagement.LookupGroup(ctx, &apimanagement.LookupGroupArgs{
// Name: "my-group",
// ApiManagementName: example.Name,
// ResourceGroupName: example.ResourceGroupName,
// }, nil)
// if err != nil {
// return err
// }
// _, err = apimanagement.NewProductGroup(ctx, "example", &apimanagement.ProductGroupArgs{
// ProductId: pulumi.String(exampleGetProduct.ProductId),
// GroupName: pulumi.String(exampleGetGroup.Name),
// ApiManagementName: pulumi.String(example.Name),
// ResourceGroupName: pulumi.String(example.ResourceGroupName),
// })
// 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.ApiManagement` - 2022-08-01
//
// ## Import
//
// API Management Product Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:apimanagement/productGroup:ProductGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/products/exampleId/groups/groupId
// ```
type ProductGroup struct {
pulumi.CustomResourceState
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName pulumi.StringOutput `pulumi:"groupName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringOutput `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewProductGroup registers a new resource with the given unique name, arguments, and options.
func NewProductGroup(ctx *pulumi.Context,
name string, args *ProductGroupArgs, opts ...pulumi.ResourceOption) (*ProductGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiManagementName == nil {
return nil, errors.New("invalid value for required argument 'ApiManagementName'")
}
if args.GroupName == nil {
return nil, errors.New("invalid value for required argument 'GroupName'")
}
if args.ProductId == nil {
return nil, errors.New("invalid value for required argument 'ProductId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ProductGroup
err := ctx.RegisterResource("azure:apimanagement/productGroup:ProductGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProductGroup gets an existing ProductGroup resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetProductGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProductGroupState, opts ...pulumi.ResourceOption) (*ProductGroup, error) {
var resource ProductGroup
err := ctx.ReadResource("azure:apimanagement/productGroup:ProductGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ProductGroup resources.
type productGroupState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName *string `pulumi:"groupName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId *string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ProductGroupState struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName pulumi.StringPtrInput
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringPtrInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ProductGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*productGroupState)(nil)).Elem()
}
type productGroupArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName string `pulumi:"groupName"`
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId string `pulumi:"productId"`
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ProductGroup resource.
type ProductGroupArgs struct {
// The name of the API Management Service. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
GroupName pulumi.StringInput
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
ProductId pulumi.StringInput
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ProductGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*productGroupArgs)(nil)).Elem()
}
type ProductGroupInput interface {
pulumi.Input
ToProductGroupOutput() ProductGroupOutput
ToProductGroupOutputWithContext(ctx context.Context) ProductGroupOutput
}
func (*ProductGroup) ElementType() reflect.Type {
return reflect.TypeOf((**ProductGroup)(nil)).Elem()
}
func (i *ProductGroup) ToProductGroupOutput() ProductGroupOutput {
return i.ToProductGroupOutputWithContext(context.Background())
}
func (i *ProductGroup) ToProductGroupOutputWithContext(ctx context.Context) ProductGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductGroupOutput)
}
// ProductGroupArrayInput is an input type that accepts ProductGroupArray and ProductGroupArrayOutput values.
// You can construct a concrete instance of `ProductGroupArrayInput` via:
//
// ProductGroupArray{ ProductGroupArgs{...} }
type ProductGroupArrayInput interface {
pulumi.Input
ToProductGroupArrayOutput() ProductGroupArrayOutput
ToProductGroupArrayOutputWithContext(context.Context) ProductGroupArrayOutput
}
type ProductGroupArray []ProductGroupInput
func (ProductGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductGroup)(nil)).Elem()
}
func (i ProductGroupArray) ToProductGroupArrayOutput() ProductGroupArrayOutput {
return i.ToProductGroupArrayOutputWithContext(context.Background())
}
func (i ProductGroupArray) ToProductGroupArrayOutputWithContext(ctx context.Context) ProductGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductGroupArrayOutput)
}
// ProductGroupMapInput is an input type that accepts ProductGroupMap and ProductGroupMapOutput values.
// You can construct a concrete instance of `ProductGroupMapInput` via:
//
// ProductGroupMap{ "key": ProductGroupArgs{...} }
type ProductGroupMapInput interface {
pulumi.Input
ToProductGroupMapOutput() ProductGroupMapOutput
ToProductGroupMapOutputWithContext(context.Context) ProductGroupMapOutput
}
type ProductGroupMap map[string]ProductGroupInput
func (ProductGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductGroup)(nil)).Elem()
}
func (i ProductGroupMap) ToProductGroupMapOutput() ProductGroupMapOutput {
return i.ToProductGroupMapOutputWithContext(context.Background())
}
func (i ProductGroupMap) ToProductGroupMapOutputWithContext(ctx context.Context) ProductGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProductGroupMapOutput)
}
type ProductGroupOutput struct{ *pulumi.OutputState }
func (ProductGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ProductGroup)(nil)).Elem()
}
func (o ProductGroupOutput) ToProductGroupOutput() ProductGroupOutput {
return o
}
func (o ProductGroupOutput) ToProductGroupOutputWithContext(ctx context.Context) ProductGroupOutput {
return o
}
// The name of the API Management Service. Changing this forces a new resource to be created.
func (o ProductGroupOutput) ApiManagementName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductGroup) pulumi.StringOutput { return v.ApiManagementName }).(pulumi.StringOutput)
}
// The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
func (o ProductGroupOutput) GroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductGroup) pulumi.StringOutput { return v.GroupName }).(pulumi.StringOutput)
}
// The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.
func (o ProductGroupOutput) ProductId() pulumi.StringOutput {
return o.ApplyT(func(v *ProductGroup) pulumi.StringOutput { return v.ProductId }).(pulumi.StringOutput)
}
// The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
func (o ProductGroupOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ProductGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ProductGroupArrayOutput struct{ *pulumi.OutputState }
func (ProductGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProductGroup)(nil)).Elem()
}
func (o ProductGroupArrayOutput) ToProductGroupArrayOutput() ProductGroupArrayOutput {
return o
}
func (o ProductGroupArrayOutput) ToProductGroupArrayOutputWithContext(ctx context.Context) ProductGroupArrayOutput {
return o
}
func (o ProductGroupArrayOutput) Index(i pulumi.IntInput) ProductGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProductGroup {
return vs[0].([]*ProductGroup)[vs[1].(int)]
}).(ProductGroupOutput)
}
type ProductGroupMapOutput struct{ *pulumi.OutputState }
func (ProductGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProductGroup)(nil)).Elem()
}
func (o ProductGroupMapOutput) ToProductGroupMapOutput() ProductGroupMapOutput {
return o
}
func (o ProductGroupMapOutput) ToProductGroupMapOutputWithContext(ctx context.Context) ProductGroupMapOutput {
return o
}
func (o ProductGroupMapOutput) MapIndex(k pulumi.StringInput) ProductGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProductGroup {
return vs[0].(map[string]*ProductGroup)[vs[1].(string)]
}).(ProductGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProductGroupInput)(nil)).Elem(), &ProductGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductGroupArrayInput)(nil)).Elem(), ProductGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ProductGroupMapInput)(nil)).Elem(), ProductGroupMap{})
pulumi.RegisterOutputType(ProductGroupOutput{})
pulumi.RegisterOutputType(ProductGroupArrayOutput{})
pulumi.RegisterOutputType(ProductGroupMapOutput{})
}
| 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.