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/operationalinsights/init.go | sdk/go/azure/operationalinsights/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 operationalinsights
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:operationalinsights/analyticsSolution:AnalyticsSolution":
r = &AnalyticsSolution{}
case "azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace":
r = &AnalyticsWorkspace{}
case "azure:operationalinsights/queryPackQuery:QueryPackQuery":
r = &QueryPackQuery{}
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",
"operationalinsights/analyticsSolution",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"operationalinsights/analyticsWorkspace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"operationalinsights/queryPackQuery",
&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/operationalinsights/pulumiTypes.go | sdk/go/azure/operationalinsights/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 operationalinsights
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 AnalyticsSolutionPlan struct {
Name *string `pulumi:"name"`
// The product name of the solution. For example `OMSGallery/Containers`. Changing this forces a new resource to be created.
Product string `pulumi:"product"`
// A promotion code to be used with the solution. Changing this forces a new resource to be created.
PromotionCode *string `pulumi:"promotionCode"`
// The publisher of the solution. For example `Microsoft`. Changing this forces a new resource to be created.
Publisher string `pulumi:"publisher"`
}
// AnalyticsSolutionPlanInput is an input type that accepts AnalyticsSolutionPlanArgs and AnalyticsSolutionPlanOutput values.
// You can construct a concrete instance of `AnalyticsSolutionPlanInput` via:
//
// AnalyticsSolutionPlanArgs{...}
type AnalyticsSolutionPlanInput interface {
pulumi.Input
ToAnalyticsSolutionPlanOutput() AnalyticsSolutionPlanOutput
ToAnalyticsSolutionPlanOutputWithContext(context.Context) AnalyticsSolutionPlanOutput
}
type AnalyticsSolutionPlanArgs struct {
Name pulumi.StringPtrInput `pulumi:"name"`
// The product name of the solution. For example `OMSGallery/Containers`. Changing this forces a new resource to be created.
Product pulumi.StringInput `pulumi:"product"`
// A promotion code to be used with the solution. Changing this forces a new resource to be created.
PromotionCode pulumi.StringPtrInput `pulumi:"promotionCode"`
// The publisher of the solution. For example `Microsoft`. Changing this forces a new resource to be created.
Publisher pulumi.StringInput `pulumi:"publisher"`
}
func (AnalyticsSolutionPlanArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AnalyticsSolutionPlan)(nil)).Elem()
}
func (i AnalyticsSolutionPlanArgs) ToAnalyticsSolutionPlanOutput() AnalyticsSolutionPlanOutput {
return i.ToAnalyticsSolutionPlanOutputWithContext(context.Background())
}
func (i AnalyticsSolutionPlanArgs) ToAnalyticsSolutionPlanOutputWithContext(ctx context.Context) AnalyticsSolutionPlanOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsSolutionPlanOutput)
}
func (i AnalyticsSolutionPlanArgs) ToAnalyticsSolutionPlanPtrOutput() AnalyticsSolutionPlanPtrOutput {
return i.ToAnalyticsSolutionPlanPtrOutputWithContext(context.Background())
}
func (i AnalyticsSolutionPlanArgs) ToAnalyticsSolutionPlanPtrOutputWithContext(ctx context.Context) AnalyticsSolutionPlanPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsSolutionPlanOutput).ToAnalyticsSolutionPlanPtrOutputWithContext(ctx)
}
// AnalyticsSolutionPlanPtrInput is an input type that accepts AnalyticsSolutionPlanArgs, AnalyticsSolutionPlanPtr and AnalyticsSolutionPlanPtrOutput values.
// You can construct a concrete instance of `AnalyticsSolutionPlanPtrInput` via:
//
// AnalyticsSolutionPlanArgs{...}
//
// or:
//
// nil
type AnalyticsSolutionPlanPtrInput interface {
pulumi.Input
ToAnalyticsSolutionPlanPtrOutput() AnalyticsSolutionPlanPtrOutput
ToAnalyticsSolutionPlanPtrOutputWithContext(context.Context) AnalyticsSolutionPlanPtrOutput
}
type analyticsSolutionPlanPtrType AnalyticsSolutionPlanArgs
func AnalyticsSolutionPlanPtr(v *AnalyticsSolutionPlanArgs) AnalyticsSolutionPlanPtrInput {
return (*analyticsSolutionPlanPtrType)(v)
}
func (*analyticsSolutionPlanPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsSolutionPlan)(nil)).Elem()
}
func (i *analyticsSolutionPlanPtrType) ToAnalyticsSolutionPlanPtrOutput() AnalyticsSolutionPlanPtrOutput {
return i.ToAnalyticsSolutionPlanPtrOutputWithContext(context.Background())
}
func (i *analyticsSolutionPlanPtrType) ToAnalyticsSolutionPlanPtrOutputWithContext(ctx context.Context) AnalyticsSolutionPlanPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsSolutionPlanPtrOutput)
}
type AnalyticsSolutionPlanOutput struct{ *pulumi.OutputState }
func (AnalyticsSolutionPlanOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AnalyticsSolutionPlan)(nil)).Elem()
}
func (o AnalyticsSolutionPlanOutput) ToAnalyticsSolutionPlanOutput() AnalyticsSolutionPlanOutput {
return o
}
func (o AnalyticsSolutionPlanOutput) ToAnalyticsSolutionPlanOutputWithContext(ctx context.Context) AnalyticsSolutionPlanOutput {
return o
}
func (o AnalyticsSolutionPlanOutput) ToAnalyticsSolutionPlanPtrOutput() AnalyticsSolutionPlanPtrOutput {
return o.ToAnalyticsSolutionPlanPtrOutputWithContext(context.Background())
}
func (o AnalyticsSolutionPlanOutput) ToAnalyticsSolutionPlanPtrOutputWithContext(ctx context.Context) AnalyticsSolutionPlanPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AnalyticsSolutionPlan) *AnalyticsSolutionPlan {
return &v
}).(AnalyticsSolutionPlanPtrOutput)
}
func (o AnalyticsSolutionPlanOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v AnalyticsSolutionPlan) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The product name of the solution. For example `OMSGallery/Containers`. Changing this forces a new resource to be created.
func (o AnalyticsSolutionPlanOutput) Product() pulumi.StringOutput {
return o.ApplyT(func(v AnalyticsSolutionPlan) string { return v.Product }).(pulumi.StringOutput)
}
// A promotion code to be used with the solution. Changing this forces a new resource to be created.
func (o AnalyticsSolutionPlanOutput) PromotionCode() pulumi.StringPtrOutput {
return o.ApplyT(func(v AnalyticsSolutionPlan) *string { return v.PromotionCode }).(pulumi.StringPtrOutput)
}
// The publisher of the solution. For example `Microsoft`. Changing this forces a new resource to be created.
func (o AnalyticsSolutionPlanOutput) Publisher() pulumi.StringOutput {
return o.ApplyT(func(v AnalyticsSolutionPlan) string { return v.Publisher }).(pulumi.StringOutput)
}
type AnalyticsSolutionPlanPtrOutput struct{ *pulumi.OutputState }
func (AnalyticsSolutionPlanPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsSolutionPlan)(nil)).Elem()
}
func (o AnalyticsSolutionPlanPtrOutput) ToAnalyticsSolutionPlanPtrOutput() AnalyticsSolutionPlanPtrOutput {
return o
}
func (o AnalyticsSolutionPlanPtrOutput) ToAnalyticsSolutionPlanPtrOutputWithContext(ctx context.Context) AnalyticsSolutionPlanPtrOutput {
return o
}
func (o AnalyticsSolutionPlanPtrOutput) Elem() AnalyticsSolutionPlanOutput {
return o.ApplyT(func(v *AnalyticsSolutionPlan) AnalyticsSolutionPlan {
if v != nil {
return *v
}
var ret AnalyticsSolutionPlan
return ret
}).(AnalyticsSolutionPlanOutput)
}
func (o AnalyticsSolutionPlanPtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsSolutionPlan) *string {
if v == nil {
return nil
}
return v.Name
}).(pulumi.StringPtrOutput)
}
// The product name of the solution. For example `OMSGallery/Containers`. Changing this forces a new resource to be created.
func (o AnalyticsSolutionPlanPtrOutput) Product() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsSolutionPlan) *string {
if v == nil {
return nil
}
return &v.Product
}).(pulumi.StringPtrOutput)
}
// A promotion code to be used with the solution. Changing this forces a new resource to be created.
func (o AnalyticsSolutionPlanPtrOutput) PromotionCode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsSolutionPlan) *string {
if v == nil {
return nil
}
return v.PromotionCode
}).(pulumi.StringPtrOutput)
}
// The publisher of the solution. For example `Microsoft`. Changing this forces a new resource to be created.
func (o AnalyticsSolutionPlanPtrOutput) Publisher() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsSolutionPlan) *string {
if v == nil {
return nil
}
return &v.Publisher
}).(pulumi.StringPtrOutput)
}
type AnalyticsWorkspaceIdentity struct {
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
PrincipalId *string `pulumi:"principalId"`
TenantId *string `pulumi:"tenantId"`
// Specifies the identity type of the Log Analytics Workspace. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you) and `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field.
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Log Analytics Workspace has been created.
Type string `pulumi:"type"`
}
// AnalyticsWorkspaceIdentityInput is an input type that accepts AnalyticsWorkspaceIdentityArgs and AnalyticsWorkspaceIdentityOutput values.
// You can construct a concrete instance of `AnalyticsWorkspaceIdentityInput` via:
//
// AnalyticsWorkspaceIdentityArgs{...}
type AnalyticsWorkspaceIdentityInput interface {
pulumi.Input
ToAnalyticsWorkspaceIdentityOutput() AnalyticsWorkspaceIdentityOutput
ToAnalyticsWorkspaceIdentityOutputWithContext(context.Context) AnalyticsWorkspaceIdentityOutput
}
type AnalyticsWorkspaceIdentityArgs struct {
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the identity type of the Log Analytics Workspace. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you) and `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field.
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Log Analytics Workspace has been created.
Type pulumi.StringInput `pulumi:"type"`
}
func (AnalyticsWorkspaceIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AnalyticsWorkspaceIdentity)(nil)).Elem()
}
func (i AnalyticsWorkspaceIdentityArgs) ToAnalyticsWorkspaceIdentityOutput() AnalyticsWorkspaceIdentityOutput {
return i.ToAnalyticsWorkspaceIdentityOutputWithContext(context.Background())
}
func (i AnalyticsWorkspaceIdentityArgs) ToAnalyticsWorkspaceIdentityOutputWithContext(ctx context.Context) AnalyticsWorkspaceIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsWorkspaceIdentityOutput)
}
func (i AnalyticsWorkspaceIdentityArgs) ToAnalyticsWorkspaceIdentityPtrOutput() AnalyticsWorkspaceIdentityPtrOutput {
return i.ToAnalyticsWorkspaceIdentityPtrOutputWithContext(context.Background())
}
func (i AnalyticsWorkspaceIdentityArgs) ToAnalyticsWorkspaceIdentityPtrOutputWithContext(ctx context.Context) AnalyticsWorkspaceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsWorkspaceIdentityOutput).ToAnalyticsWorkspaceIdentityPtrOutputWithContext(ctx)
}
// AnalyticsWorkspaceIdentityPtrInput is an input type that accepts AnalyticsWorkspaceIdentityArgs, AnalyticsWorkspaceIdentityPtr and AnalyticsWorkspaceIdentityPtrOutput values.
// You can construct a concrete instance of `AnalyticsWorkspaceIdentityPtrInput` via:
//
// AnalyticsWorkspaceIdentityArgs{...}
//
// or:
//
// nil
type AnalyticsWorkspaceIdentityPtrInput interface {
pulumi.Input
ToAnalyticsWorkspaceIdentityPtrOutput() AnalyticsWorkspaceIdentityPtrOutput
ToAnalyticsWorkspaceIdentityPtrOutputWithContext(context.Context) AnalyticsWorkspaceIdentityPtrOutput
}
type analyticsWorkspaceIdentityPtrType AnalyticsWorkspaceIdentityArgs
func AnalyticsWorkspaceIdentityPtr(v *AnalyticsWorkspaceIdentityArgs) AnalyticsWorkspaceIdentityPtrInput {
return (*analyticsWorkspaceIdentityPtrType)(v)
}
func (*analyticsWorkspaceIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsWorkspaceIdentity)(nil)).Elem()
}
func (i *analyticsWorkspaceIdentityPtrType) ToAnalyticsWorkspaceIdentityPtrOutput() AnalyticsWorkspaceIdentityPtrOutput {
return i.ToAnalyticsWorkspaceIdentityPtrOutputWithContext(context.Background())
}
func (i *analyticsWorkspaceIdentityPtrType) ToAnalyticsWorkspaceIdentityPtrOutputWithContext(ctx context.Context) AnalyticsWorkspaceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsWorkspaceIdentityPtrOutput)
}
type AnalyticsWorkspaceIdentityOutput struct{ *pulumi.OutputState }
func (AnalyticsWorkspaceIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AnalyticsWorkspaceIdentity)(nil)).Elem()
}
func (o AnalyticsWorkspaceIdentityOutput) ToAnalyticsWorkspaceIdentityOutput() AnalyticsWorkspaceIdentityOutput {
return o
}
func (o AnalyticsWorkspaceIdentityOutput) ToAnalyticsWorkspaceIdentityOutputWithContext(ctx context.Context) AnalyticsWorkspaceIdentityOutput {
return o
}
func (o AnalyticsWorkspaceIdentityOutput) ToAnalyticsWorkspaceIdentityPtrOutput() AnalyticsWorkspaceIdentityPtrOutput {
return o.ToAnalyticsWorkspaceIdentityPtrOutputWithContext(context.Background())
}
func (o AnalyticsWorkspaceIdentityOutput) ToAnalyticsWorkspaceIdentityPtrOutputWithContext(ctx context.Context) AnalyticsWorkspaceIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AnalyticsWorkspaceIdentity) *AnalyticsWorkspaceIdentity {
return &v
}).(AnalyticsWorkspaceIdentityPtrOutput)
}
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
func (o AnalyticsWorkspaceIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v AnalyticsWorkspaceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
func (o AnalyticsWorkspaceIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AnalyticsWorkspaceIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
func (o AnalyticsWorkspaceIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AnalyticsWorkspaceIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the identity type of the Log Analytics Workspace. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you) and `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field.
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Log Analytics Workspace has been created.
func (o AnalyticsWorkspaceIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v AnalyticsWorkspaceIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type AnalyticsWorkspaceIdentityPtrOutput struct{ *pulumi.OutputState }
func (AnalyticsWorkspaceIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsWorkspaceIdentity)(nil)).Elem()
}
func (o AnalyticsWorkspaceIdentityPtrOutput) ToAnalyticsWorkspaceIdentityPtrOutput() AnalyticsWorkspaceIdentityPtrOutput {
return o
}
func (o AnalyticsWorkspaceIdentityPtrOutput) ToAnalyticsWorkspaceIdentityPtrOutputWithContext(ctx context.Context) AnalyticsWorkspaceIdentityPtrOutput {
return o
}
func (o AnalyticsWorkspaceIdentityPtrOutput) Elem() AnalyticsWorkspaceIdentityOutput {
return o.ApplyT(func(v *AnalyticsWorkspaceIdentity) AnalyticsWorkspaceIdentity {
if v != nil {
return *v
}
var ret AnalyticsWorkspaceIdentity
return ret
}).(AnalyticsWorkspaceIdentityOutput)
}
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
func (o AnalyticsWorkspaceIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AnalyticsWorkspaceIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
func (o AnalyticsWorkspaceIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspaceIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
func (o AnalyticsWorkspaceIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspaceIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the identity type of the Log Analytics Workspace. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you) and `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field.
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Log Analytics Workspace has been created.
func (o AnalyticsWorkspaceIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspaceIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsSolutionPlanInput)(nil)).Elem(), AnalyticsSolutionPlanArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsSolutionPlanPtrInput)(nil)).Elem(), AnalyticsSolutionPlanArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsWorkspaceIdentityInput)(nil)).Elem(), AnalyticsWorkspaceIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsWorkspaceIdentityPtrInput)(nil)).Elem(), AnalyticsWorkspaceIdentityArgs{})
pulumi.RegisterOutputType(AnalyticsSolutionPlanOutput{})
pulumi.RegisterOutputType(AnalyticsSolutionPlanPtrOutput{})
pulumi.RegisterOutputType(AnalyticsWorkspaceIdentityOutput{})
pulumi.RegisterOutputType(AnalyticsWorkspaceIdentityPtrOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/operationalinsights/analyticsSolution.go | sdk/go/azure/operationalinsights/analyticsSolution.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package operationalinsights
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics (formally Operational Insights) Solution.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi-random/sdk/v4/go/random"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("k8s-log-analytics-test"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// workspace, err := random.NewId(ctx, "workspace", &random.IdArgs{
// Keepers: map[string]interface{}{
// "groupName": example.Name,
// },
// ByteLength: 8,
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.Sprintf("k8s-workspace-%v", workspace.Hex),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// })
// if err != nil {
// return err
// }
// _, err = operationalinsights.NewAnalyticsSolution(ctx, "example", &operationalinsights.AnalyticsSolutionArgs{
// SolutionName: pulumi.String("ContainerInsights"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// WorkspaceResourceId: exampleAnalyticsWorkspace.ID(),
// WorkspaceName: exampleAnalyticsWorkspace.Name,
// Plan: &operationalinsights.AnalyticsSolutionPlanArgs{
// Publisher: pulumi.String("Microsoft"),
// Product: pulumi.String("OMSGallery/ContainerInsights"),
// },
// })
// if 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.OperationsManagement` - 2015-11-01-preview
//
// ## Import
//
// Log Analytics Solutions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:operationalinsights/analyticsSolution:AnalyticsSolution solution1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationsManagement/solutions/solution1
// ```
type AnalyticsSolution struct {
pulumi.CustomResourceState
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A `plan` block as documented below.
Plan AnalyticsSolutionPlanOutput `pulumi:"plan"`
// The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and its related workspace can only exist in the same resource group.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies the name of the solution to be deployed. See [here for options](https://docs.microsoft.com/azure/log-analytics/log-analytics-add-solutions).Changing this forces a new resource to be created.
SolutionName pulumi.StringOutput `pulumi:"solutionName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceName pulumi.StringOutput `pulumi:"workspaceName"`
// The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceResourceId pulumi.StringOutput `pulumi:"workspaceResourceId"`
}
// NewAnalyticsSolution registers a new resource with the given unique name, arguments, and options.
func NewAnalyticsSolution(ctx *pulumi.Context,
name string, args *AnalyticsSolutionArgs, opts ...pulumi.ResourceOption) (*AnalyticsSolution, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Plan == nil {
return nil, errors.New("invalid value for required argument 'Plan'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SolutionName == nil {
return nil, errors.New("invalid value for required argument 'SolutionName'")
}
if args.WorkspaceName == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceName'")
}
if args.WorkspaceResourceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceResourceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AnalyticsSolution
err := ctx.RegisterResource("azure:operationalinsights/analyticsSolution:AnalyticsSolution", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAnalyticsSolution gets an existing AnalyticsSolution resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAnalyticsSolution(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AnalyticsSolutionState, opts ...pulumi.ResourceOption) (*AnalyticsSolution, error) {
var resource AnalyticsSolution
err := ctx.ReadResource("azure:operationalinsights/analyticsSolution:AnalyticsSolution", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AnalyticsSolution resources.
type analyticsSolutionState struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `plan` block as documented below.
Plan *AnalyticsSolutionPlan `pulumi:"plan"`
// The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and its related workspace can only exist in the same resource group.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies the name of the solution to be deployed. See [here for options](https://docs.microsoft.com/azure/log-analytics/log-analytics-add-solutions).Changing this forces a new resource to be created.
SolutionName *string `pulumi:"solutionName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceName *string `pulumi:"workspaceName"`
// The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceResourceId *string `pulumi:"workspaceResourceId"`
}
type AnalyticsSolutionState struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `plan` block as documented below.
Plan AnalyticsSolutionPlanPtrInput
// The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and its related workspace can only exist in the same resource group.
ResourceGroupName pulumi.StringPtrInput
// Specifies the name of the solution to be deployed. See [here for options](https://docs.microsoft.com/azure/log-analytics/log-analytics-add-solutions).Changing this forces a new resource to be created.
SolutionName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceName pulumi.StringPtrInput
// The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceResourceId pulumi.StringPtrInput
}
func (AnalyticsSolutionState) ElementType() reflect.Type {
return reflect.TypeOf((*analyticsSolutionState)(nil)).Elem()
}
type analyticsSolutionArgs struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `plan` block as documented below.
Plan AnalyticsSolutionPlan `pulumi:"plan"`
// The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and its related workspace can only exist in the same resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the name of the solution to be deployed. See [here for options](https://docs.microsoft.com/azure/log-analytics/log-analytics-add-solutions).Changing this forces a new resource to be created.
SolutionName string `pulumi:"solutionName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceName string `pulumi:"workspaceName"`
// The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceResourceId string `pulumi:"workspaceResourceId"`
}
// The set of arguments for constructing a AnalyticsSolution resource.
type AnalyticsSolutionArgs struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `plan` block as documented below.
Plan AnalyticsSolutionPlanInput
// The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and its related workspace can only exist in the same resource group.
ResourceGroupName pulumi.StringInput
// Specifies the name of the solution to be deployed. See [here for options](https://docs.microsoft.com/azure/log-analytics/log-analytics-add-solutions).Changing this forces a new resource to be created.
SolutionName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceName pulumi.StringInput
// The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
WorkspaceResourceId pulumi.StringInput
}
func (AnalyticsSolutionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*analyticsSolutionArgs)(nil)).Elem()
}
type AnalyticsSolutionInput interface {
pulumi.Input
ToAnalyticsSolutionOutput() AnalyticsSolutionOutput
ToAnalyticsSolutionOutputWithContext(ctx context.Context) AnalyticsSolutionOutput
}
func (*AnalyticsSolution) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsSolution)(nil)).Elem()
}
func (i *AnalyticsSolution) ToAnalyticsSolutionOutput() AnalyticsSolutionOutput {
return i.ToAnalyticsSolutionOutputWithContext(context.Background())
}
func (i *AnalyticsSolution) ToAnalyticsSolutionOutputWithContext(ctx context.Context) AnalyticsSolutionOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsSolutionOutput)
}
// AnalyticsSolutionArrayInput is an input type that accepts AnalyticsSolutionArray and AnalyticsSolutionArrayOutput values.
// You can construct a concrete instance of `AnalyticsSolutionArrayInput` via:
//
// AnalyticsSolutionArray{ AnalyticsSolutionArgs{...} }
type AnalyticsSolutionArrayInput interface {
pulumi.Input
ToAnalyticsSolutionArrayOutput() AnalyticsSolutionArrayOutput
ToAnalyticsSolutionArrayOutputWithContext(context.Context) AnalyticsSolutionArrayOutput
}
type AnalyticsSolutionArray []AnalyticsSolutionInput
func (AnalyticsSolutionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AnalyticsSolution)(nil)).Elem()
}
func (i AnalyticsSolutionArray) ToAnalyticsSolutionArrayOutput() AnalyticsSolutionArrayOutput {
return i.ToAnalyticsSolutionArrayOutputWithContext(context.Background())
}
func (i AnalyticsSolutionArray) ToAnalyticsSolutionArrayOutputWithContext(ctx context.Context) AnalyticsSolutionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsSolutionArrayOutput)
}
// AnalyticsSolutionMapInput is an input type that accepts AnalyticsSolutionMap and AnalyticsSolutionMapOutput values.
// You can construct a concrete instance of `AnalyticsSolutionMapInput` via:
//
// AnalyticsSolutionMap{ "key": AnalyticsSolutionArgs{...} }
type AnalyticsSolutionMapInput interface {
pulumi.Input
ToAnalyticsSolutionMapOutput() AnalyticsSolutionMapOutput
ToAnalyticsSolutionMapOutputWithContext(context.Context) AnalyticsSolutionMapOutput
}
type AnalyticsSolutionMap map[string]AnalyticsSolutionInput
func (AnalyticsSolutionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AnalyticsSolution)(nil)).Elem()
}
func (i AnalyticsSolutionMap) ToAnalyticsSolutionMapOutput() AnalyticsSolutionMapOutput {
return i.ToAnalyticsSolutionMapOutputWithContext(context.Background())
}
func (i AnalyticsSolutionMap) ToAnalyticsSolutionMapOutputWithContext(ctx context.Context) AnalyticsSolutionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsSolutionMapOutput)
}
type AnalyticsSolutionOutput struct{ *pulumi.OutputState }
func (AnalyticsSolutionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsSolution)(nil)).Elem()
}
func (o AnalyticsSolutionOutput) ToAnalyticsSolutionOutput() AnalyticsSolutionOutput {
return o
}
func (o AnalyticsSolutionOutput) ToAnalyticsSolutionOutputWithContext(ctx context.Context) AnalyticsSolutionOutput {
return o
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o AnalyticsSolutionOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AnalyticsSolution) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A `plan` block as documented below.
func (o AnalyticsSolutionOutput) Plan() AnalyticsSolutionPlanOutput {
return o.ApplyT(func(v *AnalyticsSolution) AnalyticsSolutionPlanOutput { return v.Plan }).(AnalyticsSolutionPlanOutput)
}
// The name of the resource group in which the Log Analytics solution is created. Changing this forces a new resource to be created. Note: The solution and its related workspace can only exist in the same resource group.
func (o AnalyticsSolutionOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *AnalyticsSolution) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the name of the solution to be deployed. See [here for options](https://docs.microsoft.com/azure/log-analytics/log-analytics-add-solutions).Changing this forces a new resource to be created.
func (o AnalyticsSolutionOutput) SolutionName() pulumi.StringOutput {
return o.ApplyT(func(v *AnalyticsSolution) pulumi.StringOutput { return v.SolutionName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o AnalyticsSolutionOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *AnalyticsSolution) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
func (o AnalyticsSolutionOutput) WorkspaceName() pulumi.StringOutput {
return o.ApplyT(func(v *AnalyticsSolution) pulumi.StringOutput { return v.WorkspaceName }).(pulumi.StringOutput)
}
// The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created.
func (o AnalyticsSolutionOutput) WorkspaceResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *AnalyticsSolution) pulumi.StringOutput { return v.WorkspaceResourceId }).(pulumi.StringOutput)
}
type AnalyticsSolutionArrayOutput struct{ *pulumi.OutputState }
func (AnalyticsSolutionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AnalyticsSolution)(nil)).Elem()
}
func (o AnalyticsSolutionArrayOutput) ToAnalyticsSolutionArrayOutput() AnalyticsSolutionArrayOutput {
return o
}
func (o AnalyticsSolutionArrayOutput) ToAnalyticsSolutionArrayOutputWithContext(ctx context.Context) AnalyticsSolutionArrayOutput {
return o
}
func (o AnalyticsSolutionArrayOutput) Index(i pulumi.IntInput) AnalyticsSolutionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AnalyticsSolution {
return vs[0].([]*AnalyticsSolution)[vs[1].(int)]
}).(AnalyticsSolutionOutput)
}
type AnalyticsSolutionMapOutput struct{ *pulumi.OutputState }
func (AnalyticsSolutionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AnalyticsSolution)(nil)).Elem()
}
func (o AnalyticsSolutionMapOutput) ToAnalyticsSolutionMapOutput() AnalyticsSolutionMapOutput {
return o
}
func (o AnalyticsSolutionMapOutput) ToAnalyticsSolutionMapOutputWithContext(ctx context.Context) AnalyticsSolutionMapOutput {
return o
}
func (o AnalyticsSolutionMapOutput) MapIndex(k pulumi.StringInput) AnalyticsSolutionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AnalyticsSolution {
return vs[0].(map[string]*AnalyticsSolution)[vs[1].(string)]
}).(AnalyticsSolutionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsSolutionInput)(nil)).Elem(), &AnalyticsSolution{})
pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsSolutionArrayInput)(nil)).Elem(), AnalyticsSolutionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsSolutionMapInput)(nil)).Elem(), AnalyticsSolutionMap{})
pulumi.RegisterOutputType(AnalyticsSolutionOutput{})
pulumi.RegisterOutputType(AnalyticsSolutionArrayOutput{})
pulumi.RegisterOutputType(AnalyticsSolutionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/operationalinsights/queryPackQuery.go | sdk/go/azure/operationalinsights/queryPackQuery.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package operationalinsights
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Query Pack Query.
//
// ## 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/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/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
// }
// exampleQueryPack, err := loganalytics.NewQueryPack(ctx, "example", &loganalytics.QueryPackArgs{
// Name: pulumi.String("example-laqp"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = operationalinsights.NewQueryPackQuery(ctx, "example", &operationalinsights.QueryPackQueryArgs{
// Name: pulumi.String("19952bc3-0bf9-49eb-b713-6b80e7a41847"),
// QueryPackId: exampleQueryPack.ID(),
// Body: pulumi.String(`let newExceptionsTimeRange = 1d;
//
// let timeRangeToCheckBefore = 7d;
// exceptions
// | where timestamp < ago(timeRangeToCheckBefore)
// | summarize count() by problemId
// | join kind= rightanti (
// exceptions
// | where timestamp >= ago(newExceptionsTimeRange)
// | extend stack = tostring(details[0].rawStack)
// | summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId
// ) on problemId
// | order by count_ desc
// `),
//
// DisplayName: pulumi.String("Exceptions - New in the last 24 hours"),
// })
// if 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.OperationalInsights` - 2019-09-01
//
// ## Import
//
// Log Analytics Query Pack Queries can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:operationalinsights/queryPackQuery:QueryPackQuery example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.OperationalInsights/queryPacks/queryPack1/queries/15b49e87-8555-4d92-8a7b-2014b469a9df
// ```
type QueryPackQuery struct {
pulumi.CustomResourceState
// The additional properties that can be set for the Log Analytics Query Pack Query.
AdditionalSettingsJson pulumi.StringPtrOutput `pulumi:"additionalSettingsJson"`
// The body of the Log Analytics Query Pack Query.
Body pulumi.StringOutput `pulumi:"body"`
// A list of the related categories for the function. Possible values are `applications`, `audit`, `container`, `databases`, `desktopanalytics`, `management`, `monitor`, `network`, `resources`, `security`, `virtualmachines`, `windowsvirtualdesktop` and `workloads`.
Categories pulumi.StringArrayOutput `pulumi:"categories"`
// The description of the Log Analytics Query Pack Query.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The unique display name for the query within the Log Analytics Query Pack.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// An unique UUID/GUID which identifies this Log Analytics Query Pack Query - one will be generated if not specified. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Log Analytics Query Pack. Changing this forces a new resource to be created.
QueryPackId pulumi.StringOutput `pulumi:"queryPackId"`
// A list of the related resource types for the function. Possible values are `default`, `microsoft.aad/domainservices`, `microsoft.aadiam/tenants`, `microsoft.agfoodplatform/farmbeats`, `microsoft.analysisservices/servers`, `microsoft.apimanagement/service`, `microsoft.appconfiguration/configurationstores`, `microsoft.appplatform/spring`, `microsoft.attestation/attestationproviders`, `microsoft.authorization/tenants`, `microsoft.automation/automationaccounts`, `microsoft.autonomousdevelopmentplatform/accounts`, `microsoft.azurestackhci/virtualmachines`, `microsoft.batch/batchaccounts`, `microsoft.blockchain/blockchainmembers`, `microsoft.botservice/botservices`, `microsoft.cache/redis`, `microsoft.cdn/profiles`, `microsoft.cognitiveservices/accounts`, `microsoft.communication/communicationservices`, `microsoft.compute/virtualmachines`, `microsoft.compute/virtualmachinescalesets`, `microsoft.connectedcache/cachenodes`, `microsoft.connectedvehicle/platformaccounts`, `microsoft.conenctedvmwarevsphere/virtualmachines`, `microsoft.containerregistry/registries`, `microsoft.containerservice/managedclusters`, `microsoft.d365customerinsights/instances`, `microsoft.dashboard/grafana`, `microsoft.databricks/workspaces`, `microsoft.datacollaboration/workspaces`, `microsoft.datafactory/factories`, `microsoft.datalakeanalytics/accounts`, `microsoft.datalakestore/accounts`, `microsoft.datashare/accounts`, `microsoft.dbformariadb/servers`, `microsoft.dbformysql/servers`, `microsoft.dbforpostgresql/flexibleservers`, `microsoft.dbforpostgresql/servers`, `microsoft.dbforpostgresql/serversv2`, `microsoft.digitaltwins/digitaltwinsinstances`, `microsoft.documentdb/cassandraclusters`, `microsoft.documentdb/databaseaccounts`, `microsoft.desktopvirtualization/applicationgroups`, `microsoft.desktopvirtualization/hostpools`, `microsoft.desktopvirtualization/workspaces`, `microsoft.devices/iothubs`, `microsoft.devices/provisioningservices`, `microsoft.dynamics/fraudprotection/purchase`, `microsoft.eventgrid/domains`, `microsoft.eventgrid/topics`, `microsoft.eventgrid/partnernamespaces`, `microsoft.eventgrid/partnertopics`, `microsoft.eventgrid/systemtopics`, `microsoft.eventhub/namespaces`, `microsoft.experimentation/experimentworkspaces`, `microsoft.hdinsight/clusters`, `microsoft.healthcareapis/services`, `microsoft.informationprotection/datasecuritymanagement`, `microsoft.intune/operations`, `microsoft.insights/autoscalesettings`, `microsoft.insights/components`, `microsoft.insights/workloadmonitoring`, `microsoft.keyvault/vaults`, `microsoft.kubernetes/connectedclusters`, `microsoft.kusto/clusters`, `microsoft.loadtestservice/loadtests`, `microsoft.logic/workflows`, `microsoft.machinelearningservices/workspaces`, `microsoft.media/mediaservices`, `microsoft.netapp/netappaccounts/capacitypools`, `microsoft.network/applicationgateways`, `microsoft.network/azurefirewalls`, `microsoft.network/bastionhosts`, `microsoft.network/expressroutecircuits`, `microsoft.network/frontdoors`, `microsoft.network/loadbalancers`, `microsoft.network/networkinterfaces`, `microsoft.network/networksecuritygroups`, `microsoft.network/networksecurityperimeters`, `microsoft.network/networkwatchers/connectionmonitors`, `microsoft.network/networkwatchers/trafficanalytics`, `microsoft.network/publicipaddresses`, `microsoft.network/trafficmanagerprofiles`, `microsoft.network/virtualnetworks`, `microsoft.network/virtualnetworkgateways`, `microsoft.network/vpngateways`, `microsoft.networkfunction/azuretrafficcollectors`, `microsoft.openenergyplatform/energyservices`, `microsoft.openlogisticsplatform/workspaces`, `microsoft.operationalinsights/workspaces`, `microsoft.powerbi/tenants`, `microsoft.powerbi/tenants/workspaces`, `microsoft.powerbidedicated/capacities`, `microsoft.purview/accounts`, `microsoft.recoveryservices/vaults`, `microsoft.resources/azureactivity`, `microsoft.scvmm/virtualmachines`, `microsoft.search/searchservices`, `microsoft.security/antimalwaresettings`, `microsoft.securityinsights/amazon`, `microsoft.securityinsights/anomalies`, `microsoft.securityinsights/cef`, `microsoft.securityinsights/datacollection`, `microsoft.securityinsights/dnsnormalized`, `microsoft.securityinsights/mda`, `microsoft.securityinsights/mde`, `microsoft.securityinsights/mdi`, `microsoft.securityinsights/mdo`, `microsoft.securityinsights/networksessionnormalized`, `microsoft.securityinsights/office365`, `microsoft.securityinsights/purview`, `microsoft.securityinsights/securityinsights`, `microsoft.securityinsights/securityinsights/mcas`, `microsoft.securityinsights/tvm`, `microsoft.securityinsights/watchlists`, `microsoft.servicebus/namespaces`, `microsoft.servicefabric/clusters`, `microsoft.signalrservice/signalr`, `microsoft.signalrservice/webpubsub`, `microsoft.sql/managedinstances`, `microsoft.sql/servers`, `microsoft.sql/servers/databases`, `microsoft.storage/storageaccounts`, `microsoft.storagecache/caches`, `microsoft.streamanalytics/streamingjobs`, `microsoft.synapse/workspaces`, `microsoft.timeseriesinsights/environments`, `microsoft.videoindexer/accounts`, `microsoft.web/sites`, `microsoft.workloadmonitor/monitors`, `resourcegroup` and `subscription`.
ResourceTypes pulumi.StringArrayOutput `pulumi:"resourceTypes"`
// A list of the related Log Analytics solutions for the function. Possible values are `AADDomainServices`, `ADAssessment`, `ADAssessmentPlus`, `ADReplication`, `ADSecurityAssessment`, `AlertManagement`, `AntiMalware`, `ApplicationInsights`, `AzureAssessment`, `AzureSecurityOfThings`, `AzureSentinelDSRE`, `AzureSentinelPrivatePreview`, `BehaviorAnalyticsInsights`, `ChangeTracking`, `CompatibilityAssessment`, `ContainerInsights`, `Containers`, `CustomizedWindowsEventsFiltering`, `DeviceHealthProd`, `DnsAnalytics`, `ExchangeAssessment`, `ExchangeOnlineAssessment`, `IISAssessmentPlus`, `InfrastructureInsights`, `InternalWindowsEvent`, `LogManagement`, `Microsoft365Analytics`, `NetworkMonitoring`, `SCCMAssessmentPlus`, `SCOMAssessment`, `SCOMAssessmentPlus`, `Security`, `SecurityCenter`, `SecurityCenterFree`, `SecurityInsights`, `ServiceMap`, `SfBAssessment`, `SfBOnlineAssessment`, `SharePointOnlineAssessment`, `SPAssessment`, `SQLAdvancedThreatProtection`, `SQLAssessment`, `SQLAssessmentPlus`, `SQLDataClassification`, `SQLThreatDetection`, `SQLVulnerabilityAssessment`, `SurfaceHub`, `Updates`, `VMInsights`, `WEFInternalUat`, `WEF_10x`, `WEF_10xDSRE`, `WaaSUpdateInsights`, `WinLog`, `WindowsClientAssessmentPlus`, `WindowsEventForwarding`, `WindowsFirewall`, `WindowsServerAssessment`, `WireData` and `WireData2`.
Solutions pulumi.StringArrayOutput `pulumi:"solutions"`
// A mapping of tags which should be assigned to the Log Analytics Query Pack Query.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewQueryPackQuery registers a new resource with the given unique name, arguments, and options.
func NewQueryPackQuery(ctx *pulumi.Context,
name string, args *QueryPackQueryArgs, opts ...pulumi.ResourceOption) (*QueryPackQuery, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Body == nil {
return nil, errors.New("invalid value for required argument 'Body'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.QueryPackId == nil {
return nil, errors.New("invalid value for required argument 'QueryPackId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource QueryPackQuery
err := ctx.RegisterResource("azure:operationalinsights/queryPackQuery:QueryPackQuery", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetQueryPackQuery gets an existing QueryPackQuery resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetQueryPackQuery(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *QueryPackQueryState, opts ...pulumi.ResourceOption) (*QueryPackQuery, error) {
var resource QueryPackQuery
err := ctx.ReadResource("azure:operationalinsights/queryPackQuery:QueryPackQuery", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering QueryPackQuery resources.
type queryPackQueryState struct {
// The additional properties that can be set for the Log Analytics Query Pack Query.
AdditionalSettingsJson *string `pulumi:"additionalSettingsJson"`
// The body of the Log Analytics Query Pack Query.
Body *string `pulumi:"body"`
// A list of the related categories for the function. Possible values are `applications`, `audit`, `container`, `databases`, `desktopanalytics`, `management`, `monitor`, `network`, `resources`, `security`, `virtualmachines`, `windowsvirtualdesktop` and `workloads`.
Categories []string `pulumi:"categories"`
// The description of the Log Analytics Query Pack Query.
Description *string `pulumi:"description"`
// The unique display name for the query within the Log Analytics Query Pack.
DisplayName *string `pulumi:"displayName"`
// An unique UUID/GUID which identifies this Log Analytics Query Pack Query - one will be generated if not specified. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Log Analytics Query Pack. Changing this forces a new resource to be created.
QueryPackId *string `pulumi:"queryPackId"`
// A list of the related resource types for the function. Possible values are `default`, `microsoft.aad/domainservices`, `microsoft.aadiam/tenants`, `microsoft.agfoodplatform/farmbeats`, `microsoft.analysisservices/servers`, `microsoft.apimanagement/service`, `microsoft.appconfiguration/configurationstores`, `microsoft.appplatform/spring`, `microsoft.attestation/attestationproviders`, `microsoft.authorization/tenants`, `microsoft.automation/automationaccounts`, `microsoft.autonomousdevelopmentplatform/accounts`, `microsoft.azurestackhci/virtualmachines`, `microsoft.batch/batchaccounts`, `microsoft.blockchain/blockchainmembers`, `microsoft.botservice/botservices`, `microsoft.cache/redis`, `microsoft.cdn/profiles`, `microsoft.cognitiveservices/accounts`, `microsoft.communication/communicationservices`, `microsoft.compute/virtualmachines`, `microsoft.compute/virtualmachinescalesets`, `microsoft.connectedcache/cachenodes`, `microsoft.connectedvehicle/platformaccounts`, `microsoft.conenctedvmwarevsphere/virtualmachines`, `microsoft.containerregistry/registries`, `microsoft.containerservice/managedclusters`, `microsoft.d365customerinsights/instances`, `microsoft.dashboard/grafana`, `microsoft.databricks/workspaces`, `microsoft.datacollaboration/workspaces`, `microsoft.datafactory/factories`, `microsoft.datalakeanalytics/accounts`, `microsoft.datalakestore/accounts`, `microsoft.datashare/accounts`, `microsoft.dbformariadb/servers`, `microsoft.dbformysql/servers`, `microsoft.dbforpostgresql/flexibleservers`, `microsoft.dbforpostgresql/servers`, `microsoft.dbforpostgresql/serversv2`, `microsoft.digitaltwins/digitaltwinsinstances`, `microsoft.documentdb/cassandraclusters`, `microsoft.documentdb/databaseaccounts`, `microsoft.desktopvirtualization/applicationgroups`, `microsoft.desktopvirtualization/hostpools`, `microsoft.desktopvirtualization/workspaces`, `microsoft.devices/iothubs`, `microsoft.devices/provisioningservices`, `microsoft.dynamics/fraudprotection/purchase`, `microsoft.eventgrid/domains`, `microsoft.eventgrid/topics`, `microsoft.eventgrid/partnernamespaces`, `microsoft.eventgrid/partnertopics`, `microsoft.eventgrid/systemtopics`, `microsoft.eventhub/namespaces`, `microsoft.experimentation/experimentworkspaces`, `microsoft.hdinsight/clusters`, `microsoft.healthcareapis/services`, `microsoft.informationprotection/datasecuritymanagement`, `microsoft.intune/operations`, `microsoft.insights/autoscalesettings`, `microsoft.insights/components`, `microsoft.insights/workloadmonitoring`, `microsoft.keyvault/vaults`, `microsoft.kubernetes/connectedclusters`, `microsoft.kusto/clusters`, `microsoft.loadtestservice/loadtests`, `microsoft.logic/workflows`, `microsoft.machinelearningservices/workspaces`, `microsoft.media/mediaservices`, `microsoft.netapp/netappaccounts/capacitypools`, `microsoft.network/applicationgateways`, `microsoft.network/azurefirewalls`, `microsoft.network/bastionhosts`, `microsoft.network/expressroutecircuits`, `microsoft.network/frontdoors`, `microsoft.network/loadbalancers`, `microsoft.network/networkinterfaces`, `microsoft.network/networksecuritygroups`, `microsoft.network/networksecurityperimeters`, `microsoft.network/networkwatchers/connectionmonitors`, `microsoft.network/networkwatchers/trafficanalytics`, `microsoft.network/publicipaddresses`, `microsoft.network/trafficmanagerprofiles`, `microsoft.network/virtualnetworks`, `microsoft.network/virtualnetworkgateways`, `microsoft.network/vpngateways`, `microsoft.networkfunction/azuretrafficcollectors`, `microsoft.openenergyplatform/energyservices`, `microsoft.openlogisticsplatform/workspaces`, `microsoft.operationalinsights/workspaces`, `microsoft.powerbi/tenants`, `microsoft.powerbi/tenants/workspaces`, `microsoft.powerbidedicated/capacities`, `microsoft.purview/accounts`, `microsoft.recoveryservices/vaults`, `microsoft.resources/azureactivity`, `microsoft.scvmm/virtualmachines`, `microsoft.search/searchservices`, `microsoft.security/antimalwaresettings`, `microsoft.securityinsights/amazon`, `microsoft.securityinsights/anomalies`, `microsoft.securityinsights/cef`, `microsoft.securityinsights/datacollection`, `microsoft.securityinsights/dnsnormalized`, `microsoft.securityinsights/mda`, `microsoft.securityinsights/mde`, `microsoft.securityinsights/mdi`, `microsoft.securityinsights/mdo`, `microsoft.securityinsights/networksessionnormalized`, `microsoft.securityinsights/office365`, `microsoft.securityinsights/purview`, `microsoft.securityinsights/securityinsights`, `microsoft.securityinsights/securityinsights/mcas`, `microsoft.securityinsights/tvm`, `microsoft.securityinsights/watchlists`, `microsoft.servicebus/namespaces`, `microsoft.servicefabric/clusters`, `microsoft.signalrservice/signalr`, `microsoft.signalrservice/webpubsub`, `microsoft.sql/managedinstances`, `microsoft.sql/servers`, `microsoft.sql/servers/databases`, `microsoft.storage/storageaccounts`, `microsoft.storagecache/caches`, `microsoft.streamanalytics/streamingjobs`, `microsoft.synapse/workspaces`, `microsoft.timeseriesinsights/environments`, `microsoft.videoindexer/accounts`, `microsoft.web/sites`, `microsoft.workloadmonitor/monitors`, `resourcegroup` and `subscription`.
ResourceTypes []string `pulumi:"resourceTypes"`
// A list of the related Log Analytics solutions for the function. Possible values are `AADDomainServices`, `ADAssessment`, `ADAssessmentPlus`, `ADReplication`, `ADSecurityAssessment`, `AlertManagement`, `AntiMalware`, `ApplicationInsights`, `AzureAssessment`, `AzureSecurityOfThings`, `AzureSentinelDSRE`, `AzureSentinelPrivatePreview`, `BehaviorAnalyticsInsights`, `ChangeTracking`, `CompatibilityAssessment`, `ContainerInsights`, `Containers`, `CustomizedWindowsEventsFiltering`, `DeviceHealthProd`, `DnsAnalytics`, `ExchangeAssessment`, `ExchangeOnlineAssessment`, `IISAssessmentPlus`, `InfrastructureInsights`, `InternalWindowsEvent`, `LogManagement`, `Microsoft365Analytics`, `NetworkMonitoring`, `SCCMAssessmentPlus`, `SCOMAssessment`, `SCOMAssessmentPlus`, `Security`, `SecurityCenter`, `SecurityCenterFree`, `SecurityInsights`, `ServiceMap`, `SfBAssessment`, `SfBOnlineAssessment`, `SharePointOnlineAssessment`, `SPAssessment`, `SQLAdvancedThreatProtection`, `SQLAssessment`, `SQLAssessmentPlus`, `SQLDataClassification`, `SQLThreatDetection`, `SQLVulnerabilityAssessment`, `SurfaceHub`, `Updates`, `VMInsights`, `WEFInternalUat`, `WEF_10x`, `WEF_10xDSRE`, `WaaSUpdateInsights`, `WinLog`, `WindowsClientAssessmentPlus`, `WindowsEventForwarding`, `WindowsFirewall`, `WindowsServerAssessment`, `WireData` and `WireData2`.
Solutions []string `pulumi:"solutions"`
// A mapping of tags which should be assigned to the Log Analytics Query Pack Query.
Tags map[string]string `pulumi:"tags"`
}
type QueryPackQueryState struct {
// The additional properties that can be set for the Log Analytics Query Pack Query.
AdditionalSettingsJson pulumi.StringPtrInput
// The body of the Log Analytics Query Pack Query.
Body pulumi.StringPtrInput
// A list of the related categories for the function. Possible values are `applications`, `audit`, `container`, `databases`, `desktopanalytics`, `management`, `monitor`, `network`, `resources`, `security`, `virtualmachines`, `windowsvirtualdesktop` and `workloads`.
Categories pulumi.StringArrayInput
// The description of the Log Analytics Query Pack Query.
Description pulumi.StringPtrInput
// The unique display name for the query within the Log Analytics Query Pack.
DisplayName pulumi.StringPtrInput
// An unique UUID/GUID which identifies this Log Analytics Query Pack Query - one will be generated if not specified. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Log Analytics Query Pack. Changing this forces a new resource to be created.
QueryPackId pulumi.StringPtrInput
// A list of the related resource types for the function. Possible values are `default`, `microsoft.aad/domainservices`, `microsoft.aadiam/tenants`, `microsoft.agfoodplatform/farmbeats`, `microsoft.analysisservices/servers`, `microsoft.apimanagement/service`, `microsoft.appconfiguration/configurationstores`, `microsoft.appplatform/spring`, `microsoft.attestation/attestationproviders`, `microsoft.authorization/tenants`, `microsoft.automation/automationaccounts`, `microsoft.autonomousdevelopmentplatform/accounts`, `microsoft.azurestackhci/virtualmachines`, `microsoft.batch/batchaccounts`, `microsoft.blockchain/blockchainmembers`, `microsoft.botservice/botservices`, `microsoft.cache/redis`, `microsoft.cdn/profiles`, `microsoft.cognitiveservices/accounts`, `microsoft.communication/communicationservices`, `microsoft.compute/virtualmachines`, `microsoft.compute/virtualmachinescalesets`, `microsoft.connectedcache/cachenodes`, `microsoft.connectedvehicle/platformaccounts`, `microsoft.conenctedvmwarevsphere/virtualmachines`, `microsoft.containerregistry/registries`, `microsoft.containerservice/managedclusters`, `microsoft.d365customerinsights/instances`, `microsoft.dashboard/grafana`, `microsoft.databricks/workspaces`, `microsoft.datacollaboration/workspaces`, `microsoft.datafactory/factories`, `microsoft.datalakeanalytics/accounts`, `microsoft.datalakestore/accounts`, `microsoft.datashare/accounts`, `microsoft.dbformariadb/servers`, `microsoft.dbformysql/servers`, `microsoft.dbforpostgresql/flexibleservers`, `microsoft.dbforpostgresql/servers`, `microsoft.dbforpostgresql/serversv2`, `microsoft.digitaltwins/digitaltwinsinstances`, `microsoft.documentdb/cassandraclusters`, `microsoft.documentdb/databaseaccounts`, `microsoft.desktopvirtualization/applicationgroups`, `microsoft.desktopvirtualization/hostpools`, `microsoft.desktopvirtualization/workspaces`, `microsoft.devices/iothubs`, `microsoft.devices/provisioningservices`, `microsoft.dynamics/fraudprotection/purchase`, `microsoft.eventgrid/domains`, `microsoft.eventgrid/topics`, `microsoft.eventgrid/partnernamespaces`, `microsoft.eventgrid/partnertopics`, `microsoft.eventgrid/systemtopics`, `microsoft.eventhub/namespaces`, `microsoft.experimentation/experimentworkspaces`, `microsoft.hdinsight/clusters`, `microsoft.healthcareapis/services`, `microsoft.informationprotection/datasecuritymanagement`, `microsoft.intune/operations`, `microsoft.insights/autoscalesettings`, `microsoft.insights/components`, `microsoft.insights/workloadmonitoring`, `microsoft.keyvault/vaults`, `microsoft.kubernetes/connectedclusters`, `microsoft.kusto/clusters`, `microsoft.loadtestservice/loadtests`, `microsoft.logic/workflows`, `microsoft.machinelearningservices/workspaces`, `microsoft.media/mediaservices`, `microsoft.netapp/netappaccounts/capacitypools`, `microsoft.network/applicationgateways`, `microsoft.network/azurefirewalls`, `microsoft.network/bastionhosts`, `microsoft.network/expressroutecircuits`, `microsoft.network/frontdoors`, `microsoft.network/loadbalancers`, `microsoft.network/networkinterfaces`, `microsoft.network/networksecuritygroups`, `microsoft.network/networksecurityperimeters`, `microsoft.network/networkwatchers/connectionmonitors`, `microsoft.network/networkwatchers/trafficanalytics`, `microsoft.network/publicipaddresses`, `microsoft.network/trafficmanagerprofiles`, `microsoft.network/virtualnetworks`, `microsoft.network/virtualnetworkgateways`, `microsoft.network/vpngateways`, `microsoft.networkfunction/azuretrafficcollectors`, `microsoft.openenergyplatform/energyservices`, `microsoft.openlogisticsplatform/workspaces`, `microsoft.operationalinsights/workspaces`, `microsoft.powerbi/tenants`, `microsoft.powerbi/tenants/workspaces`, `microsoft.powerbidedicated/capacities`, `microsoft.purview/accounts`, `microsoft.recoveryservices/vaults`, `microsoft.resources/azureactivity`, `microsoft.scvmm/virtualmachines`, `microsoft.search/searchservices`, `microsoft.security/antimalwaresettings`, `microsoft.securityinsights/amazon`, `microsoft.securityinsights/anomalies`, `microsoft.securityinsights/cef`, `microsoft.securityinsights/datacollection`, `microsoft.securityinsights/dnsnormalized`, `microsoft.securityinsights/mda`, `microsoft.securityinsights/mde`, `microsoft.securityinsights/mdi`, `microsoft.securityinsights/mdo`, `microsoft.securityinsights/networksessionnormalized`, `microsoft.securityinsights/office365`, `microsoft.securityinsights/purview`, `microsoft.securityinsights/securityinsights`, `microsoft.securityinsights/securityinsights/mcas`, `microsoft.securityinsights/tvm`, `microsoft.securityinsights/watchlists`, `microsoft.servicebus/namespaces`, `microsoft.servicefabric/clusters`, `microsoft.signalrservice/signalr`, `microsoft.signalrservice/webpubsub`, `microsoft.sql/managedinstances`, `microsoft.sql/servers`, `microsoft.sql/servers/databases`, `microsoft.storage/storageaccounts`, `microsoft.storagecache/caches`, `microsoft.streamanalytics/streamingjobs`, `microsoft.synapse/workspaces`, `microsoft.timeseriesinsights/environments`, `microsoft.videoindexer/accounts`, `microsoft.web/sites`, `microsoft.workloadmonitor/monitors`, `resourcegroup` and `subscription`.
ResourceTypes pulumi.StringArrayInput
// A list of the related Log Analytics solutions for the function. Possible values are `AADDomainServices`, `ADAssessment`, `ADAssessmentPlus`, `ADReplication`, `ADSecurityAssessment`, `AlertManagement`, `AntiMalware`, `ApplicationInsights`, `AzureAssessment`, `AzureSecurityOfThings`, `AzureSentinelDSRE`, `AzureSentinelPrivatePreview`, `BehaviorAnalyticsInsights`, `ChangeTracking`, `CompatibilityAssessment`, `ContainerInsights`, `Containers`, `CustomizedWindowsEventsFiltering`, `DeviceHealthProd`, `DnsAnalytics`, `ExchangeAssessment`, `ExchangeOnlineAssessment`, `IISAssessmentPlus`, `InfrastructureInsights`, `InternalWindowsEvent`, `LogManagement`, `Microsoft365Analytics`, `NetworkMonitoring`, `SCCMAssessmentPlus`, `SCOMAssessment`, `SCOMAssessmentPlus`, `Security`, `SecurityCenter`, `SecurityCenterFree`, `SecurityInsights`, `ServiceMap`, `SfBAssessment`, `SfBOnlineAssessment`, `SharePointOnlineAssessment`, `SPAssessment`, `SQLAdvancedThreatProtection`, `SQLAssessment`, `SQLAssessmentPlus`, `SQLDataClassification`, `SQLThreatDetection`, `SQLVulnerabilityAssessment`, `SurfaceHub`, `Updates`, `VMInsights`, `WEFInternalUat`, `WEF_10x`, `WEF_10xDSRE`, `WaaSUpdateInsights`, `WinLog`, `WindowsClientAssessmentPlus`, `WindowsEventForwarding`, `WindowsFirewall`, `WindowsServerAssessment`, `WireData` and `WireData2`.
Solutions pulumi.StringArrayInput
// A mapping of tags which should be assigned to the Log Analytics Query Pack Query.
Tags pulumi.StringMapInput
}
func (QueryPackQueryState) ElementType() reflect.Type {
return reflect.TypeOf((*queryPackQueryState)(nil)).Elem()
}
type queryPackQueryArgs struct {
// The additional properties that can be set for the Log Analytics Query Pack Query.
AdditionalSettingsJson *string `pulumi:"additionalSettingsJson"`
// The body of the Log Analytics Query Pack Query.
Body string `pulumi:"body"`
// A list of the related categories for the function. Possible values are `applications`, `audit`, `container`, `databases`, `desktopanalytics`, `management`, `monitor`, `network`, `resources`, `security`, `virtualmachines`, `windowsvirtualdesktop` and `workloads`.
Categories []string `pulumi:"categories"`
// The description of the Log Analytics Query Pack Query.
Description *string `pulumi:"description"`
// The unique display name for the query within the Log Analytics Query Pack.
DisplayName string `pulumi:"displayName"`
// An unique UUID/GUID which identifies this Log Analytics Query Pack Query - one will be generated if not specified. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Log Analytics Query Pack. Changing this forces a new resource to be created.
QueryPackId string `pulumi:"queryPackId"`
| 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/operationalinsights/analyticsWorkspace.go | sdk/go/azure/operationalinsights/analyticsWorkspace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package operationalinsights
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics (formally Operational Insights) Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/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 = operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// RetentionInDays: pulumi.Int(30),
// })
// if 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.OperationalInsights` - 2022-10-01, 2020-08-01
//
// ## Import
//
// Log Analytics Workspaces can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1
// ```
type AnalyticsWorkspace struct {
pulumi.CustomResourceState
// Specifies if the log Analytics Workspace allows users accessing to data associated with the resources they have permission to view, without permission to workspace. Defaults to `true`.
AllowResourceOnlyPermissions pulumi.BoolPtrOutput `pulumi:"allowResourceOnlyPermissions"`
// Is Customer Managed Storage mandatory for query management?
CmkForQueryForced pulumi.BoolPtrOutput `pulumi:"cmkForQueryForced"`
// The workspace daily quota for ingestion in GB. Defaults to `-1` (unlimited) if omitted.
DailyQuotaGb pulumi.Float64PtrOutput `pulumi:"dailyQuotaGb"`
// The ID of the Data Collection Rule to use for this workspace.
DataCollectionRuleId pulumi.StringPtrOutput `pulumi:"dataCollectionRuleId"`
// An `identity` block as defined below.
Identity AnalyticsWorkspaceIdentityPtrOutput `pulumi:"identity"`
// Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
ImmediateDataPurgeOn30DaysEnabled pulumi.BoolPtrOutput `pulumi:"immediateDataPurgeOn30DaysEnabled"`
// Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
InternetIngestionEnabled pulumi.BoolPtrOutput `pulumi:"internetIngestionEnabled"`
// Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
InternetQueryEnabled pulumi.BoolPtrOutput `pulumi:"internetQueryEnabled"`
// Deprecated: `localAuthenticationDisabled` has been deprecated in favour of `localAuthenticationEnabled` and will be removed in v5.0 of the AzureRM Provider
LocalAuthenticationDisabled pulumi.BoolOutput `pulumi:"localAuthenticationDisabled"`
// Specifies if the log Analytics workspace should allow local authentication methods in addition to Microsoft Entra (Azure AD). Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolOutput `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary shared key for the Log Analytics Workspace.
PrimarySharedKey pulumi.StringOutput `pulumi:"primarySharedKey"`
// The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
//
// > **Note:** `reservationCapacityInGbPerDay` can only be used when the `sku` is set to `CapacityReservation`.
ReservationCapacityInGbPerDay pulumi.IntPtrOutput `pulumi:"reservationCapacityInGbPerDay"`
// The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The workspace data retention in days. Possible values are between `30` and `730`.
RetentionInDays pulumi.IntOutput `pulumi:"retentionInDays"`
// The Secondary shared key for the Log Analytics Workspace.
SecondarySharedKey pulumi.StringOutput `pulumi:"secondarySharedKey"`
// Specifies the SKU of the Log Analytics Workspace. Possible values are `PerGB2018`, `PerNode`, `Premium`, `Standalone`, `Standard`, `CapacityReservation`, `LACluster` and `Unlimited`. Defaults to `PerGB2018`.
//
// > **Note:** `sku` should only be set to `LACluster` when the Log Analytics Workspace is linked to a Log Analytics Cluster. Additionally, `sku` cannot be modified while linked.
//
// > **Note:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. Changing `sku` to `CapacityReservation` or changing `reservationCapacityInGbPerDay` to a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
//
// > **Note:** A new pricing model took effect on `2018-04-03`, which requires the SKU `PerGB2018`. If you've provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about [the Pricing SKUs is available at the following URI](https://aka.ms/PricingTierWarning).
Sku pulumi.StringOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Workspace (or Customer) ID for the Log Analytics Workspace.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewAnalyticsWorkspace registers a new resource with the given unique name, arguments, and options.
func NewAnalyticsWorkspace(ctx *pulumi.Context,
name string, args *AnalyticsWorkspaceArgs, opts ...pulumi.ResourceOption) (*AnalyticsWorkspace, 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{
"primarySharedKey",
"secondarySharedKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AnalyticsWorkspace
err := ctx.RegisterResource("azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAnalyticsWorkspace gets an existing AnalyticsWorkspace resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAnalyticsWorkspace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AnalyticsWorkspaceState, opts ...pulumi.ResourceOption) (*AnalyticsWorkspace, error) {
var resource AnalyticsWorkspace
err := ctx.ReadResource("azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AnalyticsWorkspace resources.
type analyticsWorkspaceState struct {
// Specifies if the log Analytics Workspace allows users accessing to data associated with the resources they have permission to view, without permission to workspace. Defaults to `true`.
AllowResourceOnlyPermissions *bool `pulumi:"allowResourceOnlyPermissions"`
// Is Customer Managed Storage mandatory for query management?
CmkForQueryForced *bool `pulumi:"cmkForQueryForced"`
// The workspace daily quota for ingestion in GB. Defaults to `-1` (unlimited) if omitted.
DailyQuotaGb *float64 `pulumi:"dailyQuotaGb"`
// The ID of the Data Collection Rule to use for this workspace.
DataCollectionRuleId *string `pulumi:"dataCollectionRuleId"`
// An `identity` block as defined below.
Identity *AnalyticsWorkspaceIdentity `pulumi:"identity"`
// Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
ImmediateDataPurgeOn30DaysEnabled *bool `pulumi:"immediateDataPurgeOn30DaysEnabled"`
// Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
InternetIngestionEnabled *bool `pulumi:"internetIngestionEnabled"`
// Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
InternetQueryEnabled *bool `pulumi:"internetQueryEnabled"`
// Deprecated: `localAuthenticationDisabled` has been deprecated in favour of `localAuthenticationEnabled` and will be removed in v5.0 of the AzureRM Provider
LocalAuthenticationDisabled *bool `pulumi:"localAuthenticationDisabled"`
// Specifies if the log Analytics workspace should allow local authentication methods in addition to Microsoft Entra (Azure AD). Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary shared key for the Log Analytics Workspace.
PrimarySharedKey *string `pulumi:"primarySharedKey"`
// The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
//
// > **Note:** `reservationCapacityInGbPerDay` can only be used when the `sku` is set to `CapacityReservation`.
ReservationCapacityInGbPerDay *int `pulumi:"reservationCapacityInGbPerDay"`
// The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The workspace data retention in days. Possible values are between `30` and `730`.
RetentionInDays *int `pulumi:"retentionInDays"`
// The Secondary shared key for the Log Analytics Workspace.
SecondarySharedKey *string `pulumi:"secondarySharedKey"`
// Specifies the SKU of the Log Analytics Workspace. Possible values are `PerGB2018`, `PerNode`, `Premium`, `Standalone`, `Standard`, `CapacityReservation`, `LACluster` and `Unlimited`. Defaults to `PerGB2018`.
//
// > **Note:** `sku` should only be set to `LACluster` when the Log Analytics Workspace is linked to a Log Analytics Cluster. Additionally, `sku` cannot be modified while linked.
//
// > **Note:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. Changing `sku` to `CapacityReservation` or changing `reservationCapacityInGbPerDay` to a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
//
// > **Note:** A new pricing model took effect on `2018-04-03`, which requires the SKU `PerGB2018`. If you've provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about [the Pricing SKUs is available at the following URI](https://aka.ms/PricingTierWarning).
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Workspace (or Customer) ID for the Log Analytics Workspace.
WorkspaceId *string `pulumi:"workspaceId"`
}
type AnalyticsWorkspaceState struct {
// Specifies if the log Analytics Workspace allows users accessing to data associated with the resources they have permission to view, without permission to workspace. Defaults to `true`.
AllowResourceOnlyPermissions pulumi.BoolPtrInput
// Is Customer Managed Storage mandatory for query management?
CmkForQueryForced pulumi.BoolPtrInput
// The workspace daily quota for ingestion in GB. Defaults to `-1` (unlimited) if omitted.
DailyQuotaGb pulumi.Float64PtrInput
// The ID of the Data Collection Rule to use for this workspace.
DataCollectionRuleId pulumi.StringPtrInput
// An `identity` block as defined below.
Identity AnalyticsWorkspaceIdentityPtrInput
// Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
ImmediateDataPurgeOn30DaysEnabled pulumi.BoolPtrInput
// Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
InternetIngestionEnabled pulumi.BoolPtrInput
// Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
InternetQueryEnabled pulumi.BoolPtrInput
// Deprecated: `localAuthenticationDisabled` has been deprecated in favour of `localAuthenticationEnabled` and will be removed in v5.0 of the AzureRM Provider
LocalAuthenticationDisabled pulumi.BoolPtrInput
// Specifies if the log Analytics workspace should allow local authentication methods in addition to Microsoft Entra (Azure AD). Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary shared key for the Log Analytics Workspace.
PrimarySharedKey pulumi.StringPtrInput
// The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
//
// > **Note:** `reservationCapacityInGbPerDay` can only be used when the `sku` is set to `CapacityReservation`.
ReservationCapacityInGbPerDay pulumi.IntPtrInput
// The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The workspace data retention in days. Possible values are between `30` and `730`.
RetentionInDays pulumi.IntPtrInput
// The Secondary shared key for the Log Analytics Workspace.
SecondarySharedKey pulumi.StringPtrInput
// Specifies the SKU of the Log Analytics Workspace. Possible values are `PerGB2018`, `PerNode`, `Premium`, `Standalone`, `Standard`, `CapacityReservation`, `LACluster` and `Unlimited`. Defaults to `PerGB2018`.
//
// > **Note:** `sku` should only be set to `LACluster` when the Log Analytics Workspace is linked to a Log Analytics Cluster. Additionally, `sku` cannot be modified while linked.
//
// > **Note:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. Changing `sku` to `CapacityReservation` or changing `reservationCapacityInGbPerDay` to a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
//
// > **Note:** A new pricing model took effect on `2018-04-03`, which requires the SKU `PerGB2018`. If you've provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about [the Pricing SKUs is available at the following URI](https://aka.ms/PricingTierWarning).
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Workspace (or Customer) ID for the Log Analytics Workspace.
WorkspaceId pulumi.StringPtrInput
}
func (AnalyticsWorkspaceState) ElementType() reflect.Type {
return reflect.TypeOf((*analyticsWorkspaceState)(nil)).Elem()
}
type analyticsWorkspaceArgs struct {
// Specifies if the log Analytics Workspace allows users accessing to data associated with the resources they have permission to view, without permission to workspace. Defaults to `true`.
AllowResourceOnlyPermissions *bool `pulumi:"allowResourceOnlyPermissions"`
// Is Customer Managed Storage mandatory for query management?
CmkForQueryForced *bool `pulumi:"cmkForQueryForced"`
// The workspace daily quota for ingestion in GB. Defaults to `-1` (unlimited) if omitted.
DailyQuotaGb *float64 `pulumi:"dailyQuotaGb"`
// The ID of the Data Collection Rule to use for this workspace.
DataCollectionRuleId *string `pulumi:"dataCollectionRuleId"`
// An `identity` block as defined below.
Identity *AnalyticsWorkspaceIdentity `pulumi:"identity"`
// Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
ImmediateDataPurgeOn30DaysEnabled *bool `pulumi:"immediateDataPurgeOn30DaysEnabled"`
// Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
InternetIngestionEnabled *bool `pulumi:"internetIngestionEnabled"`
// Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
InternetQueryEnabled *bool `pulumi:"internetQueryEnabled"`
// Deprecated: `localAuthenticationDisabled` has been deprecated in favour of `localAuthenticationEnabled` and will be removed in v5.0 of the AzureRM Provider
LocalAuthenticationDisabled *bool `pulumi:"localAuthenticationDisabled"`
// Specifies if the log Analytics workspace should allow local authentication methods in addition to Microsoft Entra (Azure AD). Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
//
// > **Note:** `reservationCapacityInGbPerDay` can only be used when the `sku` is set to `CapacityReservation`.
ReservationCapacityInGbPerDay *int `pulumi:"reservationCapacityInGbPerDay"`
// The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The workspace data retention in days. Possible values are between `30` and `730`.
RetentionInDays *int `pulumi:"retentionInDays"`
// Specifies the SKU of the Log Analytics Workspace. Possible values are `PerGB2018`, `PerNode`, `Premium`, `Standalone`, `Standard`, `CapacityReservation`, `LACluster` and `Unlimited`. Defaults to `PerGB2018`.
//
// > **Note:** `sku` should only be set to `LACluster` when the Log Analytics Workspace is linked to a Log Analytics Cluster. Additionally, `sku` cannot be modified while linked.
//
// > **Note:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. Changing `sku` to `CapacityReservation` or changing `reservationCapacityInGbPerDay` to a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
//
// > **Note:** A new pricing model took effect on `2018-04-03`, which requires the SKU `PerGB2018`. If you've provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about [the Pricing SKUs is available at the following URI](https://aka.ms/PricingTierWarning).
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 AnalyticsWorkspace resource.
type AnalyticsWorkspaceArgs struct {
// Specifies if the log Analytics Workspace allows users accessing to data associated with the resources they have permission to view, without permission to workspace. Defaults to `true`.
AllowResourceOnlyPermissions pulumi.BoolPtrInput
// Is Customer Managed Storage mandatory for query management?
CmkForQueryForced pulumi.BoolPtrInput
// The workspace daily quota for ingestion in GB. Defaults to `-1` (unlimited) if omitted.
DailyQuotaGb pulumi.Float64PtrInput
// The ID of the Data Collection Rule to use for this workspace.
DataCollectionRuleId pulumi.StringPtrInput
// An `identity` block as defined below.
Identity AnalyticsWorkspaceIdentityPtrInput
// Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
ImmediateDataPurgeOn30DaysEnabled pulumi.BoolPtrInput
// Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
InternetIngestionEnabled pulumi.BoolPtrInput
// Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
InternetQueryEnabled pulumi.BoolPtrInput
// Deprecated: `localAuthenticationDisabled` has been deprecated in favour of `localAuthenticationEnabled` and will be removed in v5.0 of the AzureRM Provider
LocalAuthenticationDisabled pulumi.BoolPtrInput
// Specifies if the log Analytics workspace should allow local authentication methods in addition to Microsoft Entra (Azure AD). Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The capacity reservation level in GB for this workspace. Possible values are `100`, `200`, `300`, `400`, `500`, `1000`, `2000` and `5000`.
//
// > **Note:** `reservationCapacityInGbPerDay` can only be used when the `sku` is set to `CapacityReservation`.
ReservationCapacityInGbPerDay pulumi.IntPtrInput
// The name of the resource group in which the Log Analytics workspace is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The workspace data retention in days. Possible values are between `30` and `730`.
RetentionInDays pulumi.IntPtrInput
// Specifies the SKU of the Log Analytics Workspace. Possible values are `PerGB2018`, `PerNode`, `Premium`, `Standalone`, `Standard`, `CapacityReservation`, `LACluster` and `Unlimited`. Defaults to `PerGB2018`.
//
// > **Note:** `sku` should only be set to `LACluster` when the Log Analytics Workspace is linked to a Log Analytics Cluster. Additionally, `sku` cannot be modified while linked.
//
// > **Note:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. Changing `sku` to `CapacityReservation` or changing `reservationCapacityInGbPerDay` to a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information.
//
// > **Note:** A new pricing model took effect on `2018-04-03`, which requires the SKU `PerGB2018`. If you've provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about [the Pricing SKUs is available at the following URI](https://aka.ms/PricingTierWarning).
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AnalyticsWorkspaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*analyticsWorkspaceArgs)(nil)).Elem()
}
type AnalyticsWorkspaceInput interface {
pulumi.Input
ToAnalyticsWorkspaceOutput() AnalyticsWorkspaceOutput
ToAnalyticsWorkspaceOutputWithContext(ctx context.Context) AnalyticsWorkspaceOutput
}
func (*AnalyticsWorkspace) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsWorkspace)(nil)).Elem()
}
func (i *AnalyticsWorkspace) ToAnalyticsWorkspaceOutput() AnalyticsWorkspaceOutput {
return i.ToAnalyticsWorkspaceOutputWithContext(context.Background())
}
func (i *AnalyticsWorkspace) ToAnalyticsWorkspaceOutputWithContext(ctx context.Context) AnalyticsWorkspaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsWorkspaceOutput)
}
// AnalyticsWorkspaceArrayInput is an input type that accepts AnalyticsWorkspaceArray and AnalyticsWorkspaceArrayOutput values.
// You can construct a concrete instance of `AnalyticsWorkspaceArrayInput` via:
//
// AnalyticsWorkspaceArray{ AnalyticsWorkspaceArgs{...} }
type AnalyticsWorkspaceArrayInput interface {
pulumi.Input
ToAnalyticsWorkspaceArrayOutput() AnalyticsWorkspaceArrayOutput
ToAnalyticsWorkspaceArrayOutputWithContext(context.Context) AnalyticsWorkspaceArrayOutput
}
type AnalyticsWorkspaceArray []AnalyticsWorkspaceInput
func (AnalyticsWorkspaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AnalyticsWorkspace)(nil)).Elem()
}
func (i AnalyticsWorkspaceArray) ToAnalyticsWorkspaceArrayOutput() AnalyticsWorkspaceArrayOutput {
return i.ToAnalyticsWorkspaceArrayOutputWithContext(context.Background())
}
func (i AnalyticsWorkspaceArray) ToAnalyticsWorkspaceArrayOutputWithContext(ctx context.Context) AnalyticsWorkspaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsWorkspaceArrayOutput)
}
// AnalyticsWorkspaceMapInput is an input type that accepts AnalyticsWorkspaceMap and AnalyticsWorkspaceMapOutput values.
// You can construct a concrete instance of `AnalyticsWorkspaceMapInput` via:
//
// AnalyticsWorkspaceMap{ "key": AnalyticsWorkspaceArgs{...} }
type AnalyticsWorkspaceMapInput interface {
pulumi.Input
ToAnalyticsWorkspaceMapOutput() AnalyticsWorkspaceMapOutput
ToAnalyticsWorkspaceMapOutputWithContext(context.Context) AnalyticsWorkspaceMapOutput
}
type AnalyticsWorkspaceMap map[string]AnalyticsWorkspaceInput
func (AnalyticsWorkspaceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AnalyticsWorkspace)(nil)).Elem()
}
func (i AnalyticsWorkspaceMap) ToAnalyticsWorkspaceMapOutput() AnalyticsWorkspaceMapOutput {
return i.ToAnalyticsWorkspaceMapOutputWithContext(context.Background())
}
func (i AnalyticsWorkspaceMap) ToAnalyticsWorkspaceMapOutputWithContext(ctx context.Context) AnalyticsWorkspaceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AnalyticsWorkspaceMapOutput)
}
type AnalyticsWorkspaceOutput struct{ *pulumi.OutputState }
func (AnalyticsWorkspaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AnalyticsWorkspace)(nil)).Elem()
}
func (o AnalyticsWorkspaceOutput) ToAnalyticsWorkspaceOutput() AnalyticsWorkspaceOutput {
return o
}
func (o AnalyticsWorkspaceOutput) ToAnalyticsWorkspaceOutputWithContext(ctx context.Context) AnalyticsWorkspaceOutput {
return o
}
// Specifies if the log Analytics Workspace allows users accessing to data associated with the resources they have permission to view, without permission to workspace. Defaults to `true`.
func (o AnalyticsWorkspaceOutput) AllowResourceOnlyPermissions() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.BoolPtrOutput { return v.AllowResourceOnlyPermissions }).(pulumi.BoolPtrOutput)
}
// Is Customer Managed Storage mandatory for query management?
func (o AnalyticsWorkspaceOutput) CmkForQueryForced() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.BoolPtrOutput { return v.CmkForQueryForced }).(pulumi.BoolPtrOutput)
}
// The workspace daily quota for ingestion in GB. Defaults to `-1` (unlimited) if omitted.
func (o AnalyticsWorkspaceOutput) DailyQuotaGb() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.Float64PtrOutput { return v.DailyQuotaGb }).(pulumi.Float64PtrOutput)
}
// The ID of the Data Collection Rule to use for this workspace.
func (o AnalyticsWorkspaceOutput) DataCollectionRuleId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.StringPtrOutput { return v.DataCollectionRuleId }).(pulumi.StringPtrOutput)
}
// An `identity` block as defined below.
func (o AnalyticsWorkspaceOutput) Identity() AnalyticsWorkspaceIdentityPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) AnalyticsWorkspaceIdentityPtrOutput { return v.Identity }).(AnalyticsWorkspaceIdentityPtrOutput)
}
// Whether to remove the data in the Log Analytics Workspace immediately after 30 days.
func (o AnalyticsWorkspaceOutput) ImmediateDataPurgeOn30DaysEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.BoolPtrOutput { return v.ImmediateDataPurgeOn30DaysEnabled }).(pulumi.BoolPtrOutput)
}
// Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`.
func (o AnalyticsWorkspaceOutput) InternetIngestionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.BoolPtrOutput { return v.InternetIngestionEnabled }).(pulumi.BoolPtrOutput)
}
// Should the Log Analytics Workspace support querying over the Public Internet? Defaults to `true`.
func (o AnalyticsWorkspaceOutput) InternetQueryEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.BoolPtrOutput { return v.InternetQueryEnabled }).(pulumi.BoolPtrOutput)
}
// Deprecated: `localAuthenticationDisabled` has been deprecated in favour of `localAuthenticationEnabled` and will be removed in v5.0 of the AzureRM Provider
func (o AnalyticsWorkspaceOutput) LocalAuthenticationDisabled() pulumi.BoolOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.BoolOutput { return v.LocalAuthenticationDisabled }).(pulumi.BoolOutput)
}
// Specifies if the log Analytics workspace should allow local authentication methods in addition to Microsoft Entra (Azure AD). Defaults to `true`.
func (o AnalyticsWorkspaceOutput) LocalAuthenticationEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.BoolOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o AnalyticsWorkspaceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Log Analytics Workspace. Workspace name should include 4-63 letters, digits or '-'. The '-' shouldn't be the first or the last symbol. Changing this forces a new resource to be created.
func (o AnalyticsWorkspaceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AnalyticsWorkspace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary shared key for the Log Analytics Workspace.
| 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/operationalinsights/getAnalyticsWorkspace.go | sdk/go/azure/operationalinsights/getAnalyticsWorkspace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package operationalinsights
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 Log Analytics (formally Operational Insights) Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := operationalinsights.LookupAnalyticsWorkspace(ctx, &operationalinsights.LookupAnalyticsWorkspaceArgs{
// Name: "acctest-01",
// ResourceGroupName: "acctest",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("logAnalyticsWorkspaceId", example.WorkspaceId)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
func LookupAnalyticsWorkspace(ctx *pulumi.Context, args *LookupAnalyticsWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupAnalyticsWorkspaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAnalyticsWorkspaceResult
err := ctx.Invoke("azure:operationalinsights/getAnalyticsWorkspace:getAnalyticsWorkspace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAnalyticsWorkspace.
type LookupAnalyticsWorkspaceArgs struct {
// Specifies the name of the Log Analytics Workspace.
Name string `pulumi:"name"`
// The name of the resource group in which the Log Analytics workspace is located in.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAnalyticsWorkspace.
type LookupAnalyticsWorkspaceResult struct {
// The workspace daily quota for ingestion in GB.
DailyQuotaGb float64 `pulumi:"dailyQuotaGb"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The Primary shared key for the Log Analytics Workspace.
PrimarySharedKey string `pulumi:"primarySharedKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The workspace data retention in days.
RetentionInDays int `pulumi:"retentionInDays"`
// The Secondary shared key for the Log Analytics Workspace.
SecondarySharedKey string `pulumi:"secondarySharedKey"`
// The SKU of the Log Analytics Workspace.
Sku string `pulumi:"sku"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Workspace (or Customer) ID for the Log Analytics Workspace.
WorkspaceId string `pulumi:"workspaceId"`
}
func LookupAnalyticsWorkspaceOutput(ctx *pulumi.Context, args LookupAnalyticsWorkspaceOutputArgs, opts ...pulumi.InvokeOption) LookupAnalyticsWorkspaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAnalyticsWorkspaceResultOutput, error) {
args := v.(LookupAnalyticsWorkspaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:operationalinsights/getAnalyticsWorkspace:getAnalyticsWorkspace", args, LookupAnalyticsWorkspaceResultOutput{}, options).(LookupAnalyticsWorkspaceResultOutput), nil
}).(LookupAnalyticsWorkspaceResultOutput)
}
// A collection of arguments for invoking getAnalyticsWorkspace.
type LookupAnalyticsWorkspaceOutputArgs struct {
// Specifies the name of the Log Analytics Workspace.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the Log Analytics workspace is located in.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupAnalyticsWorkspaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAnalyticsWorkspaceArgs)(nil)).Elem()
}
// A collection of values returned by getAnalyticsWorkspace.
type LookupAnalyticsWorkspaceResultOutput struct{ *pulumi.OutputState }
func (LookupAnalyticsWorkspaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAnalyticsWorkspaceResult)(nil)).Elem()
}
func (o LookupAnalyticsWorkspaceResultOutput) ToLookupAnalyticsWorkspaceResultOutput() LookupAnalyticsWorkspaceResultOutput {
return o
}
func (o LookupAnalyticsWorkspaceResultOutput) ToLookupAnalyticsWorkspaceResultOutputWithContext(ctx context.Context) LookupAnalyticsWorkspaceResultOutput {
return o
}
// The workspace daily quota for ingestion in GB.
func (o LookupAnalyticsWorkspaceResultOutput) DailyQuotaGb() pulumi.Float64Output {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) float64 { return v.DailyQuotaGb }).(pulumi.Float64Output)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAnalyticsWorkspaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupAnalyticsWorkspaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupAnalyticsWorkspaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Primary shared key for the Log Analytics Workspace.
func (o LookupAnalyticsWorkspaceResultOutput) PrimarySharedKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.PrimarySharedKey }).(pulumi.StringOutput)
}
func (o LookupAnalyticsWorkspaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The workspace data retention in days.
func (o LookupAnalyticsWorkspaceResultOutput) RetentionInDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) int { return v.RetentionInDays }).(pulumi.IntOutput)
}
// The Secondary shared key for the Log Analytics Workspace.
func (o LookupAnalyticsWorkspaceResultOutput) SecondarySharedKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.SecondarySharedKey }).(pulumi.StringOutput)
}
// The SKU of the Log Analytics Workspace.
func (o LookupAnalyticsWorkspaceResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupAnalyticsWorkspaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Workspace (or Customer) ID for the Log Analytics Workspace.
func (o LookupAnalyticsWorkspaceResultOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAnalyticsWorkspaceResult) string { return v.WorkspaceId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAnalyticsWorkspaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/workloadssap/singleNodeVirtualInstance.go | sdk/go/azure/workloadssap/singleNodeVirtualInstance.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package workloadssap
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an SAP Single Node Virtual Instance with new SAP System.
//
// > **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use.
//
// ## Import
//
// SAP Single Node Virtual Instances with new SAP Systems can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:workloadssap/singleNodeVirtualInstance:SingleNodeVirtualInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Workloads/sapVirtualInstances/vis1
// ```
type SingleNodeVirtualInstance struct {
pulumi.CustomResourceState
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation pulumi.StringOutput `pulumi:"appLocation"`
// The environment type for the SAP Single Node Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringOutput `pulumi:"environment"`
// An `identity` block as defined below.
Identity SingleNodeVirtualInstanceIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the managed Resource Group for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrOutput `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrOutput `pulumi:"managedResourcesNetworkAccessType"`
// Specifies the name of this SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The fully qualified domain name for the SAP system. Changing this forces a new resource to be created.
SapFqdn pulumi.StringOutput `pulumi:"sapFqdn"`
// The SAP Product type for the SAP Single Node Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringOutput `pulumi:"sapProduct"`
// A `singleServerConfiguration` block as defined below. Changing this forces a new resource to be created.
SingleServerConfiguration SingleNodeVirtualInstanceSingleServerConfigurationOutput `pulumi:"singleServerConfiguration"`
// A mapping of tags which should be assigned to the SAP Single Node Virtual Instance.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewSingleNodeVirtualInstance registers a new resource with the given unique name, arguments, and options.
func NewSingleNodeVirtualInstance(ctx *pulumi.Context,
name string, args *SingleNodeVirtualInstanceArgs, opts ...pulumi.ResourceOption) (*SingleNodeVirtualInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AppLocation == nil {
return nil, errors.New("invalid value for required argument 'AppLocation'")
}
if args.Environment == nil {
return nil, errors.New("invalid value for required argument 'Environment'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SapFqdn == nil {
return nil, errors.New("invalid value for required argument 'SapFqdn'")
}
if args.SapProduct == nil {
return nil, errors.New("invalid value for required argument 'SapProduct'")
}
if args.SingleServerConfiguration == nil {
return nil, errors.New("invalid value for required argument 'SingleServerConfiguration'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SingleNodeVirtualInstance
err := ctx.RegisterResource("azure:workloadssap/singleNodeVirtualInstance:SingleNodeVirtualInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSingleNodeVirtualInstance gets an existing SingleNodeVirtualInstance resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSingleNodeVirtualInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SingleNodeVirtualInstanceState, opts ...pulumi.ResourceOption) (*SingleNodeVirtualInstance, error) {
var resource SingleNodeVirtualInstance
err := ctx.ReadResource("azure:workloadssap/singleNodeVirtualInstance:SingleNodeVirtualInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SingleNodeVirtualInstance resources.
type singleNodeVirtualInstanceState struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation *string `pulumi:"appLocation"`
// The environment type for the SAP Single Node Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment *string `pulumi:"environment"`
// An `identity` block as defined below.
Identity *SingleNodeVirtualInstanceIdentity `pulumi:"identity"`
// The Azure Region where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the managed Resource Group for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType *string `pulumi:"managedResourcesNetworkAccessType"`
// Specifies the name of this SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The fully qualified domain name for the SAP system. Changing this forces a new resource to be created.
SapFqdn *string `pulumi:"sapFqdn"`
// The SAP Product type for the SAP Single Node Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct *string `pulumi:"sapProduct"`
// A `singleServerConfiguration` block as defined below. Changing this forces a new resource to be created.
SingleServerConfiguration *SingleNodeVirtualInstanceSingleServerConfiguration `pulumi:"singleServerConfiguration"`
// A mapping of tags which should be assigned to the SAP Single Node Virtual Instance.
Tags map[string]string `pulumi:"tags"`
}
type SingleNodeVirtualInstanceState struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation pulumi.StringPtrInput
// The environment type for the SAP Single Node Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringPtrInput
// An `identity` block as defined below.
Identity SingleNodeVirtualInstanceIdentityPtrInput
// The Azure Region where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the managed Resource Group for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrInput
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrInput
// Specifies the name of this SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The fully qualified domain name for the SAP system. Changing this forces a new resource to be created.
SapFqdn pulumi.StringPtrInput
// The SAP Product type for the SAP Single Node Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringPtrInput
// A `singleServerConfiguration` block as defined below. Changing this forces a new resource to be created.
SingleServerConfiguration SingleNodeVirtualInstanceSingleServerConfigurationPtrInput
// A mapping of tags which should be assigned to the SAP Single Node Virtual Instance.
Tags pulumi.StringMapInput
}
func (SingleNodeVirtualInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*singleNodeVirtualInstanceState)(nil)).Elem()
}
type singleNodeVirtualInstanceArgs struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation string `pulumi:"appLocation"`
// The environment type for the SAP Single Node Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment string `pulumi:"environment"`
// An `identity` block as defined below.
Identity *SingleNodeVirtualInstanceIdentity `pulumi:"identity"`
// The Azure Region where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the managed Resource Group for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType *string `pulumi:"managedResourcesNetworkAccessType"`
// Specifies the name of this SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The fully qualified domain name for the SAP system. Changing this forces a new resource to be created.
SapFqdn string `pulumi:"sapFqdn"`
// The SAP Product type for the SAP Single Node Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct string `pulumi:"sapProduct"`
// A `singleServerConfiguration` block as defined below. Changing this forces a new resource to be created.
SingleServerConfiguration SingleNodeVirtualInstanceSingleServerConfiguration `pulumi:"singleServerConfiguration"`
// A mapping of tags which should be assigned to the SAP Single Node Virtual Instance.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a SingleNodeVirtualInstance resource.
type SingleNodeVirtualInstanceArgs struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation pulumi.StringInput
// The environment type for the SAP Single Node Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringInput
// An `identity` block as defined below.
Identity SingleNodeVirtualInstanceIdentityPtrInput
// The Azure Region where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the managed Resource Group for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrInput
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrInput
// Specifies the name of this SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The fully qualified domain name for the SAP system. Changing this forces a new resource to be created.
SapFqdn pulumi.StringInput
// The SAP Product type for the SAP Single Node Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringInput
// A `singleServerConfiguration` block as defined below. Changing this forces a new resource to be created.
SingleServerConfiguration SingleNodeVirtualInstanceSingleServerConfigurationInput
// A mapping of tags which should be assigned to the SAP Single Node Virtual Instance.
Tags pulumi.StringMapInput
}
func (SingleNodeVirtualInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*singleNodeVirtualInstanceArgs)(nil)).Elem()
}
type SingleNodeVirtualInstanceInput interface {
pulumi.Input
ToSingleNodeVirtualInstanceOutput() SingleNodeVirtualInstanceOutput
ToSingleNodeVirtualInstanceOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceOutput
}
func (*SingleNodeVirtualInstance) ElementType() reflect.Type {
return reflect.TypeOf((**SingleNodeVirtualInstance)(nil)).Elem()
}
func (i *SingleNodeVirtualInstance) ToSingleNodeVirtualInstanceOutput() SingleNodeVirtualInstanceOutput {
return i.ToSingleNodeVirtualInstanceOutputWithContext(context.Background())
}
func (i *SingleNodeVirtualInstance) ToSingleNodeVirtualInstanceOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceOutput)
}
// SingleNodeVirtualInstanceArrayInput is an input type that accepts SingleNodeVirtualInstanceArray and SingleNodeVirtualInstanceArrayOutput values.
// You can construct a concrete instance of `SingleNodeVirtualInstanceArrayInput` via:
//
// SingleNodeVirtualInstanceArray{ SingleNodeVirtualInstanceArgs{...} }
type SingleNodeVirtualInstanceArrayInput interface {
pulumi.Input
ToSingleNodeVirtualInstanceArrayOutput() SingleNodeVirtualInstanceArrayOutput
ToSingleNodeVirtualInstanceArrayOutputWithContext(context.Context) SingleNodeVirtualInstanceArrayOutput
}
type SingleNodeVirtualInstanceArray []SingleNodeVirtualInstanceInput
func (SingleNodeVirtualInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SingleNodeVirtualInstance)(nil)).Elem()
}
func (i SingleNodeVirtualInstanceArray) ToSingleNodeVirtualInstanceArrayOutput() SingleNodeVirtualInstanceArrayOutput {
return i.ToSingleNodeVirtualInstanceArrayOutputWithContext(context.Background())
}
func (i SingleNodeVirtualInstanceArray) ToSingleNodeVirtualInstanceArrayOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceArrayOutput)
}
// SingleNodeVirtualInstanceMapInput is an input type that accepts SingleNodeVirtualInstanceMap and SingleNodeVirtualInstanceMapOutput values.
// You can construct a concrete instance of `SingleNodeVirtualInstanceMapInput` via:
//
// SingleNodeVirtualInstanceMap{ "key": SingleNodeVirtualInstanceArgs{...} }
type SingleNodeVirtualInstanceMapInput interface {
pulumi.Input
ToSingleNodeVirtualInstanceMapOutput() SingleNodeVirtualInstanceMapOutput
ToSingleNodeVirtualInstanceMapOutputWithContext(context.Context) SingleNodeVirtualInstanceMapOutput
}
type SingleNodeVirtualInstanceMap map[string]SingleNodeVirtualInstanceInput
func (SingleNodeVirtualInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SingleNodeVirtualInstance)(nil)).Elem()
}
func (i SingleNodeVirtualInstanceMap) ToSingleNodeVirtualInstanceMapOutput() SingleNodeVirtualInstanceMapOutput {
return i.ToSingleNodeVirtualInstanceMapOutputWithContext(context.Background())
}
func (i SingleNodeVirtualInstanceMap) ToSingleNodeVirtualInstanceMapOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceMapOutput)
}
type SingleNodeVirtualInstanceOutput struct{ *pulumi.OutputState }
func (SingleNodeVirtualInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SingleNodeVirtualInstance)(nil)).Elem()
}
func (o SingleNodeVirtualInstanceOutput) ToSingleNodeVirtualInstanceOutput() SingleNodeVirtualInstanceOutput {
return o
}
func (o SingleNodeVirtualInstanceOutput) ToSingleNodeVirtualInstanceOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceOutput {
return o
}
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) AppLocation() pulumi.StringOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringOutput { return v.AppLocation }).(pulumi.StringOutput)
}
// The environment type for the SAP Single Node Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) Environment() pulumi.StringOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringOutput { return v.Environment }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o SingleNodeVirtualInstanceOutput) Identity() SingleNodeVirtualInstanceIdentityPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) SingleNodeVirtualInstanceIdentityPtrOutput { return v.Identity }).(SingleNodeVirtualInstanceIdentityPtrOutput)
}
// The Azure Region where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the managed Resource Group for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) ManagedResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringPtrOutput { return v.ManagedResourceGroupName }).(pulumi.StringPtrOutput)
}
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
func (o SingleNodeVirtualInstanceOutput) ManagedResourcesNetworkAccessType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringPtrOutput { return v.ManagedResourcesNetworkAccessType }).(pulumi.StringPtrOutput)
}
// Specifies the name of this SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the SAP Single Node Virtual Instance should exist. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The fully qualified domain name for the SAP system. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) SapFqdn() pulumi.StringOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringOutput { return v.SapFqdn }).(pulumi.StringOutput)
}
// The SAP Product type for the SAP Single Node Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) SapProduct() pulumi.StringOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringOutput { return v.SapProduct }).(pulumi.StringOutput)
}
// A `singleServerConfiguration` block as defined below. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceOutput) SingleServerConfiguration() SingleNodeVirtualInstanceSingleServerConfigurationOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) SingleNodeVirtualInstanceSingleServerConfigurationOutput {
return v.SingleServerConfiguration
}).(SingleNodeVirtualInstanceSingleServerConfigurationOutput)
}
// A mapping of tags which should be assigned to the SAP Single Node Virtual Instance.
func (o SingleNodeVirtualInstanceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type SingleNodeVirtualInstanceArrayOutput struct{ *pulumi.OutputState }
func (SingleNodeVirtualInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SingleNodeVirtualInstance)(nil)).Elem()
}
func (o SingleNodeVirtualInstanceArrayOutput) ToSingleNodeVirtualInstanceArrayOutput() SingleNodeVirtualInstanceArrayOutput {
return o
}
func (o SingleNodeVirtualInstanceArrayOutput) ToSingleNodeVirtualInstanceArrayOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceArrayOutput {
return o
}
func (o SingleNodeVirtualInstanceArrayOutput) Index(i pulumi.IntInput) SingleNodeVirtualInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SingleNodeVirtualInstance {
return vs[0].([]*SingleNodeVirtualInstance)[vs[1].(int)]
}).(SingleNodeVirtualInstanceOutput)
}
type SingleNodeVirtualInstanceMapOutput struct{ *pulumi.OutputState }
func (SingleNodeVirtualInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SingleNodeVirtualInstance)(nil)).Elem()
}
func (o SingleNodeVirtualInstanceMapOutput) ToSingleNodeVirtualInstanceMapOutput() SingleNodeVirtualInstanceMapOutput {
return o
}
func (o SingleNodeVirtualInstanceMapOutput) ToSingleNodeVirtualInstanceMapOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceMapOutput {
return o
}
func (o SingleNodeVirtualInstanceMapOutput) MapIndex(k pulumi.StringInput) SingleNodeVirtualInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SingleNodeVirtualInstance {
return vs[0].(map[string]*SingleNodeVirtualInstance)[vs[1].(string)]
}).(SingleNodeVirtualInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SingleNodeVirtualInstanceInput)(nil)).Elem(), &SingleNodeVirtualInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*SingleNodeVirtualInstanceArrayInput)(nil)).Elem(), SingleNodeVirtualInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SingleNodeVirtualInstanceMapInput)(nil)).Elem(), SingleNodeVirtualInstanceMap{})
pulumi.RegisterOutputType(SingleNodeVirtualInstanceOutput{})
pulumi.RegisterOutputType(SingleNodeVirtualInstanceArrayOutput{})
pulumi.RegisterOutputType(SingleNodeVirtualInstanceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/workloadssap/init.go | sdk/go/azure/workloadssap/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 workloadssap
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:workloadssap/discoveryVirtualInstance:DiscoveryVirtualInstance":
r = &DiscoveryVirtualInstance{}
case "azure:workloadssap/singleNodeVirtualInstance:SingleNodeVirtualInstance":
r = &SingleNodeVirtualInstance{}
case "azure:workloadssap/threeTierVirtualInstance:ThreeTierVirtualInstance":
r = &ThreeTierVirtualInstance{}
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",
"workloadssap/discoveryVirtualInstance",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"workloadssap/singleNodeVirtualInstance",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"workloadssap/threeTierVirtualInstance",
&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/workloadssap/pulumiTypes.go | sdk/go/azure/workloadssap/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 workloadssap
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 DiscoveryVirtualInstanceIdentity struct {
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Discovery Virtual Instance.
IdentityIds []string `pulumi:"identityIds"`
// The type of Managed Service Identity that should be configured on this SAP Discovery Virtual Instance. The only possible value is `UserAssigned`.
Type string `pulumi:"type"`
}
// DiscoveryVirtualInstanceIdentityInput is an input type that accepts DiscoveryVirtualInstanceIdentityArgs and DiscoveryVirtualInstanceIdentityOutput values.
// You can construct a concrete instance of `DiscoveryVirtualInstanceIdentityInput` via:
//
// DiscoveryVirtualInstanceIdentityArgs{...}
type DiscoveryVirtualInstanceIdentityInput interface {
pulumi.Input
ToDiscoveryVirtualInstanceIdentityOutput() DiscoveryVirtualInstanceIdentityOutput
ToDiscoveryVirtualInstanceIdentityOutputWithContext(context.Context) DiscoveryVirtualInstanceIdentityOutput
}
type DiscoveryVirtualInstanceIdentityArgs struct {
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Discovery Virtual Instance.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The type of Managed Service Identity that should be configured on this SAP Discovery Virtual Instance. The only possible value is `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (DiscoveryVirtualInstanceIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DiscoveryVirtualInstanceIdentity)(nil)).Elem()
}
func (i DiscoveryVirtualInstanceIdentityArgs) ToDiscoveryVirtualInstanceIdentityOutput() DiscoveryVirtualInstanceIdentityOutput {
return i.ToDiscoveryVirtualInstanceIdentityOutputWithContext(context.Background())
}
func (i DiscoveryVirtualInstanceIdentityArgs) ToDiscoveryVirtualInstanceIdentityOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiscoveryVirtualInstanceIdentityOutput)
}
func (i DiscoveryVirtualInstanceIdentityArgs) ToDiscoveryVirtualInstanceIdentityPtrOutput() DiscoveryVirtualInstanceIdentityPtrOutput {
return i.ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(context.Background())
}
func (i DiscoveryVirtualInstanceIdentityArgs) ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiscoveryVirtualInstanceIdentityOutput).ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(ctx)
}
// DiscoveryVirtualInstanceIdentityPtrInput is an input type that accepts DiscoveryVirtualInstanceIdentityArgs, DiscoveryVirtualInstanceIdentityPtr and DiscoveryVirtualInstanceIdentityPtrOutput values.
// You can construct a concrete instance of `DiscoveryVirtualInstanceIdentityPtrInput` via:
//
// DiscoveryVirtualInstanceIdentityArgs{...}
//
// or:
//
// nil
type DiscoveryVirtualInstanceIdentityPtrInput interface {
pulumi.Input
ToDiscoveryVirtualInstanceIdentityPtrOutput() DiscoveryVirtualInstanceIdentityPtrOutput
ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(context.Context) DiscoveryVirtualInstanceIdentityPtrOutput
}
type discoveryVirtualInstanceIdentityPtrType DiscoveryVirtualInstanceIdentityArgs
func DiscoveryVirtualInstanceIdentityPtr(v *DiscoveryVirtualInstanceIdentityArgs) DiscoveryVirtualInstanceIdentityPtrInput {
return (*discoveryVirtualInstanceIdentityPtrType)(v)
}
func (*discoveryVirtualInstanceIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DiscoveryVirtualInstanceIdentity)(nil)).Elem()
}
func (i *discoveryVirtualInstanceIdentityPtrType) ToDiscoveryVirtualInstanceIdentityPtrOutput() DiscoveryVirtualInstanceIdentityPtrOutput {
return i.ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(context.Background())
}
func (i *discoveryVirtualInstanceIdentityPtrType) ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiscoveryVirtualInstanceIdentityPtrOutput)
}
type DiscoveryVirtualInstanceIdentityOutput struct{ *pulumi.OutputState }
func (DiscoveryVirtualInstanceIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DiscoveryVirtualInstanceIdentity)(nil)).Elem()
}
func (o DiscoveryVirtualInstanceIdentityOutput) ToDiscoveryVirtualInstanceIdentityOutput() DiscoveryVirtualInstanceIdentityOutput {
return o
}
func (o DiscoveryVirtualInstanceIdentityOutput) ToDiscoveryVirtualInstanceIdentityOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceIdentityOutput {
return o
}
func (o DiscoveryVirtualInstanceIdentityOutput) ToDiscoveryVirtualInstanceIdentityPtrOutput() DiscoveryVirtualInstanceIdentityPtrOutput {
return o.ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(context.Background())
}
func (o DiscoveryVirtualInstanceIdentityOutput) ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DiscoveryVirtualInstanceIdentity) *DiscoveryVirtualInstanceIdentity {
return &v
}).(DiscoveryVirtualInstanceIdentityPtrOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Discovery Virtual Instance.
func (o DiscoveryVirtualInstanceIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v DiscoveryVirtualInstanceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The type of Managed Service Identity that should be configured on this SAP Discovery Virtual Instance. The only possible value is `UserAssigned`.
func (o DiscoveryVirtualInstanceIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v DiscoveryVirtualInstanceIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type DiscoveryVirtualInstanceIdentityPtrOutput struct{ *pulumi.OutputState }
func (DiscoveryVirtualInstanceIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DiscoveryVirtualInstanceIdentity)(nil)).Elem()
}
func (o DiscoveryVirtualInstanceIdentityPtrOutput) ToDiscoveryVirtualInstanceIdentityPtrOutput() DiscoveryVirtualInstanceIdentityPtrOutput {
return o
}
func (o DiscoveryVirtualInstanceIdentityPtrOutput) ToDiscoveryVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceIdentityPtrOutput {
return o
}
func (o DiscoveryVirtualInstanceIdentityPtrOutput) Elem() DiscoveryVirtualInstanceIdentityOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstanceIdentity) DiscoveryVirtualInstanceIdentity {
if v != nil {
return *v
}
var ret DiscoveryVirtualInstanceIdentity
return ret
}).(DiscoveryVirtualInstanceIdentityOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Discovery Virtual Instance.
func (o DiscoveryVirtualInstanceIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstanceIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The type of Managed Service Identity that should be configured on this SAP Discovery Virtual Instance. The only possible value is `UserAssigned`.
func (o DiscoveryVirtualInstanceIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstanceIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type SingleNodeVirtualInstanceIdentity struct {
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Single Node Virtual Instance.
IdentityIds []string `pulumi:"identityIds"`
// The type of Managed Service Identity that should be configured on this SAP Single Node Virtual Instance. The only possible value is `UserAssigned`.
Type string `pulumi:"type"`
}
// SingleNodeVirtualInstanceIdentityInput is an input type that accepts SingleNodeVirtualInstanceIdentityArgs and SingleNodeVirtualInstanceIdentityOutput values.
// You can construct a concrete instance of `SingleNodeVirtualInstanceIdentityInput` via:
//
// SingleNodeVirtualInstanceIdentityArgs{...}
type SingleNodeVirtualInstanceIdentityInput interface {
pulumi.Input
ToSingleNodeVirtualInstanceIdentityOutput() SingleNodeVirtualInstanceIdentityOutput
ToSingleNodeVirtualInstanceIdentityOutputWithContext(context.Context) SingleNodeVirtualInstanceIdentityOutput
}
type SingleNodeVirtualInstanceIdentityArgs struct {
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Single Node Virtual Instance.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The type of Managed Service Identity that should be configured on this SAP Single Node Virtual Instance. The only possible value is `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (SingleNodeVirtualInstanceIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SingleNodeVirtualInstanceIdentity)(nil)).Elem()
}
func (i SingleNodeVirtualInstanceIdentityArgs) ToSingleNodeVirtualInstanceIdentityOutput() SingleNodeVirtualInstanceIdentityOutput {
return i.ToSingleNodeVirtualInstanceIdentityOutputWithContext(context.Background())
}
func (i SingleNodeVirtualInstanceIdentityArgs) ToSingleNodeVirtualInstanceIdentityOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceIdentityOutput)
}
func (i SingleNodeVirtualInstanceIdentityArgs) ToSingleNodeVirtualInstanceIdentityPtrOutput() SingleNodeVirtualInstanceIdentityPtrOutput {
return i.ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(context.Background())
}
func (i SingleNodeVirtualInstanceIdentityArgs) ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceIdentityOutput).ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(ctx)
}
// SingleNodeVirtualInstanceIdentityPtrInput is an input type that accepts SingleNodeVirtualInstanceIdentityArgs, SingleNodeVirtualInstanceIdentityPtr and SingleNodeVirtualInstanceIdentityPtrOutput values.
// You can construct a concrete instance of `SingleNodeVirtualInstanceIdentityPtrInput` via:
//
// SingleNodeVirtualInstanceIdentityArgs{...}
//
// or:
//
// nil
type SingleNodeVirtualInstanceIdentityPtrInput interface {
pulumi.Input
ToSingleNodeVirtualInstanceIdentityPtrOutput() SingleNodeVirtualInstanceIdentityPtrOutput
ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(context.Context) SingleNodeVirtualInstanceIdentityPtrOutput
}
type singleNodeVirtualInstanceIdentityPtrType SingleNodeVirtualInstanceIdentityArgs
func SingleNodeVirtualInstanceIdentityPtr(v *SingleNodeVirtualInstanceIdentityArgs) SingleNodeVirtualInstanceIdentityPtrInput {
return (*singleNodeVirtualInstanceIdentityPtrType)(v)
}
func (*singleNodeVirtualInstanceIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**SingleNodeVirtualInstanceIdentity)(nil)).Elem()
}
func (i *singleNodeVirtualInstanceIdentityPtrType) ToSingleNodeVirtualInstanceIdentityPtrOutput() SingleNodeVirtualInstanceIdentityPtrOutput {
return i.ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(context.Background())
}
func (i *singleNodeVirtualInstanceIdentityPtrType) ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceIdentityPtrOutput)
}
type SingleNodeVirtualInstanceIdentityOutput struct{ *pulumi.OutputState }
func (SingleNodeVirtualInstanceIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SingleNodeVirtualInstanceIdentity)(nil)).Elem()
}
func (o SingleNodeVirtualInstanceIdentityOutput) ToSingleNodeVirtualInstanceIdentityOutput() SingleNodeVirtualInstanceIdentityOutput {
return o
}
func (o SingleNodeVirtualInstanceIdentityOutput) ToSingleNodeVirtualInstanceIdentityOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceIdentityOutput {
return o
}
func (o SingleNodeVirtualInstanceIdentityOutput) ToSingleNodeVirtualInstanceIdentityPtrOutput() SingleNodeVirtualInstanceIdentityPtrOutput {
return o.ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(context.Background())
}
func (o SingleNodeVirtualInstanceIdentityOutput) ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v SingleNodeVirtualInstanceIdentity) *SingleNodeVirtualInstanceIdentity {
return &v
}).(SingleNodeVirtualInstanceIdentityPtrOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Single Node Virtual Instance.
func (o SingleNodeVirtualInstanceIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The type of Managed Service Identity that should be configured on this SAP Single Node Virtual Instance. The only possible value is `UserAssigned`.
func (o SingleNodeVirtualInstanceIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type SingleNodeVirtualInstanceIdentityPtrOutput struct{ *pulumi.OutputState }
func (SingleNodeVirtualInstanceIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SingleNodeVirtualInstanceIdentity)(nil)).Elem()
}
func (o SingleNodeVirtualInstanceIdentityPtrOutput) ToSingleNodeVirtualInstanceIdentityPtrOutput() SingleNodeVirtualInstanceIdentityPtrOutput {
return o
}
func (o SingleNodeVirtualInstanceIdentityPtrOutput) ToSingleNodeVirtualInstanceIdentityPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceIdentityPtrOutput {
return o
}
func (o SingleNodeVirtualInstanceIdentityPtrOutput) Elem() SingleNodeVirtualInstanceIdentityOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceIdentity) SingleNodeVirtualInstanceIdentity {
if v != nil {
return *v
}
var ret SingleNodeVirtualInstanceIdentity
return ret
}).(SingleNodeVirtualInstanceIdentityOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this SAP Single Node Virtual Instance.
func (o SingleNodeVirtualInstanceIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The type of Managed Service Identity that should be configured on this SAP Single Node Virtual Instance. The only possible value is `UserAssigned`.
func (o SingleNodeVirtualInstanceIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type SingleNodeVirtualInstanceSingleServerConfiguration struct {
AppResourceGroupName string `pulumi:"appResourceGroupName"`
// The supported SAP database type. Possible values are `DB2` and `HANA`. Changing this forces a new resource to be created.
DatabaseType *string `pulumi:"databaseType"`
// One or more `diskVolumeConfiguration` blocks as defined below. Changing this forces a new resource to be created.
DiskVolumeConfigurations []SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfiguration `pulumi:"diskVolumeConfigurations"`
// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. Defaults to `false`. Changing this forces a new resource to be created.
SecondaryIpEnabled *bool `pulumi:"secondaryIpEnabled"`
// The resource ID of the Subnet for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
SubnetId string `pulumi:"subnetId"`
// A `virtualMachineConfiguration` block as defined below. Changing this forces a new resource to be created.
VirtualMachineConfiguration SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfiguration `pulumi:"virtualMachineConfiguration"`
// A `virtualMachineResourceNames` block as defined below. Changing this forces a new resource to be created.
VirtualMachineResourceNames *SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNames `pulumi:"virtualMachineResourceNames"`
}
// SingleNodeVirtualInstanceSingleServerConfigurationInput is an input type that accepts SingleNodeVirtualInstanceSingleServerConfigurationArgs and SingleNodeVirtualInstanceSingleServerConfigurationOutput values.
// You can construct a concrete instance of `SingleNodeVirtualInstanceSingleServerConfigurationInput` via:
//
// SingleNodeVirtualInstanceSingleServerConfigurationArgs{...}
type SingleNodeVirtualInstanceSingleServerConfigurationInput interface {
pulumi.Input
ToSingleNodeVirtualInstanceSingleServerConfigurationOutput() SingleNodeVirtualInstanceSingleServerConfigurationOutput
ToSingleNodeVirtualInstanceSingleServerConfigurationOutputWithContext(context.Context) SingleNodeVirtualInstanceSingleServerConfigurationOutput
}
type SingleNodeVirtualInstanceSingleServerConfigurationArgs struct {
AppResourceGroupName pulumi.StringInput `pulumi:"appResourceGroupName"`
// The supported SAP database type. Possible values are `DB2` and `HANA`. Changing this forces a new resource to be created.
DatabaseType pulumi.StringPtrInput `pulumi:"databaseType"`
// One or more `diskVolumeConfiguration` blocks as defined below. Changing this forces a new resource to be created.
DiskVolumeConfigurations SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfigurationArrayInput `pulumi:"diskVolumeConfigurations"`
// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. Defaults to `false`. Changing this forces a new resource to be created.
SecondaryIpEnabled pulumi.BoolPtrInput `pulumi:"secondaryIpEnabled"`
// The resource ID of the Subnet for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
// A `virtualMachineConfiguration` block as defined below. Changing this forces a new resource to be created.
VirtualMachineConfiguration SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfigurationInput `pulumi:"virtualMachineConfiguration"`
// A `virtualMachineResourceNames` block as defined below. Changing this forces a new resource to be created.
VirtualMachineResourceNames SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNamesPtrInput `pulumi:"virtualMachineResourceNames"`
}
func (SingleNodeVirtualInstanceSingleServerConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SingleNodeVirtualInstanceSingleServerConfiguration)(nil)).Elem()
}
func (i SingleNodeVirtualInstanceSingleServerConfigurationArgs) ToSingleNodeVirtualInstanceSingleServerConfigurationOutput() SingleNodeVirtualInstanceSingleServerConfigurationOutput {
return i.ToSingleNodeVirtualInstanceSingleServerConfigurationOutputWithContext(context.Background())
}
func (i SingleNodeVirtualInstanceSingleServerConfigurationArgs) ToSingleNodeVirtualInstanceSingleServerConfigurationOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceSingleServerConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceSingleServerConfigurationOutput)
}
func (i SingleNodeVirtualInstanceSingleServerConfigurationArgs) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutput() SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return i.ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(context.Background())
}
func (i SingleNodeVirtualInstanceSingleServerConfigurationArgs) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceSingleServerConfigurationOutput).ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(ctx)
}
// SingleNodeVirtualInstanceSingleServerConfigurationPtrInput is an input type that accepts SingleNodeVirtualInstanceSingleServerConfigurationArgs, SingleNodeVirtualInstanceSingleServerConfigurationPtr and SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput values.
// You can construct a concrete instance of `SingleNodeVirtualInstanceSingleServerConfigurationPtrInput` via:
//
// SingleNodeVirtualInstanceSingleServerConfigurationArgs{...}
//
// or:
//
// nil
type SingleNodeVirtualInstanceSingleServerConfigurationPtrInput interface {
pulumi.Input
ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutput() SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput
ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(context.Context) SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput
}
type singleNodeVirtualInstanceSingleServerConfigurationPtrType SingleNodeVirtualInstanceSingleServerConfigurationArgs
func SingleNodeVirtualInstanceSingleServerConfigurationPtr(v *SingleNodeVirtualInstanceSingleServerConfigurationArgs) SingleNodeVirtualInstanceSingleServerConfigurationPtrInput {
return (*singleNodeVirtualInstanceSingleServerConfigurationPtrType)(v)
}
func (*singleNodeVirtualInstanceSingleServerConfigurationPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**SingleNodeVirtualInstanceSingleServerConfiguration)(nil)).Elem()
}
func (i *singleNodeVirtualInstanceSingleServerConfigurationPtrType) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutput() SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return i.ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(context.Background())
}
func (i *singleNodeVirtualInstanceSingleServerConfigurationPtrType) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput)
}
type SingleNodeVirtualInstanceSingleServerConfigurationOutput struct{ *pulumi.OutputState }
func (SingleNodeVirtualInstanceSingleServerConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SingleNodeVirtualInstanceSingleServerConfiguration)(nil)).Elem()
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) ToSingleNodeVirtualInstanceSingleServerConfigurationOutput() SingleNodeVirtualInstanceSingleServerConfigurationOutput {
return o
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) ToSingleNodeVirtualInstanceSingleServerConfigurationOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceSingleServerConfigurationOutput {
return o
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutput() SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return o.ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(context.Background())
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v SingleNodeVirtualInstanceSingleServerConfiguration) *SingleNodeVirtualInstanceSingleServerConfiguration {
return &v
}).(SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput)
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) AppResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceSingleServerConfiguration) string { return v.AppResourceGroupName }).(pulumi.StringOutput)
}
// The supported SAP database type. Possible values are `DB2` and `HANA`. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) DatabaseType() pulumi.StringPtrOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceSingleServerConfiguration) *string { return v.DatabaseType }).(pulumi.StringPtrOutput)
}
// One or more `diskVolumeConfiguration` blocks as defined below. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) DiskVolumeConfigurations() SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfigurationArrayOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceSingleServerConfiguration) []SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfiguration {
return v.DiskVolumeConfigurations
}).(SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfigurationArrayOutput)
}
// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. Defaults to `false`. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) SecondaryIpEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceSingleServerConfiguration) *bool { return v.SecondaryIpEnabled }).(pulumi.BoolPtrOutput)
}
// The resource ID of the Subnet for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceSingleServerConfiguration) string { return v.SubnetId }).(pulumi.StringOutput)
}
// A `virtualMachineConfiguration` block as defined below. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) VirtualMachineConfiguration() SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfigurationOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceSingleServerConfiguration) SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfiguration {
return v.VirtualMachineConfiguration
}).(SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfigurationOutput)
}
// A `virtualMachineResourceNames` block as defined below. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationOutput) VirtualMachineResourceNames() SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNamesPtrOutput {
return o.ApplyT(func(v SingleNodeVirtualInstanceSingleServerConfiguration) *SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNames {
return v.VirtualMachineResourceNames
}).(SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNamesPtrOutput)
}
type SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput struct{ *pulumi.OutputState }
func (SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SingleNodeVirtualInstanceSingleServerConfiguration)(nil)).Elem()
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutput() SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return o
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) ToSingleNodeVirtualInstanceSingleServerConfigurationPtrOutputWithContext(ctx context.Context) SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput {
return o
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) Elem() SingleNodeVirtualInstanceSingleServerConfigurationOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) SingleNodeVirtualInstanceSingleServerConfiguration {
if v != nil {
return *v
}
var ret SingleNodeVirtualInstanceSingleServerConfiguration
return ret
}).(SingleNodeVirtualInstanceSingleServerConfigurationOutput)
}
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) AppResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) *string {
if v == nil {
return nil
}
return &v.AppResourceGroupName
}).(pulumi.StringPtrOutput)
}
// The supported SAP database type. Possible values are `DB2` and `HANA`. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) DatabaseType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) *string {
if v == nil {
return nil
}
return v.DatabaseType
}).(pulumi.StringPtrOutput)
}
// One or more `diskVolumeConfiguration` blocks as defined below. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) DiskVolumeConfigurations() SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfigurationArrayOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) []SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfiguration {
if v == nil {
return nil
}
return v.DiskVolumeConfigurations
}).(SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfigurationArrayOutput)
}
// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. Defaults to `false`. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) SecondaryIpEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) *bool {
if v == nil {
return nil
}
return v.SecondaryIpEnabled
}).(pulumi.BoolPtrOutput)
}
// The resource ID of the Subnet for the SAP Single Node Virtual Instance. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) SubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) *string {
if v == nil {
return nil
}
return &v.SubnetId
}).(pulumi.StringPtrOutput)
}
// A `virtualMachineConfiguration` block as defined below. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) VirtualMachineConfiguration() SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfigurationPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) *SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfiguration {
if v == nil {
return nil
}
return &v.VirtualMachineConfiguration
}).(SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineConfigurationPtrOutput)
}
// A `virtualMachineResourceNames` block as defined below. Changing this forces a new resource to be created.
func (o SingleNodeVirtualInstanceSingleServerConfigurationPtrOutput) VirtualMachineResourceNames() SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNamesPtrOutput {
return o.ApplyT(func(v *SingleNodeVirtualInstanceSingleServerConfiguration) *SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNames {
if v == nil {
return nil
}
return v.VirtualMachineResourceNames
}).(SingleNodeVirtualInstanceSingleServerConfigurationVirtualMachineResourceNamesPtrOutput)
}
type SingleNodeVirtualInstanceSingleServerConfigurationDiskVolumeConfiguration struct {
// The total number of disks required for the concerned volume. Possible values are at least `1`. Changing this forces a new resource to be created.
NumberOfDisks int `pulumi:"numberOfDisks"`
// The size of the Disk in GB. Changing this forces a new resource to be created.
SizeInGb int `pulumi:"sizeInGb"`
// The name of the Disk SKU. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. Changing this forces a new resource to be created.
SkuName string `pulumi:"skuName"`
| 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/workloadssap/discoveryVirtualInstance.go | sdk/go/azure/workloadssap/discoveryVirtualInstance.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package workloadssap
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an SAP Discovery Virtual Instance.
//
// > **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use.
//
// ## 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/workloadssap"
// "github.com/pulumi/pulumi/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-sapvis"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = workloadssap.NewDiscoveryVirtualInstance(ctx, "example", &workloadssap.DiscoveryVirtualInstanceArgs{
// Name: pulumi.String("X01"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Environment: pulumi.String("NonProd"),
// SapProduct: pulumi.String("S4HANA"),
// CentralServerVirtualMachineId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1"),
// ManagedStorageAccountName: pulumi.String("managedsa"),
// Identity: &workloadssap.DiscoveryVirtualInstanceIdentityArgs{
// Type: pulumi.String("UserAssigned"),
// IdentityIds: pulumi.StringArray{
// pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1"),
// },
// },
// })
// if 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.Workloads` - 2024-09-01
//
// ## Import
//
// SAP Discovery Virtual Instances can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:workloadssap/discoveryVirtualInstance:DiscoveryVirtualInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Workloads/sapVirtualInstances/vis1
// ```
type DiscoveryVirtualInstance struct {
pulumi.CustomResourceState
// The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
CentralServerVirtualMachineId pulumi.StringOutput `pulumi:"centralServerVirtualMachineId"`
// The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringOutput `pulumi:"environment"`
// An `identity` block as defined below.
Identity DiscoveryVirtualInstanceIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrOutput `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrOutput `pulumi:"managedResourcesNetworkAccessType"`
// The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
ManagedStorageAccountName pulumi.StringPtrOutput `pulumi:"managedStorageAccountName"`
// Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringOutput `pulumi:"sapProduct"`
// A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewDiscoveryVirtualInstance registers a new resource with the given unique name, arguments, and options.
func NewDiscoveryVirtualInstance(ctx *pulumi.Context,
name string, args *DiscoveryVirtualInstanceArgs, opts ...pulumi.ResourceOption) (*DiscoveryVirtualInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CentralServerVirtualMachineId == nil {
return nil, errors.New("invalid value for required argument 'CentralServerVirtualMachineId'")
}
if args.Environment == nil {
return nil, errors.New("invalid value for required argument 'Environment'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SapProduct == nil {
return nil, errors.New("invalid value for required argument 'SapProduct'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DiscoveryVirtualInstance
err := ctx.RegisterResource("azure:workloadssap/discoveryVirtualInstance:DiscoveryVirtualInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDiscoveryVirtualInstance gets an existing DiscoveryVirtualInstance resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDiscoveryVirtualInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DiscoveryVirtualInstanceState, opts ...pulumi.ResourceOption) (*DiscoveryVirtualInstance, error) {
var resource DiscoveryVirtualInstance
err := ctx.ReadResource("azure:workloadssap/discoveryVirtualInstance:DiscoveryVirtualInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DiscoveryVirtualInstance resources.
type discoveryVirtualInstanceState struct {
// The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
CentralServerVirtualMachineId *string `pulumi:"centralServerVirtualMachineId"`
// The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment *string `pulumi:"environment"`
// An `identity` block as defined below.
Identity *DiscoveryVirtualInstanceIdentity `pulumi:"identity"`
// The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType *string `pulumi:"managedResourcesNetworkAccessType"`
// The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
ManagedStorageAccountName *string `pulumi:"managedStorageAccountName"`
// Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct *string `pulumi:"sapProduct"`
// A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
Tags map[string]string `pulumi:"tags"`
}
type DiscoveryVirtualInstanceState struct {
// The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
CentralServerVirtualMachineId pulumi.StringPtrInput
// The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringPtrInput
// An `identity` block as defined below.
Identity DiscoveryVirtualInstanceIdentityPtrInput
// The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrInput
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrInput
// The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
ManagedStorageAccountName pulumi.StringPtrInput
// Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringPtrInput
// A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
Tags pulumi.StringMapInput
}
func (DiscoveryVirtualInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*discoveryVirtualInstanceState)(nil)).Elem()
}
type discoveryVirtualInstanceArgs struct {
// The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
CentralServerVirtualMachineId string `pulumi:"centralServerVirtualMachineId"`
// The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment string `pulumi:"environment"`
// An `identity` block as defined below.
Identity *DiscoveryVirtualInstanceIdentity `pulumi:"identity"`
// The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType *string `pulumi:"managedResourcesNetworkAccessType"`
// The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
ManagedStorageAccountName *string `pulumi:"managedStorageAccountName"`
// Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct string `pulumi:"sapProduct"`
// A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a DiscoveryVirtualInstance resource.
type DiscoveryVirtualInstanceArgs struct {
// The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
CentralServerVirtualMachineId pulumi.StringInput
// The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringInput
// An `identity` block as defined below.
Identity DiscoveryVirtualInstanceIdentityPtrInput
// The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrInput
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrInput
// The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
ManagedStorageAccountName pulumi.StringPtrInput
// Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringInput
// A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
Tags pulumi.StringMapInput
}
func (DiscoveryVirtualInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*discoveryVirtualInstanceArgs)(nil)).Elem()
}
type DiscoveryVirtualInstanceInput interface {
pulumi.Input
ToDiscoveryVirtualInstanceOutput() DiscoveryVirtualInstanceOutput
ToDiscoveryVirtualInstanceOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceOutput
}
func (*DiscoveryVirtualInstance) ElementType() reflect.Type {
return reflect.TypeOf((**DiscoveryVirtualInstance)(nil)).Elem()
}
func (i *DiscoveryVirtualInstance) ToDiscoveryVirtualInstanceOutput() DiscoveryVirtualInstanceOutput {
return i.ToDiscoveryVirtualInstanceOutputWithContext(context.Background())
}
func (i *DiscoveryVirtualInstance) ToDiscoveryVirtualInstanceOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiscoveryVirtualInstanceOutput)
}
// DiscoveryVirtualInstanceArrayInput is an input type that accepts DiscoveryVirtualInstanceArray and DiscoveryVirtualInstanceArrayOutput values.
// You can construct a concrete instance of `DiscoveryVirtualInstanceArrayInput` via:
//
// DiscoveryVirtualInstanceArray{ DiscoveryVirtualInstanceArgs{...} }
type DiscoveryVirtualInstanceArrayInput interface {
pulumi.Input
ToDiscoveryVirtualInstanceArrayOutput() DiscoveryVirtualInstanceArrayOutput
ToDiscoveryVirtualInstanceArrayOutputWithContext(context.Context) DiscoveryVirtualInstanceArrayOutput
}
type DiscoveryVirtualInstanceArray []DiscoveryVirtualInstanceInput
func (DiscoveryVirtualInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DiscoveryVirtualInstance)(nil)).Elem()
}
func (i DiscoveryVirtualInstanceArray) ToDiscoveryVirtualInstanceArrayOutput() DiscoveryVirtualInstanceArrayOutput {
return i.ToDiscoveryVirtualInstanceArrayOutputWithContext(context.Background())
}
func (i DiscoveryVirtualInstanceArray) ToDiscoveryVirtualInstanceArrayOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiscoveryVirtualInstanceArrayOutput)
}
// DiscoveryVirtualInstanceMapInput is an input type that accepts DiscoveryVirtualInstanceMap and DiscoveryVirtualInstanceMapOutput values.
// You can construct a concrete instance of `DiscoveryVirtualInstanceMapInput` via:
//
// DiscoveryVirtualInstanceMap{ "key": DiscoveryVirtualInstanceArgs{...} }
type DiscoveryVirtualInstanceMapInput interface {
pulumi.Input
ToDiscoveryVirtualInstanceMapOutput() DiscoveryVirtualInstanceMapOutput
ToDiscoveryVirtualInstanceMapOutputWithContext(context.Context) DiscoveryVirtualInstanceMapOutput
}
type DiscoveryVirtualInstanceMap map[string]DiscoveryVirtualInstanceInput
func (DiscoveryVirtualInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DiscoveryVirtualInstance)(nil)).Elem()
}
func (i DiscoveryVirtualInstanceMap) ToDiscoveryVirtualInstanceMapOutput() DiscoveryVirtualInstanceMapOutput {
return i.ToDiscoveryVirtualInstanceMapOutputWithContext(context.Background())
}
func (i DiscoveryVirtualInstanceMap) ToDiscoveryVirtualInstanceMapOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DiscoveryVirtualInstanceMapOutput)
}
type DiscoveryVirtualInstanceOutput struct{ *pulumi.OutputState }
func (DiscoveryVirtualInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DiscoveryVirtualInstance)(nil)).Elem()
}
func (o DiscoveryVirtualInstanceOutput) ToDiscoveryVirtualInstanceOutput() DiscoveryVirtualInstanceOutput {
return o
}
func (o DiscoveryVirtualInstanceOutput) ToDiscoveryVirtualInstanceOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceOutput {
return o
}
// The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) CentralServerVirtualMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringOutput { return v.CentralServerVirtualMachineId }).(pulumi.StringOutput)
}
// The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) Environment() pulumi.StringOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringOutput { return v.Environment }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o DiscoveryVirtualInstanceOutput) Identity() DiscoveryVirtualInstanceIdentityPtrOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) DiscoveryVirtualInstanceIdentityPtrOutput { return v.Identity }).(DiscoveryVirtualInstanceIdentityPtrOutput)
}
// The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) ManagedResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringPtrOutput { return v.ManagedResourceGroupName }).(pulumi.StringPtrOutput)
}
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
func (o DiscoveryVirtualInstanceOutput) ManagedResourcesNetworkAccessType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringPtrOutput { return v.ManagedResourcesNetworkAccessType }).(pulumi.StringPtrOutput)
}
// The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) ManagedStorageAccountName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringPtrOutput { return v.ManagedStorageAccountName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
func (o DiscoveryVirtualInstanceOutput) SapProduct() pulumi.StringOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringOutput { return v.SapProduct }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
func (o DiscoveryVirtualInstanceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *DiscoveryVirtualInstance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type DiscoveryVirtualInstanceArrayOutput struct{ *pulumi.OutputState }
func (DiscoveryVirtualInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DiscoveryVirtualInstance)(nil)).Elem()
}
func (o DiscoveryVirtualInstanceArrayOutput) ToDiscoveryVirtualInstanceArrayOutput() DiscoveryVirtualInstanceArrayOutput {
return o
}
func (o DiscoveryVirtualInstanceArrayOutput) ToDiscoveryVirtualInstanceArrayOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceArrayOutput {
return o
}
func (o DiscoveryVirtualInstanceArrayOutput) Index(i pulumi.IntInput) DiscoveryVirtualInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DiscoveryVirtualInstance {
return vs[0].([]*DiscoveryVirtualInstance)[vs[1].(int)]
}).(DiscoveryVirtualInstanceOutput)
}
type DiscoveryVirtualInstanceMapOutput struct{ *pulumi.OutputState }
func (DiscoveryVirtualInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DiscoveryVirtualInstance)(nil)).Elem()
}
func (o DiscoveryVirtualInstanceMapOutput) ToDiscoveryVirtualInstanceMapOutput() DiscoveryVirtualInstanceMapOutput {
return o
}
func (o DiscoveryVirtualInstanceMapOutput) ToDiscoveryVirtualInstanceMapOutputWithContext(ctx context.Context) DiscoveryVirtualInstanceMapOutput {
return o
}
func (o DiscoveryVirtualInstanceMapOutput) MapIndex(k pulumi.StringInput) DiscoveryVirtualInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DiscoveryVirtualInstance {
return vs[0].(map[string]*DiscoveryVirtualInstance)[vs[1].(string)]
}).(DiscoveryVirtualInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DiscoveryVirtualInstanceInput)(nil)).Elem(), &DiscoveryVirtualInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*DiscoveryVirtualInstanceArrayInput)(nil)).Elem(), DiscoveryVirtualInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DiscoveryVirtualInstanceMapInput)(nil)).Elem(), DiscoveryVirtualInstanceMap{})
pulumi.RegisterOutputType(DiscoveryVirtualInstanceOutput{})
pulumi.RegisterOutputType(DiscoveryVirtualInstanceArrayOutput{})
pulumi.RegisterOutputType(DiscoveryVirtualInstanceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/workloadssap/threeTierVirtualInstance.go | sdk/go/azure/workloadssap/threeTierVirtualInstance.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package workloadssap
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an SAP Three Tier Virtual Instance with a new SAP System.
//
// > **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use.
//
// ## Import
//
// SAP Three Tier Virtual Instances with new SAP Systems can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:workloadssap/threeTierVirtualInstance:ThreeTierVirtualInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Workloads/sapVirtualInstances/vis1
// ```
type ThreeTierVirtualInstance struct {
pulumi.CustomResourceState
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation pulumi.StringOutput `pulumi:"appLocation"`
// The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringOutput `pulumi:"environment"`
// An `identity` block as defined below.
Identity ThreeTierVirtualInstanceIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the managed Resource Group for the SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrOutput `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrOutput `pulumi:"managedResourcesNetworkAccessType"`
// Specifies the name of this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The FQDN of the SAP system. Changing this forces a new resource to be created.
SapFqdn pulumi.StringOutput `pulumi:"sapFqdn"`
// The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringOutput `pulumi:"sapProduct"`
// A mapping of tags which should be assigned to the SAP Three Tier Virtual Instance.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `threeTierConfiguration` block as defined below. Changing this forces a new resource to be created.
ThreeTierConfiguration ThreeTierVirtualInstanceThreeTierConfigurationOutput `pulumi:"threeTierConfiguration"`
}
// NewThreeTierVirtualInstance registers a new resource with the given unique name, arguments, and options.
func NewThreeTierVirtualInstance(ctx *pulumi.Context,
name string, args *ThreeTierVirtualInstanceArgs, opts ...pulumi.ResourceOption) (*ThreeTierVirtualInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AppLocation == nil {
return nil, errors.New("invalid value for required argument 'AppLocation'")
}
if args.Environment == nil {
return nil, errors.New("invalid value for required argument 'Environment'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SapFqdn == nil {
return nil, errors.New("invalid value for required argument 'SapFqdn'")
}
if args.SapProduct == nil {
return nil, errors.New("invalid value for required argument 'SapProduct'")
}
if args.ThreeTierConfiguration == nil {
return nil, errors.New("invalid value for required argument 'ThreeTierConfiguration'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ThreeTierVirtualInstance
err := ctx.RegisterResource("azure:workloadssap/threeTierVirtualInstance:ThreeTierVirtualInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetThreeTierVirtualInstance gets an existing ThreeTierVirtualInstance resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetThreeTierVirtualInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ThreeTierVirtualInstanceState, opts ...pulumi.ResourceOption) (*ThreeTierVirtualInstance, error) {
var resource ThreeTierVirtualInstance
err := ctx.ReadResource("azure:workloadssap/threeTierVirtualInstance:ThreeTierVirtualInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ThreeTierVirtualInstance resources.
type threeTierVirtualInstanceState struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation *string `pulumi:"appLocation"`
// The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment *string `pulumi:"environment"`
// An `identity` block as defined below.
Identity *ThreeTierVirtualInstanceIdentity `pulumi:"identity"`
// The Azure Region where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the managed Resource Group for the SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType *string `pulumi:"managedResourcesNetworkAccessType"`
// Specifies the name of this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The FQDN of the SAP system. Changing this forces a new resource to be created.
SapFqdn *string `pulumi:"sapFqdn"`
// The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct *string `pulumi:"sapProduct"`
// A mapping of tags which should be assigned to the SAP Three Tier Virtual Instance.
Tags map[string]string `pulumi:"tags"`
// A `threeTierConfiguration` block as defined below. Changing this forces a new resource to be created.
ThreeTierConfiguration *ThreeTierVirtualInstanceThreeTierConfiguration `pulumi:"threeTierConfiguration"`
}
type ThreeTierVirtualInstanceState struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation pulumi.StringPtrInput
// The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ThreeTierVirtualInstanceIdentityPtrInput
// The Azure Region where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the managed Resource Group for the SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrInput
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrInput
// Specifies the name of this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The FQDN of the SAP system. Changing this forces a new resource to be created.
SapFqdn pulumi.StringPtrInput
// The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringPtrInput
// A mapping of tags which should be assigned to the SAP Three Tier Virtual Instance.
Tags pulumi.StringMapInput
// A `threeTierConfiguration` block as defined below. Changing this forces a new resource to be created.
ThreeTierConfiguration ThreeTierVirtualInstanceThreeTierConfigurationPtrInput
}
func (ThreeTierVirtualInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*threeTierVirtualInstanceState)(nil)).Elem()
}
type threeTierVirtualInstanceArgs struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation string `pulumi:"appLocation"`
// The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment string `pulumi:"environment"`
// An `identity` block as defined below.
Identity *ThreeTierVirtualInstanceIdentity `pulumi:"identity"`
// The Azure Region where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the managed Resource Group for the SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType *string `pulumi:"managedResourcesNetworkAccessType"`
// Specifies the name of this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The FQDN of the SAP system. Changing this forces a new resource to be created.
SapFqdn string `pulumi:"sapFqdn"`
// The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct string `pulumi:"sapProduct"`
// A mapping of tags which should be assigned to the SAP Three Tier Virtual Instance.
Tags map[string]string `pulumi:"tags"`
// A `threeTierConfiguration` block as defined below. Changing this forces a new resource to be created.
ThreeTierConfiguration ThreeTierVirtualInstanceThreeTierConfiguration `pulumi:"threeTierConfiguration"`
}
// The set of arguments for constructing a ThreeTierVirtualInstance resource.
type ThreeTierVirtualInstanceArgs struct {
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
AppLocation pulumi.StringInput
// The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
Environment pulumi.StringInput
// An `identity` block as defined below.
Identity ThreeTierVirtualInstanceIdentityPtrInput
// The Azure Region where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the managed Resource Group for the SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrInput
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
ManagedResourcesNetworkAccessType pulumi.StringPtrInput
// Specifies the name of this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The FQDN of the SAP system. Changing this forces a new resource to be created.
SapFqdn pulumi.StringInput
// The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
SapProduct pulumi.StringInput
// A mapping of tags which should be assigned to the SAP Three Tier Virtual Instance.
Tags pulumi.StringMapInput
// A `threeTierConfiguration` block as defined below. Changing this forces a new resource to be created.
ThreeTierConfiguration ThreeTierVirtualInstanceThreeTierConfigurationInput
}
func (ThreeTierVirtualInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*threeTierVirtualInstanceArgs)(nil)).Elem()
}
type ThreeTierVirtualInstanceInput interface {
pulumi.Input
ToThreeTierVirtualInstanceOutput() ThreeTierVirtualInstanceOutput
ToThreeTierVirtualInstanceOutputWithContext(ctx context.Context) ThreeTierVirtualInstanceOutput
}
func (*ThreeTierVirtualInstance) ElementType() reflect.Type {
return reflect.TypeOf((**ThreeTierVirtualInstance)(nil)).Elem()
}
func (i *ThreeTierVirtualInstance) ToThreeTierVirtualInstanceOutput() ThreeTierVirtualInstanceOutput {
return i.ToThreeTierVirtualInstanceOutputWithContext(context.Background())
}
func (i *ThreeTierVirtualInstance) ToThreeTierVirtualInstanceOutputWithContext(ctx context.Context) ThreeTierVirtualInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ThreeTierVirtualInstanceOutput)
}
// ThreeTierVirtualInstanceArrayInput is an input type that accepts ThreeTierVirtualInstanceArray and ThreeTierVirtualInstanceArrayOutput values.
// You can construct a concrete instance of `ThreeTierVirtualInstanceArrayInput` via:
//
// ThreeTierVirtualInstanceArray{ ThreeTierVirtualInstanceArgs{...} }
type ThreeTierVirtualInstanceArrayInput interface {
pulumi.Input
ToThreeTierVirtualInstanceArrayOutput() ThreeTierVirtualInstanceArrayOutput
ToThreeTierVirtualInstanceArrayOutputWithContext(context.Context) ThreeTierVirtualInstanceArrayOutput
}
type ThreeTierVirtualInstanceArray []ThreeTierVirtualInstanceInput
func (ThreeTierVirtualInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ThreeTierVirtualInstance)(nil)).Elem()
}
func (i ThreeTierVirtualInstanceArray) ToThreeTierVirtualInstanceArrayOutput() ThreeTierVirtualInstanceArrayOutput {
return i.ToThreeTierVirtualInstanceArrayOutputWithContext(context.Background())
}
func (i ThreeTierVirtualInstanceArray) ToThreeTierVirtualInstanceArrayOutputWithContext(ctx context.Context) ThreeTierVirtualInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ThreeTierVirtualInstanceArrayOutput)
}
// ThreeTierVirtualInstanceMapInput is an input type that accepts ThreeTierVirtualInstanceMap and ThreeTierVirtualInstanceMapOutput values.
// You can construct a concrete instance of `ThreeTierVirtualInstanceMapInput` via:
//
// ThreeTierVirtualInstanceMap{ "key": ThreeTierVirtualInstanceArgs{...} }
type ThreeTierVirtualInstanceMapInput interface {
pulumi.Input
ToThreeTierVirtualInstanceMapOutput() ThreeTierVirtualInstanceMapOutput
ToThreeTierVirtualInstanceMapOutputWithContext(context.Context) ThreeTierVirtualInstanceMapOutput
}
type ThreeTierVirtualInstanceMap map[string]ThreeTierVirtualInstanceInput
func (ThreeTierVirtualInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ThreeTierVirtualInstance)(nil)).Elem()
}
func (i ThreeTierVirtualInstanceMap) ToThreeTierVirtualInstanceMapOutput() ThreeTierVirtualInstanceMapOutput {
return i.ToThreeTierVirtualInstanceMapOutputWithContext(context.Background())
}
func (i ThreeTierVirtualInstanceMap) ToThreeTierVirtualInstanceMapOutputWithContext(ctx context.Context) ThreeTierVirtualInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ThreeTierVirtualInstanceMapOutput)
}
type ThreeTierVirtualInstanceOutput struct{ *pulumi.OutputState }
func (ThreeTierVirtualInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ThreeTierVirtualInstance)(nil)).Elem()
}
func (o ThreeTierVirtualInstanceOutput) ToThreeTierVirtualInstanceOutput() ThreeTierVirtualInstanceOutput {
return o
}
func (o ThreeTierVirtualInstanceOutput) ToThreeTierVirtualInstanceOutputWithContext(ctx context.Context) ThreeTierVirtualInstanceOutput {
return o
}
// The Geo-Location where the SAP system is to be created. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) AppLocation() pulumi.StringOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringOutput { return v.AppLocation }).(pulumi.StringOutput)
}
// The environment type for the SAP Three Tier Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) Environment() pulumi.StringOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringOutput { return v.Environment }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o ThreeTierVirtualInstanceOutput) Identity() ThreeTierVirtualInstanceIdentityPtrOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) ThreeTierVirtualInstanceIdentityPtrOutput { return v.Identity }).(ThreeTierVirtualInstanceIdentityPtrOutput)
}
// The Azure Region where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the managed Resource Group for the SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) ManagedResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringPtrOutput { return v.ManagedResourceGroupName }).(pulumi.StringPtrOutput)
}
// The network access type for managed resources. Possible values are `Private` and `Public`. Defaults to `Public`.
func (o ThreeTierVirtualInstanceOutput) ManagedResourcesNetworkAccessType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringPtrOutput { return v.ManagedResourcesNetworkAccessType }).(pulumi.StringPtrOutput)
}
// Specifies the name of this SAP Three Tier Virtual Instance. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the SAP Three Tier Virtual Instance should exist. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The FQDN of the SAP system. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) SapFqdn() pulumi.StringOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringOutput { return v.SapFqdn }).(pulumi.StringOutput)
}
// The SAP Product type for the SAP Three Tier Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) SapProduct() pulumi.StringOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringOutput { return v.SapProduct }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the SAP Three Tier Virtual Instance.
func (o ThreeTierVirtualInstanceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A `threeTierConfiguration` block as defined below. Changing this forces a new resource to be created.
func (o ThreeTierVirtualInstanceOutput) ThreeTierConfiguration() ThreeTierVirtualInstanceThreeTierConfigurationOutput {
return o.ApplyT(func(v *ThreeTierVirtualInstance) ThreeTierVirtualInstanceThreeTierConfigurationOutput {
return v.ThreeTierConfiguration
}).(ThreeTierVirtualInstanceThreeTierConfigurationOutput)
}
type ThreeTierVirtualInstanceArrayOutput struct{ *pulumi.OutputState }
func (ThreeTierVirtualInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ThreeTierVirtualInstance)(nil)).Elem()
}
func (o ThreeTierVirtualInstanceArrayOutput) ToThreeTierVirtualInstanceArrayOutput() ThreeTierVirtualInstanceArrayOutput {
return o
}
func (o ThreeTierVirtualInstanceArrayOutput) ToThreeTierVirtualInstanceArrayOutputWithContext(ctx context.Context) ThreeTierVirtualInstanceArrayOutput {
return o
}
func (o ThreeTierVirtualInstanceArrayOutput) Index(i pulumi.IntInput) ThreeTierVirtualInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ThreeTierVirtualInstance {
return vs[0].([]*ThreeTierVirtualInstance)[vs[1].(int)]
}).(ThreeTierVirtualInstanceOutput)
}
type ThreeTierVirtualInstanceMapOutput struct{ *pulumi.OutputState }
func (ThreeTierVirtualInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ThreeTierVirtualInstance)(nil)).Elem()
}
func (o ThreeTierVirtualInstanceMapOutput) ToThreeTierVirtualInstanceMapOutput() ThreeTierVirtualInstanceMapOutput {
return o
}
func (o ThreeTierVirtualInstanceMapOutput) ToThreeTierVirtualInstanceMapOutputWithContext(ctx context.Context) ThreeTierVirtualInstanceMapOutput {
return o
}
func (o ThreeTierVirtualInstanceMapOutput) MapIndex(k pulumi.StringInput) ThreeTierVirtualInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ThreeTierVirtualInstance {
return vs[0].(map[string]*ThreeTierVirtualInstance)[vs[1].(string)]
}).(ThreeTierVirtualInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ThreeTierVirtualInstanceInput)(nil)).Elem(), &ThreeTierVirtualInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*ThreeTierVirtualInstanceArrayInput)(nil)).Elem(), ThreeTierVirtualInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ThreeTierVirtualInstanceMapInput)(nil)).Elem(), ThreeTierVirtualInstanceMap{})
pulumi.RegisterOutputType(ThreeTierVirtualInstanceOutput{})
pulumi.RegisterOutputType(ThreeTierVirtualInstanceArrayOutput{})
pulumi.RegisterOutputType(ThreeTierVirtualInstanceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/getLab.go | sdk/go/azure/devtest/getLab.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
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 Dev Test Lab.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devtest"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := devtest.LookupLab(ctx, &devtest.LookupLabArgs{
// Name: "example-lab",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("uniqueIdentifier", example.UniqueIdentifier)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DevTestLab` - 2018-09-15
func LookupLab(ctx *pulumi.Context, args *LookupLabArgs, opts ...pulumi.InvokeOption) (*LookupLabResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupLabResult
err := ctx.Invoke("azure:devtest/getLab:getLab", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getLab.
type LookupLabArgs struct {
// The name of the Dev Test Lab.
Name string `pulumi:"name"`
// The Name of the Resource Group where the Dev Test Lab exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getLab.
type LookupLabResult struct {
// The ID of the Storage Account used for Artifact Storage.
ArtifactsStorageAccountId string `pulumi:"artifactsStorageAccountId"`
// The ID of the Default Premium Storage Account for this Dev Test Lab.
DefaultPremiumStorageAccountId string `pulumi:"defaultPremiumStorageAccountId"`
// The ID of the Default Storage Account for this Dev Test Lab.
DefaultStorageAccountId string `pulumi:"defaultStorageAccountId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The ID of the Key used for this Dev Test Lab.
KeyVaultId string `pulumi:"keyVaultId"`
// The Azure location where the Dev Test Lab exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The ID of the Storage Account used for Storage of Premium Data Disk.
PremiumDataDiskStorageAccountId string `pulumi:"premiumDataDiskStorageAccountId"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The type of storage used by the Dev Test Lab.
StorageType string `pulumi:"storageType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The unique immutable identifier of the Dev Test Lab.
UniqueIdentifier string `pulumi:"uniqueIdentifier"`
}
func LookupLabOutput(ctx *pulumi.Context, args LookupLabOutputArgs, opts ...pulumi.InvokeOption) LookupLabResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupLabResultOutput, error) {
args := v.(LookupLabArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:devtest/getLab:getLab", args, LookupLabResultOutput{}, options).(LookupLabResultOutput), nil
}).(LookupLabResultOutput)
}
// A collection of arguments for invoking getLab.
type LookupLabOutputArgs struct {
// The name of the Dev Test Lab.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the Dev Test Lab exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupLabOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLabArgs)(nil)).Elem()
}
// A collection of values returned by getLab.
type LookupLabResultOutput struct{ *pulumi.OutputState }
func (LookupLabResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLabResult)(nil)).Elem()
}
func (o LookupLabResultOutput) ToLookupLabResultOutput() LookupLabResultOutput {
return o
}
func (o LookupLabResultOutput) ToLookupLabResultOutputWithContext(ctx context.Context) LookupLabResultOutput {
return o
}
// The ID of the Storage Account used for Artifact Storage.
func (o LookupLabResultOutput) ArtifactsStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.ArtifactsStorageAccountId }).(pulumi.StringOutput)
}
// The ID of the Default Premium Storage Account for this Dev Test Lab.
func (o LookupLabResultOutput) DefaultPremiumStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.DefaultPremiumStorageAccountId }).(pulumi.StringOutput)
}
// The ID of the Default Storage Account for this Dev Test Lab.
func (o LookupLabResultOutput) DefaultStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.DefaultStorageAccountId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupLabResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.Id }).(pulumi.StringOutput)
}
// The ID of the Key used for this Dev Test Lab.
func (o LookupLabResultOutput) KeyVaultId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.KeyVaultId }).(pulumi.StringOutput)
}
// The Azure location where the Dev Test Lab exists.
func (o LookupLabResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupLabResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Storage Account used for Storage of Premium Data Disk.
func (o LookupLabResultOutput) PremiumDataDiskStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.PremiumDataDiskStorageAccountId }).(pulumi.StringOutput)
}
func (o LookupLabResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The type of storage used by the Dev Test Lab.
func (o LookupLabResultOutput) StorageType() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.StorageType }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o LookupLabResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupLabResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The unique immutable identifier of the Dev Test Lab.
func (o LookupLabResultOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v LookupLabResult) string { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupLabResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/policy.go | sdk/go/azure/devtest/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 devtest
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Policy within a Dev Test Policy Set.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devtest"
// "github.com/pulumi/pulumi/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
// }
// exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
// Name: pulumi.String("example-devtestlab"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Tags: pulumi.StringMap{
// "Sydney": pulumi.String("Australia"),
// },
// })
// if err != nil {
// return err
// }
// _, err = devtest.NewPolicy(ctx, "example", &devtest.PolicyArgs{
// Name: pulumi.String("LabVmCount"),
// PolicySetName: pulumi.String("default"),
// LabName: exampleLab.Name,
// ResourceGroupName: example.Name,
// FactData: pulumi.String(""),
// Threshold: pulumi.String("999"),
// EvaluatorType: pulumi.String("MaxValuePolicy"),
// Tags: pulumi.StringMap{
// "Acceptance": pulumi.String("Test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DevTestLab` - 2018-09-15
//
// ## Import
//
// Dev Test Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:devtest/policy:Policy policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/policySets/default/policies/policy1
// ```
type Policy struct {
pulumi.CustomResourceState
// A description for the Policy.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
EvaluatorType pulumi.StringOutput `pulumi:"evaluatorType"`
// The Fact Data for this Policy.
FactData pulumi.StringPtrOutput `pulumi:"factData"`
// Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
LabName pulumi.StringOutput `pulumi:"labName"`
// Specifies the name of the Dev Test Policy. Possible values are `GalleryImage`, `LabPremiumVmCount`, `LabTargetCost`, `LabVmCount`, `LabVmSize`, `UserOwnedLabPremiumVmCount`, `UserOwnedLabVmCount` and `UserOwnedLabVmCountInSubnet`. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
PolicySetName pulumi.StringOutput `pulumi:"policySetName"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Threshold for this Policy.
Threshold pulumi.StringOutput `pulumi:"threshold"`
}
// 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.EvaluatorType == nil {
return nil, errors.New("invalid value for required argument 'EvaluatorType'")
}
if args.LabName == nil {
return nil, errors.New("invalid value for required argument 'LabName'")
}
if args.PolicySetName == nil {
return nil, errors.New("invalid value for required argument 'PolicySetName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Threshold == nil {
return nil, errors.New("invalid value for required argument 'Threshold'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Policy
err := ctx.RegisterResource("azure:devtest/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:devtest/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 {
// A description for the Policy.
Description *string `pulumi:"description"`
// The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
EvaluatorType *string `pulumi:"evaluatorType"`
// The Fact Data for this Policy.
FactData *string `pulumi:"factData"`
// Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
LabName *string `pulumi:"labName"`
// Specifies the name of the Dev Test Policy. Possible values are `GalleryImage`, `LabPremiumVmCount`, `LabTargetCost`, `LabVmCount`, `LabVmSize`, `UserOwnedLabPremiumVmCount`, `UserOwnedLabVmCount` and `UserOwnedLabVmCountInSubnet`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
PolicySetName *string `pulumi:"policySetName"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Threshold for this Policy.
Threshold *string `pulumi:"threshold"`
}
type PolicyState struct {
// A description for the Policy.
Description pulumi.StringPtrInput
// The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
EvaluatorType pulumi.StringPtrInput
// The Fact Data for this Policy.
FactData pulumi.StringPtrInput
// Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
LabName pulumi.StringPtrInput
// Specifies the name of the Dev Test Policy. Possible values are `GalleryImage`, `LabPremiumVmCount`, `LabTargetCost`, `LabVmCount`, `LabVmSize`, `UserOwnedLabPremiumVmCount`, `UserOwnedLabVmCount` and `UserOwnedLabVmCountInSubnet`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
PolicySetName pulumi.StringPtrInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Threshold for this Policy.
Threshold pulumi.StringPtrInput
}
func (PolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*policyState)(nil)).Elem()
}
type policyArgs struct {
// A description for the Policy.
Description *string `pulumi:"description"`
// The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
EvaluatorType string `pulumi:"evaluatorType"`
// The Fact Data for this Policy.
FactData *string `pulumi:"factData"`
// Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
LabName string `pulumi:"labName"`
// Specifies the name of the Dev Test Policy. Possible values are `GalleryImage`, `LabPremiumVmCount`, `LabTargetCost`, `LabVmCount`, `LabVmSize`, `UserOwnedLabPremiumVmCount`, `UserOwnedLabVmCount` and `UserOwnedLabVmCountInSubnet`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
PolicySetName string `pulumi:"policySetName"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Threshold for this Policy.
Threshold string `pulumi:"threshold"`
}
// The set of arguments for constructing a Policy resource.
type PolicyArgs struct {
// A description for the Policy.
Description pulumi.StringPtrInput
// The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
EvaluatorType pulumi.StringInput
// The Fact Data for this Policy.
FactData pulumi.StringPtrInput
// Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
LabName pulumi.StringInput
// Specifies the name of the Dev Test Policy. Possible values are `GalleryImage`, `LabPremiumVmCount`, `LabTargetCost`, `LabVmCount`, `LabVmSize`, `UserOwnedLabPremiumVmCount`, `UserOwnedLabVmCount` and `UserOwnedLabVmCountInSubnet`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
PolicySetName pulumi.StringInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Threshold for this Policy.
Threshold pulumi.StringInput
}
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
}
// A description for the Policy.
func (o PolicyOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Policy) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The Evaluation Type used for this Policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'. Changing this forces a new resource to be created.
func (o PolicyOutput) EvaluatorType() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.EvaluatorType }).(pulumi.StringOutput)
}
// The Fact Data for this Policy.
func (o PolicyOutput) FactData() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Policy) pulumi.StringPtrOutput { return v.FactData }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Dev Test Lab in which the Policy should be created. Changing this forces a new resource to be created.
func (o PolicyOutput) LabName() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.LabName }).(pulumi.StringOutput)
}
// Specifies the name of the Dev Test Policy. Possible values are `GalleryImage`, `LabPremiumVmCount`, `LabTargetCost`, `LabVmCount`, `LabVmSize`, `UserOwnedLabPremiumVmCount`, `UserOwnedLabVmCount` and `UserOwnedLabVmCountInSubnet`. Changing this forces a new resource to be created.
func (o PolicyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the Policy Set within the Dev Test Lab where this policy should be created. Changing this forces a new resource to be created.
func (o PolicyOutput) PolicySetName() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.PolicySetName }).(pulumi.StringOutput)
}
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
func (o PolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o PolicyOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Policy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Threshold for this Policy.
func (o PolicyOutput) Threshold() pulumi.StringOutput {
return o.ApplyT(func(v *Policy) pulumi.StringOutput { return v.Threshold }).(pulumi.StringOutput)
}
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/devtest/init.go | sdk/go/azure/devtest/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 devtest
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:devtest/globalVMShutdownSchedule:GlobalVMShutdownSchedule":
r = &GlobalVMShutdownSchedule{}
case "azure:devtest/lab:Lab":
r = &Lab{}
case "azure:devtest/linuxVirtualMachine:LinuxVirtualMachine":
r = &LinuxVirtualMachine{}
case "azure:devtest/policy:Policy":
r = &Policy{}
case "azure:devtest/schedule:Schedule":
r = &Schedule{}
case "azure:devtest/virtualNetwork:VirtualNetwork":
r = &VirtualNetwork{}
case "azure:devtest/windowsVirtualMachine:WindowsVirtualMachine":
r = &WindowsVirtualMachine{}
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",
"devtest/globalVMShutdownSchedule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"devtest/lab",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"devtest/linuxVirtualMachine",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"devtest/policy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"devtest/schedule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"devtest/virtualNetwork",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"devtest/windowsVirtualMachine",
&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/devtest/pulumiTypes.go | sdk/go/azure/devtest/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 devtest
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 GlobalVMShutdownScheduleNotificationSettings struct {
// E-mail address to which the notification will be sent.
Email *string `pulumi:"email"`
// Whether to enable pre-shutdown notifications. Possible values are `true` and `false`.
Enabled bool `pulumi:"enabled"`
// Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to `30`.
TimeInMinutes *int `pulumi:"timeInMinutes"`
// The webhook URL to which the notification will be sent.
WebhookUrl *string `pulumi:"webhookUrl"`
}
// GlobalVMShutdownScheduleNotificationSettingsInput is an input type that accepts GlobalVMShutdownScheduleNotificationSettingsArgs and GlobalVMShutdownScheduleNotificationSettingsOutput values.
// You can construct a concrete instance of `GlobalVMShutdownScheduleNotificationSettingsInput` via:
//
// GlobalVMShutdownScheduleNotificationSettingsArgs{...}
type GlobalVMShutdownScheduleNotificationSettingsInput interface {
pulumi.Input
ToGlobalVMShutdownScheduleNotificationSettingsOutput() GlobalVMShutdownScheduleNotificationSettingsOutput
ToGlobalVMShutdownScheduleNotificationSettingsOutputWithContext(context.Context) GlobalVMShutdownScheduleNotificationSettingsOutput
}
type GlobalVMShutdownScheduleNotificationSettingsArgs struct {
// E-mail address to which the notification will be sent.
Email pulumi.StringPtrInput `pulumi:"email"`
// Whether to enable pre-shutdown notifications. Possible values are `true` and `false`.
Enabled pulumi.BoolInput `pulumi:"enabled"`
// Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to `30`.
TimeInMinutes pulumi.IntPtrInput `pulumi:"timeInMinutes"`
// The webhook URL to which the notification will be sent.
WebhookUrl pulumi.StringPtrInput `pulumi:"webhookUrl"`
}
func (GlobalVMShutdownScheduleNotificationSettingsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GlobalVMShutdownScheduleNotificationSettings)(nil)).Elem()
}
func (i GlobalVMShutdownScheduleNotificationSettingsArgs) ToGlobalVMShutdownScheduleNotificationSettingsOutput() GlobalVMShutdownScheduleNotificationSettingsOutput {
return i.ToGlobalVMShutdownScheduleNotificationSettingsOutputWithContext(context.Background())
}
func (i GlobalVMShutdownScheduleNotificationSettingsArgs) ToGlobalVMShutdownScheduleNotificationSettingsOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleNotificationSettingsOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalVMShutdownScheduleNotificationSettingsOutput)
}
func (i GlobalVMShutdownScheduleNotificationSettingsArgs) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutput() GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return i.ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(context.Background())
}
func (i GlobalVMShutdownScheduleNotificationSettingsArgs) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalVMShutdownScheduleNotificationSettingsOutput).ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(ctx)
}
// GlobalVMShutdownScheduleNotificationSettingsPtrInput is an input type that accepts GlobalVMShutdownScheduleNotificationSettingsArgs, GlobalVMShutdownScheduleNotificationSettingsPtr and GlobalVMShutdownScheduleNotificationSettingsPtrOutput values.
// You can construct a concrete instance of `GlobalVMShutdownScheduleNotificationSettingsPtrInput` via:
//
// GlobalVMShutdownScheduleNotificationSettingsArgs{...}
//
// or:
//
// nil
type GlobalVMShutdownScheduleNotificationSettingsPtrInput interface {
pulumi.Input
ToGlobalVMShutdownScheduleNotificationSettingsPtrOutput() GlobalVMShutdownScheduleNotificationSettingsPtrOutput
ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(context.Context) GlobalVMShutdownScheduleNotificationSettingsPtrOutput
}
type globalVMShutdownScheduleNotificationSettingsPtrType GlobalVMShutdownScheduleNotificationSettingsArgs
func GlobalVMShutdownScheduleNotificationSettingsPtr(v *GlobalVMShutdownScheduleNotificationSettingsArgs) GlobalVMShutdownScheduleNotificationSettingsPtrInput {
return (*globalVMShutdownScheduleNotificationSettingsPtrType)(v)
}
func (*globalVMShutdownScheduleNotificationSettingsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**GlobalVMShutdownScheduleNotificationSettings)(nil)).Elem()
}
func (i *globalVMShutdownScheduleNotificationSettingsPtrType) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutput() GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return i.ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(context.Background())
}
func (i *globalVMShutdownScheduleNotificationSettingsPtrType) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalVMShutdownScheduleNotificationSettingsPtrOutput)
}
type GlobalVMShutdownScheduleNotificationSettingsOutput struct{ *pulumi.OutputState }
func (GlobalVMShutdownScheduleNotificationSettingsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GlobalVMShutdownScheduleNotificationSettings)(nil)).Elem()
}
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) ToGlobalVMShutdownScheduleNotificationSettingsOutput() GlobalVMShutdownScheduleNotificationSettingsOutput {
return o
}
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) ToGlobalVMShutdownScheduleNotificationSettingsOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleNotificationSettingsOutput {
return o
}
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutput() GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return o.ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(context.Background())
}
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v GlobalVMShutdownScheduleNotificationSettings) *GlobalVMShutdownScheduleNotificationSettings {
return &v
}).(GlobalVMShutdownScheduleNotificationSettingsPtrOutput)
}
// E-mail address to which the notification will be sent.
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) Email() pulumi.StringPtrOutput {
return o.ApplyT(func(v GlobalVMShutdownScheduleNotificationSettings) *string { return v.Email }).(pulumi.StringPtrOutput)
}
// Whether to enable pre-shutdown notifications. Possible values are `true` and `false`.
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v GlobalVMShutdownScheduleNotificationSettings) bool { return v.Enabled }).(pulumi.BoolOutput)
}
// Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to `30`.
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) TimeInMinutes() pulumi.IntPtrOutput {
return o.ApplyT(func(v GlobalVMShutdownScheduleNotificationSettings) *int { return v.TimeInMinutes }).(pulumi.IntPtrOutput)
}
// The webhook URL to which the notification will be sent.
func (o GlobalVMShutdownScheduleNotificationSettingsOutput) WebhookUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v GlobalVMShutdownScheduleNotificationSettings) *string { return v.WebhookUrl }).(pulumi.StringPtrOutput)
}
type GlobalVMShutdownScheduleNotificationSettingsPtrOutput struct{ *pulumi.OutputState }
func (GlobalVMShutdownScheduleNotificationSettingsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GlobalVMShutdownScheduleNotificationSettings)(nil)).Elem()
}
func (o GlobalVMShutdownScheduleNotificationSettingsPtrOutput) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutput() GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return o
}
func (o GlobalVMShutdownScheduleNotificationSettingsPtrOutput) ToGlobalVMShutdownScheduleNotificationSettingsPtrOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleNotificationSettingsPtrOutput {
return o
}
func (o GlobalVMShutdownScheduleNotificationSettingsPtrOutput) Elem() GlobalVMShutdownScheduleNotificationSettingsOutput {
return o.ApplyT(func(v *GlobalVMShutdownScheduleNotificationSettings) GlobalVMShutdownScheduleNotificationSettings {
if v != nil {
return *v
}
var ret GlobalVMShutdownScheduleNotificationSettings
return ret
}).(GlobalVMShutdownScheduleNotificationSettingsOutput)
}
// E-mail address to which the notification will be sent.
func (o GlobalVMShutdownScheduleNotificationSettingsPtrOutput) Email() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GlobalVMShutdownScheduleNotificationSettings) *string {
if v == nil {
return nil
}
return v.Email
}).(pulumi.StringPtrOutput)
}
// Whether to enable pre-shutdown notifications. Possible values are `true` and `false`.
func (o GlobalVMShutdownScheduleNotificationSettingsPtrOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GlobalVMShutdownScheduleNotificationSettings) *bool {
if v == nil {
return nil
}
return &v.Enabled
}).(pulumi.BoolPtrOutput)
}
// Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to `30`.
func (o GlobalVMShutdownScheduleNotificationSettingsPtrOutput) TimeInMinutes() pulumi.IntPtrOutput {
return o.ApplyT(func(v *GlobalVMShutdownScheduleNotificationSettings) *int {
if v == nil {
return nil
}
return v.TimeInMinutes
}).(pulumi.IntPtrOutput)
}
// The webhook URL to which the notification will be sent.
func (o GlobalVMShutdownScheduleNotificationSettingsPtrOutput) WebhookUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GlobalVMShutdownScheduleNotificationSettings) *string {
if v == nil {
return nil
}
return v.WebhookUrl
}).(pulumi.StringPtrOutput)
}
type LinuxVirtualMachineGalleryImageReference struct {
// The Offer of the Gallery Image. Changing this forces a new resource to be created.
Offer string `pulumi:"offer"`
// The Publisher of the Gallery Image. Changing this forces a new resource to be created.
Publisher string `pulumi:"publisher"`
// The SKU of the Gallery Image. Changing this forces a new resource to be created.
Sku string `pulumi:"sku"`
// The Version of the Gallery Image. Changing this forces a new resource to be created.
Version string `pulumi:"version"`
}
// LinuxVirtualMachineGalleryImageReferenceInput is an input type that accepts LinuxVirtualMachineGalleryImageReferenceArgs and LinuxVirtualMachineGalleryImageReferenceOutput values.
// You can construct a concrete instance of `LinuxVirtualMachineGalleryImageReferenceInput` via:
//
// LinuxVirtualMachineGalleryImageReferenceArgs{...}
type LinuxVirtualMachineGalleryImageReferenceInput interface {
pulumi.Input
ToLinuxVirtualMachineGalleryImageReferenceOutput() LinuxVirtualMachineGalleryImageReferenceOutput
ToLinuxVirtualMachineGalleryImageReferenceOutputWithContext(context.Context) LinuxVirtualMachineGalleryImageReferenceOutput
}
type LinuxVirtualMachineGalleryImageReferenceArgs struct {
// The Offer of the Gallery Image. Changing this forces a new resource to be created.
Offer pulumi.StringInput `pulumi:"offer"`
// The Publisher of the Gallery Image. Changing this forces a new resource to be created.
Publisher pulumi.StringInput `pulumi:"publisher"`
// The SKU of the Gallery Image. Changing this forces a new resource to be created.
Sku pulumi.StringInput `pulumi:"sku"`
// The Version of the Gallery Image. Changing this forces a new resource to be created.
Version pulumi.StringInput `pulumi:"version"`
}
func (LinuxVirtualMachineGalleryImageReferenceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LinuxVirtualMachineGalleryImageReference)(nil)).Elem()
}
func (i LinuxVirtualMachineGalleryImageReferenceArgs) ToLinuxVirtualMachineGalleryImageReferenceOutput() LinuxVirtualMachineGalleryImageReferenceOutput {
return i.ToLinuxVirtualMachineGalleryImageReferenceOutputWithContext(context.Background())
}
func (i LinuxVirtualMachineGalleryImageReferenceArgs) ToLinuxVirtualMachineGalleryImageReferenceOutputWithContext(ctx context.Context) LinuxVirtualMachineGalleryImageReferenceOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineGalleryImageReferenceOutput)
}
func (i LinuxVirtualMachineGalleryImageReferenceArgs) ToLinuxVirtualMachineGalleryImageReferencePtrOutput() LinuxVirtualMachineGalleryImageReferencePtrOutput {
return i.ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(context.Background())
}
func (i LinuxVirtualMachineGalleryImageReferenceArgs) ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(ctx context.Context) LinuxVirtualMachineGalleryImageReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineGalleryImageReferenceOutput).ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(ctx)
}
// LinuxVirtualMachineGalleryImageReferencePtrInput is an input type that accepts LinuxVirtualMachineGalleryImageReferenceArgs, LinuxVirtualMachineGalleryImageReferencePtr and LinuxVirtualMachineGalleryImageReferencePtrOutput values.
// You can construct a concrete instance of `LinuxVirtualMachineGalleryImageReferencePtrInput` via:
//
// LinuxVirtualMachineGalleryImageReferenceArgs{...}
//
// or:
//
// nil
type LinuxVirtualMachineGalleryImageReferencePtrInput interface {
pulumi.Input
ToLinuxVirtualMachineGalleryImageReferencePtrOutput() LinuxVirtualMachineGalleryImageReferencePtrOutput
ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(context.Context) LinuxVirtualMachineGalleryImageReferencePtrOutput
}
type linuxVirtualMachineGalleryImageReferencePtrType LinuxVirtualMachineGalleryImageReferenceArgs
func LinuxVirtualMachineGalleryImageReferencePtr(v *LinuxVirtualMachineGalleryImageReferenceArgs) LinuxVirtualMachineGalleryImageReferencePtrInput {
return (*linuxVirtualMachineGalleryImageReferencePtrType)(v)
}
func (*linuxVirtualMachineGalleryImageReferencePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**LinuxVirtualMachineGalleryImageReference)(nil)).Elem()
}
func (i *linuxVirtualMachineGalleryImageReferencePtrType) ToLinuxVirtualMachineGalleryImageReferencePtrOutput() LinuxVirtualMachineGalleryImageReferencePtrOutput {
return i.ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(context.Background())
}
func (i *linuxVirtualMachineGalleryImageReferencePtrType) ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(ctx context.Context) LinuxVirtualMachineGalleryImageReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineGalleryImageReferencePtrOutput)
}
type LinuxVirtualMachineGalleryImageReferenceOutput struct{ *pulumi.OutputState }
func (LinuxVirtualMachineGalleryImageReferenceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LinuxVirtualMachineGalleryImageReference)(nil)).Elem()
}
func (o LinuxVirtualMachineGalleryImageReferenceOutput) ToLinuxVirtualMachineGalleryImageReferenceOutput() LinuxVirtualMachineGalleryImageReferenceOutput {
return o
}
func (o LinuxVirtualMachineGalleryImageReferenceOutput) ToLinuxVirtualMachineGalleryImageReferenceOutputWithContext(ctx context.Context) LinuxVirtualMachineGalleryImageReferenceOutput {
return o
}
func (o LinuxVirtualMachineGalleryImageReferenceOutput) ToLinuxVirtualMachineGalleryImageReferencePtrOutput() LinuxVirtualMachineGalleryImageReferencePtrOutput {
return o.ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(context.Background())
}
func (o LinuxVirtualMachineGalleryImageReferenceOutput) ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(ctx context.Context) LinuxVirtualMachineGalleryImageReferencePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v LinuxVirtualMachineGalleryImageReference) *LinuxVirtualMachineGalleryImageReference {
return &v
}).(LinuxVirtualMachineGalleryImageReferencePtrOutput)
}
// The Offer of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferenceOutput) Offer() pulumi.StringOutput {
return o.ApplyT(func(v LinuxVirtualMachineGalleryImageReference) string { return v.Offer }).(pulumi.StringOutput)
}
// The Publisher of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferenceOutput) Publisher() pulumi.StringOutput {
return o.ApplyT(func(v LinuxVirtualMachineGalleryImageReference) string { return v.Publisher }).(pulumi.StringOutput)
}
// The SKU of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferenceOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v LinuxVirtualMachineGalleryImageReference) string { return v.Sku }).(pulumi.StringOutput)
}
// The Version of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferenceOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v LinuxVirtualMachineGalleryImageReference) string { return v.Version }).(pulumi.StringOutput)
}
type LinuxVirtualMachineGalleryImageReferencePtrOutput struct{ *pulumi.OutputState }
func (LinuxVirtualMachineGalleryImageReferencePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LinuxVirtualMachineGalleryImageReference)(nil)).Elem()
}
func (o LinuxVirtualMachineGalleryImageReferencePtrOutput) ToLinuxVirtualMachineGalleryImageReferencePtrOutput() LinuxVirtualMachineGalleryImageReferencePtrOutput {
return o
}
func (o LinuxVirtualMachineGalleryImageReferencePtrOutput) ToLinuxVirtualMachineGalleryImageReferencePtrOutputWithContext(ctx context.Context) LinuxVirtualMachineGalleryImageReferencePtrOutput {
return o
}
func (o LinuxVirtualMachineGalleryImageReferencePtrOutput) Elem() LinuxVirtualMachineGalleryImageReferenceOutput {
return o.ApplyT(func(v *LinuxVirtualMachineGalleryImageReference) LinuxVirtualMachineGalleryImageReference {
if v != nil {
return *v
}
var ret LinuxVirtualMachineGalleryImageReference
return ret
}).(LinuxVirtualMachineGalleryImageReferenceOutput)
}
// The Offer of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferencePtrOutput) Offer() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachineGalleryImageReference) *string {
if v == nil {
return nil
}
return &v.Offer
}).(pulumi.StringPtrOutput)
}
// The Publisher of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferencePtrOutput) Publisher() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachineGalleryImageReference) *string {
if v == nil {
return nil
}
return &v.Publisher
}).(pulumi.StringPtrOutput)
}
// The SKU of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferencePtrOutput) Sku() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachineGalleryImageReference) *string {
if v == nil {
return nil
}
return &v.Sku
}).(pulumi.StringPtrOutput)
}
// The Version of the Gallery Image. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineGalleryImageReferencePtrOutput) Version() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachineGalleryImageReference) *string {
if v == nil {
return nil
}
return &v.Version
}).(pulumi.StringPtrOutput)
}
type LinuxVirtualMachineInboundNatRule struct {
// The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
BackendPort int `pulumi:"backendPort"`
// The frontend port associated with this Inbound NAT Rule.
FrontendPort *int `pulumi:"frontendPort"`
// The Protocol used for this NAT Rule. Possible values are `Tcp` and `Udp`.
Protocol string `pulumi:"protocol"`
}
// LinuxVirtualMachineInboundNatRuleInput is an input type that accepts LinuxVirtualMachineInboundNatRuleArgs and LinuxVirtualMachineInboundNatRuleOutput values.
// You can construct a concrete instance of `LinuxVirtualMachineInboundNatRuleInput` via:
//
// LinuxVirtualMachineInboundNatRuleArgs{...}
type LinuxVirtualMachineInboundNatRuleInput interface {
pulumi.Input
ToLinuxVirtualMachineInboundNatRuleOutput() LinuxVirtualMachineInboundNatRuleOutput
ToLinuxVirtualMachineInboundNatRuleOutputWithContext(context.Context) LinuxVirtualMachineInboundNatRuleOutput
}
type LinuxVirtualMachineInboundNatRuleArgs struct {
// The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
BackendPort pulumi.IntInput `pulumi:"backendPort"`
// The frontend port associated with this Inbound NAT Rule.
FrontendPort pulumi.IntPtrInput `pulumi:"frontendPort"`
// The Protocol used for this NAT Rule. Possible values are `Tcp` and `Udp`.
Protocol pulumi.StringInput `pulumi:"protocol"`
}
func (LinuxVirtualMachineInboundNatRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LinuxVirtualMachineInboundNatRule)(nil)).Elem()
}
func (i LinuxVirtualMachineInboundNatRuleArgs) ToLinuxVirtualMachineInboundNatRuleOutput() LinuxVirtualMachineInboundNatRuleOutput {
return i.ToLinuxVirtualMachineInboundNatRuleOutputWithContext(context.Background())
}
func (i LinuxVirtualMachineInboundNatRuleArgs) ToLinuxVirtualMachineInboundNatRuleOutputWithContext(ctx context.Context) LinuxVirtualMachineInboundNatRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineInboundNatRuleOutput)
}
// LinuxVirtualMachineInboundNatRuleArrayInput is an input type that accepts LinuxVirtualMachineInboundNatRuleArray and LinuxVirtualMachineInboundNatRuleArrayOutput values.
// You can construct a concrete instance of `LinuxVirtualMachineInboundNatRuleArrayInput` via:
//
// LinuxVirtualMachineInboundNatRuleArray{ LinuxVirtualMachineInboundNatRuleArgs{...} }
type LinuxVirtualMachineInboundNatRuleArrayInput interface {
pulumi.Input
ToLinuxVirtualMachineInboundNatRuleArrayOutput() LinuxVirtualMachineInboundNatRuleArrayOutput
ToLinuxVirtualMachineInboundNatRuleArrayOutputWithContext(context.Context) LinuxVirtualMachineInboundNatRuleArrayOutput
}
type LinuxVirtualMachineInboundNatRuleArray []LinuxVirtualMachineInboundNatRuleInput
func (LinuxVirtualMachineInboundNatRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]LinuxVirtualMachineInboundNatRule)(nil)).Elem()
}
func (i LinuxVirtualMachineInboundNatRuleArray) ToLinuxVirtualMachineInboundNatRuleArrayOutput() LinuxVirtualMachineInboundNatRuleArrayOutput {
return i.ToLinuxVirtualMachineInboundNatRuleArrayOutputWithContext(context.Background())
}
func (i LinuxVirtualMachineInboundNatRuleArray) ToLinuxVirtualMachineInboundNatRuleArrayOutputWithContext(ctx context.Context) LinuxVirtualMachineInboundNatRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineInboundNatRuleArrayOutput)
}
type LinuxVirtualMachineInboundNatRuleOutput struct{ *pulumi.OutputState }
func (LinuxVirtualMachineInboundNatRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LinuxVirtualMachineInboundNatRule)(nil)).Elem()
}
func (o LinuxVirtualMachineInboundNatRuleOutput) ToLinuxVirtualMachineInboundNatRuleOutput() LinuxVirtualMachineInboundNatRuleOutput {
return o
}
func (o LinuxVirtualMachineInboundNatRuleOutput) ToLinuxVirtualMachineInboundNatRuleOutputWithContext(ctx context.Context) LinuxVirtualMachineInboundNatRuleOutput {
return o
}
// The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineInboundNatRuleOutput) BackendPort() pulumi.IntOutput {
return o.ApplyT(func(v LinuxVirtualMachineInboundNatRule) int { return v.BackendPort }).(pulumi.IntOutput)
}
// The frontend port associated with this Inbound NAT Rule.
func (o LinuxVirtualMachineInboundNatRuleOutput) FrontendPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v LinuxVirtualMachineInboundNatRule) *int { return v.FrontendPort }).(pulumi.IntPtrOutput)
}
// The Protocol used for this NAT Rule. Possible values are `Tcp` and `Udp`.
func (o LinuxVirtualMachineInboundNatRuleOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v LinuxVirtualMachineInboundNatRule) string { return v.Protocol }).(pulumi.StringOutput)
}
type LinuxVirtualMachineInboundNatRuleArrayOutput struct{ *pulumi.OutputState }
func (LinuxVirtualMachineInboundNatRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]LinuxVirtualMachineInboundNatRule)(nil)).Elem()
}
func (o LinuxVirtualMachineInboundNatRuleArrayOutput) ToLinuxVirtualMachineInboundNatRuleArrayOutput() LinuxVirtualMachineInboundNatRuleArrayOutput {
return o
}
func (o LinuxVirtualMachineInboundNatRuleArrayOutput) ToLinuxVirtualMachineInboundNatRuleArrayOutputWithContext(ctx context.Context) LinuxVirtualMachineInboundNatRuleArrayOutput {
return o
}
func (o LinuxVirtualMachineInboundNatRuleArrayOutput) Index(i pulumi.IntInput) LinuxVirtualMachineInboundNatRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) LinuxVirtualMachineInboundNatRule {
return vs[0].([]LinuxVirtualMachineInboundNatRule)[vs[1].(int)]
}).(LinuxVirtualMachineInboundNatRuleOutput)
}
type ScheduleDailyRecurrence struct {
// The time each day when the schedule takes effect.
Time string `pulumi:"time"`
}
// ScheduleDailyRecurrenceInput is an input type that accepts ScheduleDailyRecurrenceArgs and ScheduleDailyRecurrenceOutput values.
// You can construct a concrete instance of `ScheduleDailyRecurrenceInput` via:
//
// ScheduleDailyRecurrenceArgs{...}
type ScheduleDailyRecurrenceInput interface {
pulumi.Input
ToScheduleDailyRecurrenceOutput() ScheduleDailyRecurrenceOutput
ToScheduleDailyRecurrenceOutputWithContext(context.Context) ScheduleDailyRecurrenceOutput
}
type ScheduleDailyRecurrenceArgs struct {
// The time each day when the schedule takes effect.
Time pulumi.StringInput `pulumi:"time"`
}
func (ScheduleDailyRecurrenceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ScheduleDailyRecurrence)(nil)).Elem()
}
func (i ScheduleDailyRecurrenceArgs) ToScheduleDailyRecurrenceOutput() ScheduleDailyRecurrenceOutput {
return i.ToScheduleDailyRecurrenceOutputWithContext(context.Background())
}
func (i ScheduleDailyRecurrenceArgs) ToScheduleDailyRecurrenceOutputWithContext(ctx context.Context) ScheduleDailyRecurrenceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleDailyRecurrenceOutput)
}
func (i ScheduleDailyRecurrenceArgs) ToScheduleDailyRecurrencePtrOutput() ScheduleDailyRecurrencePtrOutput {
return i.ToScheduleDailyRecurrencePtrOutputWithContext(context.Background())
}
func (i ScheduleDailyRecurrenceArgs) ToScheduleDailyRecurrencePtrOutputWithContext(ctx context.Context) ScheduleDailyRecurrencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleDailyRecurrenceOutput).ToScheduleDailyRecurrencePtrOutputWithContext(ctx)
}
// ScheduleDailyRecurrencePtrInput is an input type that accepts ScheduleDailyRecurrenceArgs, ScheduleDailyRecurrencePtr and ScheduleDailyRecurrencePtrOutput values.
// You can construct a concrete instance of `ScheduleDailyRecurrencePtrInput` via:
//
// ScheduleDailyRecurrenceArgs{...}
//
// or:
//
// nil
type ScheduleDailyRecurrencePtrInput interface {
pulumi.Input
ToScheduleDailyRecurrencePtrOutput() ScheduleDailyRecurrencePtrOutput
ToScheduleDailyRecurrencePtrOutputWithContext(context.Context) ScheduleDailyRecurrencePtrOutput
}
type scheduleDailyRecurrencePtrType ScheduleDailyRecurrenceArgs
func ScheduleDailyRecurrencePtr(v *ScheduleDailyRecurrenceArgs) ScheduleDailyRecurrencePtrInput {
return (*scheduleDailyRecurrencePtrType)(v)
}
func (*scheduleDailyRecurrencePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ScheduleDailyRecurrence)(nil)).Elem()
}
func (i *scheduleDailyRecurrencePtrType) ToScheduleDailyRecurrencePtrOutput() ScheduleDailyRecurrencePtrOutput {
return i.ToScheduleDailyRecurrencePtrOutputWithContext(context.Background())
}
func (i *scheduleDailyRecurrencePtrType) ToScheduleDailyRecurrencePtrOutputWithContext(ctx context.Context) ScheduleDailyRecurrencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleDailyRecurrencePtrOutput)
}
type ScheduleDailyRecurrenceOutput struct{ *pulumi.OutputState }
func (ScheduleDailyRecurrenceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ScheduleDailyRecurrence)(nil)).Elem()
}
func (o ScheduleDailyRecurrenceOutput) ToScheduleDailyRecurrenceOutput() ScheduleDailyRecurrenceOutput {
return o
}
func (o ScheduleDailyRecurrenceOutput) ToScheduleDailyRecurrenceOutputWithContext(ctx context.Context) ScheduleDailyRecurrenceOutput {
return o
}
func (o ScheduleDailyRecurrenceOutput) ToScheduleDailyRecurrencePtrOutput() ScheduleDailyRecurrencePtrOutput {
return o.ToScheduleDailyRecurrencePtrOutputWithContext(context.Background())
}
func (o ScheduleDailyRecurrenceOutput) ToScheduleDailyRecurrencePtrOutputWithContext(ctx context.Context) ScheduleDailyRecurrencePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ScheduleDailyRecurrence) *ScheduleDailyRecurrence {
return &v
}).(ScheduleDailyRecurrencePtrOutput)
}
// The time each day when the schedule takes effect.
func (o ScheduleDailyRecurrenceOutput) Time() pulumi.StringOutput {
return o.ApplyT(func(v ScheduleDailyRecurrence) string { return v.Time }).(pulumi.StringOutput)
}
type ScheduleDailyRecurrencePtrOutput struct{ *pulumi.OutputState }
func (ScheduleDailyRecurrencePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ScheduleDailyRecurrence)(nil)).Elem()
}
func (o ScheduleDailyRecurrencePtrOutput) ToScheduleDailyRecurrencePtrOutput() ScheduleDailyRecurrencePtrOutput {
return o
}
func (o ScheduleDailyRecurrencePtrOutput) ToScheduleDailyRecurrencePtrOutputWithContext(ctx context.Context) ScheduleDailyRecurrencePtrOutput {
return o
}
func (o ScheduleDailyRecurrencePtrOutput) Elem() ScheduleDailyRecurrenceOutput {
return o.ApplyT(func(v *ScheduleDailyRecurrence) ScheduleDailyRecurrence {
if v != nil {
return *v
}
var ret ScheduleDailyRecurrence
return ret
}).(ScheduleDailyRecurrenceOutput)
}
// The time each day when the schedule takes effect.
func (o ScheduleDailyRecurrencePtrOutput) Time() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ScheduleDailyRecurrence) *string {
if v == nil {
return nil
}
return &v.Time
}).(pulumi.StringPtrOutput)
}
type ScheduleHourlyRecurrence struct {
// Minutes of the hour the schedule will run.
Minute int `pulumi:"minute"`
}
// ScheduleHourlyRecurrenceInput is an input type that accepts ScheduleHourlyRecurrenceArgs and ScheduleHourlyRecurrenceOutput values.
// You can construct a concrete instance of `ScheduleHourlyRecurrenceInput` via:
//
// ScheduleHourlyRecurrenceArgs{...}
type ScheduleHourlyRecurrenceInput interface {
pulumi.Input
ToScheduleHourlyRecurrenceOutput() ScheduleHourlyRecurrenceOutput
ToScheduleHourlyRecurrenceOutputWithContext(context.Context) ScheduleHourlyRecurrenceOutput
}
type ScheduleHourlyRecurrenceArgs struct {
// Minutes of the hour the schedule will run.
Minute pulumi.IntInput `pulumi:"minute"`
}
func (ScheduleHourlyRecurrenceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ScheduleHourlyRecurrence)(nil)).Elem()
}
func (i ScheduleHourlyRecurrenceArgs) ToScheduleHourlyRecurrenceOutput() ScheduleHourlyRecurrenceOutput {
return i.ToScheduleHourlyRecurrenceOutputWithContext(context.Background())
}
func (i ScheduleHourlyRecurrenceArgs) ToScheduleHourlyRecurrenceOutputWithContext(ctx context.Context) ScheduleHourlyRecurrenceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleHourlyRecurrenceOutput)
}
func (i ScheduleHourlyRecurrenceArgs) ToScheduleHourlyRecurrencePtrOutput() ScheduleHourlyRecurrencePtrOutput {
return i.ToScheduleHourlyRecurrencePtrOutputWithContext(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/devtest/linuxVirtualMachine.go | sdk/go/azure/devtest/linuxVirtualMachine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Linux Virtual Machine within a Dev Test Lab.
//
// ## 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/devtest"
// "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
// }
// exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
// Name: pulumi.String("example-devtestlab"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Tags: pulumi.StringMap{
// "Sydney": pulumi.String("Australia"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := devtest.NewVirtualNetwork(ctx, "example", &devtest.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// LabName: exampleLab.Name,
// ResourceGroupName: example.Name,
// Subnet: &devtest.VirtualNetworkSubnetArgs{
// UsePublicIpAddress: pulumi.String("Allow"),
// UseInVirtualMachineCreation: pulumi.String("Allow"),
// },
// })
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "~/.ssh/id_rsa.pub",
// }, nil)
// if err != nil {
// return err
// }
// _, err = devtest.NewLinuxVirtualMachine(ctx, "example", &devtest.LinuxVirtualMachineArgs{
// Name: pulumi.String("example-vm03"),
// LabName: exampleLab.Name,
// ResourceGroupName: example.Name,
// Location: example.Location,
// Size: pulumi.String("Standard_DS2"),
// Username: pulumi.String("exampleuser99"),
// SshKey: pulumi.String(invokeFile.Result),
// LabVirtualNetworkId: exampleVirtualNetwork.ID(),
// LabSubnetName: pulumi.String(exampleVirtualNetwork.Subnet.ApplyT(func(subnet devtest.VirtualNetworkSubnet) (*string, error) {
// return &subnet.Name, nil
// }).(pulumi.StringPtrOutput)),
// StorageType: pulumi.String("Premium"),
// Notes: pulumi.String("Some notes about this Virtual Machine."),
// GalleryImageReference: &devtest.LinuxVirtualMachineGalleryImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DevTestLab` - 2018-09-15
//
// ## Import
//
// Dev Test Linux Virtual Machines can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:devtest/linuxVirtualMachine:LinuxVirtualMachine machine1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualMachines/machine1
// ```
type LinuxVirtualMachine struct {
pulumi.CustomResourceState
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim pulumi.BoolPtrOutput `pulumi:"allowClaim"`
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress pulumi.BoolPtrOutput `pulumi:"disallowPublicIpAddress"`
// The FQDN of the Virtual Machine.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// A `galleryImageReference` block as defined below.
GalleryImageReference LinuxVirtualMachineGalleryImageReferenceOutput `pulumi:"galleryImageReference"`
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules LinuxVirtualMachineInboundNatRuleArrayOutput `pulumi:"inboundNatRules"`
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName pulumi.StringOutput `pulumi:"labName"`
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName pulumi.StringOutput `pulumi:"labSubnetName"`
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId pulumi.StringOutput `pulumi:"labVirtualNetworkId"`
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name pulumi.StringOutput `pulumi:"name"`
// Any notes about the Virtual Machine.
Notes pulumi.StringPtrOutput `pulumi:"notes"`
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password pulumi.StringPtrOutput `pulumi:"password"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size pulumi.StringOutput `pulumi:"size"`
// The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** One or either `password` or `sshKey` must be specified.
SshKey pulumi.StringPtrOutput `pulumi:"sshKey"`
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType pulumi.StringOutput `pulumi:"storageType"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The unique immutable identifier of the Virtual Machine.
UniqueIdentifier pulumi.StringOutput `pulumi:"uniqueIdentifier"`
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username pulumi.StringOutput `pulumi:"username"`
}
// NewLinuxVirtualMachine registers a new resource with the given unique name, arguments, and options.
func NewLinuxVirtualMachine(ctx *pulumi.Context,
name string, args *LinuxVirtualMachineArgs, opts ...pulumi.ResourceOption) (*LinuxVirtualMachine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.GalleryImageReference == nil {
return nil, errors.New("invalid value for required argument 'GalleryImageReference'")
}
if args.LabName == nil {
return nil, errors.New("invalid value for required argument 'LabName'")
}
if args.LabSubnetName == nil {
return nil, errors.New("invalid value for required argument 'LabSubnetName'")
}
if args.LabVirtualNetworkId == nil {
return nil, errors.New("invalid value for required argument 'LabVirtualNetworkId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Size == nil {
return nil, errors.New("invalid value for required argument 'Size'")
}
if args.StorageType == nil {
return nil, errors.New("invalid value for required argument 'StorageType'")
}
if args.Username == nil {
return nil, errors.New("invalid value for required argument 'Username'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource LinuxVirtualMachine
err := ctx.RegisterResource("azure:devtest/linuxVirtualMachine:LinuxVirtualMachine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLinuxVirtualMachine gets an existing LinuxVirtualMachine resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLinuxVirtualMachine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LinuxVirtualMachineState, opts ...pulumi.ResourceOption) (*LinuxVirtualMachine, error) {
var resource LinuxVirtualMachine
err := ctx.ReadResource("azure:devtest/linuxVirtualMachine:LinuxVirtualMachine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LinuxVirtualMachine resources.
type linuxVirtualMachineState struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim *bool `pulumi:"allowClaim"`
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress *bool `pulumi:"disallowPublicIpAddress"`
// The FQDN of the Virtual Machine.
Fqdn *string `pulumi:"fqdn"`
// A `galleryImageReference` block as defined below.
GalleryImageReference *LinuxVirtualMachineGalleryImageReference `pulumi:"galleryImageReference"`
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules []LinuxVirtualMachineInboundNatRule `pulumi:"inboundNatRules"`
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName *string `pulumi:"labName"`
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName *string `pulumi:"labSubnetName"`
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId *string `pulumi:"labVirtualNetworkId"`
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name *string `pulumi:"name"`
// Any notes about the Virtual Machine.
Notes *string `pulumi:"notes"`
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password *string `pulumi:"password"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size *string `pulumi:"size"`
// The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** One or either `password` or `sshKey` must be specified.
SshKey *string `pulumi:"sshKey"`
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType *string `pulumi:"storageType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The unique immutable identifier of the Virtual Machine.
UniqueIdentifier *string `pulumi:"uniqueIdentifier"`
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username *string `pulumi:"username"`
}
type LinuxVirtualMachineState struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim pulumi.BoolPtrInput
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress pulumi.BoolPtrInput
// The FQDN of the Virtual Machine.
Fqdn pulumi.StringPtrInput
// A `galleryImageReference` block as defined below.
GalleryImageReference LinuxVirtualMachineGalleryImageReferencePtrInput
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules LinuxVirtualMachineInboundNatRuleArrayInput
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName pulumi.StringPtrInput
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName pulumi.StringPtrInput
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId pulumi.StringPtrInput
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name pulumi.StringPtrInput
// Any notes about the Virtual Machine.
Notes pulumi.StringPtrInput
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password pulumi.StringPtrInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size pulumi.StringPtrInput
// The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** One or either `password` or `sshKey` must be specified.
SshKey pulumi.StringPtrInput
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The unique immutable identifier of the Virtual Machine.
UniqueIdentifier pulumi.StringPtrInput
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username pulumi.StringPtrInput
}
func (LinuxVirtualMachineState) ElementType() reflect.Type {
return reflect.TypeOf((*linuxVirtualMachineState)(nil)).Elem()
}
type linuxVirtualMachineArgs struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim *bool `pulumi:"allowClaim"`
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress *bool `pulumi:"disallowPublicIpAddress"`
// A `galleryImageReference` block as defined below.
GalleryImageReference LinuxVirtualMachineGalleryImageReference `pulumi:"galleryImageReference"`
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules []LinuxVirtualMachineInboundNatRule `pulumi:"inboundNatRules"`
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName string `pulumi:"labName"`
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName string `pulumi:"labSubnetName"`
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId string `pulumi:"labVirtualNetworkId"`
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name *string `pulumi:"name"`
// Any notes about the Virtual Machine.
Notes *string `pulumi:"notes"`
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password *string `pulumi:"password"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size string `pulumi:"size"`
// The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** One or either `password` or `sshKey` must be specified.
SshKey *string `pulumi:"sshKey"`
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType string `pulumi:"storageType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username string `pulumi:"username"`
}
// The set of arguments for constructing a LinuxVirtualMachine resource.
type LinuxVirtualMachineArgs struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim pulumi.BoolPtrInput
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress pulumi.BoolPtrInput
// A `galleryImageReference` block as defined below.
GalleryImageReference LinuxVirtualMachineGalleryImageReferenceInput
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules LinuxVirtualMachineInboundNatRuleArrayInput
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName pulumi.StringInput
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName pulumi.StringInput
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId pulumi.StringInput
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name pulumi.StringPtrInput
// Any notes about the Virtual Machine.
Notes pulumi.StringPtrInput
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password pulumi.StringPtrInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size pulumi.StringInput
// The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** One or either `password` or `sshKey` must be specified.
SshKey pulumi.StringPtrInput
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username pulumi.StringInput
}
func (LinuxVirtualMachineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*linuxVirtualMachineArgs)(nil)).Elem()
}
type LinuxVirtualMachineInput interface {
pulumi.Input
ToLinuxVirtualMachineOutput() LinuxVirtualMachineOutput
ToLinuxVirtualMachineOutputWithContext(ctx context.Context) LinuxVirtualMachineOutput
}
func (*LinuxVirtualMachine) ElementType() reflect.Type {
return reflect.TypeOf((**LinuxVirtualMachine)(nil)).Elem()
}
func (i *LinuxVirtualMachine) ToLinuxVirtualMachineOutput() LinuxVirtualMachineOutput {
return i.ToLinuxVirtualMachineOutputWithContext(context.Background())
}
func (i *LinuxVirtualMachine) ToLinuxVirtualMachineOutputWithContext(ctx context.Context) LinuxVirtualMachineOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineOutput)
}
// LinuxVirtualMachineArrayInput is an input type that accepts LinuxVirtualMachineArray and LinuxVirtualMachineArrayOutput values.
// You can construct a concrete instance of `LinuxVirtualMachineArrayInput` via:
//
// LinuxVirtualMachineArray{ LinuxVirtualMachineArgs{...} }
type LinuxVirtualMachineArrayInput interface {
pulumi.Input
ToLinuxVirtualMachineArrayOutput() LinuxVirtualMachineArrayOutput
ToLinuxVirtualMachineArrayOutputWithContext(context.Context) LinuxVirtualMachineArrayOutput
}
type LinuxVirtualMachineArray []LinuxVirtualMachineInput
func (LinuxVirtualMachineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LinuxVirtualMachine)(nil)).Elem()
}
func (i LinuxVirtualMachineArray) ToLinuxVirtualMachineArrayOutput() LinuxVirtualMachineArrayOutput {
return i.ToLinuxVirtualMachineArrayOutputWithContext(context.Background())
}
func (i LinuxVirtualMachineArray) ToLinuxVirtualMachineArrayOutputWithContext(ctx context.Context) LinuxVirtualMachineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineArrayOutput)
}
// LinuxVirtualMachineMapInput is an input type that accepts LinuxVirtualMachineMap and LinuxVirtualMachineMapOutput values.
// You can construct a concrete instance of `LinuxVirtualMachineMapInput` via:
//
// LinuxVirtualMachineMap{ "key": LinuxVirtualMachineArgs{...} }
type LinuxVirtualMachineMapInput interface {
pulumi.Input
ToLinuxVirtualMachineMapOutput() LinuxVirtualMachineMapOutput
ToLinuxVirtualMachineMapOutputWithContext(context.Context) LinuxVirtualMachineMapOutput
}
type LinuxVirtualMachineMap map[string]LinuxVirtualMachineInput
func (LinuxVirtualMachineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LinuxVirtualMachine)(nil)).Elem()
}
func (i LinuxVirtualMachineMap) ToLinuxVirtualMachineMapOutput() LinuxVirtualMachineMapOutput {
return i.ToLinuxVirtualMachineMapOutputWithContext(context.Background())
}
func (i LinuxVirtualMachineMap) ToLinuxVirtualMachineMapOutputWithContext(ctx context.Context) LinuxVirtualMachineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinuxVirtualMachineMapOutput)
}
type LinuxVirtualMachineOutput struct{ *pulumi.OutputState }
func (LinuxVirtualMachineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LinuxVirtualMachine)(nil)).Elem()
}
func (o LinuxVirtualMachineOutput) ToLinuxVirtualMachineOutput() LinuxVirtualMachineOutput {
return o
}
func (o LinuxVirtualMachineOutput) ToLinuxVirtualMachineOutputWithContext(ctx context.Context) LinuxVirtualMachineOutput {
return o
}
// Can this Virtual Machine be claimed by users? Defaults to `true`.
func (o LinuxVirtualMachineOutput) AllowClaim() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.BoolPtrOutput { return v.AllowClaim }).(pulumi.BoolPtrOutput)
}
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) DisallowPublicIpAddress() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.BoolPtrOutput { return v.DisallowPublicIpAddress }).(pulumi.BoolPtrOutput)
}
// The FQDN of the Virtual Machine.
func (o LinuxVirtualMachineOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// A `galleryImageReference` block as defined below.
func (o LinuxVirtualMachineOutput) GalleryImageReference() LinuxVirtualMachineGalleryImageReferenceOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) LinuxVirtualMachineGalleryImageReferenceOutput {
return v.GalleryImageReference
}).(LinuxVirtualMachineGalleryImageReferenceOutput)
}
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
func (o LinuxVirtualMachineOutput) InboundNatRules() LinuxVirtualMachineInboundNatRuleArrayOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) LinuxVirtualMachineInboundNatRuleArrayOutput { return v.InboundNatRules }).(LinuxVirtualMachineInboundNatRuleArrayOutput)
}
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) LabName() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.LabName }).(pulumi.StringOutput)
}
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) LabSubnetName() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.LabSubnetName }).(pulumi.StringOutput)
}
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) LabVirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.LabVirtualNetworkId }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
func (o LinuxVirtualMachineOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Any notes about the Virtual Machine.
func (o LinuxVirtualMachineOutput) Notes() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringPtrOutput { return v.Notes }).(pulumi.StringPtrOutput)
}
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) Password() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput)
}
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) Size() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.Size }).(pulumi.StringOutput)
}
// The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** One or either `password` or `sshKey` must be specified.
func (o LinuxVirtualMachineOutput) SshKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringPtrOutput { return v.SshKey }).(pulumi.StringPtrOutput)
}
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) StorageType() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.StorageType }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o LinuxVirtualMachineOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The unique immutable identifier of the Virtual Machine.
func (o LinuxVirtualMachineOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
func (o LinuxVirtualMachineOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v *LinuxVirtualMachine) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
}
type LinuxVirtualMachineArrayOutput struct{ *pulumi.OutputState }
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/lab.go | sdk/go/azure/devtest/lab.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Dev Test Lab.
//
// ## 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/devtest"
// "github.com/pulumi/pulumi/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 = devtest.NewLab(ctx, "example", &devtest.LabArgs{
// Name: pulumi.String("example-devtestlab"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Tags: pulumi.StringMap{
// "Sydney": pulumi.String("Australia"),
// },
// })
// if 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.DevTestLab` - 2018-09-15
//
// ## Import
//
// Dev Test Labs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:devtest/lab:Lab lab1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1
// ```
type Lab struct {
pulumi.CustomResourceState
// The ID of the Storage Account used for Artifact Storage.
ArtifactsStorageAccountId pulumi.StringOutput `pulumi:"artifactsStorageAccountId"`
// The ID of the Default Premium Storage Account for this Dev Test Lab.
DefaultPremiumStorageAccountId pulumi.StringOutput `pulumi:"defaultPremiumStorageAccountId"`
// The ID of the Default Storage Account for this Dev Test Lab.
DefaultStorageAccountId pulumi.StringOutput `pulumi:"defaultStorageAccountId"`
// The ID of the Key used for this Dev Test Lab.
KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"`
// Specifies the supported Azure location where the Dev Test Lab should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Dev Test Lab. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Storage Account used for Storage of Premium Data Disk.
PremiumDataDiskStorageAccountId pulumi.StringOutput `pulumi:"premiumDataDiskStorageAccountId"`
// The name of the resource group under which the Dev Test Lab resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The unique immutable identifier of the Dev Test Lab.
UniqueIdentifier pulumi.StringOutput `pulumi:"uniqueIdentifier"`
}
// NewLab registers a new resource with the given unique name, arguments, and options.
func NewLab(ctx *pulumi.Context,
name string, args *LabArgs, opts ...pulumi.ResourceOption) (*Lab, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Lab
err := ctx.RegisterResource("azure:devtest/lab:Lab", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLab gets an existing Lab resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLab(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LabState, opts ...pulumi.ResourceOption) (*Lab, error) {
var resource Lab
err := ctx.ReadResource("azure:devtest/lab:Lab", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Lab resources.
type labState struct {
// The ID of the Storage Account used for Artifact Storage.
ArtifactsStorageAccountId *string `pulumi:"artifactsStorageAccountId"`
// The ID of the Default Premium Storage Account for this Dev Test Lab.
DefaultPremiumStorageAccountId *string `pulumi:"defaultPremiumStorageAccountId"`
// The ID of the Default Storage Account for this Dev Test Lab.
DefaultStorageAccountId *string `pulumi:"defaultStorageAccountId"`
// The ID of the Key used for this Dev Test Lab.
KeyVaultId *string `pulumi:"keyVaultId"`
// Specifies the supported Azure location where the Dev Test Lab should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Dev Test Lab. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Storage Account used for Storage of Premium Data Disk.
PremiumDataDiskStorageAccountId *string `pulumi:"premiumDataDiskStorageAccountId"`
// The name of the resource group under which the Dev Test Lab resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The unique immutable identifier of the Dev Test Lab.
UniqueIdentifier *string `pulumi:"uniqueIdentifier"`
}
type LabState struct {
// The ID of the Storage Account used for Artifact Storage.
ArtifactsStorageAccountId pulumi.StringPtrInput
// The ID of the Default Premium Storage Account for this Dev Test Lab.
DefaultPremiumStorageAccountId pulumi.StringPtrInput
// The ID of the Default Storage Account for this Dev Test Lab.
DefaultStorageAccountId pulumi.StringPtrInput
// The ID of the Key used for this Dev Test Lab.
KeyVaultId pulumi.StringPtrInput
// Specifies the supported Azure location where the Dev Test Lab should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Dev Test Lab. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Storage Account used for Storage of Premium Data Disk.
PremiumDataDiskStorageAccountId pulumi.StringPtrInput
// The name of the resource group under which the Dev Test Lab resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The unique immutable identifier of the Dev Test Lab.
UniqueIdentifier pulumi.StringPtrInput
}
func (LabState) ElementType() reflect.Type {
return reflect.TypeOf((*labState)(nil)).Elem()
}
type labArgs struct {
// Specifies the supported Azure location where the Dev Test Lab should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Dev Test Lab. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the Dev Test Lab resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Lab resource.
type LabArgs struct {
// Specifies the supported Azure location where the Dev Test Lab should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Dev Test Lab. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the Dev Test Lab resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (LabArgs) ElementType() reflect.Type {
return reflect.TypeOf((*labArgs)(nil)).Elem()
}
type LabInput interface {
pulumi.Input
ToLabOutput() LabOutput
ToLabOutputWithContext(ctx context.Context) LabOutput
}
func (*Lab) ElementType() reflect.Type {
return reflect.TypeOf((**Lab)(nil)).Elem()
}
func (i *Lab) ToLabOutput() LabOutput {
return i.ToLabOutputWithContext(context.Background())
}
func (i *Lab) ToLabOutputWithContext(ctx context.Context) LabOutput {
return pulumi.ToOutputWithContext(ctx, i).(LabOutput)
}
// LabArrayInput is an input type that accepts LabArray and LabArrayOutput values.
// You can construct a concrete instance of `LabArrayInput` via:
//
// LabArray{ LabArgs{...} }
type LabArrayInput interface {
pulumi.Input
ToLabArrayOutput() LabArrayOutput
ToLabArrayOutputWithContext(context.Context) LabArrayOutput
}
type LabArray []LabInput
func (LabArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Lab)(nil)).Elem()
}
func (i LabArray) ToLabArrayOutput() LabArrayOutput {
return i.ToLabArrayOutputWithContext(context.Background())
}
func (i LabArray) ToLabArrayOutputWithContext(ctx context.Context) LabArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LabArrayOutput)
}
// LabMapInput is an input type that accepts LabMap and LabMapOutput values.
// You can construct a concrete instance of `LabMapInput` via:
//
// LabMap{ "key": LabArgs{...} }
type LabMapInput interface {
pulumi.Input
ToLabMapOutput() LabMapOutput
ToLabMapOutputWithContext(context.Context) LabMapOutput
}
type LabMap map[string]LabInput
func (LabMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Lab)(nil)).Elem()
}
func (i LabMap) ToLabMapOutput() LabMapOutput {
return i.ToLabMapOutputWithContext(context.Background())
}
func (i LabMap) ToLabMapOutputWithContext(ctx context.Context) LabMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LabMapOutput)
}
type LabOutput struct{ *pulumi.OutputState }
func (LabOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Lab)(nil)).Elem()
}
func (o LabOutput) ToLabOutput() LabOutput {
return o
}
func (o LabOutput) ToLabOutputWithContext(ctx context.Context) LabOutput {
return o
}
// The ID of the Storage Account used for Artifact Storage.
func (o LabOutput) ArtifactsStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.ArtifactsStorageAccountId }).(pulumi.StringOutput)
}
// The ID of the Default Premium Storage Account for this Dev Test Lab.
func (o LabOutput) DefaultPremiumStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.DefaultPremiumStorageAccountId }).(pulumi.StringOutput)
}
// The ID of the Default Storage Account for this Dev Test Lab.
func (o LabOutput) DefaultStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.DefaultStorageAccountId }).(pulumi.StringOutput)
}
// The ID of the Key used for this Dev Test Lab.
func (o LabOutput) KeyVaultId() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the Dev Test Lab should exist. Changing this forces a new resource to be created.
func (o LabOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Dev Test Lab. Changing this forces a new resource to be created.
func (o LabOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Storage Account used for Storage of Premium Data Disk.
func (o LabOutput) PremiumDataDiskStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.PremiumDataDiskStorageAccountId }).(pulumi.StringOutput)
}
// The name of the resource group under which the Dev Test Lab resource has to be created. Changing this forces a new resource to be created.
func (o LabOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o LabOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Lab) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The unique immutable identifier of the Dev Test Lab.
func (o LabOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v *Lab) pulumi.StringOutput { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
type LabArrayOutput struct{ *pulumi.OutputState }
func (LabArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Lab)(nil)).Elem()
}
func (o LabArrayOutput) ToLabArrayOutput() LabArrayOutput {
return o
}
func (o LabArrayOutput) ToLabArrayOutputWithContext(ctx context.Context) LabArrayOutput {
return o
}
func (o LabArrayOutput) Index(i pulumi.IntInput) LabOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Lab {
return vs[0].([]*Lab)[vs[1].(int)]
}).(LabOutput)
}
type LabMapOutput struct{ *pulumi.OutputState }
func (LabMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Lab)(nil)).Elem()
}
func (o LabMapOutput) ToLabMapOutput() LabMapOutput {
return o
}
func (o LabMapOutput) ToLabMapOutputWithContext(ctx context.Context) LabMapOutput {
return o
}
func (o LabMapOutput) MapIndex(k pulumi.StringInput) LabOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Lab {
return vs[0].(map[string]*Lab)[vs[1].(string)]
}).(LabOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LabInput)(nil)).Elem(), &Lab{})
pulumi.RegisterInputType(reflect.TypeOf((*LabArrayInput)(nil)).Elem(), LabArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LabMapInput)(nil)).Elem(), LabMap{})
pulumi.RegisterOutputType(LabOutput{})
pulumi.RegisterOutputType(LabArrayOutput{})
pulumi.RegisterOutputType(LabMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/schedule.go | sdk/go/azure/devtest/schedule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages automated startup and shutdown schedules for Azure Dev Test Lab.
//
// ## 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/devtest"
// "github.com/pulumi/pulumi/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
// }
// exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
// Name: pulumi.String("YourDevTestLab"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = devtest.NewSchedule(ctx, "example", &devtest.ScheduleArgs{
// Name: pulumi.String("LabVmAutoStart"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// LabName: exampleLab.Name,
// Status: pulumi.String("Enabled"),
// WeeklyRecurrence: &devtest.ScheduleWeeklyRecurrenceArgs{
// Time: pulumi.String("1100"),
// WeekDays: pulumi.StringArray{
// pulumi.String("Monday"),
// pulumi.String("Tuesday"),
// },
// },
// TimeZoneId: pulumi.String("Pacific Standard Time"),
// TaskType: pulumi.String("LabVmsStartupTask"),
// NotificationSettings: &devtest.ScheduleNotificationSettingsArgs{},
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DevTestLab` - 2018-09-15
//
// ## Import
//
// DevTest Schedule's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:devtest/schedule:Schedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DevTestLab/labs/myDevTestLab/schedules/labvmautostart
// ```
type Schedule struct {
pulumi.CustomResourceState
// The properties of a daily schedule. If the schedule occurs once each day of the week, specify the daily recurrence. A `dailyRecurrence` block as defined below.
DailyRecurrence ScheduleDailyRecurrencePtrOutput `pulumi:"dailyRecurrence"`
// The properties of an hourly schedule. If the schedule occurs multiple times a day, specify the hourly recurrence. A `hourlyRecurrence` block as defined below.
HourlyRecurrence ScheduleHourlyRecurrencePtrOutput `pulumi:"hourlyRecurrence"`
// The name of the dev test lab. Changing this forces a new resource to be created.
LabName pulumi.StringOutput `pulumi:"labName"`
// The location where the schedule is created. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the dev test lab schedule. Valid value for name depends on the `taskType`. For instance for taskType `LabVmsStartupTask` the name needs to be `LabVmAutoStart`. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings ScheduleNotificationSettingsOutput `pulumi:"notificationSettings"`
// The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The status of this schedule. Possible values are `Enabled` and `Disabled`. Defaults to `Disabled`.
Status pulumi.StringPtrOutput `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The task type of the schedule. Possible values include `LabVmsShutdownTask` and `LabVmAutoStart`.
TaskType pulumi.StringOutput `pulumi:"taskType"`
// The time zone ID (e.g. Pacific Standard time).
TimeZoneId pulumi.StringOutput `pulumi:"timeZoneId"`
// The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weeklyRecurrence` block as defined below.
WeeklyRecurrence ScheduleWeeklyRecurrencePtrOutput `pulumi:"weeklyRecurrence"`
}
// NewSchedule registers a new resource with the given unique name, arguments, and options.
func NewSchedule(ctx *pulumi.Context,
name string, args *ScheduleArgs, opts ...pulumi.ResourceOption) (*Schedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LabName == nil {
return nil, errors.New("invalid value for required argument 'LabName'")
}
if args.NotificationSettings == nil {
return nil, errors.New("invalid value for required argument 'NotificationSettings'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.TaskType == nil {
return nil, errors.New("invalid value for required argument 'TaskType'")
}
if args.TimeZoneId == nil {
return nil, errors.New("invalid value for required argument 'TimeZoneId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Schedule
err := ctx.RegisterResource("azure:devtest/schedule:Schedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSchedule gets an existing Schedule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScheduleState, opts ...pulumi.ResourceOption) (*Schedule, error) {
var resource Schedule
err := ctx.ReadResource("azure:devtest/schedule:Schedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Schedule resources.
type scheduleState struct {
// The properties of a daily schedule. If the schedule occurs once each day of the week, specify the daily recurrence. A `dailyRecurrence` block as defined below.
DailyRecurrence *ScheduleDailyRecurrence `pulumi:"dailyRecurrence"`
// The properties of an hourly schedule. If the schedule occurs multiple times a day, specify the hourly recurrence. A `hourlyRecurrence` block as defined below.
HourlyRecurrence *ScheduleHourlyRecurrence `pulumi:"hourlyRecurrence"`
// The name of the dev test lab. Changing this forces a new resource to be created.
LabName *string `pulumi:"labName"`
// The location where the schedule is created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the dev test lab schedule. Valid value for name depends on the `taskType`. For instance for taskType `LabVmsStartupTask` the name needs to be `LabVmAutoStart`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings *ScheduleNotificationSettings `pulumi:"notificationSettings"`
// The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The status of this schedule. Possible values are `Enabled` and `Disabled`. Defaults to `Disabled`.
Status *string `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The task type of the schedule. Possible values include `LabVmsShutdownTask` and `LabVmAutoStart`.
TaskType *string `pulumi:"taskType"`
// The time zone ID (e.g. Pacific Standard time).
TimeZoneId *string `pulumi:"timeZoneId"`
// The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weeklyRecurrence` block as defined below.
WeeklyRecurrence *ScheduleWeeklyRecurrence `pulumi:"weeklyRecurrence"`
}
type ScheduleState struct {
// The properties of a daily schedule. If the schedule occurs once each day of the week, specify the daily recurrence. A `dailyRecurrence` block as defined below.
DailyRecurrence ScheduleDailyRecurrencePtrInput
// The properties of an hourly schedule. If the schedule occurs multiple times a day, specify the hourly recurrence. A `hourlyRecurrence` block as defined below.
HourlyRecurrence ScheduleHourlyRecurrencePtrInput
// The name of the dev test lab. Changing this forces a new resource to be created.
LabName pulumi.StringPtrInput
// The location where the schedule is created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the dev test lab schedule. Valid value for name depends on the `taskType`. For instance for taskType `LabVmsStartupTask` the name needs to be `LabVmAutoStart`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings ScheduleNotificationSettingsPtrInput
// The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The status of this schedule. Possible values are `Enabled` and `Disabled`. Defaults to `Disabled`.
Status pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The task type of the schedule. Possible values include `LabVmsShutdownTask` and `LabVmAutoStart`.
TaskType pulumi.StringPtrInput
// The time zone ID (e.g. Pacific Standard time).
TimeZoneId pulumi.StringPtrInput
// The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weeklyRecurrence` block as defined below.
WeeklyRecurrence ScheduleWeeklyRecurrencePtrInput
}
func (ScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleState)(nil)).Elem()
}
type scheduleArgs struct {
// The properties of a daily schedule. If the schedule occurs once each day of the week, specify the daily recurrence. A `dailyRecurrence` block as defined below.
DailyRecurrence *ScheduleDailyRecurrence `pulumi:"dailyRecurrence"`
// The properties of an hourly schedule. If the schedule occurs multiple times a day, specify the hourly recurrence. A `hourlyRecurrence` block as defined below.
HourlyRecurrence *ScheduleHourlyRecurrence `pulumi:"hourlyRecurrence"`
// The name of the dev test lab. Changing this forces a new resource to be created.
LabName string `pulumi:"labName"`
// The location where the schedule is created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the dev test lab schedule. Valid value for name depends on the `taskType`. For instance for taskType `LabVmsStartupTask` the name needs to be `LabVmAutoStart`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings ScheduleNotificationSettings `pulumi:"notificationSettings"`
// The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The status of this schedule. Possible values are `Enabled` and `Disabled`. Defaults to `Disabled`.
Status *string `pulumi:"status"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The task type of the schedule. Possible values include `LabVmsShutdownTask` and `LabVmAutoStart`.
TaskType string `pulumi:"taskType"`
// The time zone ID (e.g. Pacific Standard time).
TimeZoneId string `pulumi:"timeZoneId"`
// The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weeklyRecurrence` block as defined below.
WeeklyRecurrence *ScheduleWeeklyRecurrence `pulumi:"weeklyRecurrence"`
}
// The set of arguments for constructing a Schedule resource.
type ScheduleArgs struct {
// The properties of a daily schedule. If the schedule occurs once each day of the week, specify the daily recurrence. A `dailyRecurrence` block as defined below.
DailyRecurrence ScheduleDailyRecurrencePtrInput
// The properties of an hourly schedule. If the schedule occurs multiple times a day, specify the hourly recurrence. A `hourlyRecurrence` block as defined below.
HourlyRecurrence ScheduleHourlyRecurrencePtrInput
// The name of the dev test lab. Changing this forces a new resource to be created.
LabName pulumi.StringInput
// The location where the schedule is created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the dev test lab schedule. Valid value for name depends on the `taskType`. For instance for taskType `LabVmsStartupTask` the name needs to be `LabVmAutoStart`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings ScheduleNotificationSettingsInput
// The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The status of this schedule. Possible values are `Enabled` and `Disabled`. Defaults to `Disabled`.
Status pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The task type of the schedule. Possible values include `LabVmsShutdownTask` and `LabVmAutoStart`.
TaskType pulumi.StringInput
// The time zone ID (e.g. Pacific Standard time).
TimeZoneId pulumi.StringInput
// The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weeklyRecurrence` block as defined below.
WeeklyRecurrence ScheduleWeeklyRecurrencePtrInput
}
func (ScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleArgs)(nil)).Elem()
}
type ScheduleInput interface {
pulumi.Input
ToScheduleOutput() ScheduleOutput
ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput
}
func (*Schedule) ElementType() reflect.Type {
return reflect.TypeOf((**Schedule)(nil)).Elem()
}
func (i *Schedule) ToScheduleOutput() ScheduleOutput {
return i.ToScheduleOutputWithContext(context.Background())
}
func (i *Schedule) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleOutput)
}
// ScheduleArrayInput is an input type that accepts ScheduleArray and ScheduleArrayOutput values.
// You can construct a concrete instance of `ScheduleArrayInput` via:
//
// ScheduleArray{ ScheduleArgs{...} }
type ScheduleArrayInput interface {
pulumi.Input
ToScheduleArrayOutput() ScheduleArrayOutput
ToScheduleArrayOutputWithContext(context.Context) ScheduleArrayOutput
}
type ScheduleArray []ScheduleInput
func (ScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Schedule)(nil)).Elem()
}
func (i ScheduleArray) ToScheduleArrayOutput() ScheduleArrayOutput {
return i.ToScheduleArrayOutputWithContext(context.Background())
}
func (i ScheduleArray) ToScheduleArrayOutputWithContext(ctx context.Context) ScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleArrayOutput)
}
// ScheduleMapInput is an input type that accepts ScheduleMap and ScheduleMapOutput values.
// You can construct a concrete instance of `ScheduleMapInput` via:
//
// ScheduleMap{ "key": ScheduleArgs{...} }
type ScheduleMapInput interface {
pulumi.Input
ToScheduleMapOutput() ScheduleMapOutput
ToScheduleMapOutputWithContext(context.Context) ScheduleMapOutput
}
type ScheduleMap map[string]ScheduleInput
func (ScheduleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Schedule)(nil)).Elem()
}
func (i ScheduleMap) ToScheduleMapOutput() ScheduleMapOutput {
return i.ToScheduleMapOutputWithContext(context.Background())
}
func (i ScheduleMap) ToScheduleMapOutputWithContext(ctx context.Context) ScheduleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleMapOutput)
}
type ScheduleOutput struct{ *pulumi.OutputState }
func (ScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Schedule)(nil)).Elem()
}
func (o ScheduleOutput) ToScheduleOutput() ScheduleOutput {
return o
}
func (o ScheduleOutput) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput {
return o
}
// The properties of a daily schedule. If the schedule occurs once each day of the week, specify the daily recurrence. A `dailyRecurrence` block as defined below.
func (o ScheduleOutput) DailyRecurrence() ScheduleDailyRecurrencePtrOutput {
return o.ApplyT(func(v *Schedule) ScheduleDailyRecurrencePtrOutput { return v.DailyRecurrence }).(ScheduleDailyRecurrencePtrOutput)
}
// The properties of an hourly schedule. If the schedule occurs multiple times a day, specify the hourly recurrence. A `hourlyRecurrence` block as defined below.
func (o ScheduleOutput) HourlyRecurrence() ScheduleHourlyRecurrencePtrOutput {
return o.ApplyT(func(v *Schedule) ScheduleHourlyRecurrencePtrOutput { return v.HourlyRecurrence }).(ScheduleHourlyRecurrencePtrOutput)
}
// The name of the dev test lab. Changing this forces a new resource to be created.
func (o ScheduleOutput) LabName() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.LabName }).(pulumi.StringOutput)
}
// The location where the schedule is created. Changing this forces a new resource to be created.
func (o ScheduleOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the dev test lab schedule. Valid value for name depends on the `taskType`. For instance for taskType `LabVmsStartupTask` the name needs to be `LabVmAutoStart`. Changing this forces a new resource to be created.
func (o ScheduleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The notification setting of a schedule. A `notificationSettings` block as defined below.
func (o ScheduleOutput) NotificationSettings() ScheduleNotificationSettingsOutput {
return o.ApplyT(func(v *Schedule) ScheduleNotificationSettingsOutput { return v.NotificationSettings }).(ScheduleNotificationSettingsOutput)
}
// The name of the resource group in which to create the dev test lab schedule. Changing this forces a new resource to be created.
func (o ScheduleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The status of this schedule. Possible values are `Enabled` and `Disabled`. Defaults to `Disabled`.
func (o ScheduleOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o ScheduleOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The task type of the schedule. Possible values include `LabVmsShutdownTask` and `LabVmAutoStart`.
func (o ScheduleOutput) TaskType() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.TaskType }).(pulumi.StringOutput)
}
// The time zone ID (e.g. Pacific Standard time).
func (o ScheduleOutput) TimeZoneId() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.TimeZoneId }).(pulumi.StringOutput)
}
// The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weeklyRecurrence` block as defined below.
func (o ScheduleOutput) WeeklyRecurrence() ScheduleWeeklyRecurrencePtrOutput {
return o.ApplyT(func(v *Schedule) ScheduleWeeklyRecurrencePtrOutput { return v.WeeklyRecurrence }).(ScheduleWeeklyRecurrencePtrOutput)
}
type ScheduleArrayOutput struct{ *pulumi.OutputState }
func (ScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Schedule)(nil)).Elem()
}
func (o ScheduleArrayOutput) ToScheduleArrayOutput() ScheduleArrayOutput {
return o
}
func (o ScheduleArrayOutput) ToScheduleArrayOutputWithContext(ctx context.Context) ScheduleArrayOutput {
return o
}
func (o ScheduleArrayOutput) Index(i pulumi.IntInput) ScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Schedule {
return vs[0].([]*Schedule)[vs[1].(int)]
}).(ScheduleOutput)
}
type ScheduleMapOutput struct{ *pulumi.OutputState }
func (ScheduleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Schedule)(nil)).Elem()
}
func (o ScheduleMapOutput) ToScheduleMapOutput() ScheduleMapOutput {
return o
}
func (o ScheduleMapOutput) ToScheduleMapOutputWithContext(ctx context.Context) ScheduleMapOutput {
return o
}
func (o ScheduleMapOutput) MapIndex(k pulumi.StringInput) ScheduleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Schedule {
return vs[0].(map[string]*Schedule)[vs[1].(string)]
}).(ScheduleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleInput)(nil)).Elem(), &Schedule{})
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleArrayInput)(nil)).Elem(), ScheduleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleMapInput)(nil)).Elem(), ScheduleMap{})
pulumi.RegisterOutputType(ScheduleOutput{})
pulumi.RegisterOutputType(ScheduleArrayOutput{})
pulumi.RegisterOutputType(ScheduleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/virtualNetwork.go | sdk/go/azure/devtest/virtualNetwork.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Network within a DevTest Lab.
//
// ## 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/devtest"
// "github.com/pulumi/pulumi/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
// }
// exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
// Name: pulumi.String("example-devtestlab"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Tags: pulumi.StringMap{
// "Sydney": pulumi.String("Australia"),
// },
// })
// if err != nil {
// return err
// }
// _, err = devtest.NewVirtualNetwork(ctx, "example", &devtest.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// LabName: exampleLab.Name,
// ResourceGroupName: example.Name,
// Subnet: &devtest.VirtualNetworkSubnetArgs{
// UsePublicIpAddress: pulumi.String("Allow"),
// UseInVirtualMachineCreation: pulumi.String("Allow"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DevTestLab` - 2018-09-15
//
// ## Import
//
// DevTest Virtual Networks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:devtest/virtualNetwork:VirtualNetwork network1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualNetworks/network1
// ```
type VirtualNetwork struct {
pulumi.CustomResourceState
// A description for the Virtual Network.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name of the Dev Test Lab in which the Virtual Network should be created. Changing this forces a new resource to be created.
LabName pulumi.StringOutput `pulumi:"labName"`
// Specifies the name of the Dev Test Virtual Network. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `subnet` block as defined below.
Subnet VirtualNetworkSubnetOutput `pulumi:"subnet"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The unique immutable identifier of the Dev Test Virtual Network.
UniqueIdentifier pulumi.StringOutput `pulumi:"uniqueIdentifier"`
}
// NewVirtualNetwork registers a new resource with the given unique name, arguments, and options.
func NewVirtualNetwork(ctx *pulumi.Context,
name string, args *VirtualNetworkArgs, opts ...pulumi.ResourceOption) (*VirtualNetwork, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LabName == nil {
return nil, errors.New("invalid value for required argument 'LabName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource VirtualNetwork
err := ctx.RegisterResource("azure:devtest/virtualNetwork:VirtualNetwork", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVirtualNetwork gets an existing VirtualNetwork resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetVirtualNetwork(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VirtualNetworkState, opts ...pulumi.ResourceOption) (*VirtualNetwork, error) {
var resource VirtualNetwork
err := ctx.ReadResource("azure:devtest/virtualNetwork:VirtualNetwork", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VirtualNetwork resources.
type virtualNetworkState struct {
// A description for the Virtual Network.
Description *string `pulumi:"description"`
// Specifies the name of the Dev Test Lab in which the Virtual Network should be created. Changing this forces a new resource to be created.
LabName *string `pulumi:"labName"`
// Specifies the name of the Dev Test Virtual Network. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `subnet` block as defined below.
Subnet *VirtualNetworkSubnet `pulumi:"subnet"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The unique immutable identifier of the Dev Test Virtual Network.
UniqueIdentifier *string `pulumi:"uniqueIdentifier"`
}
type VirtualNetworkState struct {
// A description for the Virtual Network.
Description pulumi.StringPtrInput
// Specifies the name of the Dev Test Lab in which the Virtual Network should be created. Changing this forces a new resource to be created.
LabName pulumi.StringPtrInput
// Specifies the name of the Dev Test Virtual Network. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `subnet` block as defined below.
Subnet VirtualNetworkSubnetPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The unique immutable identifier of the Dev Test Virtual Network.
UniqueIdentifier pulumi.StringPtrInput
}
func (VirtualNetworkState) ElementType() reflect.Type {
return reflect.TypeOf((*virtualNetworkState)(nil)).Elem()
}
type virtualNetworkArgs struct {
// A description for the Virtual Network.
Description *string `pulumi:"description"`
// Specifies the name of the Dev Test Lab in which the Virtual Network should be created. Changing this forces a new resource to be created.
LabName string `pulumi:"labName"`
// Specifies the name of the Dev Test Virtual Network. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `subnet` block as defined below.
Subnet *VirtualNetworkSubnet `pulumi:"subnet"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a VirtualNetwork resource.
type VirtualNetworkArgs struct {
// A description for the Virtual Network.
Description pulumi.StringPtrInput
// Specifies the name of the Dev Test Lab in which the Virtual Network should be created. Changing this forces a new resource to be created.
LabName pulumi.StringInput
// Specifies the name of the Dev Test Virtual Network. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `subnet` block as defined below.
Subnet VirtualNetworkSubnetPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (VirtualNetworkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*virtualNetworkArgs)(nil)).Elem()
}
type VirtualNetworkInput interface {
pulumi.Input
ToVirtualNetworkOutput() VirtualNetworkOutput
ToVirtualNetworkOutputWithContext(ctx context.Context) VirtualNetworkOutput
}
func (*VirtualNetwork) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualNetwork)(nil)).Elem()
}
func (i *VirtualNetwork) ToVirtualNetworkOutput() VirtualNetworkOutput {
return i.ToVirtualNetworkOutputWithContext(context.Background())
}
func (i *VirtualNetwork) ToVirtualNetworkOutputWithContext(ctx context.Context) VirtualNetworkOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkOutput)
}
// VirtualNetworkArrayInput is an input type that accepts VirtualNetworkArray and VirtualNetworkArrayOutput values.
// You can construct a concrete instance of `VirtualNetworkArrayInput` via:
//
// VirtualNetworkArray{ VirtualNetworkArgs{...} }
type VirtualNetworkArrayInput interface {
pulumi.Input
ToVirtualNetworkArrayOutput() VirtualNetworkArrayOutput
ToVirtualNetworkArrayOutputWithContext(context.Context) VirtualNetworkArrayOutput
}
type VirtualNetworkArray []VirtualNetworkInput
func (VirtualNetworkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualNetwork)(nil)).Elem()
}
func (i VirtualNetworkArray) ToVirtualNetworkArrayOutput() VirtualNetworkArrayOutput {
return i.ToVirtualNetworkArrayOutputWithContext(context.Background())
}
func (i VirtualNetworkArray) ToVirtualNetworkArrayOutputWithContext(ctx context.Context) VirtualNetworkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkArrayOutput)
}
// VirtualNetworkMapInput is an input type that accepts VirtualNetworkMap and VirtualNetworkMapOutput values.
// You can construct a concrete instance of `VirtualNetworkMapInput` via:
//
// VirtualNetworkMap{ "key": VirtualNetworkArgs{...} }
type VirtualNetworkMapInput interface {
pulumi.Input
ToVirtualNetworkMapOutput() VirtualNetworkMapOutput
ToVirtualNetworkMapOutputWithContext(context.Context) VirtualNetworkMapOutput
}
type VirtualNetworkMap map[string]VirtualNetworkInput
func (VirtualNetworkMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualNetwork)(nil)).Elem()
}
func (i VirtualNetworkMap) ToVirtualNetworkMapOutput() VirtualNetworkMapOutput {
return i.ToVirtualNetworkMapOutputWithContext(context.Background())
}
func (i VirtualNetworkMap) ToVirtualNetworkMapOutputWithContext(ctx context.Context) VirtualNetworkMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkMapOutput)
}
type VirtualNetworkOutput struct{ *pulumi.OutputState }
func (VirtualNetworkOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualNetwork)(nil)).Elem()
}
func (o VirtualNetworkOutput) ToVirtualNetworkOutput() VirtualNetworkOutput {
return o
}
func (o VirtualNetworkOutput) ToVirtualNetworkOutputWithContext(ctx context.Context) VirtualNetworkOutput {
return o
}
// A description for the Virtual Network.
func (o VirtualNetworkOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VirtualNetwork) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Dev Test Lab in which the Virtual Network should be created. Changing this forces a new resource to be created.
func (o VirtualNetworkOutput) LabName() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.LabName }).(pulumi.StringOutput)
}
// Specifies the name of the Dev Test Virtual Network. Changing this forces a new resource to be created.
func (o VirtualNetworkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
func (o VirtualNetworkOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `subnet` block as defined below.
func (o VirtualNetworkOutput) Subnet() VirtualNetworkSubnetOutput {
return o.ApplyT(func(v *VirtualNetwork) VirtualNetworkSubnetOutput { return v.Subnet }).(VirtualNetworkSubnetOutput)
}
// A mapping of tags to assign to the resource.
func (o VirtualNetworkOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualNetwork) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The unique immutable identifier of the Dev Test Virtual Network.
func (o VirtualNetworkOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
type VirtualNetworkArrayOutput struct{ *pulumi.OutputState }
func (VirtualNetworkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualNetwork)(nil)).Elem()
}
func (o VirtualNetworkArrayOutput) ToVirtualNetworkArrayOutput() VirtualNetworkArrayOutput {
return o
}
func (o VirtualNetworkArrayOutput) ToVirtualNetworkArrayOutputWithContext(ctx context.Context) VirtualNetworkArrayOutput {
return o
}
func (o VirtualNetworkArrayOutput) Index(i pulumi.IntInput) VirtualNetworkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetwork {
return vs[0].([]*VirtualNetwork)[vs[1].(int)]
}).(VirtualNetworkOutput)
}
type VirtualNetworkMapOutput struct{ *pulumi.OutputState }
func (VirtualNetworkMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualNetwork)(nil)).Elem()
}
func (o VirtualNetworkMapOutput) ToVirtualNetworkMapOutput() VirtualNetworkMapOutput {
return o
}
func (o VirtualNetworkMapOutput) ToVirtualNetworkMapOutputWithContext(ctx context.Context) VirtualNetworkMapOutput {
return o
}
func (o VirtualNetworkMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetwork {
return vs[0].(map[string]*VirtualNetwork)[vs[1].(string)]
}).(VirtualNetworkOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkInput)(nil)).Elem(), &VirtualNetwork{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkArrayInput)(nil)).Elem(), VirtualNetworkArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkMapInput)(nil)).Elem(), VirtualNetworkMap{})
pulumi.RegisterOutputType(VirtualNetworkOutput{})
pulumi.RegisterOutputType(VirtualNetworkArrayOutput{})
pulumi.RegisterOutputType(VirtualNetworkMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/globalVMShutdownSchedule.go | sdk/go/azure/devtest/globalVMShutdownSchedule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages automated shutdown schedules for Azure VMs that are not within an Azure DevTest Lab. While this is part of the DevTest Labs service in Azure,
// this resource applies only to standard VMs, not DevTest Lab VMs. To manage automated shutdown schedules for DevTest Lab VMs, reference the
// `devtest.Schedule` resource
//
// ## 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/devtest"
// "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("sample-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("sample-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("sample-subnet"),
// 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("sample-nic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
// &network.NetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("testconfiguration1"),
// SubnetId: exampleSubnet.ID(),
// PrivateIpAddressAllocation: pulumi.String("Dynamic"),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
// Name: pulumi.String("SampleVM"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// NetworkInterfaceIds: pulumi.StringArray{
// exampleNetworkInterface.ID(),
// },
// Size: pulumi.String("Standard_B2s"),
// SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
// Name: pulumi.String("myosdisk-example"),
// Caching: pulumi.String("ReadWrite"),
// StorageAccountType: pulumi.String("Standard_LRS"),
// },
// AdminUsername: pulumi.String("testadmin"),
// AdminPassword: pulumi.String("Password1234!"),
// DisablePasswordAuthentication: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = devtest.NewGlobalVMShutdownSchedule(ctx, "example", &devtest.GlobalVMShutdownScheduleArgs{
// VirtualMachineId: exampleLinuxVirtualMachine.ID(),
// Location: example.Location,
// Enabled: pulumi.Bool(true),
// DailyRecurrenceTime: pulumi.String("1100"),
// Timezone: pulumi.String("Pacific Standard Time"),
// NotificationSettings: &devtest.GlobalVMShutdownScheduleNotificationSettingsArgs{
// Enabled: pulumi.Bool(true),
// TimeInMinutes: pulumi.Int(60),
// WebhookUrl: pulumi.String("https://sample-webhook-url.example.com"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DevTestLab` - 2018-09-15
//
// ## Import
//
// An existing Dev Test Global Shutdown Schedule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:devtest/globalVMShutdownSchedule:GlobalVMShutdownSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.DevTestLab/schedules/shutdown-computevm-SampleVM
// ```
//
// The name of the resource within the `resource id` will always follow the format `shutdown-computevm-<VM Name>` where `<VM Name>` is replaced by the name of the target Virtual Machine
type GlobalVMShutdownSchedule struct {
pulumi.CustomResourceState
// The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.)
DailyRecurrenceTime pulumi.StringOutput `pulumi:"dailyRecurrenceTime"`
// Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// The location where the schedule is created. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings GlobalVMShutdownScheduleNotificationSettingsOutput `pulumi:"notificationSettings"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
Timezone pulumi.StringOutput `pulumi:"timezone"`
// The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"`
}
// NewGlobalVMShutdownSchedule registers a new resource with the given unique name, arguments, and options.
func NewGlobalVMShutdownSchedule(ctx *pulumi.Context,
name string, args *GlobalVMShutdownScheduleArgs, opts ...pulumi.ResourceOption) (*GlobalVMShutdownSchedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DailyRecurrenceTime == nil {
return nil, errors.New("invalid value for required argument 'DailyRecurrenceTime'")
}
if args.NotificationSettings == nil {
return nil, errors.New("invalid value for required argument 'NotificationSettings'")
}
if args.Timezone == nil {
return nil, errors.New("invalid value for required argument 'Timezone'")
}
if args.VirtualMachineId == nil {
return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GlobalVMShutdownSchedule
err := ctx.RegisterResource("azure:devtest/globalVMShutdownSchedule:GlobalVMShutdownSchedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGlobalVMShutdownSchedule gets an existing GlobalVMShutdownSchedule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGlobalVMShutdownSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GlobalVMShutdownScheduleState, opts ...pulumi.ResourceOption) (*GlobalVMShutdownSchedule, error) {
var resource GlobalVMShutdownSchedule
err := ctx.ReadResource("azure:devtest/globalVMShutdownSchedule:GlobalVMShutdownSchedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GlobalVMShutdownSchedule resources.
type globalVMShutdownScheduleState struct {
// The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.)
DailyRecurrenceTime *string `pulumi:"dailyRecurrenceTime"`
// Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// The location where the schedule is created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings *GlobalVMShutdownScheduleNotificationSettings `pulumi:"notificationSettings"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
Timezone *string `pulumi:"timezone"`
// The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId *string `pulumi:"virtualMachineId"`
}
type GlobalVMShutdownScheduleState struct {
// The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.)
DailyRecurrenceTime pulumi.StringPtrInput
// Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// The location where the schedule is created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings GlobalVMShutdownScheduleNotificationSettingsPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
Timezone pulumi.StringPtrInput
// The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringPtrInput
}
func (GlobalVMShutdownScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*globalVMShutdownScheduleState)(nil)).Elem()
}
type globalVMShutdownScheduleArgs struct {
// The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.)
DailyRecurrenceTime string `pulumi:"dailyRecurrenceTime"`
// Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// The location where the schedule is created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings GlobalVMShutdownScheduleNotificationSettings `pulumi:"notificationSettings"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
Timezone string `pulumi:"timezone"`
// The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId string `pulumi:"virtualMachineId"`
}
// The set of arguments for constructing a GlobalVMShutdownSchedule resource.
type GlobalVMShutdownScheduleArgs struct {
// The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.)
DailyRecurrenceTime pulumi.StringInput
// Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// The location where the schedule is created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The notification setting of a schedule. A `notificationSettings` block as defined below.
NotificationSettings GlobalVMShutdownScheduleNotificationSettingsInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
Timezone pulumi.StringInput
// The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringInput
}
func (GlobalVMShutdownScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*globalVMShutdownScheduleArgs)(nil)).Elem()
}
type GlobalVMShutdownScheduleInput interface {
pulumi.Input
ToGlobalVMShutdownScheduleOutput() GlobalVMShutdownScheduleOutput
ToGlobalVMShutdownScheduleOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleOutput
}
func (*GlobalVMShutdownSchedule) ElementType() reflect.Type {
return reflect.TypeOf((**GlobalVMShutdownSchedule)(nil)).Elem()
}
func (i *GlobalVMShutdownSchedule) ToGlobalVMShutdownScheduleOutput() GlobalVMShutdownScheduleOutput {
return i.ToGlobalVMShutdownScheduleOutputWithContext(context.Background())
}
func (i *GlobalVMShutdownSchedule) ToGlobalVMShutdownScheduleOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalVMShutdownScheduleOutput)
}
// GlobalVMShutdownScheduleArrayInput is an input type that accepts GlobalVMShutdownScheduleArray and GlobalVMShutdownScheduleArrayOutput values.
// You can construct a concrete instance of `GlobalVMShutdownScheduleArrayInput` via:
//
// GlobalVMShutdownScheduleArray{ GlobalVMShutdownScheduleArgs{...} }
type GlobalVMShutdownScheduleArrayInput interface {
pulumi.Input
ToGlobalVMShutdownScheduleArrayOutput() GlobalVMShutdownScheduleArrayOutput
ToGlobalVMShutdownScheduleArrayOutputWithContext(context.Context) GlobalVMShutdownScheduleArrayOutput
}
type GlobalVMShutdownScheduleArray []GlobalVMShutdownScheduleInput
func (GlobalVMShutdownScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GlobalVMShutdownSchedule)(nil)).Elem()
}
func (i GlobalVMShutdownScheduleArray) ToGlobalVMShutdownScheduleArrayOutput() GlobalVMShutdownScheduleArrayOutput {
return i.ToGlobalVMShutdownScheduleArrayOutputWithContext(context.Background())
}
func (i GlobalVMShutdownScheduleArray) ToGlobalVMShutdownScheduleArrayOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalVMShutdownScheduleArrayOutput)
}
// GlobalVMShutdownScheduleMapInput is an input type that accepts GlobalVMShutdownScheduleMap and GlobalVMShutdownScheduleMapOutput values.
// You can construct a concrete instance of `GlobalVMShutdownScheduleMapInput` via:
//
// GlobalVMShutdownScheduleMap{ "key": GlobalVMShutdownScheduleArgs{...} }
type GlobalVMShutdownScheduleMapInput interface {
pulumi.Input
ToGlobalVMShutdownScheduleMapOutput() GlobalVMShutdownScheduleMapOutput
ToGlobalVMShutdownScheduleMapOutputWithContext(context.Context) GlobalVMShutdownScheduleMapOutput
}
type GlobalVMShutdownScheduleMap map[string]GlobalVMShutdownScheduleInput
func (GlobalVMShutdownScheduleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GlobalVMShutdownSchedule)(nil)).Elem()
}
func (i GlobalVMShutdownScheduleMap) ToGlobalVMShutdownScheduleMapOutput() GlobalVMShutdownScheduleMapOutput {
return i.ToGlobalVMShutdownScheduleMapOutputWithContext(context.Background())
}
func (i GlobalVMShutdownScheduleMap) ToGlobalVMShutdownScheduleMapOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalVMShutdownScheduleMapOutput)
}
type GlobalVMShutdownScheduleOutput struct{ *pulumi.OutputState }
func (GlobalVMShutdownScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GlobalVMShutdownSchedule)(nil)).Elem()
}
func (o GlobalVMShutdownScheduleOutput) ToGlobalVMShutdownScheduleOutput() GlobalVMShutdownScheduleOutput {
return o
}
func (o GlobalVMShutdownScheduleOutput) ToGlobalVMShutdownScheduleOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleOutput {
return o
}
// The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.)
func (o GlobalVMShutdownScheduleOutput) DailyRecurrenceTime() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalVMShutdownSchedule) pulumi.StringOutput { return v.DailyRecurrenceTime }).(pulumi.StringOutput)
}
// Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`.
func (o GlobalVMShutdownScheduleOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GlobalVMShutdownSchedule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// The location where the schedule is created. Changing this forces a new resource to be created.
func (o GlobalVMShutdownScheduleOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalVMShutdownSchedule) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The notification setting of a schedule. A `notificationSettings` block as defined below.
func (o GlobalVMShutdownScheduleOutput) NotificationSettings() GlobalVMShutdownScheduleNotificationSettingsOutput {
return o.ApplyT(func(v *GlobalVMShutdownSchedule) GlobalVMShutdownScheduleNotificationSettingsOutput {
return v.NotificationSettings
}).(GlobalVMShutdownScheduleNotificationSettingsOutput)
}
// A mapping of tags to assign to the resource.
func (o GlobalVMShutdownScheduleOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *GlobalVMShutdownSchedule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
func (o GlobalVMShutdownScheduleOutput) Timezone() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalVMShutdownSchedule) pulumi.StringOutput { return v.Timezone }).(pulumi.StringOutput)
}
// The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
func (o GlobalVMShutdownScheduleOutput) VirtualMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *GlobalVMShutdownSchedule) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput)
}
type GlobalVMShutdownScheduleArrayOutput struct{ *pulumi.OutputState }
func (GlobalVMShutdownScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GlobalVMShutdownSchedule)(nil)).Elem()
}
func (o GlobalVMShutdownScheduleArrayOutput) ToGlobalVMShutdownScheduleArrayOutput() GlobalVMShutdownScheduleArrayOutput {
return o
}
func (o GlobalVMShutdownScheduleArrayOutput) ToGlobalVMShutdownScheduleArrayOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleArrayOutput {
return o
}
func (o GlobalVMShutdownScheduleArrayOutput) Index(i pulumi.IntInput) GlobalVMShutdownScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GlobalVMShutdownSchedule {
return vs[0].([]*GlobalVMShutdownSchedule)[vs[1].(int)]
}).(GlobalVMShutdownScheduleOutput)
}
type GlobalVMShutdownScheduleMapOutput struct{ *pulumi.OutputState }
func (GlobalVMShutdownScheduleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GlobalVMShutdownSchedule)(nil)).Elem()
}
func (o GlobalVMShutdownScheduleMapOutput) ToGlobalVMShutdownScheduleMapOutput() GlobalVMShutdownScheduleMapOutput {
return o
}
func (o GlobalVMShutdownScheduleMapOutput) ToGlobalVMShutdownScheduleMapOutputWithContext(ctx context.Context) GlobalVMShutdownScheduleMapOutput {
return o
}
func (o GlobalVMShutdownScheduleMapOutput) MapIndex(k pulumi.StringInput) GlobalVMShutdownScheduleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GlobalVMShutdownSchedule {
return vs[0].(map[string]*GlobalVMShutdownSchedule)[vs[1].(string)]
}).(GlobalVMShutdownScheduleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GlobalVMShutdownScheduleInput)(nil)).Elem(), &GlobalVMShutdownSchedule{})
pulumi.RegisterInputType(reflect.TypeOf((*GlobalVMShutdownScheduleArrayInput)(nil)).Elem(), GlobalVMShutdownScheduleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GlobalVMShutdownScheduleMapInput)(nil)).Elem(), GlobalVMShutdownScheduleMap{})
pulumi.RegisterOutputType(GlobalVMShutdownScheduleOutput{})
pulumi.RegisterOutputType(GlobalVMShutdownScheduleArrayOutput{})
pulumi.RegisterOutputType(GlobalVMShutdownScheduleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/getVirtualNetwork.go | sdk/go/azure/devtest/getVirtualNetwork.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
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 Dev Test Lab Virtual Network.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devtest"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := devtest.LookupVirtualNetwork(ctx, &devtest.LookupVirtualNetworkArgs{
// Name: "example-network",
// LabName: "examplelab",
// ResourceGroupName: "example-resource",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("labSubnetName", example.AllowedSubnets[0].LabSubnetName)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DevTestLab` - 2018-09-15
func LookupVirtualNetwork(ctx *pulumi.Context, args *LookupVirtualNetworkArgs, opts ...pulumi.InvokeOption) (*LookupVirtualNetworkResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupVirtualNetworkResult
err := ctx.Invoke("azure:devtest/getVirtualNetwork:getVirtualNetwork", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVirtualNetwork.
type LookupVirtualNetworkArgs struct {
// Specifies the name of the Dev Test Lab.
LabName string `pulumi:"labName"`
// Specifies the name of the Virtual Network.
Name string `pulumi:"name"`
// Specifies the name of the resource group that contains the Virtual Network.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getVirtualNetwork.
type LookupVirtualNetworkResult struct {
// The list of subnets enabled for the virtual network as defined below.
AllowedSubnets []GetVirtualNetworkAllowedSubnet `pulumi:"allowedSubnets"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
LabName string `pulumi:"labName"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The list of permission overrides for the subnets as defined below.
SubnetOverrides []GetVirtualNetworkSubnetOverride `pulumi:"subnetOverrides"`
// The unique immutable identifier of the virtual network.
UniqueIdentifier string `pulumi:"uniqueIdentifier"`
}
func LookupVirtualNetworkOutput(ctx *pulumi.Context, args LookupVirtualNetworkOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualNetworkResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupVirtualNetworkResultOutput, error) {
args := v.(LookupVirtualNetworkArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:devtest/getVirtualNetwork:getVirtualNetwork", args, LookupVirtualNetworkResultOutput{}, options).(LookupVirtualNetworkResultOutput), nil
}).(LookupVirtualNetworkResultOutput)
}
// A collection of arguments for invoking getVirtualNetwork.
type LookupVirtualNetworkOutputArgs struct {
// Specifies the name of the Dev Test Lab.
LabName pulumi.StringInput `pulumi:"labName"`
// Specifies the name of the Virtual Network.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the resource group that contains the Virtual Network.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupVirtualNetworkOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVirtualNetworkArgs)(nil)).Elem()
}
// A collection of values returned by getVirtualNetwork.
type LookupVirtualNetworkResultOutput struct{ *pulumi.OutputState }
func (LookupVirtualNetworkResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVirtualNetworkResult)(nil)).Elem()
}
func (o LookupVirtualNetworkResultOutput) ToLookupVirtualNetworkResultOutput() LookupVirtualNetworkResultOutput {
return o
}
func (o LookupVirtualNetworkResultOutput) ToLookupVirtualNetworkResultOutputWithContext(ctx context.Context) LookupVirtualNetworkResultOutput {
return o
}
// The list of subnets enabled for the virtual network as defined below.
func (o LookupVirtualNetworkResultOutput) AllowedSubnets() GetVirtualNetworkAllowedSubnetArrayOutput {
return o.ApplyT(func(v LookupVirtualNetworkResult) []GetVirtualNetworkAllowedSubnet { return v.AllowedSubnets }).(GetVirtualNetworkAllowedSubnetArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupVirtualNetworkResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupVirtualNetworkResultOutput) LabName() pulumi.StringOutput {
return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.LabName }).(pulumi.StringOutput)
}
func (o LookupVirtualNetworkResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupVirtualNetworkResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The list of permission overrides for the subnets as defined below.
func (o LookupVirtualNetworkResultOutput) SubnetOverrides() GetVirtualNetworkSubnetOverrideArrayOutput {
return o.ApplyT(func(v LookupVirtualNetworkResult) []GetVirtualNetworkSubnetOverride { return v.SubnetOverrides }).(GetVirtualNetworkSubnetOverrideArrayOutput)
}
// The unique immutable identifier of the virtual network.
func (o LookupVirtualNetworkResultOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupVirtualNetworkResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/devtest/windowsVirtualMachine.go | sdk/go/azure/devtest/windowsVirtualMachine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package devtest
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Windows Virtual Machine within a Dev Test Lab.
//
// ## 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/devtest"
// "github.com/pulumi/pulumi/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
// }
// exampleLab, err := devtest.NewLab(ctx, "example", &devtest.LabArgs{
// Name: pulumi.String("example-devtestlab"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Tags: pulumi.StringMap{
// "Sydney": pulumi.String("Australia"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := devtest.NewVirtualNetwork(ctx, "example", &devtest.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// LabName: exampleLab.Name,
// ResourceGroupName: example.Name,
// Subnet: &devtest.VirtualNetworkSubnetArgs{
// UsePublicIpAddress: pulumi.String("Allow"),
// UseInVirtualMachineCreation: pulumi.String("Allow"),
// },
// })
// if err != nil {
// return err
// }
// _, err = devtest.NewWindowsVirtualMachine(ctx, "example", &devtest.WindowsVirtualMachineArgs{
// Name: pulumi.String("example-vm03"),
// LabName: exampleLab.Name,
// ResourceGroupName: example.Name,
// Location: example.Location,
// Size: pulumi.String("Standard_DS2"),
// Username: pulumi.String("exampleuser99"),
// Password: pulumi.String("Pa$w0rd1234!"),
// LabVirtualNetworkId: exampleVirtualNetwork.ID(),
// LabSubnetName: pulumi.String(exampleVirtualNetwork.Subnet.ApplyT(func(subnet devtest.VirtualNetworkSubnet) (*string, error) {
// return &subnet.Name, nil
// }).(pulumi.StringPtrOutput)),
// StorageType: pulumi.String("Premium"),
// Notes: pulumi.String("Some notes about this Virtual Machine."),
// GalleryImageReference: &devtest.WindowsVirtualMachineGalleryImageReferenceArgs{
// Offer: pulumi.String("WindowsServer"),
// Publisher: pulumi.String("MicrosoftWindowsServer"),
// Sku: pulumi.String("2019-Datacenter"),
// Version: pulumi.String("latest"),
// },
// })
// if 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.DevTestLab` - 2018-09-15
//
// ## Import
//
// DevTest Windows Virtual Machines can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:devtest/windowsVirtualMachine:WindowsVirtualMachine machine1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualMachines/machine1
// ```
type WindowsVirtualMachine struct {
pulumi.CustomResourceState
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim pulumi.BoolPtrOutput `pulumi:"allowClaim"`
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress pulumi.BoolPtrOutput `pulumi:"disallowPublicIpAddress"`
// The FQDN of the Virtual Machine.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// A `galleryImageReference` block as defined below.
GalleryImageReference WindowsVirtualMachineGalleryImageReferenceOutput `pulumi:"galleryImageReference"`
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules WindowsVirtualMachineInboundNatRuleArrayOutput `pulumi:"inboundNatRules"`
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName pulumi.StringOutput `pulumi:"labName"`
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName pulumi.StringOutput `pulumi:"labSubnetName"`
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId pulumi.StringOutput `pulumi:"labVirtualNetworkId"`
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name pulumi.StringOutput `pulumi:"name"`
// Any notes about the Virtual Machine.
Notes pulumi.StringPtrOutput `pulumi:"notes"`
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password pulumi.StringOutput `pulumi:"password"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size pulumi.StringOutput `pulumi:"size"`
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType pulumi.StringOutput `pulumi:"storageType"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The unique immutable identifier of the Virtual Machine.
UniqueIdentifier pulumi.StringOutput `pulumi:"uniqueIdentifier"`
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username pulumi.StringOutput `pulumi:"username"`
}
// NewWindowsVirtualMachine registers a new resource with the given unique name, arguments, and options.
func NewWindowsVirtualMachine(ctx *pulumi.Context,
name string, args *WindowsVirtualMachineArgs, opts ...pulumi.ResourceOption) (*WindowsVirtualMachine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.GalleryImageReference == nil {
return nil, errors.New("invalid value for required argument 'GalleryImageReference'")
}
if args.LabName == nil {
return nil, errors.New("invalid value for required argument 'LabName'")
}
if args.LabSubnetName == nil {
return nil, errors.New("invalid value for required argument 'LabSubnetName'")
}
if args.LabVirtualNetworkId == nil {
return nil, errors.New("invalid value for required argument 'LabVirtualNetworkId'")
}
if args.Password == nil {
return nil, errors.New("invalid value for required argument 'Password'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Size == nil {
return nil, errors.New("invalid value for required argument 'Size'")
}
if args.StorageType == nil {
return nil, errors.New("invalid value for required argument 'StorageType'")
}
if args.Username == nil {
return nil, errors.New("invalid value for required argument 'Username'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource WindowsVirtualMachine
err := ctx.RegisterResource("azure:devtest/windowsVirtualMachine:WindowsVirtualMachine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWindowsVirtualMachine gets an existing WindowsVirtualMachine resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWindowsVirtualMachine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WindowsVirtualMachineState, opts ...pulumi.ResourceOption) (*WindowsVirtualMachine, error) {
var resource WindowsVirtualMachine
err := ctx.ReadResource("azure:devtest/windowsVirtualMachine:WindowsVirtualMachine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WindowsVirtualMachine resources.
type windowsVirtualMachineState struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim *bool `pulumi:"allowClaim"`
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress *bool `pulumi:"disallowPublicIpAddress"`
// The FQDN of the Virtual Machine.
Fqdn *string `pulumi:"fqdn"`
// A `galleryImageReference` block as defined below.
GalleryImageReference *WindowsVirtualMachineGalleryImageReference `pulumi:"galleryImageReference"`
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules []WindowsVirtualMachineInboundNatRule `pulumi:"inboundNatRules"`
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName *string `pulumi:"labName"`
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName *string `pulumi:"labSubnetName"`
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId *string `pulumi:"labVirtualNetworkId"`
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name *string `pulumi:"name"`
// Any notes about the Virtual Machine.
Notes *string `pulumi:"notes"`
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password *string `pulumi:"password"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size *string `pulumi:"size"`
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType *string `pulumi:"storageType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The unique immutable identifier of the Virtual Machine.
UniqueIdentifier *string `pulumi:"uniqueIdentifier"`
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username *string `pulumi:"username"`
}
type WindowsVirtualMachineState struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim pulumi.BoolPtrInput
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress pulumi.BoolPtrInput
// The FQDN of the Virtual Machine.
Fqdn pulumi.StringPtrInput
// A `galleryImageReference` block as defined below.
GalleryImageReference WindowsVirtualMachineGalleryImageReferencePtrInput
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules WindowsVirtualMachineInboundNatRuleArrayInput
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName pulumi.StringPtrInput
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName pulumi.StringPtrInput
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId pulumi.StringPtrInput
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name pulumi.StringPtrInput
// Any notes about the Virtual Machine.
Notes pulumi.StringPtrInput
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password pulumi.StringPtrInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size pulumi.StringPtrInput
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The unique immutable identifier of the Virtual Machine.
UniqueIdentifier pulumi.StringPtrInput
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username pulumi.StringPtrInput
}
func (WindowsVirtualMachineState) ElementType() reflect.Type {
return reflect.TypeOf((*windowsVirtualMachineState)(nil)).Elem()
}
type windowsVirtualMachineArgs struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim *bool `pulumi:"allowClaim"`
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress *bool `pulumi:"disallowPublicIpAddress"`
// A `galleryImageReference` block as defined below.
GalleryImageReference WindowsVirtualMachineGalleryImageReference `pulumi:"galleryImageReference"`
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules []WindowsVirtualMachineInboundNatRule `pulumi:"inboundNatRules"`
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName string `pulumi:"labName"`
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName string `pulumi:"labSubnetName"`
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId string `pulumi:"labVirtualNetworkId"`
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name *string `pulumi:"name"`
// Any notes about the Virtual Machine.
Notes *string `pulumi:"notes"`
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password string `pulumi:"password"`
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size string `pulumi:"size"`
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType string `pulumi:"storageType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username string `pulumi:"username"`
}
// The set of arguments for constructing a WindowsVirtualMachine resource.
type WindowsVirtualMachineArgs struct {
// Can this Virtual Machine be claimed by users? Defaults to `true`.
AllowClaim pulumi.BoolPtrInput
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
DisallowPublicIpAddress pulumi.BoolPtrInput
// A `galleryImageReference` block as defined below.
GalleryImageReference WindowsVirtualMachineGalleryImageReferenceInput
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
InboundNatRules WindowsVirtualMachineInboundNatRuleArrayInput
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
LabName pulumi.StringInput
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
LabSubnetName pulumi.StringInput
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
LabVirtualNetworkId pulumi.StringInput
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
Name pulumi.StringPtrInput
// Any notes about the Virtual Machine.
Notes pulumi.StringPtrInput
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
Password pulumi.StringInput
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
Size pulumi.StringInput
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
StorageType pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
Username pulumi.StringInput
}
func (WindowsVirtualMachineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*windowsVirtualMachineArgs)(nil)).Elem()
}
type WindowsVirtualMachineInput interface {
pulumi.Input
ToWindowsVirtualMachineOutput() WindowsVirtualMachineOutput
ToWindowsVirtualMachineOutputWithContext(ctx context.Context) WindowsVirtualMachineOutput
}
func (*WindowsVirtualMachine) ElementType() reflect.Type {
return reflect.TypeOf((**WindowsVirtualMachine)(nil)).Elem()
}
func (i *WindowsVirtualMachine) ToWindowsVirtualMachineOutput() WindowsVirtualMachineOutput {
return i.ToWindowsVirtualMachineOutputWithContext(context.Background())
}
func (i *WindowsVirtualMachine) ToWindowsVirtualMachineOutputWithContext(ctx context.Context) WindowsVirtualMachineOutput {
return pulumi.ToOutputWithContext(ctx, i).(WindowsVirtualMachineOutput)
}
// WindowsVirtualMachineArrayInput is an input type that accepts WindowsVirtualMachineArray and WindowsVirtualMachineArrayOutput values.
// You can construct a concrete instance of `WindowsVirtualMachineArrayInput` via:
//
// WindowsVirtualMachineArray{ WindowsVirtualMachineArgs{...} }
type WindowsVirtualMachineArrayInput interface {
pulumi.Input
ToWindowsVirtualMachineArrayOutput() WindowsVirtualMachineArrayOutput
ToWindowsVirtualMachineArrayOutputWithContext(context.Context) WindowsVirtualMachineArrayOutput
}
type WindowsVirtualMachineArray []WindowsVirtualMachineInput
func (WindowsVirtualMachineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WindowsVirtualMachine)(nil)).Elem()
}
func (i WindowsVirtualMachineArray) ToWindowsVirtualMachineArrayOutput() WindowsVirtualMachineArrayOutput {
return i.ToWindowsVirtualMachineArrayOutputWithContext(context.Background())
}
func (i WindowsVirtualMachineArray) ToWindowsVirtualMachineArrayOutputWithContext(ctx context.Context) WindowsVirtualMachineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WindowsVirtualMachineArrayOutput)
}
// WindowsVirtualMachineMapInput is an input type that accepts WindowsVirtualMachineMap and WindowsVirtualMachineMapOutput values.
// You can construct a concrete instance of `WindowsVirtualMachineMapInput` via:
//
// WindowsVirtualMachineMap{ "key": WindowsVirtualMachineArgs{...} }
type WindowsVirtualMachineMapInput interface {
pulumi.Input
ToWindowsVirtualMachineMapOutput() WindowsVirtualMachineMapOutput
ToWindowsVirtualMachineMapOutputWithContext(context.Context) WindowsVirtualMachineMapOutput
}
type WindowsVirtualMachineMap map[string]WindowsVirtualMachineInput
func (WindowsVirtualMachineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WindowsVirtualMachine)(nil)).Elem()
}
func (i WindowsVirtualMachineMap) ToWindowsVirtualMachineMapOutput() WindowsVirtualMachineMapOutput {
return i.ToWindowsVirtualMachineMapOutputWithContext(context.Background())
}
func (i WindowsVirtualMachineMap) ToWindowsVirtualMachineMapOutputWithContext(ctx context.Context) WindowsVirtualMachineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WindowsVirtualMachineMapOutput)
}
type WindowsVirtualMachineOutput struct{ *pulumi.OutputState }
func (WindowsVirtualMachineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WindowsVirtualMachine)(nil)).Elem()
}
func (o WindowsVirtualMachineOutput) ToWindowsVirtualMachineOutput() WindowsVirtualMachineOutput {
return o
}
func (o WindowsVirtualMachineOutput) ToWindowsVirtualMachineOutputWithContext(ctx context.Context) WindowsVirtualMachineOutput {
return o
}
// Can this Virtual Machine be claimed by users? Defaults to `true`.
func (o WindowsVirtualMachineOutput) AllowClaim() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.BoolPtrOutput { return v.AllowClaim }).(pulumi.BoolPtrOutput)
}
// Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) DisallowPublicIpAddress() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.BoolPtrOutput { return v.DisallowPublicIpAddress }).(pulumi.BoolPtrOutput)
}
// The FQDN of the Virtual Machine.
func (o WindowsVirtualMachineOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// A `galleryImageReference` block as defined below.
func (o WindowsVirtualMachineOutput) GalleryImageReference() WindowsVirtualMachineGalleryImageReferenceOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) WindowsVirtualMachineGalleryImageReferenceOutput {
return v.GalleryImageReference
}).(WindowsVirtualMachineGalleryImageReferenceOutput)
}
// One or more `inboundNatRule` blocks as defined below. Changing this forces a new resource to be created.
//
// > **Note:** If any `inboundNatRule` blocks are specified then `disallowPublicIpAddress` must be set to `true`.
func (o WindowsVirtualMachineOutput) InboundNatRules() WindowsVirtualMachineInboundNatRuleArrayOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) WindowsVirtualMachineInboundNatRuleArrayOutput {
return v.InboundNatRules
}).(WindowsVirtualMachineInboundNatRuleArrayOutput)
}
// Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) LabName() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.LabName }).(pulumi.StringOutput)
}
// The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) LabSubnetName() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.LabSubnetName }).(pulumi.StringOutput)
}
// The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) LabVirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.LabVirtualNetworkId }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
//
// > **Note:** The validation requirements for the Name change based on the `osType` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
func (o WindowsVirtualMachineOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Any notes about the Virtual Machine.
func (o WindowsVirtualMachineOutput) Notes() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringPtrOutput { return v.Notes }).(pulumi.StringPtrOutput)
}
// The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) Password() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
}
// The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) Size() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.Size }).(pulumi.StringOutput)
}
// The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) StorageType() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.StorageType }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o WindowsVirtualMachineOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The unique immutable identifier of the Virtual Machine.
func (o WindowsVirtualMachineOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
// The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
func (o WindowsVirtualMachineOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v *WindowsVirtualMachine) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
}
type WindowsVirtualMachineArrayOutput struct{ *pulumi.OutputState }
func (WindowsVirtualMachineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WindowsVirtualMachine)(nil)).Elem()
}
func (o WindowsVirtualMachineArrayOutput) ToWindowsVirtualMachineArrayOutput() WindowsVirtualMachineArrayOutput {
return o
}
func (o WindowsVirtualMachineArrayOutput) ToWindowsVirtualMachineArrayOutputWithContext(ctx context.Context) WindowsVirtualMachineArrayOutput {
return o
}
func (o WindowsVirtualMachineArrayOutput) Index(i pulumi.IntInput) WindowsVirtualMachineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WindowsVirtualMachine {
return vs[0].([]*WindowsVirtualMachine)[vs[1].(int)]
}).(WindowsVirtualMachineOutput)
}
type WindowsVirtualMachineMapOutput struct{ *pulumi.OutputState }
func (WindowsVirtualMachineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WindowsVirtualMachine)(nil)).Elem()
}
func (o WindowsVirtualMachineMapOutput) ToWindowsVirtualMachineMapOutput() WindowsVirtualMachineMapOutput {
return o
}
func (o WindowsVirtualMachineMapOutput) ToWindowsVirtualMachineMapOutputWithContext(ctx context.Context) WindowsVirtualMachineMapOutput {
return o
}
func (o WindowsVirtualMachineMapOutput) MapIndex(k pulumi.StringInput) WindowsVirtualMachineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WindowsVirtualMachine {
return vs[0].(map[string]*WindowsVirtualMachine)[vs[1].(string)]
| 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/dataprotection/resourceGuard.go | sdk/go/azure/dataprotection/resourceGuard.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Resource Guard.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewResourceGuard(ctx, "example", &dataprotection.ResourceGuardArgs{
// Name: pulumi.String("example-resourceguard"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataProtection` - 2024-04-01
//
// ## Import
//
// Resource Guards can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/resourceGuard:ResourceGuard example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/resourceGuards/resourceGuard1
// ```
type ResourceGuard struct {
pulumi.CustomResourceState
// The Azure Region where the Resource Guard should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Resource Guard. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Resource Guard should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Resource Guard.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A list of the critical operations which are not protected by this Resource Guard.
VaultCriticalOperationExclusionLists pulumi.StringArrayOutput `pulumi:"vaultCriticalOperationExclusionLists"`
}
// NewResourceGuard registers a new resource with the given unique name, arguments, and options.
func NewResourceGuard(ctx *pulumi.Context,
name string, args *ResourceGuardArgs, opts ...pulumi.ResourceOption) (*ResourceGuard, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ResourceGuard
err := ctx.RegisterResource("azure:dataprotection/resourceGuard:ResourceGuard", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResourceGuard gets an existing ResourceGuard resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResourceGuard(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResourceGuardState, opts ...pulumi.ResourceOption) (*ResourceGuard, error) {
var resource ResourceGuard
err := ctx.ReadResource("azure:dataprotection/resourceGuard:ResourceGuard", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ResourceGuard resources.
type resourceGuardState struct {
// The Azure Region where the Resource Guard should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Resource Guard. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Resource Guard should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Resource Guard.
Tags map[string]string `pulumi:"tags"`
// A list of the critical operations which are not protected by this Resource Guard.
VaultCriticalOperationExclusionLists []string `pulumi:"vaultCriticalOperationExclusionLists"`
}
type ResourceGuardState struct {
// The Azure Region where the Resource Guard should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Resource Guard. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Resource Guard should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Resource Guard.
Tags pulumi.StringMapInput
// A list of the critical operations which are not protected by this Resource Guard.
VaultCriticalOperationExclusionLists pulumi.StringArrayInput
}
func (ResourceGuardState) ElementType() reflect.Type {
return reflect.TypeOf((*resourceGuardState)(nil)).Elem()
}
type resourceGuardArgs struct {
// The Azure Region where the Resource Guard should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Resource Guard. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Resource Guard should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Resource Guard.
Tags map[string]string `pulumi:"tags"`
// A list of the critical operations which are not protected by this Resource Guard.
VaultCriticalOperationExclusionLists []string `pulumi:"vaultCriticalOperationExclusionLists"`
}
// The set of arguments for constructing a ResourceGuard resource.
type ResourceGuardArgs struct {
// The Azure Region where the Resource Guard should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Resource Guard. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Resource Guard should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Resource Guard.
Tags pulumi.StringMapInput
// A list of the critical operations which are not protected by this Resource Guard.
VaultCriticalOperationExclusionLists pulumi.StringArrayInput
}
func (ResourceGuardArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resourceGuardArgs)(nil)).Elem()
}
type ResourceGuardInput interface {
pulumi.Input
ToResourceGuardOutput() ResourceGuardOutput
ToResourceGuardOutputWithContext(ctx context.Context) ResourceGuardOutput
}
func (*ResourceGuard) ElementType() reflect.Type {
return reflect.TypeOf((**ResourceGuard)(nil)).Elem()
}
func (i *ResourceGuard) ToResourceGuardOutput() ResourceGuardOutput {
return i.ToResourceGuardOutputWithContext(context.Background())
}
func (i *ResourceGuard) ToResourceGuardOutputWithContext(ctx context.Context) ResourceGuardOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceGuardOutput)
}
// ResourceGuardArrayInput is an input type that accepts ResourceGuardArray and ResourceGuardArrayOutput values.
// You can construct a concrete instance of `ResourceGuardArrayInput` via:
//
// ResourceGuardArray{ ResourceGuardArgs{...} }
type ResourceGuardArrayInput interface {
pulumi.Input
ToResourceGuardArrayOutput() ResourceGuardArrayOutput
ToResourceGuardArrayOutputWithContext(context.Context) ResourceGuardArrayOutput
}
type ResourceGuardArray []ResourceGuardInput
func (ResourceGuardArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResourceGuard)(nil)).Elem()
}
func (i ResourceGuardArray) ToResourceGuardArrayOutput() ResourceGuardArrayOutput {
return i.ToResourceGuardArrayOutputWithContext(context.Background())
}
func (i ResourceGuardArray) ToResourceGuardArrayOutputWithContext(ctx context.Context) ResourceGuardArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceGuardArrayOutput)
}
// ResourceGuardMapInput is an input type that accepts ResourceGuardMap and ResourceGuardMapOutput values.
// You can construct a concrete instance of `ResourceGuardMapInput` via:
//
// ResourceGuardMap{ "key": ResourceGuardArgs{...} }
type ResourceGuardMapInput interface {
pulumi.Input
ToResourceGuardMapOutput() ResourceGuardMapOutput
ToResourceGuardMapOutputWithContext(context.Context) ResourceGuardMapOutput
}
type ResourceGuardMap map[string]ResourceGuardInput
func (ResourceGuardMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResourceGuard)(nil)).Elem()
}
func (i ResourceGuardMap) ToResourceGuardMapOutput() ResourceGuardMapOutput {
return i.ToResourceGuardMapOutputWithContext(context.Background())
}
func (i ResourceGuardMap) ToResourceGuardMapOutputWithContext(ctx context.Context) ResourceGuardMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceGuardMapOutput)
}
type ResourceGuardOutput struct{ *pulumi.OutputState }
func (ResourceGuardOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResourceGuard)(nil)).Elem()
}
func (o ResourceGuardOutput) ToResourceGuardOutput() ResourceGuardOutput {
return o
}
func (o ResourceGuardOutput) ToResourceGuardOutputWithContext(ctx context.Context) ResourceGuardOutput {
return o
}
// The Azure Region where the Resource Guard should exist. Changing this forces a new resource to be created.
func (o ResourceGuardOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ResourceGuard) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Resource Guard. Changing this forces a new resource to be created.
func (o ResourceGuardOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ResourceGuard) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Resource Guard should exist. Changing this forces a new resource to be created.
func (o ResourceGuardOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ResourceGuard) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Resource Guard.
func (o ResourceGuardOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ResourceGuard) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A list of the critical operations which are not protected by this Resource Guard.
func (o ResourceGuardOutput) VaultCriticalOperationExclusionLists() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ResourceGuard) pulumi.StringArrayOutput { return v.VaultCriticalOperationExclusionLists }).(pulumi.StringArrayOutput)
}
type ResourceGuardArrayOutput struct{ *pulumi.OutputState }
func (ResourceGuardArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResourceGuard)(nil)).Elem()
}
func (o ResourceGuardArrayOutput) ToResourceGuardArrayOutput() ResourceGuardArrayOutput {
return o
}
func (o ResourceGuardArrayOutput) ToResourceGuardArrayOutputWithContext(ctx context.Context) ResourceGuardArrayOutput {
return o
}
func (o ResourceGuardArrayOutput) Index(i pulumi.IntInput) ResourceGuardOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGuard {
return vs[0].([]*ResourceGuard)[vs[1].(int)]
}).(ResourceGuardOutput)
}
type ResourceGuardMapOutput struct{ *pulumi.OutputState }
func (ResourceGuardMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResourceGuard)(nil)).Elem()
}
func (o ResourceGuardMapOutput) ToResourceGuardMapOutput() ResourceGuardMapOutput {
return o
}
func (o ResourceGuardMapOutput) ToResourceGuardMapOutputWithContext(ctx context.Context) ResourceGuardMapOutput {
return o
}
func (o ResourceGuardMapOutput) MapIndex(k pulumi.StringInput) ResourceGuardOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGuard {
return vs[0].(map[string]*ResourceGuard)[vs[1].(string)]
}).(ResourceGuardOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResourceGuardInput)(nil)).Elem(), &ResourceGuard{})
pulumi.RegisterInputType(reflect.TypeOf((*ResourceGuardArrayInput)(nil)).Elem(), ResourceGuardArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResourceGuardMapInput)(nil)).Elem(), ResourceGuardMap{})
pulumi.RegisterOutputType(ResourceGuardOutput{})
pulumi.RegisterOutputType(ResourceGuardArrayOutput{})
pulumi.RegisterOutputType(ResourceGuardMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/init.go | sdk/go/azure/dataprotection/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 dataprotection
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:dataprotection/backupInstanceBlogStorage:BackupInstanceBlogStorage":
r = &BackupInstanceBlogStorage{}
case "azure:dataprotection/backupInstanceDisk:BackupInstanceDisk":
r = &BackupInstanceDisk{}
case "azure:dataprotection/backupInstanceKubernetesCluster:BackupInstanceKubernetesCluster":
r = &BackupInstanceKubernetesCluster{}
case "azure:dataprotection/backupInstanceMysqlFlexibleServer:BackupInstanceMysqlFlexibleServer":
r = &BackupInstanceMysqlFlexibleServer{}
case "azure:dataprotection/backupInstancePostgresql:BackupInstancePostgresql":
r = &BackupInstancePostgresql{}
case "azure:dataprotection/backupInstancePostgresqlFlexibleServer:BackupInstancePostgresqlFlexibleServer":
r = &BackupInstancePostgresqlFlexibleServer{}
case "azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage":
r = &BackupPolicyBlobStorage{}
case "azure:dataprotection/backupPolicyDisk:BackupPolicyDisk":
r = &BackupPolicyDisk{}
case "azure:dataprotection/backupPolicyKubernetesCluster:BackupPolicyKubernetesCluster":
r = &BackupPolicyKubernetesCluster{}
case "azure:dataprotection/backupPolicyMysqlFlexibleServer:BackupPolicyMysqlFlexibleServer":
r = &BackupPolicyMysqlFlexibleServer{}
case "azure:dataprotection/backupPolicyPostgresql:BackupPolicyPostgresql":
r = &BackupPolicyPostgresql{}
case "azure:dataprotection/backupPolicyPostgresqlFlexibleServer:BackupPolicyPostgresqlFlexibleServer":
r = &BackupPolicyPostgresqlFlexibleServer{}
case "azure:dataprotection/backupVault:BackupVault":
r = &BackupVault{}
case "azure:dataprotection/backupVaultCustomerManagedKey:BackupVaultCustomerManagedKey":
r = &BackupVaultCustomerManagedKey{}
case "azure:dataprotection/resourceGuard:ResourceGuard":
r = &ResourceGuard{}
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",
"dataprotection/backupInstanceBlogStorage",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupInstanceDisk",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupInstanceKubernetesCluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupInstanceMysqlFlexibleServer",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupInstancePostgresql",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupInstancePostgresqlFlexibleServer",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupPolicyBlobStorage",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupPolicyDisk",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupPolicyKubernetesCluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupPolicyMysqlFlexibleServer",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupPolicyPostgresql",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupPolicyPostgresqlFlexibleServer",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupVault",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/backupVaultCustomerManagedKey",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"dataprotection/resourceGuard",
&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/dataprotection/pulumiTypes.go | sdk/go/azure/dataprotection/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 dataprotection
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 BackupInstanceKubernetesClusterBackupDatasourceParameters struct {
// Whether to include cluster scope resources during backup. Default to `false`. Changing this forces a new resource to be created.
ClusterScopedResourcesEnabled *bool `pulumi:"clusterScopedResourcesEnabled"`
// Specifies the namespaces to be excluded during backup. Changing this forces a new resource to be created.
ExcludedNamespaces []string `pulumi:"excludedNamespaces"`
// Specifies the resource types to be excluded during backup. Changing this forces a new resource to be created.
ExcludedResourceTypes []string `pulumi:"excludedResourceTypes"`
// Specifies the namespaces to be included during backup. Changing this forces a new resource to be created.
IncludedNamespaces []string `pulumi:"includedNamespaces"`
// Specifies the resource types to be included during backup. Changing this forces a new resource to be created.
IncludedResourceTypes []string `pulumi:"includedResourceTypes"`
// Specifies the resources with such label selectors to be included during backup. Changing this forces a new resource to be created.
LabelSelectors []string `pulumi:"labelSelectors"`
// Whether to take volume snapshots during backup. Default to `false`. Changing this forces a new resource to be created.
VolumeSnapshotEnabled *bool `pulumi:"volumeSnapshotEnabled"`
}
// BackupInstanceKubernetesClusterBackupDatasourceParametersInput is an input type that accepts BackupInstanceKubernetesClusterBackupDatasourceParametersArgs and BackupInstanceKubernetesClusterBackupDatasourceParametersOutput values.
// You can construct a concrete instance of `BackupInstanceKubernetesClusterBackupDatasourceParametersInput` via:
//
// BackupInstanceKubernetesClusterBackupDatasourceParametersArgs{...}
type BackupInstanceKubernetesClusterBackupDatasourceParametersInput interface {
pulumi.Input
ToBackupInstanceKubernetesClusterBackupDatasourceParametersOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersOutput
ToBackupInstanceKubernetesClusterBackupDatasourceParametersOutputWithContext(context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersOutput
}
type BackupInstanceKubernetesClusterBackupDatasourceParametersArgs struct {
// Whether to include cluster scope resources during backup. Default to `false`. Changing this forces a new resource to be created.
ClusterScopedResourcesEnabled pulumi.BoolPtrInput `pulumi:"clusterScopedResourcesEnabled"`
// Specifies the namespaces to be excluded during backup. Changing this forces a new resource to be created.
ExcludedNamespaces pulumi.StringArrayInput `pulumi:"excludedNamespaces"`
// Specifies the resource types to be excluded during backup. Changing this forces a new resource to be created.
ExcludedResourceTypes pulumi.StringArrayInput `pulumi:"excludedResourceTypes"`
// Specifies the namespaces to be included during backup. Changing this forces a new resource to be created.
IncludedNamespaces pulumi.StringArrayInput `pulumi:"includedNamespaces"`
// Specifies the resource types to be included during backup. Changing this forces a new resource to be created.
IncludedResourceTypes pulumi.StringArrayInput `pulumi:"includedResourceTypes"`
// Specifies the resources with such label selectors to be included during backup. Changing this forces a new resource to be created.
LabelSelectors pulumi.StringArrayInput `pulumi:"labelSelectors"`
// Whether to take volume snapshots during backup. Default to `false`. Changing this forces a new resource to be created.
VolumeSnapshotEnabled pulumi.BoolPtrInput `pulumi:"volumeSnapshotEnabled"`
}
func (BackupInstanceKubernetesClusterBackupDatasourceParametersArgs) ElementType() reflect.Type {
return reflect.TypeOf((*BackupInstanceKubernetesClusterBackupDatasourceParameters)(nil)).Elem()
}
func (i BackupInstanceKubernetesClusterBackupDatasourceParametersArgs) ToBackupInstanceKubernetesClusterBackupDatasourceParametersOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersOutput {
return i.ToBackupInstanceKubernetesClusterBackupDatasourceParametersOutputWithContext(context.Background())
}
func (i BackupInstanceKubernetesClusterBackupDatasourceParametersArgs) ToBackupInstanceKubernetesClusterBackupDatasourceParametersOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceKubernetesClusterBackupDatasourceParametersOutput)
}
func (i BackupInstanceKubernetesClusterBackupDatasourceParametersArgs) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return i.ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(context.Background())
}
func (i BackupInstanceKubernetesClusterBackupDatasourceParametersArgs) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceKubernetesClusterBackupDatasourceParametersOutput).ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(ctx)
}
// BackupInstanceKubernetesClusterBackupDatasourceParametersPtrInput is an input type that accepts BackupInstanceKubernetesClusterBackupDatasourceParametersArgs, BackupInstanceKubernetesClusterBackupDatasourceParametersPtr and BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput values.
// You can construct a concrete instance of `BackupInstanceKubernetesClusterBackupDatasourceParametersPtrInput` via:
//
// BackupInstanceKubernetesClusterBackupDatasourceParametersArgs{...}
//
// or:
//
// nil
type BackupInstanceKubernetesClusterBackupDatasourceParametersPtrInput interface {
pulumi.Input
ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput
ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput
}
type backupInstanceKubernetesClusterBackupDatasourceParametersPtrType BackupInstanceKubernetesClusterBackupDatasourceParametersArgs
func BackupInstanceKubernetesClusterBackupDatasourceParametersPtr(v *BackupInstanceKubernetesClusterBackupDatasourceParametersArgs) BackupInstanceKubernetesClusterBackupDatasourceParametersPtrInput {
return (*backupInstanceKubernetesClusterBackupDatasourceParametersPtrType)(v)
}
func (*backupInstanceKubernetesClusterBackupDatasourceParametersPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceKubernetesClusterBackupDatasourceParameters)(nil)).Elem()
}
func (i *backupInstanceKubernetesClusterBackupDatasourceParametersPtrType) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return i.ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(context.Background())
}
func (i *backupInstanceKubernetesClusterBackupDatasourceParametersPtrType) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput)
}
type BackupInstanceKubernetesClusterBackupDatasourceParametersOutput struct{ *pulumi.OutputState }
func (BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ElementType() reflect.Type {
return reflect.TypeOf((*BackupInstanceKubernetesClusterBackupDatasourceParameters)(nil)).Elem()
}
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ToBackupInstanceKubernetesClusterBackupDatasourceParametersOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersOutput {
return o
}
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ToBackupInstanceKubernetesClusterBackupDatasourceParametersOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersOutput {
return o
}
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return o.ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(context.Background())
}
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v BackupInstanceKubernetesClusterBackupDatasourceParameters) *BackupInstanceKubernetesClusterBackupDatasourceParameters {
return &v
}).(BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput)
}
// Whether to include cluster scope resources during backup. Default to `false`. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ClusterScopedResourcesEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v BackupInstanceKubernetesClusterBackupDatasourceParameters) *bool {
return v.ClusterScopedResourcesEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies the namespaces to be excluded during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ExcludedNamespaces() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
return v.ExcludedNamespaces
}).(pulumi.StringArrayOutput)
}
// Specifies the resource types to be excluded during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) ExcludedResourceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
return v.ExcludedResourceTypes
}).(pulumi.StringArrayOutput)
}
// Specifies the namespaces to be included during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) IncludedNamespaces() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
return v.IncludedNamespaces
}).(pulumi.StringArrayOutput)
}
// Specifies the resource types to be included during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) IncludedResourceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
return v.IncludedResourceTypes
}).(pulumi.StringArrayOutput)
}
// Specifies the resources with such label selectors to be included during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) LabelSelectors() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupInstanceKubernetesClusterBackupDatasourceParameters) []string { return v.LabelSelectors }).(pulumi.StringArrayOutput)
}
// Whether to take volume snapshots during backup. Default to `false`. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersOutput) VolumeSnapshotEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v BackupInstanceKubernetesClusterBackupDatasourceParameters) *bool {
return v.VolumeSnapshotEnabled
}).(pulumi.BoolPtrOutput)
}
type BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput struct{ *pulumi.OutputState }
func (BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceKubernetesClusterBackupDatasourceParameters)(nil)).Elem()
}
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput() BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return o
}
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) ToBackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return o
}
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) Elem() BackupInstanceKubernetesClusterBackupDatasourceParametersOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) BackupInstanceKubernetesClusterBackupDatasourceParameters {
if v != nil {
return *v
}
var ret BackupInstanceKubernetesClusterBackupDatasourceParameters
return ret
}).(BackupInstanceKubernetesClusterBackupDatasourceParametersOutput)
}
// Whether to include cluster scope resources during backup. Default to `false`. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) ClusterScopedResourcesEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) *bool {
if v == nil {
return nil
}
return v.ClusterScopedResourcesEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies the namespaces to be excluded during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) ExcludedNamespaces() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
if v == nil {
return nil
}
return v.ExcludedNamespaces
}).(pulumi.StringArrayOutput)
}
// Specifies the resource types to be excluded during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) ExcludedResourceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
if v == nil {
return nil
}
return v.ExcludedResourceTypes
}).(pulumi.StringArrayOutput)
}
// Specifies the namespaces to be included during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) IncludedNamespaces() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
if v == nil {
return nil
}
return v.IncludedNamespaces
}).(pulumi.StringArrayOutput)
}
// Specifies the resource types to be included during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) IncludedResourceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
if v == nil {
return nil
}
return v.IncludedResourceTypes
}).(pulumi.StringArrayOutput)
}
// Specifies the resources with such label selectors to be included during backup. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) LabelSelectors() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) []string {
if v == nil {
return nil
}
return v.LabelSelectors
}).(pulumi.StringArrayOutput)
}
// Whether to take volume snapshots during backup. Default to `false`. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput) VolumeSnapshotEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesClusterBackupDatasourceParameters) *bool {
if v == nil {
return nil
}
return v.VolumeSnapshotEnabled
}).(pulumi.BoolPtrOutput)
}
type BackupPolicyBlobStorageRetentionRule struct {
// A `criteria` block as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
Criteria BackupPolicyBlobStorageRetentionRuleCriteria `pulumi:"criteria"`
// A `lifeCycle` block as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
LifeCycle BackupPolicyBlobStorageRetentionRuleLifeCycle `pulumi:"lifeCycle"`
// The name which should be used for this retention rule. Changing this forces a new Backup Policy Blob Storage to be created.
Name string `pulumi:"name"`
// Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new Backup Policy Blob Storage to be created.
Priority int `pulumi:"priority"`
}
// BackupPolicyBlobStorageRetentionRuleInput is an input type that accepts BackupPolicyBlobStorageRetentionRuleArgs and BackupPolicyBlobStorageRetentionRuleOutput values.
// You can construct a concrete instance of `BackupPolicyBlobStorageRetentionRuleInput` via:
//
// BackupPolicyBlobStorageRetentionRuleArgs{...}
type BackupPolicyBlobStorageRetentionRuleInput interface {
pulumi.Input
ToBackupPolicyBlobStorageRetentionRuleOutput() BackupPolicyBlobStorageRetentionRuleOutput
ToBackupPolicyBlobStorageRetentionRuleOutputWithContext(context.Context) BackupPolicyBlobStorageRetentionRuleOutput
}
type BackupPolicyBlobStorageRetentionRuleArgs struct {
// A `criteria` block as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
Criteria BackupPolicyBlobStorageRetentionRuleCriteriaInput `pulumi:"criteria"`
// A `lifeCycle` block as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
LifeCycle BackupPolicyBlobStorageRetentionRuleLifeCycleInput `pulumi:"lifeCycle"`
// The name which should be used for this retention rule. Changing this forces a new Backup Policy Blob Storage to be created.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new Backup Policy Blob Storage to be created.
Priority pulumi.IntInput `pulumi:"priority"`
}
func (BackupPolicyBlobStorageRetentionRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*BackupPolicyBlobStorageRetentionRule)(nil)).Elem()
}
func (i BackupPolicyBlobStorageRetentionRuleArgs) ToBackupPolicyBlobStorageRetentionRuleOutput() BackupPolicyBlobStorageRetentionRuleOutput {
return i.ToBackupPolicyBlobStorageRetentionRuleOutputWithContext(context.Background())
}
func (i BackupPolicyBlobStorageRetentionRuleArgs) ToBackupPolicyBlobStorageRetentionRuleOutputWithContext(ctx context.Context) BackupPolicyBlobStorageRetentionRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyBlobStorageRetentionRuleOutput)
}
// BackupPolicyBlobStorageRetentionRuleArrayInput is an input type that accepts BackupPolicyBlobStorageRetentionRuleArray and BackupPolicyBlobStorageRetentionRuleArrayOutput values.
// You can construct a concrete instance of `BackupPolicyBlobStorageRetentionRuleArrayInput` via:
//
// BackupPolicyBlobStorageRetentionRuleArray{ BackupPolicyBlobStorageRetentionRuleArgs{...} }
type BackupPolicyBlobStorageRetentionRuleArrayInput interface {
pulumi.Input
ToBackupPolicyBlobStorageRetentionRuleArrayOutput() BackupPolicyBlobStorageRetentionRuleArrayOutput
ToBackupPolicyBlobStorageRetentionRuleArrayOutputWithContext(context.Context) BackupPolicyBlobStorageRetentionRuleArrayOutput
}
type BackupPolicyBlobStorageRetentionRuleArray []BackupPolicyBlobStorageRetentionRuleInput
func (BackupPolicyBlobStorageRetentionRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]BackupPolicyBlobStorageRetentionRule)(nil)).Elem()
}
func (i BackupPolicyBlobStorageRetentionRuleArray) ToBackupPolicyBlobStorageRetentionRuleArrayOutput() BackupPolicyBlobStorageRetentionRuleArrayOutput {
return i.ToBackupPolicyBlobStorageRetentionRuleArrayOutputWithContext(context.Background())
}
func (i BackupPolicyBlobStorageRetentionRuleArray) ToBackupPolicyBlobStorageRetentionRuleArrayOutputWithContext(ctx context.Context) BackupPolicyBlobStorageRetentionRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyBlobStorageRetentionRuleArrayOutput)
}
type BackupPolicyBlobStorageRetentionRuleOutput struct{ *pulumi.OutputState }
func (BackupPolicyBlobStorageRetentionRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*BackupPolicyBlobStorageRetentionRule)(nil)).Elem()
}
func (o BackupPolicyBlobStorageRetentionRuleOutput) ToBackupPolicyBlobStorageRetentionRuleOutput() BackupPolicyBlobStorageRetentionRuleOutput {
return o
}
func (o BackupPolicyBlobStorageRetentionRuleOutput) ToBackupPolicyBlobStorageRetentionRuleOutputWithContext(ctx context.Context) BackupPolicyBlobStorageRetentionRuleOutput {
return o
}
// A `criteria` block as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleOutput) Criteria() BackupPolicyBlobStorageRetentionRuleCriteriaOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRule) BackupPolicyBlobStorageRetentionRuleCriteria {
return v.Criteria
}).(BackupPolicyBlobStorageRetentionRuleCriteriaOutput)
}
// A `lifeCycle` block as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleOutput) LifeCycle() BackupPolicyBlobStorageRetentionRuleLifeCycleOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRule) BackupPolicyBlobStorageRetentionRuleLifeCycle {
return v.LifeCycle
}).(BackupPolicyBlobStorageRetentionRuleLifeCycleOutput)
}
// The name which should be used for this retention rule. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRule) string { return v.Name }).(pulumi.StringOutput)
}
// Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleOutput) Priority() pulumi.IntOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRule) int { return v.Priority }).(pulumi.IntOutput)
}
type BackupPolicyBlobStorageRetentionRuleArrayOutput struct{ *pulumi.OutputState }
func (BackupPolicyBlobStorageRetentionRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]BackupPolicyBlobStorageRetentionRule)(nil)).Elem()
}
func (o BackupPolicyBlobStorageRetentionRuleArrayOutput) ToBackupPolicyBlobStorageRetentionRuleArrayOutput() BackupPolicyBlobStorageRetentionRuleArrayOutput {
return o
}
func (o BackupPolicyBlobStorageRetentionRuleArrayOutput) ToBackupPolicyBlobStorageRetentionRuleArrayOutputWithContext(ctx context.Context) BackupPolicyBlobStorageRetentionRuleArrayOutput {
return o
}
func (o BackupPolicyBlobStorageRetentionRuleArrayOutput) Index(i pulumi.IntInput) BackupPolicyBlobStorageRetentionRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) BackupPolicyBlobStorageRetentionRule {
return vs[0].([]BackupPolicyBlobStorageRetentionRule)[vs[1].(int)]
}).(BackupPolicyBlobStorageRetentionRuleOutput)
}
type BackupPolicyBlobStorageRetentionRuleCriteria struct {
// Possible values are `AllBackup`, `FirstOfDay`, `FirstOfWeek`, `FirstOfMonth` and `FirstOfYear`. These values mean the first successful backup of the day/week/month/year. Changing this forces a new Backup Policy Blob Storage to be created.
AbsoluteCriteria *string `pulumi:"absoluteCriteria"`
// Must be between `0` and `28`. `0` for last day within the month. Changing this forces a new Backup Policy Blob Storage to be created.
DaysOfMonths []int `pulumi:"daysOfMonths"`
// Possible values are `Monday`, `Tuesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. Changing this forces a new Backup Policy Blob Storage to be created.
DaysOfWeeks []string `pulumi:"daysOfWeeks"`
// Possible values are `January`, `February`, `March`, `April`, `May`, `June`, `July`, `August`, `September`, `October`, `November` and `December`. Changing this forces a new Backup Policy Blob Storage to be created. When this property is specified, exactly one of the following must also be set: `daysOfMonth`, `daysOfWeek`
MonthsOfYears []string `pulumi:"monthsOfYears"`
// Specifies a list of backup times for backup in the `RFC3339` format. Changing this forces a new Backup Policy Blob Storage to be created.
ScheduledBackupTimes []string `pulumi:"scheduledBackupTimes"`
// Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. Changing this forces a new Backup Policy Blob Storage to be created. When this property is specified, exactly one of the following must also be set: `daysOfMonth`, `daysOfWeek`
//
// > **Note:** When not using `absoluteCriteria`, you must use exactly one of `daysOfMonth` or `daysOfWeek`. Regarding the remaining two properties, `weeksOfMonth` and `monthsOfYear`, you may use either, both, or neither. If you would like to set multiple intervals, you may do so by using multiple `retentionRule` blocks.
WeeksOfMonths []string `pulumi:"weeksOfMonths"`
}
// BackupPolicyBlobStorageRetentionRuleCriteriaInput is an input type that accepts BackupPolicyBlobStorageRetentionRuleCriteriaArgs and BackupPolicyBlobStorageRetentionRuleCriteriaOutput values.
// You can construct a concrete instance of `BackupPolicyBlobStorageRetentionRuleCriteriaInput` via:
//
// BackupPolicyBlobStorageRetentionRuleCriteriaArgs{...}
type BackupPolicyBlobStorageRetentionRuleCriteriaInput interface {
pulumi.Input
ToBackupPolicyBlobStorageRetentionRuleCriteriaOutput() BackupPolicyBlobStorageRetentionRuleCriteriaOutput
ToBackupPolicyBlobStorageRetentionRuleCriteriaOutputWithContext(context.Context) BackupPolicyBlobStorageRetentionRuleCriteriaOutput
}
type BackupPolicyBlobStorageRetentionRuleCriteriaArgs struct {
// Possible values are `AllBackup`, `FirstOfDay`, `FirstOfWeek`, `FirstOfMonth` and `FirstOfYear`. These values mean the first successful backup of the day/week/month/year. Changing this forces a new Backup Policy Blob Storage to be created.
AbsoluteCriteria pulumi.StringPtrInput `pulumi:"absoluteCriteria"`
// Must be between `0` and `28`. `0` for last day within the month. Changing this forces a new Backup Policy Blob Storage to be created.
DaysOfMonths pulumi.IntArrayInput `pulumi:"daysOfMonths"`
// Possible values are `Monday`, `Tuesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. Changing this forces a new Backup Policy Blob Storage to be created.
DaysOfWeeks pulumi.StringArrayInput `pulumi:"daysOfWeeks"`
// Possible values are `January`, `February`, `March`, `April`, `May`, `June`, `July`, `August`, `September`, `October`, `November` and `December`. Changing this forces a new Backup Policy Blob Storage to be created. When this property is specified, exactly one of the following must also be set: `daysOfMonth`, `daysOfWeek`
MonthsOfYears pulumi.StringArrayInput `pulumi:"monthsOfYears"`
// Specifies a list of backup times for backup in the `RFC3339` format. Changing this forces a new Backup Policy Blob Storage to be created.
ScheduledBackupTimes pulumi.StringArrayInput `pulumi:"scheduledBackupTimes"`
// Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. Changing this forces a new Backup Policy Blob Storage to be created. When this property is specified, exactly one of the following must also be set: `daysOfMonth`, `daysOfWeek`
//
// > **Note:** When not using `absoluteCriteria`, you must use exactly one of `daysOfMonth` or `daysOfWeek`. Regarding the remaining two properties, `weeksOfMonth` and `monthsOfYear`, you may use either, both, or neither. If you would like to set multiple intervals, you may do so by using multiple `retentionRule` blocks.
WeeksOfMonths pulumi.StringArrayInput `pulumi:"weeksOfMonths"`
}
func (BackupPolicyBlobStorageRetentionRuleCriteriaArgs) ElementType() reflect.Type {
return reflect.TypeOf((*BackupPolicyBlobStorageRetentionRuleCriteria)(nil)).Elem()
}
func (i BackupPolicyBlobStorageRetentionRuleCriteriaArgs) ToBackupPolicyBlobStorageRetentionRuleCriteriaOutput() BackupPolicyBlobStorageRetentionRuleCriteriaOutput {
return i.ToBackupPolicyBlobStorageRetentionRuleCriteriaOutputWithContext(context.Background())
}
func (i BackupPolicyBlobStorageRetentionRuleCriteriaArgs) ToBackupPolicyBlobStorageRetentionRuleCriteriaOutputWithContext(ctx context.Context) BackupPolicyBlobStorageRetentionRuleCriteriaOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyBlobStorageRetentionRuleCriteriaOutput)
}
type BackupPolicyBlobStorageRetentionRuleCriteriaOutput struct{ *pulumi.OutputState }
func (BackupPolicyBlobStorageRetentionRuleCriteriaOutput) ElementType() reflect.Type {
return reflect.TypeOf((*BackupPolicyBlobStorageRetentionRuleCriteria)(nil)).Elem()
}
func (o BackupPolicyBlobStorageRetentionRuleCriteriaOutput) ToBackupPolicyBlobStorageRetentionRuleCriteriaOutput() BackupPolicyBlobStorageRetentionRuleCriteriaOutput {
return o
}
func (o BackupPolicyBlobStorageRetentionRuleCriteriaOutput) ToBackupPolicyBlobStorageRetentionRuleCriteriaOutputWithContext(ctx context.Context) BackupPolicyBlobStorageRetentionRuleCriteriaOutput {
return o
}
// Possible values are `AllBackup`, `FirstOfDay`, `FirstOfWeek`, `FirstOfMonth` and `FirstOfYear`. These values mean the first successful backup of the day/week/month/year. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleCriteriaOutput) AbsoluteCriteria() pulumi.StringPtrOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRuleCriteria) *string { return v.AbsoluteCriteria }).(pulumi.StringPtrOutput)
}
// Must be between `0` and `28`. `0` for last day within the month. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleCriteriaOutput) DaysOfMonths() pulumi.IntArrayOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRuleCriteria) []int { return v.DaysOfMonths }).(pulumi.IntArrayOutput)
}
// Possible values are `Monday`, `Tuesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleCriteriaOutput) DaysOfWeeks() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRuleCriteria) []string { return v.DaysOfWeeks }).(pulumi.StringArrayOutput)
}
// Possible values are `January`, `February`, `March`, `April`, `May`, `June`, `July`, `August`, `September`, `October`, `November` and `December`. Changing this forces a new Backup Policy Blob Storage to be created. When this property is specified, exactly one of the following must also be set: `daysOfMonth`, `daysOfWeek`
func (o BackupPolicyBlobStorageRetentionRuleCriteriaOutput) MonthsOfYears() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRuleCriteria) []string { return v.MonthsOfYears }).(pulumi.StringArrayOutput)
}
// Specifies a list of backup times for backup in the `RFC3339` format. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageRetentionRuleCriteriaOutput) ScheduledBackupTimes() pulumi.StringArrayOutput {
return o.ApplyT(func(v BackupPolicyBlobStorageRetentionRuleCriteria) []string { return v.ScheduledBackupTimes }).(pulumi.StringArrayOutput)
}
// Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. Changing this forces a new Backup Policy Blob Storage to be created. When this property is specified, exactly one of the following must also be set: `daysOfMonth`, `daysOfWeek`
//
| 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/dataprotection/backupPolicyPostgresqlFlexibleServer.go | sdk/go/azure/dataprotection/backupPolicyPostgresqlFlexibleServer.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Policy to back up PostgreSQL Flexible Server.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/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
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupPolicyPostgresqlFlexibleServer(ctx, "example", &dataprotection.BackupPolicyPostgresqlFlexibleServerArgs{
// Name: pulumi.String("example-backup-policy"),
// VaultId: exampleBackupVault.ID(),
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
// },
// TimeZone: pulumi.String("India Standard Time"),
// DefaultRetentionRule: &dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleArgs{
// LifeCycles: dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P4M"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// },
// RetentionRules: dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleArray{
// &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleArgs{
// Name: pulumi.String("weekly"),
// LifeCycles: dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P6M"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// Priority: pulumi.Int(20),
// Criteria: &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteriaArgs{
// AbsoluteCriteria: pulumi.String("FirstOfWeek"),
// },
// },
// &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleArgs{
// Name: pulumi.String("thursday"),
// LifeCycles: dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P1W"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// Priority: pulumi.Int(25),
// Criteria: &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteriaArgs{
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Thursday"),
// },
// ScheduledBackupTimes: pulumi.StringArray{
// pulumi.String("2021-05-23T02:30:00Z"),
// },
// },
// },
// &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleArgs{
// Name: pulumi.String("monthly"),
// LifeCycles: dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P1D"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// Priority: pulumi.Int(15),
// Criteria: &dataprotection.BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteriaArgs{
// WeeksOfMonths: pulumi.StringArray{
// pulumi.String("First"),
// pulumi.String("Last"),
// },
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Tuesday"),
// },
// ScheduledBackupTimes: pulumi.StringArray{
// pulumi.String("2021-05-23T02:30:00Z"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Policy PostgreSQL Flexible Server's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupPolicyPostgresqlFlexibleServer:BackupPolicyPostgresqlFlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1
// ```
type BackupPolicyPostgresqlFlexibleServer struct {
pulumi.CustomResourceState
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayOutput `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleOutput `pulumi:"defaultRetentionRule"`
// Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyPostgresqlFlexibleServerRetentionRuleArrayOutput `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupPolicyPostgresqlFlexibleServer registers a new resource with the given unique name, arguments, and options.
func NewBackupPolicyPostgresqlFlexibleServer(ctx *pulumi.Context,
name string, args *BackupPolicyPostgresqlFlexibleServerArgs, opts ...pulumi.ResourceOption) (*BackupPolicyPostgresqlFlexibleServer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupRepeatingTimeIntervals == nil {
return nil, errors.New("invalid value for required argument 'BackupRepeatingTimeIntervals'")
}
if args.DefaultRetentionRule == nil {
return nil, errors.New("invalid value for required argument 'DefaultRetentionRule'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupPolicyPostgresqlFlexibleServer
err := ctx.RegisterResource("azure:dataprotection/backupPolicyPostgresqlFlexibleServer:BackupPolicyPostgresqlFlexibleServer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupPolicyPostgresqlFlexibleServer gets an existing BackupPolicyPostgresqlFlexibleServer resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupPolicyPostgresqlFlexibleServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupPolicyPostgresqlFlexibleServerState, opts ...pulumi.ResourceOption) (*BackupPolicyPostgresqlFlexibleServer, error) {
var resource BackupPolicyPostgresqlFlexibleServer
err := ctx.ReadResource("azure:dataprotection/backupPolicyPostgresqlFlexibleServer:BackupPolicyPostgresqlFlexibleServer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupPolicyPostgresqlFlexibleServer resources.
type backupPolicyPostgresqlFlexibleServerState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule *BackupPolicyPostgresqlFlexibleServerDefaultRetentionRule `pulumi:"defaultRetentionRule"`
// Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules []BackupPolicyPostgresqlFlexibleServerRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupPolicyPostgresqlFlexibleServerState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyPostgresqlFlexibleServerDefaultRetentionRulePtrInput
// Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyPostgresqlFlexibleServerRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrInput
// The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringPtrInput
}
func (BackupPolicyPostgresqlFlexibleServerState) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyPostgresqlFlexibleServerState)(nil)).Elem()
}
type backupPolicyPostgresqlFlexibleServerArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyPostgresqlFlexibleServerDefaultRetentionRule `pulumi:"defaultRetentionRule"`
// Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules []BackupPolicyPostgresqlFlexibleServerRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupPolicyPostgresqlFlexibleServer resource.
type BackupPolicyPostgresqlFlexibleServerArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleInput
// Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyPostgresqlFlexibleServerRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrInput
// The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringInput
}
func (BackupPolicyPostgresqlFlexibleServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyPostgresqlFlexibleServerArgs)(nil)).Elem()
}
type BackupPolicyPostgresqlFlexibleServerInput interface {
pulumi.Input
ToBackupPolicyPostgresqlFlexibleServerOutput() BackupPolicyPostgresqlFlexibleServerOutput
ToBackupPolicyPostgresqlFlexibleServerOutputWithContext(ctx context.Context) BackupPolicyPostgresqlFlexibleServerOutput
}
func (*BackupPolicyPostgresqlFlexibleServer) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyPostgresqlFlexibleServer)(nil)).Elem()
}
func (i *BackupPolicyPostgresqlFlexibleServer) ToBackupPolicyPostgresqlFlexibleServerOutput() BackupPolicyPostgresqlFlexibleServerOutput {
return i.ToBackupPolicyPostgresqlFlexibleServerOutputWithContext(context.Background())
}
func (i *BackupPolicyPostgresqlFlexibleServer) ToBackupPolicyPostgresqlFlexibleServerOutputWithContext(ctx context.Context) BackupPolicyPostgresqlFlexibleServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyPostgresqlFlexibleServerOutput)
}
// BackupPolicyPostgresqlFlexibleServerArrayInput is an input type that accepts BackupPolicyPostgresqlFlexibleServerArray and BackupPolicyPostgresqlFlexibleServerArrayOutput values.
// You can construct a concrete instance of `BackupPolicyPostgresqlFlexibleServerArrayInput` via:
//
// BackupPolicyPostgresqlFlexibleServerArray{ BackupPolicyPostgresqlFlexibleServerArgs{...} }
type BackupPolicyPostgresqlFlexibleServerArrayInput interface {
pulumi.Input
ToBackupPolicyPostgresqlFlexibleServerArrayOutput() BackupPolicyPostgresqlFlexibleServerArrayOutput
ToBackupPolicyPostgresqlFlexibleServerArrayOutputWithContext(context.Context) BackupPolicyPostgresqlFlexibleServerArrayOutput
}
type BackupPolicyPostgresqlFlexibleServerArray []BackupPolicyPostgresqlFlexibleServerInput
func (BackupPolicyPostgresqlFlexibleServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyPostgresqlFlexibleServer)(nil)).Elem()
}
func (i BackupPolicyPostgresqlFlexibleServerArray) ToBackupPolicyPostgresqlFlexibleServerArrayOutput() BackupPolicyPostgresqlFlexibleServerArrayOutput {
return i.ToBackupPolicyPostgresqlFlexibleServerArrayOutputWithContext(context.Background())
}
func (i BackupPolicyPostgresqlFlexibleServerArray) ToBackupPolicyPostgresqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupPolicyPostgresqlFlexibleServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyPostgresqlFlexibleServerArrayOutput)
}
// BackupPolicyPostgresqlFlexibleServerMapInput is an input type that accepts BackupPolicyPostgresqlFlexibleServerMap and BackupPolicyPostgresqlFlexibleServerMapOutput values.
// You can construct a concrete instance of `BackupPolicyPostgresqlFlexibleServerMapInput` via:
//
// BackupPolicyPostgresqlFlexibleServerMap{ "key": BackupPolicyPostgresqlFlexibleServerArgs{...} }
type BackupPolicyPostgresqlFlexibleServerMapInput interface {
pulumi.Input
ToBackupPolicyPostgresqlFlexibleServerMapOutput() BackupPolicyPostgresqlFlexibleServerMapOutput
ToBackupPolicyPostgresqlFlexibleServerMapOutputWithContext(context.Context) BackupPolicyPostgresqlFlexibleServerMapOutput
}
type BackupPolicyPostgresqlFlexibleServerMap map[string]BackupPolicyPostgresqlFlexibleServerInput
func (BackupPolicyPostgresqlFlexibleServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyPostgresqlFlexibleServer)(nil)).Elem()
}
func (i BackupPolicyPostgresqlFlexibleServerMap) ToBackupPolicyPostgresqlFlexibleServerMapOutput() BackupPolicyPostgresqlFlexibleServerMapOutput {
return i.ToBackupPolicyPostgresqlFlexibleServerMapOutputWithContext(context.Background())
}
func (i BackupPolicyPostgresqlFlexibleServerMap) ToBackupPolicyPostgresqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupPolicyPostgresqlFlexibleServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyPostgresqlFlexibleServerMapOutput)
}
type BackupPolicyPostgresqlFlexibleServerOutput struct{ *pulumi.OutputState }
func (BackupPolicyPostgresqlFlexibleServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyPostgresqlFlexibleServer)(nil)).Elem()
}
func (o BackupPolicyPostgresqlFlexibleServerOutput) ToBackupPolicyPostgresqlFlexibleServerOutput() BackupPolicyPostgresqlFlexibleServerOutput {
return o
}
func (o BackupPolicyPostgresqlFlexibleServerOutput) ToBackupPolicyPostgresqlFlexibleServerOutputWithContext(ctx context.Context) BackupPolicyPostgresqlFlexibleServerOutput {
return o
}
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
func (o BackupPolicyPostgresqlFlexibleServerOutput) BackupRepeatingTimeIntervals() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupPolicyPostgresqlFlexibleServer) pulumi.StringArrayOutput {
return v.BackupRepeatingTimeIntervals
}).(pulumi.StringArrayOutput)
}
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
func (o BackupPolicyPostgresqlFlexibleServerOutput) DefaultRetentionRule() BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleOutput {
return o.ApplyT(func(v *BackupPolicyPostgresqlFlexibleServer) BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleOutput {
return v.DefaultRetentionRule
}).(BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleOutput)
}
// Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
func (o BackupPolicyPostgresqlFlexibleServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyPostgresqlFlexibleServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
func (o BackupPolicyPostgresqlFlexibleServerOutput) RetentionRules() BackupPolicyPostgresqlFlexibleServerRetentionRuleArrayOutput {
return o.ApplyT(func(v *BackupPolicyPostgresqlFlexibleServer) BackupPolicyPostgresqlFlexibleServerRetentionRuleArrayOutput {
return v.RetentionRules
}).(BackupPolicyPostgresqlFlexibleServerRetentionRuleArrayOutput)
}
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
func (o BackupPolicyPostgresqlFlexibleServerOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyPostgresqlFlexibleServer) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created.
func (o BackupPolicyPostgresqlFlexibleServerOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyPostgresqlFlexibleServer) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupPolicyPostgresqlFlexibleServerArrayOutput struct{ *pulumi.OutputState }
func (BackupPolicyPostgresqlFlexibleServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyPostgresqlFlexibleServer)(nil)).Elem()
}
func (o BackupPolicyPostgresqlFlexibleServerArrayOutput) ToBackupPolicyPostgresqlFlexibleServerArrayOutput() BackupPolicyPostgresqlFlexibleServerArrayOutput {
return o
}
func (o BackupPolicyPostgresqlFlexibleServerArrayOutput) ToBackupPolicyPostgresqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupPolicyPostgresqlFlexibleServerArrayOutput {
return o
}
func (o BackupPolicyPostgresqlFlexibleServerArrayOutput) Index(i pulumi.IntInput) BackupPolicyPostgresqlFlexibleServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupPolicyPostgresqlFlexibleServer {
return vs[0].([]*BackupPolicyPostgresqlFlexibleServer)[vs[1].(int)]
}).(BackupPolicyPostgresqlFlexibleServerOutput)
}
type BackupPolicyPostgresqlFlexibleServerMapOutput struct{ *pulumi.OutputState }
func (BackupPolicyPostgresqlFlexibleServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyPostgresqlFlexibleServer)(nil)).Elem()
}
func (o BackupPolicyPostgresqlFlexibleServerMapOutput) ToBackupPolicyPostgresqlFlexibleServerMapOutput() BackupPolicyPostgresqlFlexibleServerMapOutput {
return o
}
func (o BackupPolicyPostgresqlFlexibleServerMapOutput) ToBackupPolicyPostgresqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupPolicyPostgresqlFlexibleServerMapOutput {
return o
}
func (o BackupPolicyPostgresqlFlexibleServerMapOutput) MapIndex(k pulumi.StringInput) BackupPolicyPostgresqlFlexibleServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupPolicyPostgresqlFlexibleServer {
return vs[0].(map[string]*BackupPolicyPostgresqlFlexibleServer)[vs[1].(string)]
}).(BackupPolicyPostgresqlFlexibleServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyPostgresqlFlexibleServerInput)(nil)).Elem(), &BackupPolicyPostgresqlFlexibleServer{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyPostgresqlFlexibleServerArrayInput)(nil)).Elem(), BackupPolicyPostgresqlFlexibleServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyPostgresqlFlexibleServerMapInput)(nil)).Elem(), BackupPolicyPostgresqlFlexibleServerMap{})
pulumi.RegisterOutputType(BackupPolicyPostgresqlFlexibleServerOutput{})
pulumi.RegisterOutputType(BackupPolicyPostgresqlFlexibleServerArrayOutput{})
pulumi.RegisterOutputType(BackupPolicyPostgresqlFlexibleServerMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupInstancePostgresqlFlexibleServer.go | sdk/go/azure/dataprotection/backupInstancePostgresqlFlexibleServer.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Instance to back up PostgreSQL Flexible Server.
//
// > **Note:** Before using this resource, there are some prerequisite permissions for configure backup and restore. See more details from <https://learn.microsoft.com/azure/backup/backup-azure-database-postgresql-flex-overview>.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql"
// "github.com/pulumi/pulumi/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
// }
// exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{
// Name: pulumi.String("example-postgresqlfs"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AdministratorLogin: pulumi.String("adminTerraform"),
// AdministratorPassword: pulumi.String("QAZwsx123"),
// StorageMb: pulumi.Int(32768),
// Version: pulumi.String("12"),
// SkuName: pulumi.String("GP_Standard_D4s_v3"),
// Zone: pulumi.String("2"),
// })
// if err != nil {
// return err
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backupvault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// SoftDelete: pulumi.String("Off"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: example.ID(),
// RoleDefinitionName: pulumi.String("Reader"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// example2, err := authorization.NewAssignment(ctx, "example2", &authorization.AssignmentArgs{
// Scope: exampleFlexibleServer.ID(),
// RoleDefinitionName: pulumi.String("PostgreSQL Flexible Server Long Term Retention Backup Role"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// exampleBackupPolicyPostgresqlFlexibleServer, err := dataprotection.NewBackupPolicyPostgresqlFlexibleServer(ctx, "example", &dataprotection.BackupPolicyPostgresqlFlexibleServerArgs{
// Name: pulumi.String("example-dp"),
// VaultId: exampleBackupVault.ID(),
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
// },
// DefaultRetentionRule: &dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleArgs{
// LifeCycles: dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyPostgresqlFlexibleServerDefaultRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P4M"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAssignment,
// example2,
// }))
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupInstancePostgresqlFlexibleServer(ctx, "example", &dataprotection.BackupInstancePostgresqlFlexibleServerArgs{
// Name: pulumi.String("example-dbi"),
// Location: example.Location,
// VaultId: exampleBackupVault.ID(),
// ServerId: exampleFlexibleServer.ID(),
// BackupPolicyId: exampleBackupPolicyPostgresqlFlexibleServer.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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Instance PostgreSQL Flexible Servers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupInstancePostgresqlFlexibleServer:BackupInstancePostgresqlFlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
// ```
type BackupInstancePostgresqlFlexibleServer struct {
pulumi.CustomResourceState
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringOutput `pulumi:"backupPolicyId"`
// The location of the source database. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The protection state of the Backup Instance PostgreSQL Flexible Server.
ProtectionState pulumi.StringOutput `pulumi:"protectionState"`
// The ID of the source server. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
// The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupInstancePostgresqlFlexibleServer registers a new resource with the given unique name, arguments, and options.
func NewBackupInstancePostgresqlFlexibleServer(ctx *pulumi.Context,
name string, args *BackupInstancePostgresqlFlexibleServerArgs, opts ...pulumi.ResourceOption) (*BackupInstancePostgresqlFlexibleServer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupPolicyId == nil {
return nil, errors.New("invalid value for required argument 'BackupPolicyId'")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupInstancePostgresqlFlexibleServer
err := ctx.RegisterResource("azure:dataprotection/backupInstancePostgresqlFlexibleServer:BackupInstancePostgresqlFlexibleServer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupInstancePostgresqlFlexibleServer gets an existing BackupInstancePostgresqlFlexibleServer resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupInstancePostgresqlFlexibleServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupInstancePostgresqlFlexibleServerState, opts ...pulumi.ResourceOption) (*BackupInstancePostgresqlFlexibleServer, error) {
var resource BackupInstancePostgresqlFlexibleServer
err := ctx.ReadResource("azure:dataprotection/backupInstancePostgresqlFlexibleServer:BackupInstancePostgresqlFlexibleServer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupInstancePostgresqlFlexibleServer resources.
type backupInstancePostgresqlFlexibleServerState struct {
// The ID of the Backup Policy.
BackupPolicyId *string `pulumi:"backupPolicyId"`
// The location of the source database. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The protection state of the Backup Instance PostgreSQL Flexible Server.
ProtectionState *string `pulumi:"protectionState"`
// The ID of the source server. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
// The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupInstancePostgresqlFlexibleServerState struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringPtrInput
// The location of the source database. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The protection state of the Backup Instance PostgreSQL Flexible Server.
ProtectionState pulumi.StringPtrInput
// The ID of the source server. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
// The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringPtrInput
}
func (BackupInstancePostgresqlFlexibleServerState) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstancePostgresqlFlexibleServerState)(nil)).Elem()
}
type backupInstancePostgresqlFlexibleServerArgs struct {
// The ID of the Backup Policy.
BackupPolicyId string `pulumi:"backupPolicyId"`
// The location of the source database. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the source server. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
// The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupInstancePostgresqlFlexibleServer resource.
type BackupInstancePostgresqlFlexibleServerArgs struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringInput
// The location of the source database. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the source server. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
// The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringInput
}
func (BackupInstancePostgresqlFlexibleServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstancePostgresqlFlexibleServerArgs)(nil)).Elem()
}
type BackupInstancePostgresqlFlexibleServerInput interface {
pulumi.Input
ToBackupInstancePostgresqlFlexibleServerOutput() BackupInstancePostgresqlFlexibleServerOutput
ToBackupInstancePostgresqlFlexibleServerOutputWithContext(ctx context.Context) BackupInstancePostgresqlFlexibleServerOutput
}
func (*BackupInstancePostgresqlFlexibleServer) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstancePostgresqlFlexibleServer)(nil)).Elem()
}
func (i *BackupInstancePostgresqlFlexibleServer) ToBackupInstancePostgresqlFlexibleServerOutput() BackupInstancePostgresqlFlexibleServerOutput {
return i.ToBackupInstancePostgresqlFlexibleServerOutputWithContext(context.Background())
}
func (i *BackupInstancePostgresqlFlexibleServer) ToBackupInstancePostgresqlFlexibleServerOutputWithContext(ctx context.Context) BackupInstancePostgresqlFlexibleServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstancePostgresqlFlexibleServerOutput)
}
// BackupInstancePostgresqlFlexibleServerArrayInput is an input type that accepts BackupInstancePostgresqlFlexibleServerArray and BackupInstancePostgresqlFlexibleServerArrayOutput values.
// You can construct a concrete instance of `BackupInstancePostgresqlFlexibleServerArrayInput` via:
//
// BackupInstancePostgresqlFlexibleServerArray{ BackupInstancePostgresqlFlexibleServerArgs{...} }
type BackupInstancePostgresqlFlexibleServerArrayInput interface {
pulumi.Input
ToBackupInstancePostgresqlFlexibleServerArrayOutput() BackupInstancePostgresqlFlexibleServerArrayOutput
ToBackupInstancePostgresqlFlexibleServerArrayOutputWithContext(context.Context) BackupInstancePostgresqlFlexibleServerArrayOutput
}
type BackupInstancePostgresqlFlexibleServerArray []BackupInstancePostgresqlFlexibleServerInput
func (BackupInstancePostgresqlFlexibleServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstancePostgresqlFlexibleServer)(nil)).Elem()
}
func (i BackupInstancePostgresqlFlexibleServerArray) ToBackupInstancePostgresqlFlexibleServerArrayOutput() BackupInstancePostgresqlFlexibleServerArrayOutput {
return i.ToBackupInstancePostgresqlFlexibleServerArrayOutputWithContext(context.Background())
}
func (i BackupInstancePostgresqlFlexibleServerArray) ToBackupInstancePostgresqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupInstancePostgresqlFlexibleServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstancePostgresqlFlexibleServerArrayOutput)
}
// BackupInstancePostgresqlFlexibleServerMapInput is an input type that accepts BackupInstancePostgresqlFlexibleServerMap and BackupInstancePostgresqlFlexibleServerMapOutput values.
// You can construct a concrete instance of `BackupInstancePostgresqlFlexibleServerMapInput` via:
//
// BackupInstancePostgresqlFlexibleServerMap{ "key": BackupInstancePostgresqlFlexibleServerArgs{...} }
type BackupInstancePostgresqlFlexibleServerMapInput interface {
pulumi.Input
ToBackupInstancePostgresqlFlexibleServerMapOutput() BackupInstancePostgresqlFlexibleServerMapOutput
ToBackupInstancePostgresqlFlexibleServerMapOutputWithContext(context.Context) BackupInstancePostgresqlFlexibleServerMapOutput
}
type BackupInstancePostgresqlFlexibleServerMap map[string]BackupInstancePostgresqlFlexibleServerInput
func (BackupInstancePostgresqlFlexibleServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstancePostgresqlFlexibleServer)(nil)).Elem()
}
func (i BackupInstancePostgresqlFlexibleServerMap) ToBackupInstancePostgresqlFlexibleServerMapOutput() BackupInstancePostgresqlFlexibleServerMapOutput {
return i.ToBackupInstancePostgresqlFlexibleServerMapOutputWithContext(context.Background())
}
func (i BackupInstancePostgresqlFlexibleServerMap) ToBackupInstancePostgresqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupInstancePostgresqlFlexibleServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstancePostgresqlFlexibleServerMapOutput)
}
type BackupInstancePostgresqlFlexibleServerOutput struct{ *pulumi.OutputState }
func (BackupInstancePostgresqlFlexibleServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstancePostgresqlFlexibleServer)(nil)).Elem()
}
func (o BackupInstancePostgresqlFlexibleServerOutput) ToBackupInstancePostgresqlFlexibleServerOutput() BackupInstancePostgresqlFlexibleServerOutput {
return o
}
func (o BackupInstancePostgresqlFlexibleServerOutput) ToBackupInstancePostgresqlFlexibleServerOutputWithContext(ctx context.Context) BackupInstancePostgresqlFlexibleServerOutput {
return o
}
// The ID of the Backup Policy.
func (o BackupInstancePostgresqlFlexibleServerOutput) BackupPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresqlFlexibleServer) pulumi.StringOutput { return v.BackupPolicyId }).(pulumi.StringOutput)
}
// The location of the source database. Changing this forces a new resource to be created.
func (o BackupInstancePostgresqlFlexibleServerOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresqlFlexibleServer) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Backup Instance for the PostgreSQL Flexible Server. Changing this forces a new resource to be created.
func (o BackupInstancePostgresqlFlexibleServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresqlFlexibleServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The protection state of the Backup Instance PostgreSQL Flexible Server.
func (o BackupInstancePostgresqlFlexibleServerOutput) ProtectionState() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresqlFlexibleServer) pulumi.StringOutput { return v.ProtectionState }).(pulumi.StringOutput)
}
// The ID of the source server. Changing this forces a new resource to be created.
func (o BackupInstancePostgresqlFlexibleServerOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresqlFlexibleServer) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
// The ID of the Backup Vault within which the PostgreSQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
func (o BackupInstancePostgresqlFlexibleServerOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresqlFlexibleServer) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupInstancePostgresqlFlexibleServerArrayOutput struct{ *pulumi.OutputState }
func (BackupInstancePostgresqlFlexibleServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstancePostgresqlFlexibleServer)(nil)).Elem()
}
func (o BackupInstancePostgresqlFlexibleServerArrayOutput) ToBackupInstancePostgresqlFlexibleServerArrayOutput() BackupInstancePostgresqlFlexibleServerArrayOutput {
return o
}
func (o BackupInstancePostgresqlFlexibleServerArrayOutput) ToBackupInstancePostgresqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupInstancePostgresqlFlexibleServerArrayOutput {
return o
}
func (o BackupInstancePostgresqlFlexibleServerArrayOutput) Index(i pulumi.IntInput) BackupInstancePostgresqlFlexibleServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupInstancePostgresqlFlexibleServer {
return vs[0].([]*BackupInstancePostgresqlFlexibleServer)[vs[1].(int)]
}).(BackupInstancePostgresqlFlexibleServerOutput)
}
type BackupInstancePostgresqlFlexibleServerMapOutput struct{ *pulumi.OutputState }
func (BackupInstancePostgresqlFlexibleServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstancePostgresqlFlexibleServer)(nil)).Elem()
}
func (o BackupInstancePostgresqlFlexibleServerMapOutput) ToBackupInstancePostgresqlFlexibleServerMapOutput() BackupInstancePostgresqlFlexibleServerMapOutput {
return o
}
func (o BackupInstancePostgresqlFlexibleServerMapOutput) ToBackupInstancePostgresqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupInstancePostgresqlFlexibleServerMapOutput {
return o
}
func (o BackupInstancePostgresqlFlexibleServerMapOutput) MapIndex(k pulumi.StringInput) BackupInstancePostgresqlFlexibleServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupInstancePostgresqlFlexibleServer {
return vs[0].(map[string]*BackupInstancePostgresqlFlexibleServer)[vs[1].(string)]
}).(BackupInstancePostgresqlFlexibleServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstancePostgresqlFlexibleServerInput)(nil)).Elem(), &BackupInstancePostgresqlFlexibleServer{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstancePostgresqlFlexibleServerArrayInput)(nil)).Elem(), BackupInstancePostgresqlFlexibleServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstancePostgresqlFlexibleServerMapInput)(nil)).Elem(), BackupInstancePostgresqlFlexibleServerMap{})
pulumi.RegisterOutputType(BackupInstancePostgresqlFlexibleServerOutput{})
pulumi.RegisterOutputType(BackupInstancePostgresqlFlexibleServerArrayOutput{})
pulumi.RegisterOutputType(BackupInstancePostgresqlFlexibleServerMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupPolicyPostgresql.go | sdk/go/azure/dataprotection/backupPolicyPostgresql.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Policy to back up PostgreSQL.
//
// > **Note:** The `dataprotection.BackupPolicyPostgresql` resource has been deprecated because Azure Database for PostgreSQL Single Server has been retired as of 2025-03-28 and will be removed in v5.0 of the AzureRM Provider.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/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
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupPolicyPostgresql(ctx, "example", &dataprotection.BackupPolicyPostgresqlArgs{
// Name: pulumi.String("example-backup-policy"),
// ResourceGroupName: example.Name,
// VaultName: exampleBackupVault.Name,
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
// },
// TimeZone: pulumi.String("India Standard Time"),
// DefaultRetentionDuration: pulumi.String("P4M"),
// RetentionRules: dataprotection.BackupPolicyPostgresqlRetentionRuleArray{
// &dataprotection.BackupPolicyPostgresqlRetentionRuleArgs{
// Name: pulumi.String("weekly"),
// Duration: pulumi.String("P6M"),
// Priority: pulumi.Int(20),
// Criteria: &dataprotection.BackupPolicyPostgresqlRetentionRuleCriteriaArgs{
// AbsoluteCriteria: pulumi.String("FirstOfWeek"),
// },
// },
// &dataprotection.BackupPolicyPostgresqlRetentionRuleArgs{
// Name: pulumi.String("thursday"),
// Duration: pulumi.String("P1W"),
// Priority: pulumi.Int(25),
// Criteria: &dataprotection.BackupPolicyPostgresqlRetentionRuleCriteriaArgs{
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Thursday"),
// },
// ScheduledBackupTimes: pulumi.StringArray{
// pulumi.String("2021-05-23T02:30:00Z"),
// },
// },
// },
// &dataprotection.BackupPolicyPostgresqlRetentionRuleArgs{
// Name: pulumi.String("monthly"),
// Duration: pulumi.String("P1D"),
// Priority: pulumi.Int(15),
// Criteria: &dataprotection.BackupPolicyPostgresqlRetentionRuleCriteriaArgs{
// WeeksOfMonths: pulumi.StringArray{
// pulumi.String("First"),
// pulumi.String("Last"),
// },
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Tuesday"),
// },
// ScheduledBackupTimes: pulumi.StringArray{
// pulumi.String("2021-05-23T02:30:00Z"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Policy PostgreSQL's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupPolicyPostgresql:BackupPolicyPostgresql example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1
// ```
type BackupPolicyPostgresql struct {
pulumi.CustomResourceState
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy PostgreSQL to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayOutput `pulumi:"backupRepeatingTimeIntervals"`
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy PostgreSQL to be created.
DefaultRetentionDuration pulumi.StringOutput `pulumi:"defaultRetentionDuration"`
// The name which should be used for this Backup Policy PostgreSQL. Changing this forces a new Backup Policy PostgreSQL to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created.
RetentionRules BackupPolicyPostgresqlRetentionRuleArrayOutput `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy PostgreSQL to be created.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// The name of the Backup Vault where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
VaultName pulumi.StringOutput `pulumi:"vaultName"`
}
// NewBackupPolicyPostgresql registers a new resource with the given unique name, arguments, and options.
func NewBackupPolicyPostgresql(ctx *pulumi.Context,
name string, args *BackupPolicyPostgresqlArgs, opts ...pulumi.ResourceOption) (*BackupPolicyPostgresql, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupRepeatingTimeIntervals == nil {
return nil, errors.New("invalid value for required argument 'BackupRepeatingTimeIntervals'")
}
if args.DefaultRetentionDuration == nil {
return nil, errors.New("invalid value for required argument 'DefaultRetentionDuration'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.VaultName == nil {
return nil, errors.New("invalid value for required argument 'VaultName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupPolicyPostgresql
err := ctx.RegisterResource("azure:dataprotection/backupPolicyPostgresql:BackupPolicyPostgresql", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupPolicyPostgresql gets an existing BackupPolicyPostgresql resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupPolicyPostgresql(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupPolicyPostgresqlState, opts ...pulumi.ResourceOption) (*BackupPolicyPostgresql, error) {
var resource BackupPolicyPostgresql
err := ctx.ReadResource("azure:dataprotection/backupPolicyPostgresql:BackupPolicyPostgresql", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupPolicyPostgresql resources.
type backupPolicyPostgresqlState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy PostgreSQL to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy PostgreSQL to be created.
DefaultRetentionDuration *string `pulumi:"defaultRetentionDuration"`
// The name which should be used for this Backup Policy PostgreSQL. Changing this forces a new Backup Policy PostgreSQL to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created.
RetentionRules []BackupPolicyPostgresqlRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy PostgreSQL to be created.
TimeZone *string `pulumi:"timeZone"`
// The name of the Backup Vault where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
VaultName *string `pulumi:"vaultName"`
}
type BackupPolicyPostgresqlState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy PostgreSQL to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy PostgreSQL to be created.
DefaultRetentionDuration pulumi.StringPtrInput
// The name which should be used for this Backup Policy PostgreSQL. Changing this forces a new Backup Policy PostgreSQL to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
ResourceGroupName pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created.
RetentionRules BackupPolicyPostgresqlRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy PostgreSQL to be created.
TimeZone pulumi.StringPtrInput
// The name of the Backup Vault where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
VaultName pulumi.StringPtrInput
}
func (BackupPolicyPostgresqlState) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyPostgresqlState)(nil)).Elem()
}
type backupPolicyPostgresqlArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy PostgreSQL to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy PostgreSQL to be created.
DefaultRetentionDuration string `pulumi:"defaultRetentionDuration"`
// The name which should be used for this Backup Policy PostgreSQL. Changing this forces a new Backup Policy PostgreSQL to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created.
RetentionRules []BackupPolicyPostgresqlRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy PostgreSQL to be created.
TimeZone *string `pulumi:"timeZone"`
// The name of the Backup Vault where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
VaultName string `pulumi:"vaultName"`
}
// The set of arguments for constructing a BackupPolicyPostgresql resource.
type BackupPolicyPostgresqlArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy PostgreSQL to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy PostgreSQL to be created.
DefaultRetentionDuration pulumi.StringInput
// The name which should be used for this Backup Policy PostgreSQL. Changing this forces a new Backup Policy PostgreSQL to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
ResourceGroupName pulumi.StringInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created.
RetentionRules BackupPolicyPostgresqlRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy PostgreSQL to be created.
TimeZone pulumi.StringPtrInput
// The name of the Backup Vault where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
VaultName pulumi.StringInput
}
func (BackupPolicyPostgresqlArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyPostgresqlArgs)(nil)).Elem()
}
type BackupPolicyPostgresqlInput interface {
pulumi.Input
ToBackupPolicyPostgresqlOutput() BackupPolicyPostgresqlOutput
ToBackupPolicyPostgresqlOutputWithContext(ctx context.Context) BackupPolicyPostgresqlOutput
}
func (*BackupPolicyPostgresql) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyPostgresql)(nil)).Elem()
}
func (i *BackupPolicyPostgresql) ToBackupPolicyPostgresqlOutput() BackupPolicyPostgresqlOutput {
return i.ToBackupPolicyPostgresqlOutputWithContext(context.Background())
}
func (i *BackupPolicyPostgresql) ToBackupPolicyPostgresqlOutputWithContext(ctx context.Context) BackupPolicyPostgresqlOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyPostgresqlOutput)
}
// BackupPolicyPostgresqlArrayInput is an input type that accepts BackupPolicyPostgresqlArray and BackupPolicyPostgresqlArrayOutput values.
// You can construct a concrete instance of `BackupPolicyPostgresqlArrayInput` via:
//
// BackupPolicyPostgresqlArray{ BackupPolicyPostgresqlArgs{...} }
type BackupPolicyPostgresqlArrayInput interface {
pulumi.Input
ToBackupPolicyPostgresqlArrayOutput() BackupPolicyPostgresqlArrayOutput
ToBackupPolicyPostgresqlArrayOutputWithContext(context.Context) BackupPolicyPostgresqlArrayOutput
}
type BackupPolicyPostgresqlArray []BackupPolicyPostgresqlInput
func (BackupPolicyPostgresqlArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyPostgresql)(nil)).Elem()
}
func (i BackupPolicyPostgresqlArray) ToBackupPolicyPostgresqlArrayOutput() BackupPolicyPostgresqlArrayOutput {
return i.ToBackupPolicyPostgresqlArrayOutputWithContext(context.Background())
}
func (i BackupPolicyPostgresqlArray) ToBackupPolicyPostgresqlArrayOutputWithContext(ctx context.Context) BackupPolicyPostgresqlArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyPostgresqlArrayOutput)
}
// BackupPolicyPostgresqlMapInput is an input type that accepts BackupPolicyPostgresqlMap and BackupPolicyPostgresqlMapOutput values.
// You can construct a concrete instance of `BackupPolicyPostgresqlMapInput` via:
//
// BackupPolicyPostgresqlMap{ "key": BackupPolicyPostgresqlArgs{...} }
type BackupPolicyPostgresqlMapInput interface {
pulumi.Input
ToBackupPolicyPostgresqlMapOutput() BackupPolicyPostgresqlMapOutput
ToBackupPolicyPostgresqlMapOutputWithContext(context.Context) BackupPolicyPostgresqlMapOutput
}
type BackupPolicyPostgresqlMap map[string]BackupPolicyPostgresqlInput
func (BackupPolicyPostgresqlMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyPostgresql)(nil)).Elem()
}
func (i BackupPolicyPostgresqlMap) ToBackupPolicyPostgresqlMapOutput() BackupPolicyPostgresqlMapOutput {
return i.ToBackupPolicyPostgresqlMapOutputWithContext(context.Background())
}
func (i BackupPolicyPostgresqlMap) ToBackupPolicyPostgresqlMapOutputWithContext(ctx context.Context) BackupPolicyPostgresqlMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyPostgresqlMapOutput)
}
type BackupPolicyPostgresqlOutput struct{ *pulumi.OutputState }
func (BackupPolicyPostgresqlOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyPostgresql)(nil)).Elem()
}
func (o BackupPolicyPostgresqlOutput) ToBackupPolicyPostgresqlOutput() BackupPolicyPostgresqlOutput {
return o
}
func (o BackupPolicyPostgresqlOutput) ToBackupPolicyPostgresqlOutputWithContext(ctx context.Context) BackupPolicyPostgresqlOutput {
return o
}
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy PostgreSQL to be created.
func (o BackupPolicyPostgresqlOutput) BackupRepeatingTimeIntervals() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupPolicyPostgresql) pulumi.StringArrayOutput { return v.BackupRepeatingTimeIntervals }).(pulumi.StringArrayOutput)
}
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy PostgreSQL to be created.
func (o BackupPolicyPostgresqlOutput) DefaultRetentionDuration() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyPostgresql) pulumi.StringOutput { return v.DefaultRetentionDuration }).(pulumi.StringOutput)
}
// The name which should be used for this Backup Policy PostgreSQL. Changing this forces a new Backup Policy PostgreSQL to be created.
func (o BackupPolicyPostgresqlOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyPostgresql) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
func (o BackupPolicyPostgresqlOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyPostgresql) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created.
func (o BackupPolicyPostgresqlOutput) RetentionRules() BackupPolicyPostgresqlRetentionRuleArrayOutput {
return o.ApplyT(func(v *BackupPolicyPostgresql) BackupPolicyPostgresqlRetentionRuleArrayOutput {
return v.RetentionRules
}).(BackupPolicyPostgresqlRetentionRuleArrayOutput)
}
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy PostgreSQL to be created.
func (o BackupPolicyPostgresqlOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyPostgresql) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// The name of the Backup Vault where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created.
func (o BackupPolicyPostgresqlOutput) VaultName() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyPostgresql) pulumi.StringOutput { return v.VaultName }).(pulumi.StringOutput)
}
type BackupPolicyPostgresqlArrayOutput struct{ *pulumi.OutputState }
func (BackupPolicyPostgresqlArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyPostgresql)(nil)).Elem()
}
func (o BackupPolicyPostgresqlArrayOutput) ToBackupPolicyPostgresqlArrayOutput() BackupPolicyPostgresqlArrayOutput {
return o
}
func (o BackupPolicyPostgresqlArrayOutput) ToBackupPolicyPostgresqlArrayOutputWithContext(ctx context.Context) BackupPolicyPostgresqlArrayOutput {
return o
}
func (o BackupPolicyPostgresqlArrayOutput) Index(i pulumi.IntInput) BackupPolicyPostgresqlOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupPolicyPostgresql {
return vs[0].([]*BackupPolicyPostgresql)[vs[1].(int)]
}).(BackupPolicyPostgresqlOutput)
}
type BackupPolicyPostgresqlMapOutput struct{ *pulumi.OutputState }
func (BackupPolicyPostgresqlMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyPostgresql)(nil)).Elem()
}
func (o BackupPolicyPostgresqlMapOutput) ToBackupPolicyPostgresqlMapOutput() BackupPolicyPostgresqlMapOutput {
return o
}
func (o BackupPolicyPostgresqlMapOutput) ToBackupPolicyPostgresqlMapOutputWithContext(ctx context.Context) BackupPolicyPostgresqlMapOutput {
return o
}
func (o BackupPolicyPostgresqlMapOutput) MapIndex(k pulumi.StringInput) BackupPolicyPostgresqlOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupPolicyPostgresql {
return vs[0].(map[string]*BackupPolicyPostgresql)[vs[1].(string)]
}).(BackupPolicyPostgresqlOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyPostgresqlInput)(nil)).Elem(), &BackupPolicyPostgresql{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyPostgresqlArrayInput)(nil)).Elem(), BackupPolicyPostgresqlArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyPostgresqlMapInput)(nil)).Elem(), BackupPolicyPostgresqlMap{})
pulumi.RegisterOutputType(BackupPolicyPostgresqlOutput{})
pulumi.RegisterOutputType(BackupPolicyPostgresqlArrayOutput{})
pulumi.RegisterOutputType(BackupPolicyPostgresqlMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupInstanceDisk.go | sdk/go/azure/dataprotection/backupInstanceDisk.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Instance to back up Disk.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/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
// }
// exampleManagedDisk, err := compute.NewManagedDisk(ctx, "example", &compute.ManagedDiskArgs{
// Name: pulumi.String("example-disk"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// StorageAccountType: pulumi.String("Standard_LRS"),
// CreateOption: pulumi.String("Empty"),
// DiskSizeGb: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = authorization.NewAssignment(ctx, "example1", &authorization.AssignmentArgs{
// Scope: example.ID(),
// RoleDefinitionName: pulumi.String("Disk Snapshot Contributor"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// _, err = authorization.NewAssignment(ctx, "example2", &authorization.AssignmentArgs{
// Scope: exampleManagedDisk.ID(),
// RoleDefinitionName: pulumi.String("Disk Backup Reader"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// exampleBackupPolicyDisk, err := dataprotection.NewBackupPolicyDisk(ctx, "example", &dataprotection.BackupPolicyDiskArgs{
// Name: pulumi.String("example-backup-policy"),
// VaultId: exampleBackupVault.ID(),
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-19T06:33:16+00:00/PT4H"),
// },
// DefaultRetentionDuration: pulumi.String("P7D"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupInstanceDisk(ctx, "example", &dataprotection.BackupInstanceDiskArgs{
// Name: pulumi.String("example-backup-instance"),
// Location: exampleBackupVault.Location,
// VaultId: exampleBackupVault.ID(),
// DiskId: exampleManagedDisk.ID(),
// SnapshotResourceGroupName: example.Name,
// BackupPolicyId: exampleBackupPolicyDisk.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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Instance Disks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupInstanceDisk:BackupInstanceDisk example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
// ```
type BackupInstanceDisk struct {
pulumi.CustomResourceState
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringOutput `pulumi:"backupPolicyId"`
// The ID of the source Disk. Changing this forces a new Backup Instance Disk to be created.
DiskId pulumi.StringOutput `pulumi:"diskId"`
// The Azure Region where the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Backup Instance Disk. Changing this forces a new Backup Instance Disk to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The protection state of the Backup Instance Disk.
ProtectionState pulumi.StringOutput `pulumi:"protectionState"`
// The name of the Resource Group where snapshots are stored. Changing this forces a new Backup Instance Disk to be created.
SnapshotResourceGroupName pulumi.StringOutput `pulumi:"snapshotResourceGroupName"`
// The subscription ID of the Resource Group where snapshots are stored. The default value is the subscription ID of the Backup Vault. Changing this forces a new Backup Instance Disk to be created.
SnapshotSubscriptionId pulumi.StringPtrOutput `pulumi:"snapshotSubscriptionId"`
// The ID of the Backup Vault within which the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupInstanceDisk registers a new resource with the given unique name, arguments, and options.
func NewBackupInstanceDisk(ctx *pulumi.Context,
name string, args *BackupInstanceDiskArgs, opts ...pulumi.ResourceOption) (*BackupInstanceDisk, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupPolicyId == nil {
return nil, errors.New("invalid value for required argument 'BackupPolicyId'")
}
if args.DiskId == nil {
return nil, errors.New("invalid value for required argument 'DiskId'")
}
if args.SnapshotResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'SnapshotResourceGroupName'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupInstanceDisk
err := ctx.RegisterResource("azure:dataprotection/backupInstanceDisk:BackupInstanceDisk", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupInstanceDisk gets an existing BackupInstanceDisk resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupInstanceDisk(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupInstanceDiskState, opts ...pulumi.ResourceOption) (*BackupInstanceDisk, error) {
var resource BackupInstanceDisk
err := ctx.ReadResource("azure:dataprotection/backupInstanceDisk:BackupInstanceDisk", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupInstanceDisk resources.
type backupInstanceDiskState struct {
// The ID of the Backup Policy.
BackupPolicyId *string `pulumi:"backupPolicyId"`
// The ID of the source Disk. Changing this forces a new Backup Instance Disk to be created.
DiskId *string `pulumi:"diskId"`
// The Azure Region where the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance Disk. Changing this forces a new Backup Instance Disk to be created.
Name *string `pulumi:"name"`
// The protection state of the Backup Instance Disk.
ProtectionState *string `pulumi:"protectionState"`
// The name of the Resource Group where snapshots are stored. Changing this forces a new Backup Instance Disk to be created.
SnapshotResourceGroupName *string `pulumi:"snapshotResourceGroupName"`
// The subscription ID of the Resource Group where snapshots are stored. The default value is the subscription ID of the Backup Vault. Changing this forces a new Backup Instance Disk to be created.
SnapshotSubscriptionId *string `pulumi:"snapshotSubscriptionId"`
// The ID of the Backup Vault within which the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupInstanceDiskState struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringPtrInput
// The ID of the source Disk. Changing this forces a new Backup Instance Disk to be created.
DiskId pulumi.StringPtrInput
// The Azure Region where the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance Disk. Changing this forces a new Backup Instance Disk to be created.
Name pulumi.StringPtrInput
// The protection state of the Backup Instance Disk.
ProtectionState pulumi.StringPtrInput
// The name of the Resource Group where snapshots are stored. Changing this forces a new Backup Instance Disk to be created.
SnapshotResourceGroupName pulumi.StringPtrInput
// The subscription ID of the Resource Group where snapshots are stored. The default value is the subscription ID of the Backup Vault. Changing this forces a new Backup Instance Disk to be created.
SnapshotSubscriptionId pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
VaultId pulumi.StringPtrInput
}
func (BackupInstanceDiskState) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceDiskState)(nil)).Elem()
}
type backupInstanceDiskArgs struct {
// The ID of the Backup Policy.
BackupPolicyId string `pulumi:"backupPolicyId"`
// The ID of the source Disk. Changing this forces a new Backup Instance Disk to be created.
DiskId string `pulumi:"diskId"`
// The Azure Region where the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance Disk. Changing this forces a new Backup Instance Disk to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where snapshots are stored. Changing this forces a new Backup Instance Disk to be created.
SnapshotResourceGroupName string `pulumi:"snapshotResourceGroupName"`
// The subscription ID of the Resource Group where snapshots are stored. The default value is the subscription ID of the Backup Vault. Changing this forces a new Backup Instance Disk to be created.
SnapshotSubscriptionId *string `pulumi:"snapshotSubscriptionId"`
// The ID of the Backup Vault within which the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupInstanceDisk resource.
type BackupInstanceDiskArgs struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringInput
// The ID of the source Disk. Changing this forces a new Backup Instance Disk to be created.
DiskId pulumi.StringInput
// The Azure Region where the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance Disk. Changing this forces a new Backup Instance Disk to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where snapshots are stored. Changing this forces a new Backup Instance Disk to be created.
SnapshotResourceGroupName pulumi.StringInput
// The subscription ID of the Resource Group where snapshots are stored. The default value is the subscription ID of the Backup Vault. Changing this forces a new Backup Instance Disk to be created.
SnapshotSubscriptionId pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
VaultId pulumi.StringInput
}
func (BackupInstanceDiskArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceDiskArgs)(nil)).Elem()
}
type BackupInstanceDiskInput interface {
pulumi.Input
ToBackupInstanceDiskOutput() BackupInstanceDiskOutput
ToBackupInstanceDiskOutputWithContext(ctx context.Context) BackupInstanceDiskOutput
}
func (*BackupInstanceDisk) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceDisk)(nil)).Elem()
}
func (i *BackupInstanceDisk) ToBackupInstanceDiskOutput() BackupInstanceDiskOutput {
return i.ToBackupInstanceDiskOutputWithContext(context.Background())
}
func (i *BackupInstanceDisk) ToBackupInstanceDiskOutputWithContext(ctx context.Context) BackupInstanceDiskOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceDiskOutput)
}
// BackupInstanceDiskArrayInput is an input type that accepts BackupInstanceDiskArray and BackupInstanceDiskArrayOutput values.
// You can construct a concrete instance of `BackupInstanceDiskArrayInput` via:
//
// BackupInstanceDiskArray{ BackupInstanceDiskArgs{...} }
type BackupInstanceDiskArrayInput interface {
pulumi.Input
ToBackupInstanceDiskArrayOutput() BackupInstanceDiskArrayOutput
ToBackupInstanceDiskArrayOutputWithContext(context.Context) BackupInstanceDiskArrayOutput
}
type BackupInstanceDiskArray []BackupInstanceDiskInput
func (BackupInstanceDiskArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceDisk)(nil)).Elem()
}
func (i BackupInstanceDiskArray) ToBackupInstanceDiskArrayOutput() BackupInstanceDiskArrayOutput {
return i.ToBackupInstanceDiskArrayOutputWithContext(context.Background())
}
func (i BackupInstanceDiskArray) ToBackupInstanceDiskArrayOutputWithContext(ctx context.Context) BackupInstanceDiskArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceDiskArrayOutput)
}
// BackupInstanceDiskMapInput is an input type that accepts BackupInstanceDiskMap and BackupInstanceDiskMapOutput values.
// You can construct a concrete instance of `BackupInstanceDiskMapInput` via:
//
// BackupInstanceDiskMap{ "key": BackupInstanceDiskArgs{...} }
type BackupInstanceDiskMapInput interface {
pulumi.Input
ToBackupInstanceDiskMapOutput() BackupInstanceDiskMapOutput
ToBackupInstanceDiskMapOutputWithContext(context.Context) BackupInstanceDiskMapOutput
}
type BackupInstanceDiskMap map[string]BackupInstanceDiskInput
func (BackupInstanceDiskMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceDisk)(nil)).Elem()
}
func (i BackupInstanceDiskMap) ToBackupInstanceDiskMapOutput() BackupInstanceDiskMapOutput {
return i.ToBackupInstanceDiskMapOutputWithContext(context.Background())
}
func (i BackupInstanceDiskMap) ToBackupInstanceDiskMapOutputWithContext(ctx context.Context) BackupInstanceDiskMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceDiskMapOutput)
}
type BackupInstanceDiskOutput struct{ *pulumi.OutputState }
func (BackupInstanceDiskOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceDisk)(nil)).Elem()
}
func (o BackupInstanceDiskOutput) ToBackupInstanceDiskOutput() BackupInstanceDiskOutput {
return o
}
func (o BackupInstanceDiskOutput) ToBackupInstanceDiskOutputWithContext(ctx context.Context) BackupInstanceDiskOutput {
return o
}
// The ID of the Backup Policy.
func (o BackupInstanceDiskOutput) BackupPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringOutput { return v.BackupPolicyId }).(pulumi.StringOutput)
}
// The ID of the source Disk. Changing this forces a new Backup Instance Disk to be created.
func (o BackupInstanceDiskOutput) DiskId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringOutput { return v.DiskId }).(pulumi.StringOutput)
}
// The Azure Region where the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
func (o BackupInstanceDiskOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Backup Instance Disk. Changing this forces a new Backup Instance Disk to be created.
func (o BackupInstanceDiskOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The protection state of the Backup Instance Disk.
func (o BackupInstanceDiskOutput) ProtectionState() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringOutput { return v.ProtectionState }).(pulumi.StringOutput)
}
// The name of the Resource Group where snapshots are stored. Changing this forces a new Backup Instance Disk to be created.
func (o BackupInstanceDiskOutput) SnapshotResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringOutput { return v.SnapshotResourceGroupName }).(pulumi.StringOutput)
}
// The subscription ID of the Resource Group where snapshots are stored. The default value is the subscription ID of the Backup Vault. Changing this forces a new Backup Instance Disk to be created.
func (o BackupInstanceDiskOutput) SnapshotSubscriptionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringPtrOutput { return v.SnapshotSubscriptionId }).(pulumi.StringPtrOutput)
}
// The ID of the Backup Vault within which the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created.
func (o BackupInstanceDiskOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceDisk) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupInstanceDiskArrayOutput struct{ *pulumi.OutputState }
func (BackupInstanceDiskArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceDisk)(nil)).Elem()
}
func (o BackupInstanceDiskArrayOutput) ToBackupInstanceDiskArrayOutput() BackupInstanceDiskArrayOutput {
return o
}
func (o BackupInstanceDiskArrayOutput) ToBackupInstanceDiskArrayOutputWithContext(ctx context.Context) BackupInstanceDiskArrayOutput {
return o
}
func (o BackupInstanceDiskArrayOutput) Index(i pulumi.IntInput) BackupInstanceDiskOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupInstanceDisk {
return vs[0].([]*BackupInstanceDisk)[vs[1].(int)]
}).(BackupInstanceDiskOutput)
}
type BackupInstanceDiskMapOutput struct{ *pulumi.OutputState }
func (BackupInstanceDiskMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceDisk)(nil)).Elem()
}
func (o BackupInstanceDiskMapOutput) ToBackupInstanceDiskMapOutput() BackupInstanceDiskMapOutput {
return o
}
func (o BackupInstanceDiskMapOutput) ToBackupInstanceDiskMapOutputWithContext(ctx context.Context) BackupInstanceDiskMapOutput {
return o
}
func (o BackupInstanceDiskMapOutput) MapIndex(k pulumi.StringInput) BackupInstanceDiskOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupInstanceDisk {
return vs[0].(map[string]*BackupInstanceDisk)[vs[1].(string)]
}).(BackupInstanceDiskOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceDiskInput)(nil)).Elem(), &BackupInstanceDisk{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceDiskArrayInput)(nil)).Elem(), BackupInstanceDiskArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceDiskMapInput)(nil)).Elem(), BackupInstanceDiskMap{})
pulumi.RegisterOutputType(BackupInstanceDiskOutput{})
pulumi.RegisterOutputType(BackupInstanceDiskArrayOutput{})
pulumi.RegisterOutputType(BackupInstanceDiskMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupInstanceBlogStorage.go | sdk/go/azure/dataprotection/backupInstanceBlogStorage.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Instance Blob Storage.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: exampleAccount.ID(),
// RoleDefinitionName: pulumi.String("Storage Account Backup Contributor"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// exampleBackupPolicyBlobStorage, err := dataprotection.NewBackupPolicyBlobStorage(ctx, "example", &dataprotection.BackupPolicyBlobStorageArgs{
// Name: pulumi.String("example-backup-policy"),
// VaultId: exampleBackupVault.ID(),
// OperationalDefaultRetentionDuration: pulumi.String("P30D"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupInstanceBlogStorage(ctx, "example", &dataprotection.BackupInstanceBlogStorageArgs{
// Name: pulumi.String("example-backup-instance"),
// VaultId: exampleBackupVault.ID(),
// Location: example.Location,
// StorageAccountId: exampleAccount.ID(),
// BackupPolicyId: exampleBackupPolicyBlobStorage.ID(),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAssignment,
// }))
// if 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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Instance Blob Storages can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupInstanceBlogStorage:BackupInstanceBlogStorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
// ```
type BackupInstanceBlogStorage struct {
pulumi.CustomResourceState
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringOutput `pulumi:"backupPolicyId"`
// The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The protection state of the Backup Instance Blob Storage.
ProtectionState pulumi.StringOutput `pulumi:"protectionState"`
// The list of the container names of the source Storage Account.
//
// > **Note:** The `storageAccountContainerNames` should be specified in the vaulted backup policy/operational and vaulted hybrid backup policy. Removing the `storageAccountContainerNames` will force a new resource to be created since it can't be removed once specified.
StorageAccountContainerNames pulumi.StringArrayOutput `pulumi:"storageAccountContainerNames"`
// The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupInstanceBlogStorage registers a new resource with the given unique name, arguments, and options.
func NewBackupInstanceBlogStorage(ctx *pulumi.Context,
name string, args *BackupInstanceBlogStorageArgs, opts ...pulumi.ResourceOption) (*BackupInstanceBlogStorage, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupPolicyId == nil {
return nil, errors.New("invalid value for required argument 'BackupPolicyId'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupInstanceBlogStorage
err := ctx.RegisterResource("azure:dataprotection/backupInstanceBlogStorage:BackupInstanceBlogStorage", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupInstanceBlogStorage gets an existing BackupInstanceBlogStorage resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupInstanceBlogStorage(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupInstanceBlogStorageState, opts ...pulumi.ResourceOption) (*BackupInstanceBlogStorage, error) {
var resource BackupInstanceBlogStorage
err := ctx.ReadResource("azure:dataprotection/backupInstanceBlogStorage:BackupInstanceBlogStorage", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupInstanceBlogStorage resources.
type backupInstanceBlogStorageState struct {
// The ID of the Backup Policy.
BackupPolicyId *string `pulumi:"backupPolicyId"`
// The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
Name *string `pulumi:"name"`
// The protection state of the Backup Instance Blob Storage.
ProtectionState *string `pulumi:"protectionState"`
// The list of the container names of the source Storage Account.
//
// > **Note:** The `storageAccountContainerNames` should be specified in the vaulted backup policy/operational and vaulted hybrid backup policy. Removing the `storageAccountContainerNames` will force a new resource to be created since it can't be removed once specified.
StorageAccountContainerNames []string `pulumi:"storageAccountContainerNames"`
// The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
// The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupInstanceBlogStorageState struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringPtrInput
// The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
Name pulumi.StringPtrInput
// The protection state of the Backup Instance Blob Storage.
ProtectionState pulumi.StringPtrInput
// The list of the container names of the source Storage Account.
//
// > **Note:** The `storageAccountContainerNames` should be specified in the vaulted backup policy/operational and vaulted hybrid backup policy. Removing the `storageAccountContainerNames` will force a new resource to be created since it can't be removed once specified.
StorageAccountContainerNames pulumi.StringArrayInput
// The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
StorageAccountId pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
VaultId pulumi.StringPtrInput
}
func (BackupInstanceBlogStorageState) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceBlogStorageState)(nil)).Elem()
}
type backupInstanceBlogStorageArgs struct {
// The ID of the Backup Policy.
BackupPolicyId string `pulumi:"backupPolicyId"`
// The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
Name *string `pulumi:"name"`
// The list of the container names of the source Storage Account.
//
// > **Note:** The `storageAccountContainerNames` should be specified in the vaulted backup policy/operational and vaulted hybrid backup policy. Removing the `storageAccountContainerNames` will force a new resource to be created since it can't be removed once specified.
StorageAccountContainerNames []string `pulumi:"storageAccountContainerNames"`
// The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
StorageAccountId string `pulumi:"storageAccountId"`
// The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupInstanceBlogStorage resource.
type BackupInstanceBlogStorageArgs struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringInput
// The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
Name pulumi.StringPtrInput
// The list of the container names of the source Storage Account.
//
// > **Note:** The `storageAccountContainerNames` should be specified in the vaulted backup policy/operational and vaulted hybrid backup policy. Removing the `storageAccountContainerNames` will force a new resource to be created since it can't be removed once specified.
StorageAccountContainerNames pulumi.StringArrayInput
// The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
StorageAccountId pulumi.StringInput
// The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
VaultId pulumi.StringInput
}
func (BackupInstanceBlogStorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceBlogStorageArgs)(nil)).Elem()
}
type BackupInstanceBlogStorageInput interface {
pulumi.Input
ToBackupInstanceBlogStorageOutput() BackupInstanceBlogStorageOutput
ToBackupInstanceBlogStorageOutputWithContext(ctx context.Context) BackupInstanceBlogStorageOutput
}
func (*BackupInstanceBlogStorage) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceBlogStorage)(nil)).Elem()
}
func (i *BackupInstanceBlogStorage) ToBackupInstanceBlogStorageOutput() BackupInstanceBlogStorageOutput {
return i.ToBackupInstanceBlogStorageOutputWithContext(context.Background())
}
func (i *BackupInstanceBlogStorage) ToBackupInstanceBlogStorageOutputWithContext(ctx context.Context) BackupInstanceBlogStorageOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceBlogStorageOutput)
}
// BackupInstanceBlogStorageArrayInput is an input type that accepts BackupInstanceBlogStorageArray and BackupInstanceBlogStorageArrayOutput values.
// You can construct a concrete instance of `BackupInstanceBlogStorageArrayInput` via:
//
// BackupInstanceBlogStorageArray{ BackupInstanceBlogStorageArgs{...} }
type BackupInstanceBlogStorageArrayInput interface {
pulumi.Input
ToBackupInstanceBlogStorageArrayOutput() BackupInstanceBlogStorageArrayOutput
ToBackupInstanceBlogStorageArrayOutputWithContext(context.Context) BackupInstanceBlogStorageArrayOutput
}
type BackupInstanceBlogStorageArray []BackupInstanceBlogStorageInput
func (BackupInstanceBlogStorageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceBlogStorage)(nil)).Elem()
}
func (i BackupInstanceBlogStorageArray) ToBackupInstanceBlogStorageArrayOutput() BackupInstanceBlogStorageArrayOutput {
return i.ToBackupInstanceBlogStorageArrayOutputWithContext(context.Background())
}
func (i BackupInstanceBlogStorageArray) ToBackupInstanceBlogStorageArrayOutputWithContext(ctx context.Context) BackupInstanceBlogStorageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceBlogStorageArrayOutput)
}
// BackupInstanceBlogStorageMapInput is an input type that accepts BackupInstanceBlogStorageMap and BackupInstanceBlogStorageMapOutput values.
// You can construct a concrete instance of `BackupInstanceBlogStorageMapInput` via:
//
// BackupInstanceBlogStorageMap{ "key": BackupInstanceBlogStorageArgs{...} }
type BackupInstanceBlogStorageMapInput interface {
pulumi.Input
ToBackupInstanceBlogStorageMapOutput() BackupInstanceBlogStorageMapOutput
ToBackupInstanceBlogStorageMapOutputWithContext(context.Context) BackupInstanceBlogStorageMapOutput
}
type BackupInstanceBlogStorageMap map[string]BackupInstanceBlogStorageInput
func (BackupInstanceBlogStorageMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceBlogStorage)(nil)).Elem()
}
func (i BackupInstanceBlogStorageMap) ToBackupInstanceBlogStorageMapOutput() BackupInstanceBlogStorageMapOutput {
return i.ToBackupInstanceBlogStorageMapOutputWithContext(context.Background())
}
func (i BackupInstanceBlogStorageMap) ToBackupInstanceBlogStorageMapOutputWithContext(ctx context.Context) BackupInstanceBlogStorageMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceBlogStorageMapOutput)
}
type BackupInstanceBlogStorageOutput struct{ *pulumi.OutputState }
func (BackupInstanceBlogStorageOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceBlogStorage)(nil)).Elem()
}
func (o BackupInstanceBlogStorageOutput) ToBackupInstanceBlogStorageOutput() BackupInstanceBlogStorageOutput {
return o
}
func (o BackupInstanceBlogStorageOutput) ToBackupInstanceBlogStorageOutputWithContext(ctx context.Context) BackupInstanceBlogStorageOutput {
return o
}
// The ID of the Backup Policy.
func (o BackupInstanceBlogStorageOutput) BackupPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceBlogStorage) pulumi.StringOutput { return v.BackupPolicyId }).(pulumi.StringOutput)
}
// The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
func (o BackupInstanceBlogStorageOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceBlogStorage) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
func (o BackupInstanceBlogStorageOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceBlogStorage) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The protection state of the Backup Instance Blob Storage.
func (o BackupInstanceBlogStorageOutput) ProtectionState() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceBlogStorage) pulumi.StringOutput { return v.ProtectionState }).(pulumi.StringOutput)
}
// The list of the container names of the source Storage Account.
//
// > **Note:** The `storageAccountContainerNames` should be specified in the vaulted backup policy/operational and vaulted hybrid backup policy. Removing the `storageAccountContainerNames` will force a new resource to be created since it can't be removed once specified.
func (o BackupInstanceBlogStorageOutput) StorageAccountContainerNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupInstanceBlogStorage) pulumi.StringArrayOutput { return v.StorageAccountContainerNames }).(pulumi.StringArrayOutput)
}
// The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
func (o BackupInstanceBlogStorageOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceBlogStorage) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
// The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
func (o BackupInstanceBlogStorageOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceBlogStorage) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupInstanceBlogStorageArrayOutput struct{ *pulumi.OutputState }
func (BackupInstanceBlogStorageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceBlogStorage)(nil)).Elem()
}
func (o BackupInstanceBlogStorageArrayOutput) ToBackupInstanceBlogStorageArrayOutput() BackupInstanceBlogStorageArrayOutput {
return o
}
func (o BackupInstanceBlogStorageArrayOutput) ToBackupInstanceBlogStorageArrayOutputWithContext(ctx context.Context) BackupInstanceBlogStorageArrayOutput {
return o
}
func (o BackupInstanceBlogStorageArrayOutput) Index(i pulumi.IntInput) BackupInstanceBlogStorageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupInstanceBlogStorage {
return vs[0].([]*BackupInstanceBlogStorage)[vs[1].(int)]
}).(BackupInstanceBlogStorageOutput)
}
type BackupInstanceBlogStorageMapOutput struct{ *pulumi.OutputState }
func (BackupInstanceBlogStorageMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceBlogStorage)(nil)).Elem()
}
func (o BackupInstanceBlogStorageMapOutput) ToBackupInstanceBlogStorageMapOutput() BackupInstanceBlogStorageMapOutput {
return o
}
func (o BackupInstanceBlogStorageMapOutput) ToBackupInstanceBlogStorageMapOutputWithContext(ctx context.Context) BackupInstanceBlogStorageMapOutput {
return o
}
func (o BackupInstanceBlogStorageMapOutput) MapIndex(k pulumi.StringInput) BackupInstanceBlogStorageOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupInstanceBlogStorage {
return vs[0].(map[string]*BackupInstanceBlogStorage)[vs[1].(string)]
}).(BackupInstanceBlogStorageOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceBlogStorageInput)(nil)).Elem(), &BackupInstanceBlogStorage{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceBlogStorageArrayInput)(nil)).Elem(), BackupInstanceBlogStorageArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceBlogStorageMapInput)(nil)).Elem(), BackupInstanceBlogStorageMap{})
pulumi.RegisterOutputType(BackupInstanceBlogStorageOutput{})
pulumi.RegisterOutputType(BackupInstanceBlogStorageArrayOutput{})
pulumi.RegisterOutputType(BackupInstanceBlogStorageMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupVaultCustomerManagedKey.go | sdk/go/azure/dataprotection/backupVaultCustomerManagedKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Vault Customer Managed Key.
//
// !> **Note:** It is not possible to remove the Customer Managed Key from the Backup Vault once it's been added. To remove the Customer Managed Key, the parent Data Protection Backup Vault must be deleted and recreated.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-key-vault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// EnabledForDiskEncryption: pulumi.Bool(true),
// TenantId: pulumi.String(current.TenantId),
// SoftDeleteRetentionDays: pulumi.Int(7),
// PurgeProtectionEnabled: pulumi.Bool(true),
// SkuName: pulumi.String("standard"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Decrypt"),
// pulumi.String("Encrypt"),
// pulumi.String("Delete"),
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Purge"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Verify"),
// pulumi.String("GetRotationPolicy"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Decrypt"),
// pulumi.String("Encrypt"),
// pulumi.String("Delete"),
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Purge"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Verify"),
// pulumi.String("GetRotationPolicy"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("example-key"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("decrypt"),
// pulumi.String("encrypt"),
// pulumi.String("sign"),
// pulumi.String("unwrapKey"),
// pulumi.String("verify"),
// pulumi.String("wrapKey"),
// },
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupVaultCustomerManagedKey(ctx, "example", &dataprotection.BackupVaultCustomerManagedKeyArgs{
// DataProtectionBackupVaultId: exampleBackupVault.ID(),
// KeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Vault Customer Managed Keys can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupVaultCustomerManagedKey:BackupVaultCustomerManagedKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1
// ```
type BackupVaultCustomerManagedKey struct {
pulumi.CustomResourceState
// The ID of the Backup Vault. Changing this forces a new resource to be created.
DataProtectionBackupVaultId pulumi.StringOutput `pulumi:"dataProtectionBackupVaultId"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Backup Vault.
KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"`
}
// NewBackupVaultCustomerManagedKey registers a new resource with the given unique name, arguments, and options.
func NewBackupVaultCustomerManagedKey(ctx *pulumi.Context,
name string, args *BackupVaultCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*BackupVaultCustomerManagedKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DataProtectionBackupVaultId == nil {
return nil, errors.New("invalid value for required argument 'DataProtectionBackupVaultId'")
}
if args.KeyVaultKeyId == nil {
return nil, errors.New("invalid value for required argument 'KeyVaultKeyId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupVaultCustomerManagedKey
err := ctx.RegisterResource("azure:dataprotection/backupVaultCustomerManagedKey:BackupVaultCustomerManagedKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupVaultCustomerManagedKey gets an existing BackupVaultCustomerManagedKey resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupVaultCustomerManagedKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupVaultCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*BackupVaultCustomerManagedKey, error) {
var resource BackupVaultCustomerManagedKey
err := ctx.ReadResource("azure:dataprotection/backupVaultCustomerManagedKey:BackupVaultCustomerManagedKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupVaultCustomerManagedKey resources.
type backupVaultCustomerManagedKeyState struct {
// The ID of the Backup Vault. Changing this forces a new resource to be created.
DataProtectionBackupVaultId *string `pulumi:"dataProtectionBackupVaultId"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Backup Vault.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
}
type BackupVaultCustomerManagedKeyState struct {
// The ID of the Backup Vault. Changing this forces a new resource to be created.
DataProtectionBackupVaultId pulumi.StringPtrInput
// The ID of the Key Vault Key which should be used to Encrypt the data in this Backup Vault.
KeyVaultKeyId pulumi.StringPtrInput
}
func (BackupVaultCustomerManagedKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*backupVaultCustomerManagedKeyState)(nil)).Elem()
}
type backupVaultCustomerManagedKeyArgs struct {
// The ID of the Backup Vault. Changing this forces a new resource to be created.
DataProtectionBackupVaultId string `pulumi:"dataProtectionBackupVaultId"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Backup Vault.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
}
// The set of arguments for constructing a BackupVaultCustomerManagedKey resource.
type BackupVaultCustomerManagedKeyArgs struct {
// The ID of the Backup Vault. Changing this forces a new resource to be created.
DataProtectionBackupVaultId pulumi.StringInput
// The ID of the Key Vault Key which should be used to Encrypt the data in this Backup Vault.
KeyVaultKeyId pulumi.StringInput
}
func (BackupVaultCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupVaultCustomerManagedKeyArgs)(nil)).Elem()
}
type BackupVaultCustomerManagedKeyInput interface {
pulumi.Input
ToBackupVaultCustomerManagedKeyOutput() BackupVaultCustomerManagedKeyOutput
ToBackupVaultCustomerManagedKeyOutputWithContext(ctx context.Context) BackupVaultCustomerManagedKeyOutput
}
func (*BackupVaultCustomerManagedKey) ElementType() reflect.Type {
return reflect.TypeOf((**BackupVaultCustomerManagedKey)(nil)).Elem()
}
func (i *BackupVaultCustomerManagedKey) ToBackupVaultCustomerManagedKeyOutput() BackupVaultCustomerManagedKeyOutput {
return i.ToBackupVaultCustomerManagedKeyOutputWithContext(context.Background())
}
func (i *BackupVaultCustomerManagedKey) ToBackupVaultCustomerManagedKeyOutputWithContext(ctx context.Context) BackupVaultCustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupVaultCustomerManagedKeyOutput)
}
// BackupVaultCustomerManagedKeyArrayInput is an input type that accepts BackupVaultCustomerManagedKeyArray and BackupVaultCustomerManagedKeyArrayOutput values.
// You can construct a concrete instance of `BackupVaultCustomerManagedKeyArrayInput` via:
//
// BackupVaultCustomerManagedKeyArray{ BackupVaultCustomerManagedKeyArgs{...} }
type BackupVaultCustomerManagedKeyArrayInput interface {
pulumi.Input
ToBackupVaultCustomerManagedKeyArrayOutput() BackupVaultCustomerManagedKeyArrayOutput
ToBackupVaultCustomerManagedKeyArrayOutputWithContext(context.Context) BackupVaultCustomerManagedKeyArrayOutput
}
type BackupVaultCustomerManagedKeyArray []BackupVaultCustomerManagedKeyInput
func (BackupVaultCustomerManagedKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupVaultCustomerManagedKey)(nil)).Elem()
}
func (i BackupVaultCustomerManagedKeyArray) ToBackupVaultCustomerManagedKeyArrayOutput() BackupVaultCustomerManagedKeyArrayOutput {
return i.ToBackupVaultCustomerManagedKeyArrayOutputWithContext(context.Background())
}
func (i BackupVaultCustomerManagedKeyArray) ToBackupVaultCustomerManagedKeyArrayOutputWithContext(ctx context.Context) BackupVaultCustomerManagedKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupVaultCustomerManagedKeyArrayOutput)
}
// BackupVaultCustomerManagedKeyMapInput is an input type that accepts BackupVaultCustomerManagedKeyMap and BackupVaultCustomerManagedKeyMapOutput values.
// You can construct a concrete instance of `BackupVaultCustomerManagedKeyMapInput` via:
//
// BackupVaultCustomerManagedKeyMap{ "key": BackupVaultCustomerManagedKeyArgs{...} }
type BackupVaultCustomerManagedKeyMapInput interface {
pulumi.Input
ToBackupVaultCustomerManagedKeyMapOutput() BackupVaultCustomerManagedKeyMapOutput
ToBackupVaultCustomerManagedKeyMapOutputWithContext(context.Context) BackupVaultCustomerManagedKeyMapOutput
}
type BackupVaultCustomerManagedKeyMap map[string]BackupVaultCustomerManagedKeyInput
func (BackupVaultCustomerManagedKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupVaultCustomerManagedKey)(nil)).Elem()
}
func (i BackupVaultCustomerManagedKeyMap) ToBackupVaultCustomerManagedKeyMapOutput() BackupVaultCustomerManagedKeyMapOutput {
return i.ToBackupVaultCustomerManagedKeyMapOutputWithContext(context.Background())
}
func (i BackupVaultCustomerManagedKeyMap) ToBackupVaultCustomerManagedKeyMapOutputWithContext(ctx context.Context) BackupVaultCustomerManagedKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupVaultCustomerManagedKeyMapOutput)
}
type BackupVaultCustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (BackupVaultCustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupVaultCustomerManagedKey)(nil)).Elem()
}
func (o BackupVaultCustomerManagedKeyOutput) ToBackupVaultCustomerManagedKeyOutput() BackupVaultCustomerManagedKeyOutput {
return o
}
func (o BackupVaultCustomerManagedKeyOutput) ToBackupVaultCustomerManagedKeyOutputWithContext(ctx context.Context) BackupVaultCustomerManagedKeyOutput {
return o
}
// The ID of the Backup Vault. Changing this forces a new resource to be created.
func (o BackupVaultCustomerManagedKeyOutput) DataProtectionBackupVaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupVaultCustomerManagedKey) pulumi.StringOutput { return v.DataProtectionBackupVaultId }).(pulumi.StringOutput)
}
// The ID of the Key Vault Key which should be used to Encrypt the data in this Backup Vault.
func (o BackupVaultCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupVaultCustomerManagedKey) pulumi.StringOutput { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
type BackupVaultCustomerManagedKeyArrayOutput struct{ *pulumi.OutputState }
func (BackupVaultCustomerManagedKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupVaultCustomerManagedKey)(nil)).Elem()
}
func (o BackupVaultCustomerManagedKeyArrayOutput) ToBackupVaultCustomerManagedKeyArrayOutput() BackupVaultCustomerManagedKeyArrayOutput {
return o
}
func (o BackupVaultCustomerManagedKeyArrayOutput) ToBackupVaultCustomerManagedKeyArrayOutputWithContext(ctx context.Context) BackupVaultCustomerManagedKeyArrayOutput {
return o
}
func (o BackupVaultCustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) BackupVaultCustomerManagedKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupVaultCustomerManagedKey {
return vs[0].([]*BackupVaultCustomerManagedKey)[vs[1].(int)]
}).(BackupVaultCustomerManagedKeyOutput)
}
type BackupVaultCustomerManagedKeyMapOutput struct{ *pulumi.OutputState }
func (BackupVaultCustomerManagedKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupVaultCustomerManagedKey)(nil)).Elem()
}
func (o BackupVaultCustomerManagedKeyMapOutput) ToBackupVaultCustomerManagedKeyMapOutput() BackupVaultCustomerManagedKeyMapOutput {
return o
}
func (o BackupVaultCustomerManagedKeyMapOutput) ToBackupVaultCustomerManagedKeyMapOutputWithContext(ctx context.Context) BackupVaultCustomerManagedKeyMapOutput {
return o
}
func (o BackupVaultCustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) BackupVaultCustomerManagedKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupVaultCustomerManagedKey {
return vs[0].(map[string]*BackupVaultCustomerManagedKey)[vs[1].(string)]
}).(BackupVaultCustomerManagedKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupVaultCustomerManagedKeyInput)(nil)).Elem(), &BackupVaultCustomerManagedKey{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupVaultCustomerManagedKeyArrayInput)(nil)).Elem(), BackupVaultCustomerManagedKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupVaultCustomerManagedKeyMapInput)(nil)).Elem(), BackupVaultCustomerManagedKeyMap{})
pulumi.RegisterOutputType(BackupVaultCustomerManagedKeyOutput{})
pulumi.RegisterOutputType(BackupVaultCustomerManagedKeyArrayOutput{})
pulumi.RegisterOutputType(BackupVaultCustomerManagedKeyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupVault.go | sdk/go/azure/dataprotection/backupVault.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Vault.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// })
// if 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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Vaults can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupVault:BackupVault example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1
// ```
type BackupVault struct {
pulumi.CustomResourceState
// Whether to enable cross-region restore for the Backup Vault.
//
// > **Note:** The `crossRegionRestoreEnabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `crossRegionRestoreEnabled` is enabled, it cannot be disabled.
CrossRegionRestoreEnabled pulumi.BoolPtrOutput `pulumi:"crossRegionRestoreEnabled"`
// Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
//
// > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
DatastoreType pulumi.StringOutput `pulumi:"datastoreType"`
// An `identity` block as defined below.
Identity BackupVaultIdentityPtrOutput `pulumi:"identity"`
// The state of immutability for this Backup Vault. Possible values are `Disabled`, `Locked`, and `Unlocked`. Defaults to `Disabled`.
Immutability pulumi.StringPtrOutput `pulumi:"immutability"`
// The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
Redundancy pulumi.StringOutput `pulumi:"redundancy"`
// The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
//
// > **Note:** The `retentionDurationInDays` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retentionDurationInDays` is required when the `softDelete` is set to `On`.
RetentionDurationInDays pulumi.Float64PtrOutput `pulumi:"retentionDurationInDays"`
// The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off`, and `On`. Defaults to `On`.
//
// > **Note:** Once the `softDelete` is set to `AlwaysOn`, the setting cannot be changed.
SoftDelete pulumi.StringPtrOutput `pulumi:"softDelete"`
// A mapping of tags which should be assigned to the Backup Vault.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewBackupVault registers a new resource with the given unique name, arguments, and options.
func NewBackupVault(ctx *pulumi.Context,
name string, args *BackupVaultArgs, opts ...pulumi.ResourceOption) (*BackupVault, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DatastoreType == nil {
return nil, errors.New("invalid value for required argument 'DatastoreType'")
}
if args.Redundancy == nil {
return nil, errors.New("invalid value for required argument 'Redundancy'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupVault
err := ctx.RegisterResource("azure:dataprotection/backupVault:BackupVault", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupVault gets an existing BackupVault resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupVault(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupVaultState, opts ...pulumi.ResourceOption) (*BackupVault, error) {
var resource BackupVault
err := ctx.ReadResource("azure:dataprotection/backupVault:BackupVault", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupVault resources.
type backupVaultState struct {
// Whether to enable cross-region restore for the Backup Vault.
//
// > **Note:** The `crossRegionRestoreEnabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `crossRegionRestoreEnabled` is enabled, it cannot be disabled.
CrossRegionRestoreEnabled *bool `pulumi:"crossRegionRestoreEnabled"`
// Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
//
// > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
DatastoreType *string `pulumi:"datastoreType"`
// An `identity` block as defined below.
Identity *BackupVaultIdentity `pulumi:"identity"`
// The state of immutability for this Backup Vault. Possible values are `Disabled`, `Locked`, and `Unlocked`. Defaults to `Disabled`.
Immutability *string `pulumi:"immutability"`
// The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
Name *string `pulumi:"name"`
// Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
Redundancy *string `pulumi:"redundancy"`
// The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
//
// > **Note:** The `retentionDurationInDays` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retentionDurationInDays` is required when the `softDelete` is set to `On`.
RetentionDurationInDays *float64 `pulumi:"retentionDurationInDays"`
// The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off`, and `On`. Defaults to `On`.
//
// > **Note:** Once the `softDelete` is set to `AlwaysOn`, the setting cannot be changed.
SoftDelete *string `pulumi:"softDelete"`
// A mapping of tags which should be assigned to the Backup Vault.
Tags map[string]string `pulumi:"tags"`
}
type BackupVaultState struct {
// Whether to enable cross-region restore for the Backup Vault.
//
// > **Note:** The `crossRegionRestoreEnabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `crossRegionRestoreEnabled` is enabled, it cannot be disabled.
CrossRegionRestoreEnabled pulumi.BoolPtrInput
// Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
//
// > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
DatastoreType pulumi.StringPtrInput
// An `identity` block as defined below.
Identity BackupVaultIdentityPtrInput
// The state of immutability for this Backup Vault. Possible values are `Disabled`, `Locked`, and `Unlocked`. Defaults to `Disabled`.
Immutability pulumi.StringPtrInput
// The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
Name pulumi.StringPtrInput
// Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
Redundancy pulumi.StringPtrInput
// The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
ResourceGroupName pulumi.StringPtrInput
// The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
//
// > **Note:** The `retentionDurationInDays` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retentionDurationInDays` is required when the `softDelete` is set to `On`.
RetentionDurationInDays pulumi.Float64PtrInput
// The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off`, and `On`. Defaults to `On`.
//
// > **Note:** Once the `softDelete` is set to `AlwaysOn`, the setting cannot be changed.
SoftDelete pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Backup Vault.
Tags pulumi.StringMapInput
}
func (BackupVaultState) ElementType() reflect.Type {
return reflect.TypeOf((*backupVaultState)(nil)).Elem()
}
type backupVaultArgs struct {
// Whether to enable cross-region restore for the Backup Vault.
//
// > **Note:** The `crossRegionRestoreEnabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `crossRegionRestoreEnabled` is enabled, it cannot be disabled.
CrossRegionRestoreEnabled *bool `pulumi:"crossRegionRestoreEnabled"`
// Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
//
// > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
DatastoreType string `pulumi:"datastoreType"`
// An `identity` block as defined below.
Identity *BackupVaultIdentity `pulumi:"identity"`
// The state of immutability for this Backup Vault. Possible values are `Disabled`, `Locked`, and `Unlocked`. Defaults to `Disabled`.
Immutability *string `pulumi:"immutability"`
// The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
Name *string `pulumi:"name"`
// Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
Redundancy string `pulumi:"redundancy"`
// The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
//
// > **Note:** The `retentionDurationInDays` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retentionDurationInDays` is required when the `softDelete` is set to `On`.
RetentionDurationInDays *float64 `pulumi:"retentionDurationInDays"`
// The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off`, and `On`. Defaults to `On`.
//
// > **Note:** Once the `softDelete` is set to `AlwaysOn`, the setting cannot be changed.
SoftDelete *string `pulumi:"softDelete"`
// A mapping of tags which should be assigned to the Backup Vault.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a BackupVault resource.
type BackupVaultArgs struct {
// Whether to enable cross-region restore for the Backup Vault.
//
// > **Note:** The `crossRegionRestoreEnabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `crossRegionRestoreEnabled` is enabled, it cannot be disabled.
CrossRegionRestoreEnabled pulumi.BoolPtrInput
// Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
//
// > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
DatastoreType pulumi.StringInput
// An `identity` block as defined below.
Identity BackupVaultIdentityPtrInput
// The state of immutability for this Backup Vault. Possible values are `Disabled`, `Locked`, and `Unlocked`. Defaults to `Disabled`.
Immutability pulumi.StringPtrInput
// The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
Name pulumi.StringPtrInput
// Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
Redundancy pulumi.StringInput
// The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
ResourceGroupName pulumi.StringInput
// The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
//
// > **Note:** The `retentionDurationInDays` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retentionDurationInDays` is required when the `softDelete` is set to `On`.
RetentionDurationInDays pulumi.Float64PtrInput
// The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off`, and `On`. Defaults to `On`.
//
// > **Note:** Once the `softDelete` is set to `AlwaysOn`, the setting cannot be changed.
SoftDelete pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Backup Vault.
Tags pulumi.StringMapInput
}
func (BackupVaultArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupVaultArgs)(nil)).Elem()
}
type BackupVaultInput interface {
pulumi.Input
ToBackupVaultOutput() BackupVaultOutput
ToBackupVaultOutputWithContext(ctx context.Context) BackupVaultOutput
}
func (*BackupVault) ElementType() reflect.Type {
return reflect.TypeOf((**BackupVault)(nil)).Elem()
}
func (i *BackupVault) ToBackupVaultOutput() BackupVaultOutput {
return i.ToBackupVaultOutputWithContext(context.Background())
}
func (i *BackupVault) ToBackupVaultOutputWithContext(ctx context.Context) BackupVaultOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupVaultOutput)
}
// BackupVaultArrayInput is an input type that accepts BackupVaultArray and BackupVaultArrayOutput values.
// You can construct a concrete instance of `BackupVaultArrayInput` via:
//
// BackupVaultArray{ BackupVaultArgs{...} }
type BackupVaultArrayInput interface {
pulumi.Input
ToBackupVaultArrayOutput() BackupVaultArrayOutput
ToBackupVaultArrayOutputWithContext(context.Context) BackupVaultArrayOutput
}
type BackupVaultArray []BackupVaultInput
func (BackupVaultArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupVault)(nil)).Elem()
}
func (i BackupVaultArray) ToBackupVaultArrayOutput() BackupVaultArrayOutput {
return i.ToBackupVaultArrayOutputWithContext(context.Background())
}
func (i BackupVaultArray) ToBackupVaultArrayOutputWithContext(ctx context.Context) BackupVaultArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupVaultArrayOutput)
}
// BackupVaultMapInput is an input type that accepts BackupVaultMap and BackupVaultMapOutput values.
// You can construct a concrete instance of `BackupVaultMapInput` via:
//
// BackupVaultMap{ "key": BackupVaultArgs{...} }
type BackupVaultMapInput interface {
pulumi.Input
ToBackupVaultMapOutput() BackupVaultMapOutput
ToBackupVaultMapOutputWithContext(context.Context) BackupVaultMapOutput
}
type BackupVaultMap map[string]BackupVaultInput
func (BackupVaultMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupVault)(nil)).Elem()
}
func (i BackupVaultMap) ToBackupVaultMapOutput() BackupVaultMapOutput {
return i.ToBackupVaultMapOutputWithContext(context.Background())
}
func (i BackupVaultMap) ToBackupVaultMapOutputWithContext(ctx context.Context) BackupVaultMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupVaultMapOutput)
}
type BackupVaultOutput struct{ *pulumi.OutputState }
func (BackupVaultOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupVault)(nil)).Elem()
}
func (o BackupVaultOutput) ToBackupVaultOutput() BackupVaultOutput {
return o
}
func (o BackupVaultOutput) ToBackupVaultOutputWithContext(ctx context.Context) BackupVaultOutput {
return o
}
// Whether to enable cross-region restore for the Backup Vault.
//
// > **Note:** The `crossRegionRestoreEnabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `crossRegionRestoreEnabled` is enabled, it cannot be disabled.
func (o BackupVaultOutput) CrossRegionRestoreEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *BackupVault) pulumi.BoolPtrOutput { return v.CrossRegionRestoreEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
//
// > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
func (o BackupVaultOutput) DatastoreType() pulumi.StringOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringOutput { return v.DatastoreType }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o BackupVaultOutput) Identity() BackupVaultIdentityPtrOutput {
return o.ApplyT(func(v *BackupVault) BackupVaultIdentityPtrOutput { return v.Identity }).(BackupVaultIdentityPtrOutput)
}
// The state of immutability for this Backup Vault. Possible values are `Disabled`, `Locked`, and `Unlocked`. Defaults to `Disabled`.
func (o BackupVaultOutput) Immutability() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringPtrOutput { return v.Immutability }).(pulumi.StringPtrOutput)
}
// The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
func (o BackupVaultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
func (o BackupVaultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
func (o BackupVaultOutput) Redundancy() pulumi.StringOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringOutput { return v.Redundancy }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
func (o BackupVaultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
//
// > **Note:** The `retentionDurationInDays` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retentionDurationInDays` is required when the `softDelete` is set to `On`.
func (o BackupVaultOutput) RetentionDurationInDays() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *BackupVault) pulumi.Float64PtrOutput { return v.RetentionDurationInDays }).(pulumi.Float64PtrOutput)
}
// The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off`, and `On`. Defaults to `On`.
//
// > **Note:** Once the `softDelete` is set to `AlwaysOn`, the setting cannot be changed.
func (o BackupVaultOutput) SoftDelete() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringPtrOutput { return v.SoftDelete }).(pulumi.StringPtrOutput)
}
// A mapping of tags which should be assigned to the Backup Vault.
func (o BackupVaultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *BackupVault) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type BackupVaultArrayOutput struct{ *pulumi.OutputState }
func (BackupVaultArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupVault)(nil)).Elem()
}
func (o BackupVaultArrayOutput) ToBackupVaultArrayOutput() BackupVaultArrayOutput {
return o
}
func (o BackupVaultArrayOutput) ToBackupVaultArrayOutputWithContext(ctx context.Context) BackupVaultArrayOutput {
return o
}
func (o BackupVaultArrayOutput) Index(i pulumi.IntInput) BackupVaultOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupVault {
return vs[0].([]*BackupVault)[vs[1].(int)]
}).(BackupVaultOutput)
}
type BackupVaultMapOutput struct{ *pulumi.OutputState }
func (BackupVaultMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupVault)(nil)).Elem()
}
func (o BackupVaultMapOutput) ToBackupVaultMapOutput() BackupVaultMapOutput {
return o
}
func (o BackupVaultMapOutput) ToBackupVaultMapOutputWithContext(ctx context.Context) BackupVaultMapOutput {
return o
}
func (o BackupVaultMapOutput) MapIndex(k pulumi.StringInput) BackupVaultOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupVault {
return vs[0].(map[string]*BackupVault)[vs[1].(string)]
}).(BackupVaultOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupVaultInput)(nil)).Elem(), &BackupVault{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupVaultArrayInput)(nil)).Elem(), BackupVaultArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupVaultMapInput)(nil)).Elem(), BackupVaultMap{})
pulumi.RegisterOutputType(BackupVaultOutput{})
pulumi.RegisterOutputType(BackupVaultArrayOutput{})
pulumi.RegisterOutputType(BackupVaultMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupInstancePostgresql.go | sdk/go/azure/dataprotection/backupInstancePostgresql.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Instance to back up PostgreSQL.
//
// > **Note:** The `dataprotection.BackupInstancePostgresql` resource has been deprecated because Azure Database for PostgreSQL Single Server has been retired as of 2025-03-28 and will be removed in v5.0 of the AzureRM Provider.
//
// > **Note:** Before using this resource, there are some prerequisite permissions for configure backup and restore. See more details from <https://docs.microsoft.com/azure/backup/backup-azure-database-postgresql#prerequisite-permissions-for-configure-backup-and-restore>.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql"
// "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"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("B_Gen5_2"),
// StorageMb: pulumi.Int(5120),
// BackupRetentionDays: pulumi.Int(7),
// GeoRedundantBackupEnabled: pulumi.Bool(false),
// AutoGrowEnabled: pulumi.Bool(true),
// AdministratorLogin: pulumi.String("psqladmin"),
// AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
// Version: pulumi.String("9.5"),
// SslEnforcementEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = postgresql.NewFirewallRule(ctx, "example", &postgresql.FirewallRuleArgs{
// Name: pulumi.String("AllowAllWindowsAzureIps"),
// ResourceGroupName: example.Name,
// ServerName: exampleServer.Name,
// StartIpAddress: pulumi.String("0.0.0.0"),
// EndIpAddress: pulumi.String("0.0.0.0"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := postgresql.NewDatabase(ctx, "example", &postgresql.DatabaseArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// ServerName: exampleServer.Name,
// Charset: pulumi.String("UTF8"),
// Collation: pulumi.String("English_United States.1252"),
// })
// if err != nil {
// return err
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// SoftDeleteRetentionDays: pulumi.Int(7),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// pulumi.String("Get"),
// pulumi.String("Delete"),
// pulumi.String("Purge"),
// pulumi.String("Recover"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// pulumi.String("Get"),
// pulumi.String("Delete"),
// pulumi.String("Purge"),
// pulumi.String("Recover"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleSecret, err := keyvault.NewSecret(ctx, "example", &keyvault.SecretArgs{
// Name: pulumi.String("example"),
// Value: pulumi.All(exampleServer.Name, exampleDatabase.Name, exampleServer.Name).ApplyT(func(_args []interface{}) (string, error) {
// exampleServerName := _args[0].(string)
// exampleDatabaseName := _args[1].(string)
// exampleServerName1 := _args[2].(string)
// return fmt.Sprintf("Server=%v.postgres.database.azure.com;Database=%v;Port=5432;User Id=psqladmin@%v;Password=H@Sh1CoR3!;Ssl Mode=Require;", exampleServerName, exampleDatabaseName, exampleServerName1), nil
// }).(pulumi.StringOutput),
// KeyVaultId: exampleKeyVault.ID(),
// })
// if err != nil {
// return err
// }
// exampleBackupPolicyPostgresql, err := dataprotection.NewBackupPolicyPostgresql(ctx, "example", &dataprotection.BackupPolicyPostgresqlArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// VaultName: exampleBackupVault.Name,
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
// },
// DefaultRetentionDuration: pulumi.String("P4M"),
// })
// if err != nil {
// return err
// }
// _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: exampleServer.ID(),
// RoleDefinitionName: pulumi.String("Reader"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupInstancePostgresql(ctx, "example", &dataprotection.BackupInstancePostgresqlArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// VaultId: exampleBackupVault.ID(),
// DatabaseId: exampleDatabase.ID(),
// BackupPolicyId: exampleBackupPolicyPostgresql.ID(),
// DatabaseCredentialKeyVaultSecretId: exampleSecret.VersionlessId,
// })
// if 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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Instance PostgreSQL can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupInstancePostgresql:BackupInstancePostgresql example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
// ```
type BackupInstancePostgresql struct {
pulumi.CustomResourceState
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringOutput `pulumi:"backupPolicyId"`
// The ID or versionless ID of the key vault secret which stores the connection string of the database.
DatabaseCredentialKeyVaultSecretId pulumi.StringPtrOutput `pulumi:"databaseCredentialKeyVaultSecretId"`
// The ID of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
DatabaseId pulumi.StringOutput `pulumi:"databaseId"`
// The location of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The protection state of the Backup Instance PostgreSQL.
ProtectionState pulumi.StringOutput `pulumi:"protectionState"`
// The ID of the Backup Vault within which the PostgreSQL Backup Instance should exist. Changing this forces a new Backup Instance PostgreSQL to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupInstancePostgresql registers a new resource with the given unique name, arguments, and options.
func NewBackupInstancePostgresql(ctx *pulumi.Context,
name string, args *BackupInstancePostgresqlArgs, opts ...pulumi.ResourceOption) (*BackupInstancePostgresql, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupPolicyId == nil {
return nil, errors.New("invalid value for required argument 'BackupPolicyId'")
}
if args.DatabaseId == nil {
return nil, errors.New("invalid value for required argument 'DatabaseId'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupInstancePostgresql
err := ctx.RegisterResource("azure:dataprotection/backupInstancePostgresql:BackupInstancePostgresql", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupInstancePostgresql gets an existing BackupInstancePostgresql resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupInstancePostgresql(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupInstancePostgresqlState, opts ...pulumi.ResourceOption) (*BackupInstancePostgresql, error) {
var resource BackupInstancePostgresql
err := ctx.ReadResource("azure:dataprotection/backupInstancePostgresql:BackupInstancePostgresql", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupInstancePostgresql resources.
type backupInstancePostgresqlState struct {
// The ID of the Backup Policy.
BackupPolicyId *string `pulumi:"backupPolicyId"`
// The ID or versionless ID of the key vault secret which stores the connection string of the database.
DatabaseCredentialKeyVaultSecretId *string `pulumi:"databaseCredentialKeyVaultSecretId"`
// The ID of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
DatabaseId *string `pulumi:"databaseId"`
// The location of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created.
Name *string `pulumi:"name"`
// The protection state of the Backup Instance PostgreSQL.
ProtectionState *string `pulumi:"protectionState"`
// The ID of the Backup Vault within which the PostgreSQL Backup Instance should exist. Changing this forces a new Backup Instance PostgreSQL to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupInstancePostgresqlState struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringPtrInput
// The ID or versionless ID of the key vault secret which stores the connection string of the database.
DatabaseCredentialKeyVaultSecretId pulumi.StringPtrInput
// The ID of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
DatabaseId pulumi.StringPtrInput
// The location of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created.
Name pulumi.StringPtrInput
// The protection state of the Backup Instance PostgreSQL.
ProtectionState pulumi.StringPtrInput
// The ID of the Backup Vault within which the PostgreSQL Backup Instance should exist. Changing this forces a new Backup Instance PostgreSQL to be created.
VaultId pulumi.StringPtrInput
}
func (BackupInstancePostgresqlState) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstancePostgresqlState)(nil)).Elem()
}
type backupInstancePostgresqlArgs struct {
// The ID of the Backup Policy.
BackupPolicyId string `pulumi:"backupPolicyId"`
// The ID or versionless ID of the key vault secret which stores the connection string of the database.
DatabaseCredentialKeyVaultSecretId *string `pulumi:"databaseCredentialKeyVaultSecretId"`
// The ID of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
DatabaseId string `pulumi:"databaseId"`
// The location of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created.
Name *string `pulumi:"name"`
// The ID of the Backup Vault within which the PostgreSQL Backup Instance should exist. Changing this forces a new Backup Instance PostgreSQL to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupInstancePostgresql resource.
type BackupInstancePostgresqlArgs struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringInput
// The ID or versionless ID of the key vault secret which stores the connection string of the database.
DatabaseCredentialKeyVaultSecretId pulumi.StringPtrInput
// The ID of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
DatabaseId pulumi.StringInput
// The location of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created.
Name pulumi.StringPtrInput
// The ID of the Backup Vault within which the PostgreSQL Backup Instance should exist. Changing this forces a new Backup Instance PostgreSQL to be created.
VaultId pulumi.StringInput
}
func (BackupInstancePostgresqlArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstancePostgresqlArgs)(nil)).Elem()
}
type BackupInstancePostgresqlInput interface {
pulumi.Input
ToBackupInstancePostgresqlOutput() BackupInstancePostgresqlOutput
ToBackupInstancePostgresqlOutputWithContext(ctx context.Context) BackupInstancePostgresqlOutput
}
func (*BackupInstancePostgresql) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstancePostgresql)(nil)).Elem()
}
func (i *BackupInstancePostgresql) ToBackupInstancePostgresqlOutput() BackupInstancePostgresqlOutput {
return i.ToBackupInstancePostgresqlOutputWithContext(context.Background())
}
func (i *BackupInstancePostgresql) ToBackupInstancePostgresqlOutputWithContext(ctx context.Context) BackupInstancePostgresqlOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstancePostgresqlOutput)
}
// BackupInstancePostgresqlArrayInput is an input type that accepts BackupInstancePostgresqlArray and BackupInstancePostgresqlArrayOutput values.
// You can construct a concrete instance of `BackupInstancePostgresqlArrayInput` via:
//
// BackupInstancePostgresqlArray{ BackupInstancePostgresqlArgs{...} }
type BackupInstancePostgresqlArrayInput interface {
pulumi.Input
ToBackupInstancePostgresqlArrayOutput() BackupInstancePostgresqlArrayOutput
ToBackupInstancePostgresqlArrayOutputWithContext(context.Context) BackupInstancePostgresqlArrayOutput
}
type BackupInstancePostgresqlArray []BackupInstancePostgresqlInput
func (BackupInstancePostgresqlArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstancePostgresql)(nil)).Elem()
}
func (i BackupInstancePostgresqlArray) ToBackupInstancePostgresqlArrayOutput() BackupInstancePostgresqlArrayOutput {
return i.ToBackupInstancePostgresqlArrayOutputWithContext(context.Background())
}
func (i BackupInstancePostgresqlArray) ToBackupInstancePostgresqlArrayOutputWithContext(ctx context.Context) BackupInstancePostgresqlArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstancePostgresqlArrayOutput)
}
// BackupInstancePostgresqlMapInput is an input type that accepts BackupInstancePostgresqlMap and BackupInstancePostgresqlMapOutput values.
// You can construct a concrete instance of `BackupInstancePostgresqlMapInput` via:
//
// BackupInstancePostgresqlMap{ "key": BackupInstancePostgresqlArgs{...} }
type BackupInstancePostgresqlMapInput interface {
pulumi.Input
ToBackupInstancePostgresqlMapOutput() BackupInstancePostgresqlMapOutput
ToBackupInstancePostgresqlMapOutputWithContext(context.Context) BackupInstancePostgresqlMapOutput
}
type BackupInstancePostgresqlMap map[string]BackupInstancePostgresqlInput
func (BackupInstancePostgresqlMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstancePostgresql)(nil)).Elem()
}
func (i BackupInstancePostgresqlMap) ToBackupInstancePostgresqlMapOutput() BackupInstancePostgresqlMapOutput {
return i.ToBackupInstancePostgresqlMapOutputWithContext(context.Background())
}
func (i BackupInstancePostgresqlMap) ToBackupInstancePostgresqlMapOutputWithContext(ctx context.Context) BackupInstancePostgresqlMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstancePostgresqlMapOutput)
}
type BackupInstancePostgresqlOutput struct{ *pulumi.OutputState }
func (BackupInstancePostgresqlOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstancePostgresql)(nil)).Elem()
}
func (o BackupInstancePostgresqlOutput) ToBackupInstancePostgresqlOutput() BackupInstancePostgresqlOutput {
return o
}
func (o BackupInstancePostgresqlOutput) ToBackupInstancePostgresqlOutputWithContext(ctx context.Context) BackupInstancePostgresqlOutput {
return o
}
// The ID of the Backup Policy.
func (o BackupInstancePostgresqlOutput) BackupPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresql) pulumi.StringOutput { return v.BackupPolicyId }).(pulumi.StringOutput)
}
// The ID or versionless ID of the key vault secret which stores the connection string of the database.
func (o BackupInstancePostgresqlOutput) DatabaseCredentialKeyVaultSecretId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupInstancePostgresql) pulumi.StringPtrOutput { return v.DatabaseCredentialKeyVaultSecretId }).(pulumi.StringPtrOutput)
}
// The ID of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
func (o BackupInstancePostgresqlOutput) DatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresql) pulumi.StringOutput { return v.DatabaseId }).(pulumi.StringOutput)
}
// The location of the source database. Changing this forces a new Backup Instance PostgreSQL to be created.
func (o BackupInstancePostgresqlOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresql) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created.
func (o BackupInstancePostgresqlOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresql) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The protection state of the Backup Instance PostgreSQL.
func (o BackupInstancePostgresqlOutput) ProtectionState() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresql) pulumi.StringOutput { return v.ProtectionState }).(pulumi.StringOutput)
}
// The ID of the Backup Vault within which the PostgreSQL Backup Instance should exist. Changing this forces a new Backup Instance PostgreSQL to be created.
func (o BackupInstancePostgresqlOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstancePostgresql) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupInstancePostgresqlArrayOutput struct{ *pulumi.OutputState }
func (BackupInstancePostgresqlArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstancePostgresql)(nil)).Elem()
}
func (o BackupInstancePostgresqlArrayOutput) ToBackupInstancePostgresqlArrayOutput() BackupInstancePostgresqlArrayOutput {
return o
}
func (o BackupInstancePostgresqlArrayOutput) ToBackupInstancePostgresqlArrayOutputWithContext(ctx context.Context) BackupInstancePostgresqlArrayOutput {
return o
}
func (o BackupInstancePostgresqlArrayOutput) Index(i pulumi.IntInput) BackupInstancePostgresqlOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupInstancePostgresql {
return vs[0].([]*BackupInstancePostgresql)[vs[1].(int)]
}).(BackupInstancePostgresqlOutput)
}
type BackupInstancePostgresqlMapOutput struct{ *pulumi.OutputState }
func (BackupInstancePostgresqlMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstancePostgresql)(nil)).Elem()
}
func (o BackupInstancePostgresqlMapOutput) ToBackupInstancePostgresqlMapOutput() BackupInstancePostgresqlMapOutput {
return o
}
func (o BackupInstancePostgresqlMapOutput) ToBackupInstancePostgresqlMapOutputWithContext(ctx context.Context) BackupInstancePostgresqlMapOutput {
return o
}
func (o BackupInstancePostgresqlMapOutput) MapIndex(k pulumi.StringInput) BackupInstancePostgresqlOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupInstancePostgresql {
return vs[0].(map[string]*BackupInstancePostgresql)[vs[1].(string)]
}).(BackupInstancePostgresqlOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstancePostgresqlInput)(nil)).Elem(), &BackupInstancePostgresql{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstancePostgresqlArrayInput)(nil)).Elem(), BackupInstancePostgresqlArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstancePostgresqlMapInput)(nil)).Elem(), BackupInstancePostgresqlMap{})
pulumi.RegisterOutputType(BackupInstancePostgresqlOutput{})
pulumi.RegisterOutputType(BackupInstancePostgresqlArrayOutput{})
pulumi.RegisterOutputType(BackupInstancePostgresqlMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupPolicyMysqlFlexibleServer.go | sdk/go/azure/dataprotection/backupPolicyMysqlFlexibleServer.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Policy to back up MySQL Flexible Server.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/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
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupPolicyMysqlFlexibleServer(ctx, "example", &dataprotection.BackupPolicyMysqlFlexibleServerArgs{
// Name: pulumi.String("example-backup-policy"),
// VaultId: exampleBackupVault.ID(),
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
// },
// TimeZone: pulumi.String("India Standard Time"),
// DefaultRetentionRule: &dataprotection.BackupPolicyMysqlFlexibleServerDefaultRetentionRuleArgs{
// LifeCycles: dataprotection.BackupPolicyMysqlFlexibleServerDefaultRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyMysqlFlexibleServerDefaultRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P4M"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// },
// RetentionRules: dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleArray{
// &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleArgs{
// Name: pulumi.String("weekly"),
// LifeCycles: dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P6M"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// Priority: pulumi.Int(20),
// Criteria: &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleCriteriaArgs{
// AbsoluteCriteria: pulumi.String("FirstOfWeek"),
// },
// },
// &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleArgs{
// Name: pulumi.String("thursday"),
// LifeCycles: dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P1W"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// Priority: pulumi.Int(25),
// Criteria: &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleCriteriaArgs{
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Thursday"),
// },
// ScheduledBackupTimes: pulumi.StringArray{
// pulumi.String("2021-05-23T02:30:00Z"),
// },
// },
// },
// &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleArgs{
// Name: pulumi.String("monthly"),
// LifeCycles: dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P1D"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// Priority: pulumi.Int(15),
// Criteria: &dataprotection.BackupPolicyMysqlFlexibleServerRetentionRuleCriteriaArgs{
// WeeksOfMonths: pulumi.StringArray{
// pulumi.String("First"),
// pulumi.String("Last"),
// },
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Tuesday"),
// },
// ScheduledBackupTimes: pulumi.StringArray{
// pulumi.String("2021-05-23T02:30:00Z"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Policy MySQL Flexible Server's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupPolicyMysqlFlexibleServer:BackupPolicyMysqlFlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1
// ```
type BackupPolicyMysqlFlexibleServer struct {
pulumi.CustomResourceState
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayOutput `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyMysqlFlexibleServerDefaultRetentionRuleOutput `pulumi:"defaultRetentionRule"`
// Specifies the name of the Backup Policy for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyMysqlFlexibleServerRetentionRuleArrayOutput `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// The ID of the Backup Vault where the Backup Policy MySQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupPolicyMysqlFlexibleServer registers a new resource with the given unique name, arguments, and options.
func NewBackupPolicyMysqlFlexibleServer(ctx *pulumi.Context,
name string, args *BackupPolicyMysqlFlexibleServerArgs, opts ...pulumi.ResourceOption) (*BackupPolicyMysqlFlexibleServer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupRepeatingTimeIntervals == nil {
return nil, errors.New("invalid value for required argument 'BackupRepeatingTimeIntervals'")
}
if args.DefaultRetentionRule == nil {
return nil, errors.New("invalid value for required argument 'DefaultRetentionRule'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupPolicyMysqlFlexibleServer
err := ctx.RegisterResource("azure:dataprotection/backupPolicyMysqlFlexibleServer:BackupPolicyMysqlFlexibleServer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupPolicyMysqlFlexibleServer gets an existing BackupPolicyMysqlFlexibleServer resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupPolicyMysqlFlexibleServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupPolicyMysqlFlexibleServerState, opts ...pulumi.ResourceOption) (*BackupPolicyMysqlFlexibleServer, error) {
var resource BackupPolicyMysqlFlexibleServer
err := ctx.ReadResource("azure:dataprotection/backupPolicyMysqlFlexibleServer:BackupPolicyMysqlFlexibleServer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupPolicyMysqlFlexibleServer resources.
type backupPolicyMysqlFlexibleServerState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule *BackupPolicyMysqlFlexibleServerDefaultRetentionRule `pulumi:"defaultRetentionRule"`
// Specifies the name of the Backup Policy for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules []BackupPolicyMysqlFlexibleServerRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Backup Vault where the Backup Policy MySQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupPolicyMysqlFlexibleServerState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyMysqlFlexibleServerDefaultRetentionRulePtrInput
// Specifies the name of the Backup Policy for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyMysqlFlexibleServerRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrInput
// The ID of the Backup Vault where the Backup Policy MySQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringPtrInput
}
func (BackupPolicyMysqlFlexibleServerState) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyMysqlFlexibleServerState)(nil)).Elem()
}
type backupPolicyMysqlFlexibleServerArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyMysqlFlexibleServerDefaultRetentionRule `pulumi:"defaultRetentionRule"`
// Specifies the name of the Backup Policy for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules []BackupPolicyMysqlFlexibleServerRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Backup Vault where the Backup Policy MySQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupPolicyMysqlFlexibleServer resource.
type BackupPolicyMysqlFlexibleServerArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyMysqlFlexibleServerDefaultRetentionRuleInput
// Specifies the name of the Backup Policy for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyMysqlFlexibleServerRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrInput
// The ID of the Backup Vault where the Backup Policy MySQL Flexible Server should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringInput
}
func (BackupPolicyMysqlFlexibleServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyMysqlFlexibleServerArgs)(nil)).Elem()
}
type BackupPolicyMysqlFlexibleServerInput interface {
pulumi.Input
ToBackupPolicyMysqlFlexibleServerOutput() BackupPolicyMysqlFlexibleServerOutput
ToBackupPolicyMysqlFlexibleServerOutputWithContext(ctx context.Context) BackupPolicyMysqlFlexibleServerOutput
}
func (*BackupPolicyMysqlFlexibleServer) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyMysqlFlexibleServer)(nil)).Elem()
}
func (i *BackupPolicyMysqlFlexibleServer) ToBackupPolicyMysqlFlexibleServerOutput() BackupPolicyMysqlFlexibleServerOutput {
return i.ToBackupPolicyMysqlFlexibleServerOutputWithContext(context.Background())
}
func (i *BackupPolicyMysqlFlexibleServer) ToBackupPolicyMysqlFlexibleServerOutputWithContext(ctx context.Context) BackupPolicyMysqlFlexibleServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyMysqlFlexibleServerOutput)
}
// BackupPolicyMysqlFlexibleServerArrayInput is an input type that accepts BackupPolicyMysqlFlexibleServerArray and BackupPolicyMysqlFlexibleServerArrayOutput values.
// You can construct a concrete instance of `BackupPolicyMysqlFlexibleServerArrayInput` via:
//
// BackupPolicyMysqlFlexibleServerArray{ BackupPolicyMysqlFlexibleServerArgs{...} }
type BackupPolicyMysqlFlexibleServerArrayInput interface {
pulumi.Input
ToBackupPolicyMysqlFlexibleServerArrayOutput() BackupPolicyMysqlFlexibleServerArrayOutput
ToBackupPolicyMysqlFlexibleServerArrayOutputWithContext(context.Context) BackupPolicyMysqlFlexibleServerArrayOutput
}
type BackupPolicyMysqlFlexibleServerArray []BackupPolicyMysqlFlexibleServerInput
func (BackupPolicyMysqlFlexibleServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyMysqlFlexibleServer)(nil)).Elem()
}
func (i BackupPolicyMysqlFlexibleServerArray) ToBackupPolicyMysqlFlexibleServerArrayOutput() BackupPolicyMysqlFlexibleServerArrayOutput {
return i.ToBackupPolicyMysqlFlexibleServerArrayOutputWithContext(context.Background())
}
func (i BackupPolicyMysqlFlexibleServerArray) ToBackupPolicyMysqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupPolicyMysqlFlexibleServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyMysqlFlexibleServerArrayOutput)
}
// BackupPolicyMysqlFlexibleServerMapInput is an input type that accepts BackupPolicyMysqlFlexibleServerMap and BackupPolicyMysqlFlexibleServerMapOutput values.
// You can construct a concrete instance of `BackupPolicyMysqlFlexibleServerMapInput` via:
//
// BackupPolicyMysqlFlexibleServerMap{ "key": BackupPolicyMysqlFlexibleServerArgs{...} }
type BackupPolicyMysqlFlexibleServerMapInput interface {
pulumi.Input
ToBackupPolicyMysqlFlexibleServerMapOutput() BackupPolicyMysqlFlexibleServerMapOutput
ToBackupPolicyMysqlFlexibleServerMapOutputWithContext(context.Context) BackupPolicyMysqlFlexibleServerMapOutput
}
type BackupPolicyMysqlFlexibleServerMap map[string]BackupPolicyMysqlFlexibleServerInput
func (BackupPolicyMysqlFlexibleServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyMysqlFlexibleServer)(nil)).Elem()
}
func (i BackupPolicyMysqlFlexibleServerMap) ToBackupPolicyMysqlFlexibleServerMapOutput() BackupPolicyMysqlFlexibleServerMapOutput {
return i.ToBackupPolicyMysqlFlexibleServerMapOutputWithContext(context.Background())
}
func (i BackupPolicyMysqlFlexibleServerMap) ToBackupPolicyMysqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupPolicyMysqlFlexibleServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyMysqlFlexibleServerMapOutput)
}
type BackupPolicyMysqlFlexibleServerOutput struct{ *pulumi.OutputState }
func (BackupPolicyMysqlFlexibleServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyMysqlFlexibleServer)(nil)).Elem()
}
func (o BackupPolicyMysqlFlexibleServerOutput) ToBackupPolicyMysqlFlexibleServerOutput() BackupPolicyMysqlFlexibleServerOutput {
return o
}
func (o BackupPolicyMysqlFlexibleServerOutput) ToBackupPolicyMysqlFlexibleServerOutputWithContext(ctx context.Context) BackupPolicyMysqlFlexibleServerOutput {
return o
}
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created.
func (o BackupPolicyMysqlFlexibleServerOutput) BackupRepeatingTimeIntervals() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupPolicyMysqlFlexibleServer) pulumi.StringArrayOutput {
return v.BackupRepeatingTimeIntervals
}).(pulumi.StringArrayOutput)
}
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
func (o BackupPolicyMysqlFlexibleServerOutput) DefaultRetentionRule() BackupPolicyMysqlFlexibleServerDefaultRetentionRuleOutput {
return o.ApplyT(func(v *BackupPolicyMysqlFlexibleServer) BackupPolicyMysqlFlexibleServerDefaultRetentionRuleOutput {
return v.DefaultRetentionRule
}).(BackupPolicyMysqlFlexibleServerDefaultRetentionRuleOutput)
}
// Specifies the name of the Backup Policy for the MySQL Flexible Server. Changing this forces a new resource to be created.
func (o BackupPolicyMysqlFlexibleServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyMysqlFlexibleServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
func (o BackupPolicyMysqlFlexibleServerOutput) RetentionRules() BackupPolicyMysqlFlexibleServerRetentionRuleArrayOutput {
return o.ApplyT(func(v *BackupPolicyMysqlFlexibleServer) BackupPolicyMysqlFlexibleServerRetentionRuleArrayOutput {
return v.RetentionRules
}).(BackupPolicyMysqlFlexibleServerRetentionRuleArrayOutput)
}
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
func (o BackupPolicyMysqlFlexibleServerOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyMysqlFlexibleServer) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// The ID of the Backup Vault where the Backup Policy MySQL Flexible Server should exist. Changing this forces a new resource to be created.
func (o BackupPolicyMysqlFlexibleServerOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyMysqlFlexibleServer) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupPolicyMysqlFlexibleServerArrayOutput struct{ *pulumi.OutputState }
func (BackupPolicyMysqlFlexibleServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyMysqlFlexibleServer)(nil)).Elem()
}
func (o BackupPolicyMysqlFlexibleServerArrayOutput) ToBackupPolicyMysqlFlexibleServerArrayOutput() BackupPolicyMysqlFlexibleServerArrayOutput {
return o
}
func (o BackupPolicyMysqlFlexibleServerArrayOutput) ToBackupPolicyMysqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupPolicyMysqlFlexibleServerArrayOutput {
return o
}
func (o BackupPolicyMysqlFlexibleServerArrayOutput) Index(i pulumi.IntInput) BackupPolicyMysqlFlexibleServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupPolicyMysqlFlexibleServer {
return vs[0].([]*BackupPolicyMysqlFlexibleServer)[vs[1].(int)]
}).(BackupPolicyMysqlFlexibleServerOutput)
}
type BackupPolicyMysqlFlexibleServerMapOutput struct{ *pulumi.OutputState }
func (BackupPolicyMysqlFlexibleServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyMysqlFlexibleServer)(nil)).Elem()
}
func (o BackupPolicyMysqlFlexibleServerMapOutput) ToBackupPolicyMysqlFlexibleServerMapOutput() BackupPolicyMysqlFlexibleServerMapOutput {
return o
}
func (o BackupPolicyMysqlFlexibleServerMapOutput) ToBackupPolicyMysqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupPolicyMysqlFlexibleServerMapOutput {
return o
}
func (o BackupPolicyMysqlFlexibleServerMapOutput) MapIndex(k pulumi.StringInput) BackupPolicyMysqlFlexibleServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupPolicyMysqlFlexibleServer {
return vs[0].(map[string]*BackupPolicyMysqlFlexibleServer)[vs[1].(string)]
}).(BackupPolicyMysqlFlexibleServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyMysqlFlexibleServerInput)(nil)).Elem(), &BackupPolicyMysqlFlexibleServer{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyMysqlFlexibleServerArrayInput)(nil)).Elem(), BackupPolicyMysqlFlexibleServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyMysqlFlexibleServerMapInput)(nil)).Elem(), BackupPolicyMysqlFlexibleServerMap{})
pulumi.RegisterOutputType(BackupPolicyMysqlFlexibleServerOutput{})
pulumi.RegisterOutputType(BackupPolicyMysqlFlexibleServerArrayOutput{})
pulumi.RegisterOutputType(BackupPolicyMysqlFlexibleServerMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupPolicyDisk.go | sdk/go/azure/dataprotection/backupPolicyDisk.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Policy Disk.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/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
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupPolicyDisk(ctx, "example", &dataprotection.BackupPolicyDiskArgs{
// Name: pulumi.String("example-backup-policy"),
// VaultId: exampleBackupVault.ID(),
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-19T06:33:16+00:00/PT4H"),
// },
// DefaultRetentionDuration: pulumi.String("P7D"),
// TimeZone: pulumi.String("W. Europe Standard Time"),
// RetentionRules: dataprotection.BackupPolicyDiskRetentionRuleArray{
// &dataprotection.BackupPolicyDiskRetentionRuleArgs{
// Name: pulumi.String("Daily"),
// Duration: pulumi.String("P7D"),
// Priority: pulumi.Int(25),
// Criteria: &dataprotection.BackupPolicyDiskRetentionRuleCriteriaArgs{
// AbsoluteCriteria: pulumi.String("FirstOfDay"),
// },
// },
// &dataprotection.BackupPolicyDiskRetentionRuleArgs{
// Name: pulumi.String("Weekly"),
// Duration: pulumi.String("P7D"),
// Priority: pulumi.Int(20),
// Criteria: &dataprotection.BackupPolicyDiskRetentionRuleCriteriaArgs{
// AbsoluteCriteria: pulumi.String("FirstOfWeek"),
// },
// },
// },
// })
// if 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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Policy Disks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupPolicyDisk:BackupPolicyDisk example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1
// ```
type BackupPolicyDisk struct {
pulumi.CustomResourceState
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval . Changing this forces a new Backup Policy Disk to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayOutput `pulumi:"backupRepeatingTimeIntervals"`
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
DefaultRetentionDuration pulumi.StringOutput `pulumi:"defaultRetentionDuration"`
// The name which should be used for this Backup Policy Disk. Changing this forces a new Backup Policy Disk to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created.
RetentionRules BackupPolicyDiskRetentionRuleArrayOutput `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Disk to be created.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// The ID of the Backup Vault within which the Backup Policy Disk should exist. Changing this forces a new Backup Policy Disk to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupPolicyDisk registers a new resource with the given unique name, arguments, and options.
func NewBackupPolicyDisk(ctx *pulumi.Context,
name string, args *BackupPolicyDiskArgs, opts ...pulumi.ResourceOption) (*BackupPolicyDisk, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupRepeatingTimeIntervals == nil {
return nil, errors.New("invalid value for required argument 'BackupRepeatingTimeIntervals'")
}
if args.DefaultRetentionDuration == nil {
return nil, errors.New("invalid value for required argument 'DefaultRetentionDuration'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupPolicyDisk
err := ctx.RegisterResource("azure:dataprotection/backupPolicyDisk:BackupPolicyDisk", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupPolicyDisk gets an existing BackupPolicyDisk resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupPolicyDisk(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupPolicyDiskState, opts ...pulumi.ResourceOption) (*BackupPolicyDisk, error) {
var resource BackupPolicyDisk
err := ctx.ReadResource("azure:dataprotection/backupPolicyDisk:BackupPolicyDisk", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupPolicyDisk resources.
type backupPolicyDiskState struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval . Changing this forces a new Backup Policy Disk to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
DefaultRetentionDuration *string `pulumi:"defaultRetentionDuration"`
// The name which should be used for this Backup Policy Disk. Changing this forces a new Backup Policy Disk to be created.
Name *string `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created.
RetentionRules []BackupPolicyDiskRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Disk to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Backup Vault within which the Backup Policy Disk should exist. Changing this forces a new Backup Policy Disk to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupPolicyDiskState struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval . Changing this forces a new Backup Policy Disk to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
DefaultRetentionDuration pulumi.StringPtrInput
// The name which should be used for this Backup Policy Disk. Changing this forces a new Backup Policy Disk to be created.
Name pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created.
RetentionRules BackupPolicyDiskRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Disk to be created.
TimeZone pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Policy Disk should exist. Changing this forces a new Backup Policy Disk to be created.
VaultId pulumi.StringPtrInput
}
func (BackupPolicyDiskState) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyDiskState)(nil)).Elem()
}
type backupPolicyDiskArgs struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval . Changing this forces a new Backup Policy Disk to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
DefaultRetentionDuration string `pulumi:"defaultRetentionDuration"`
// The name which should be used for this Backup Policy Disk. Changing this forces a new Backup Policy Disk to be created.
Name *string `pulumi:"name"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created.
RetentionRules []BackupPolicyDiskRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Disk to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Backup Vault within which the Backup Policy Disk should exist. Changing this forces a new Backup Policy Disk to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupPolicyDisk resource.
type BackupPolicyDiskArgs struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval . Changing this forces a new Backup Policy Disk to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
DefaultRetentionDuration pulumi.StringInput
// The name which should be used for this Backup Policy Disk. Changing this forces a new Backup Policy Disk to be created.
Name pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created.
RetentionRules BackupPolicyDiskRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Disk to be created.
TimeZone pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Policy Disk should exist. Changing this forces a new Backup Policy Disk to be created.
VaultId pulumi.StringInput
}
func (BackupPolicyDiskArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyDiskArgs)(nil)).Elem()
}
type BackupPolicyDiskInput interface {
pulumi.Input
ToBackupPolicyDiskOutput() BackupPolicyDiskOutput
ToBackupPolicyDiskOutputWithContext(ctx context.Context) BackupPolicyDiskOutput
}
func (*BackupPolicyDisk) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyDisk)(nil)).Elem()
}
func (i *BackupPolicyDisk) ToBackupPolicyDiskOutput() BackupPolicyDiskOutput {
return i.ToBackupPolicyDiskOutputWithContext(context.Background())
}
func (i *BackupPolicyDisk) ToBackupPolicyDiskOutputWithContext(ctx context.Context) BackupPolicyDiskOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyDiskOutput)
}
// BackupPolicyDiskArrayInput is an input type that accepts BackupPolicyDiskArray and BackupPolicyDiskArrayOutput values.
// You can construct a concrete instance of `BackupPolicyDiskArrayInput` via:
//
// BackupPolicyDiskArray{ BackupPolicyDiskArgs{...} }
type BackupPolicyDiskArrayInput interface {
pulumi.Input
ToBackupPolicyDiskArrayOutput() BackupPolicyDiskArrayOutput
ToBackupPolicyDiskArrayOutputWithContext(context.Context) BackupPolicyDiskArrayOutput
}
type BackupPolicyDiskArray []BackupPolicyDiskInput
func (BackupPolicyDiskArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyDisk)(nil)).Elem()
}
func (i BackupPolicyDiskArray) ToBackupPolicyDiskArrayOutput() BackupPolicyDiskArrayOutput {
return i.ToBackupPolicyDiskArrayOutputWithContext(context.Background())
}
func (i BackupPolicyDiskArray) ToBackupPolicyDiskArrayOutputWithContext(ctx context.Context) BackupPolicyDiskArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyDiskArrayOutput)
}
// BackupPolicyDiskMapInput is an input type that accepts BackupPolicyDiskMap and BackupPolicyDiskMapOutput values.
// You can construct a concrete instance of `BackupPolicyDiskMapInput` via:
//
// BackupPolicyDiskMap{ "key": BackupPolicyDiskArgs{...} }
type BackupPolicyDiskMapInput interface {
pulumi.Input
ToBackupPolicyDiskMapOutput() BackupPolicyDiskMapOutput
ToBackupPolicyDiskMapOutputWithContext(context.Context) BackupPolicyDiskMapOutput
}
type BackupPolicyDiskMap map[string]BackupPolicyDiskInput
func (BackupPolicyDiskMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyDisk)(nil)).Elem()
}
func (i BackupPolicyDiskMap) ToBackupPolicyDiskMapOutput() BackupPolicyDiskMapOutput {
return i.ToBackupPolicyDiskMapOutputWithContext(context.Background())
}
func (i BackupPolicyDiskMap) ToBackupPolicyDiskMapOutputWithContext(ctx context.Context) BackupPolicyDiskMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyDiskMapOutput)
}
type BackupPolicyDiskOutput struct{ *pulumi.OutputState }
func (BackupPolicyDiskOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyDisk)(nil)).Elem()
}
func (o BackupPolicyDiskOutput) ToBackupPolicyDiskOutput() BackupPolicyDiskOutput {
return o
}
func (o BackupPolicyDiskOutput) ToBackupPolicyDiskOutputWithContext(ctx context.Context) BackupPolicyDiskOutput {
return o
}
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval . Changing this forces a new Backup Policy Disk to be created.
func (o BackupPolicyDiskOutput) BackupRepeatingTimeIntervals() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupPolicyDisk) pulumi.StringArrayOutput { return v.BackupRepeatingTimeIntervals }).(pulumi.StringArrayOutput)
}
// The duration of default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
func (o BackupPolicyDiskOutput) DefaultRetentionDuration() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyDisk) pulumi.StringOutput { return v.DefaultRetentionDuration }).(pulumi.StringOutput)
}
// The name which should be used for this Backup Policy Disk. Changing this forces a new Backup Policy Disk to be created.
func (o BackupPolicyDiskOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyDisk) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created.
func (o BackupPolicyDiskOutput) RetentionRules() BackupPolicyDiskRetentionRuleArrayOutput {
return o.ApplyT(func(v *BackupPolicyDisk) BackupPolicyDiskRetentionRuleArrayOutput { return v.RetentionRules }).(BackupPolicyDiskRetentionRuleArrayOutput)
}
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Disk to be created.
func (o BackupPolicyDiskOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyDisk) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// The ID of the Backup Vault within which the Backup Policy Disk should exist. Changing this forces a new Backup Policy Disk to be created.
func (o BackupPolicyDiskOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyDisk) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupPolicyDiskArrayOutput struct{ *pulumi.OutputState }
func (BackupPolicyDiskArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyDisk)(nil)).Elem()
}
func (o BackupPolicyDiskArrayOutput) ToBackupPolicyDiskArrayOutput() BackupPolicyDiskArrayOutput {
return o
}
func (o BackupPolicyDiskArrayOutput) ToBackupPolicyDiskArrayOutputWithContext(ctx context.Context) BackupPolicyDiskArrayOutput {
return o
}
func (o BackupPolicyDiskArrayOutput) Index(i pulumi.IntInput) BackupPolicyDiskOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupPolicyDisk {
return vs[0].([]*BackupPolicyDisk)[vs[1].(int)]
}).(BackupPolicyDiskOutput)
}
type BackupPolicyDiskMapOutput struct{ *pulumi.OutputState }
func (BackupPolicyDiskMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyDisk)(nil)).Elem()
}
func (o BackupPolicyDiskMapOutput) ToBackupPolicyDiskMapOutput() BackupPolicyDiskMapOutput {
return o
}
func (o BackupPolicyDiskMapOutput) ToBackupPolicyDiskMapOutputWithContext(ctx context.Context) BackupPolicyDiskMapOutput {
return o
}
func (o BackupPolicyDiskMapOutput) MapIndex(k pulumi.StringInput) BackupPolicyDiskOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupPolicyDisk {
return vs[0].(map[string]*BackupPolicyDisk)[vs[1].(string)]
}).(BackupPolicyDiskOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyDiskInput)(nil)).Elem(), &BackupPolicyDisk{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyDiskArrayInput)(nil)).Elem(), BackupPolicyDiskArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyDiskMapInput)(nil)).Elem(), BackupPolicyDiskMap{})
pulumi.RegisterOutputType(BackupPolicyDiskOutput{})
pulumi.RegisterOutputType(BackupPolicyDiskArrayOutput{})
pulumi.RegisterOutputType(BackupPolicyDiskMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupPolicyKubernetesCluster.go | sdk/go/azure/dataprotection/backupPolicyKubernetesCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Policy to back up Kubernetes Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/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
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupPolicyKubernetesCluster(ctx, "example", &dataprotection.BackupPolicyKubernetesClusterArgs{
// Name: pulumi.String("example-backup-policy"),
// ResourceGroupName: example.Name,
// VaultName: exampleBackupVault.Name,
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
// },
// TimeZone: pulumi.String("India Standard Time"),
// DefaultRetentionDuration: "P4M",
// RetentionRules: dataprotection.BackupPolicyKubernetesClusterRetentionRuleArray{
// &dataprotection.BackupPolicyKubernetesClusterRetentionRuleArgs{
// Name: pulumi.String("Daily"),
// Priority: pulumi.Int(25),
// LifeCycles: dataprotection.BackupPolicyKubernetesClusterRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P84D"),
// DataStoreType: pulumi.String("OperationalStore"),
// },
// },
// Criteria: &dataprotection.BackupPolicyKubernetesClusterRetentionRuleCriteriaArgs{
// AbsoluteCriteria: pulumi.String("FirstOfDay"),
// },
// },
// },
// DefaultRetentionRule: &dataprotection.BackupPolicyKubernetesClusterDefaultRetentionRuleArgs{
// LifeCycles: dataprotection.BackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P7D"),
// DataStoreType: pulumi.String("OperationalStore"),
// },
// },
// },
// })
// if 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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Policy Kubernetes Cluster's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupPolicyKubernetesCluster:BackupPolicyKubernetesCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1
// ```
type BackupPolicyKubernetesCluster struct {
pulumi.CustomResourceState
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayOutput `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyKubernetesClusterDefaultRetentionRuleOutput `pulumi:"defaultRetentionRule"`
// The name which should be used for the Backup Policy Kubernetes Cluster. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyKubernetesClusterRetentionRuleArrayOutput `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// The name of the Backup Vault where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultName pulumi.StringOutput `pulumi:"vaultName"`
}
// NewBackupPolicyKubernetesCluster registers a new resource with the given unique name, arguments, and options.
func NewBackupPolicyKubernetesCluster(ctx *pulumi.Context,
name string, args *BackupPolicyKubernetesClusterArgs, opts ...pulumi.ResourceOption) (*BackupPolicyKubernetesCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupRepeatingTimeIntervals == nil {
return nil, errors.New("invalid value for required argument 'BackupRepeatingTimeIntervals'")
}
if args.DefaultRetentionRule == nil {
return nil, errors.New("invalid value for required argument 'DefaultRetentionRule'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.VaultName == nil {
return nil, errors.New("invalid value for required argument 'VaultName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupPolicyKubernetesCluster
err := ctx.RegisterResource("azure:dataprotection/backupPolicyKubernetesCluster:BackupPolicyKubernetesCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupPolicyKubernetesCluster gets an existing BackupPolicyKubernetesCluster resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupPolicyKubernetesCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupPolicyKubernetesClusterState, opts ...pulumi.ResourceOption) (*BackupPolicyKubernetesCluster, error) {
var resource BackupPolicyKubernetesCluster
err := ctx.ReadResource("azure:dataprotection/backupPolicyKubernetesCluster:BackupPolicyKubernetesCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupPolicyKubernetesCluster resources.
type backupPolicyKubernetesClusterState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule *BackupPolicyKubernetesClusterDefaultRetentionRule `pulumi:"defaultRetentionRule"`
// The name which should be used for the Backup Policy Kubernetes Cluster. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules []BackupPolicyKubernetesClusterRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone *string `pulumi:"timeZone"`
// The name of the Backup Vault where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultName *string `pulumi:"vaultName"`
}
type BackupPolicyKubernetesClusterState struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyKubernetesClusterDefaultRetentionRulePtrInput
// The name which should be used for the Backup Policy Kubernetes Cluster. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyKubernetesClusterRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrInput
// The name of the Backup Vault where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultName pulumi.StringPtrInput
}
func (BackupPolicyKubernetesClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyKubernetesClusterState)(nil)).Elem()
}
type backupPolicyKubernetesClusterArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyKubernetesClusterDefaultRetentionRule `pulumi:"defaultRetentionRule"`
// The name which should be used for the Backup Policy Kubernetes Cluster. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules []BackupPolicyKubernetesClusterRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone *string `pulumi:"timeZone"`
// The name of the Backup Vault where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultName string `pulumi:"vaultName"`
}
// The set of arguments for constructing a BackupPolicyKubernetesCluster resource.
type BackupPolicyKubernetesClusterArgs struct {
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new resource to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
DefaultRetentionRule BackupPolicyKubernetesClusterDefaultRetentionRuleInput
// The name which should be used for the Backup Policy Kubernetes Cluster. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
RetentionRules BackupPolicyKubernetesClusterRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
TimeZone pulumi.StringPtrInput
// The name of the Backup Vault where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultName pulumi.StringInput
}
func (BackupPolicyKubernetesClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyKubernetesClusterArgs)(nil)).Elem()
}
type BackupPolicyKubernetesClusterInput interface {
pulumi.Input
ToBackupPolicyKubernetesClusterOutput() BackupPolicyKubernetesClusterOutput
ToBackupPolicyKubernetesClusterOutputWithContext(ctx context.Context) BackupPolicyKubernetesClusterOutput
}
func (*BackupPolicyKubernetesCluster) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyKubernetesCluster)(nil)).Elem()
}
func (i *BackupPolicyKubernetesCluster) ToBackupPolicyKubernetesClusterOutput() BackupPolicyKubernetesClusterOutput {
return i.ToBackupPolicyKubernetesClusterOutputWithContext(context.Background())
}
func (i *BackupPolicyKubernetesCluster) ToBackupPolicyKubernetesClusterOutputWithContext(ctx context.Context) BackupPolicyKubernetesClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyKubernetesClusterOutput)
}
// BackupPolicyKubernetesClusterArrayInput is an input type that accepts BackupPolicyKubernetesClusterArray and BackupPolicyKubernetesClusterArrayOutput values.
// You can construct a concrete instance of `BackupPolicyKubernetesClusterArrayInput` via:
//
// BackupPolicyKubernetesClusterArray{ BackupPolicyKubernetesClusterArgs{...} }
type BackupPolicyKubernetesClusterArrayInput interface {
pulumi.Input
ToBackupPolicyKubernetesClusterArrayOutput() BackupPolicyKubernetesClusterArrayOutput
ToBackupPolicyKubernetesClusterArrayOutputWithContext(context.Context) BackupPolicyKubernetesClusterArrayOutput
}
type BackupPolicyKubernetesClusterArray []BackupPolicyKubernetesClusterInput
func (BackupPolicyKubernetesClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyKubernetesCluster)(nil)).Elem()
}
func (i BackupPolicyKubernetesClusterArray) ToBackupPolicyKubernetesClusterArrayOutput() BackupPolicyKubernetesClusterArrayOutput {
return i.ToBackupPolicyKubernetesClusterArrayOutputWithContext(context.Background())
}
func (i BackupPolicyKubernetesClusterArray) ToBackupPolicyKubernetesClusterArrayOutputWithContext(ctx context.Context) BackupPolicyKubernetesClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyKubernetesClusterArrayOutput)
}
// BackupPolicyKubernetesClusterMapInput is an input type that accepts BackupPolicyKubernetesClusterMap and BackupPolicyKubernetesClusterMapOutput values.
// You can construct a concrete instance of `BackupPolicyKubernetesClusterMapInput` via:
//
// BackupPolicyKubernetesClusterMap{ "key": BackupPolicyKubernetesClusterArgs{...} }
type BackupPolicyKubernetesClusterMapInput interface {
pulumi.Input
ToBackupPolicyKubernetesClusterMapOutput() BackupPolicyKubernetesClusterMapOutput
ToBackupPolicyKubernetesClusterMapOutputWithContext(context.Context) BackupPolicyKubernetesClusterMapOutput
}
type BackupPolicyKubernetesClusterMap map[string]BackupPolicyKubernetesClusterInput
func (BackupPolicyKubernetesClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyKubernetesCluster)(nil)).Elem()
}
func (i BackupPolicyKubernetesClusterMap) ToBackupPolicyKubernetesClusterMapOutput() BackupPolicyKubernetesClusterMapOutput {
return i.ToBackupPolicyKubernetesClusterMapOutputWithContext(context.Background())
}
func (i BackupPolicyKubernetesClusterMap) ToBackupPolicyKubernetesClusterMapOutputWithContext(ctx context.Context) BackupPolicyKubernetesClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyKubernetesClusterMapOutput)
}
type BackupPolicyKubernetesClusterOutput struct{ *pulumi.OutputState }
func (BackupPolicyKubernetesClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyKubernetesCluster)(nil)).Elem()
}
func (o BackupPolicyKubernetesClusterOutput) ToBackupPolicyKubernetesClusterOutput() BackupPolicyKubernetesClusterOutput {
return o
}
func (o BackupPolicyKubernetesClusterOutput) ToBackupPolicyKubernetesClusterOutputWithContext(ctx context.Context) BackupPolicyKubernetesClusterOutput {
return o
}
// Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval. Changing this forces a new resource to be created.
func (o BackupPolicyKubernetesClusterOutput) BackupRepeatingTimeIntervals() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupPolicyKubernetesCluster) pulumi.StringArrayOutput { return v.BackupRepeatingTimeIntervals }).(pulumi.StringArrayOutput)
}
// A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created.
func (o BackupPolicyKubernetesClusterOutput) DefaultRetentionRule() BackupPolicyKubernetesClusterDefaultRetentionRuleOutput {
return o.ApplyT(func(v *BackupPolicyKubernetesCluster) BackupPolicyKubernetesClusterDefaultRetentionRuleOutput {
return v.DefaultRetentionRule
}).(BackupPolicyKubernetesClusterDefaultRetentionRuleOutput)
}
// The name which should be used for the Backup Policy Kubernetes Cluster. Changing this forces a new resource to be created.
func (o BackupPolicyKubernetesClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyKubernetesCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
func (o BackupPolicyKubernetesClusterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyKubernetesCluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created.
func (o BackupPolicyKubernetesClusterOutput) RetentionRules() BackupPolicyKubernetesClusterRetentionRuleArrayOutput {
return o.ApplyT(func(v *BackupPolicyKubernetesCluster) BackupPolicyKubernetesClusterRetentionRuleArrayOutput {
return v.RetentionRules
}).(BackupPolicyKubernetesClusterRetentionRuleArrayOutput)
}
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created.
func (o BackupPolicyKubernetesClusterOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyKubernetesCluster) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// The name of the Backup Vault where the Backup Policy Kubernetes Cluster should exist. Changing this forces a new resource to be created.
func (o BackupPolicyKubernetesClusterOutput) VaultName() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyKubernetesCluster) pulumi.StringOutput { return v.VaultName }).(pulumi.StringOutput)
}
type BackupPolicyKubernetesClusterArrayOutput struct{ *pulumi.OutputState }
func (BackupPolicyKubernetesClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyKubernetesCluster)(nil)).Elem()
}
func (o BackupPolicyKubernetesClusterArrayOutput) ToBackupPolicyKubernetesClusterArrayOutput() BackupPolicyKubernetesClusterArrayOutput {
return o
}
func (o BackupPolicyKubernetesClusterArrayOutput) ToBackupPolicyKubernetesClusterArrayOutputWithContext(ctx context.Context) BackupPolicyKubernetesClusterArrayOutput {
return o
}
func (o BackupPolicyKubernetesClusterArrayOutput) Index(i pulumi.IntInput) BackupPolicyKubernetesClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupPolicyKubernetesCluster {
return vs[0].([]*BackupPolicyKubernetesCluster)[vs[1].(int)]
}).(BackupPolicyKubernetesClusterOutput)
}
type BackupPolicyKubernetesClusterMapOutput struct{ *pulumi.OutputState }
func (BackupPolicyKubernetesClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyKubernetesCluster)(nil)).Elem()
}
func (o BackupPolicyKubernetesClusterMapOutput) ToBackupPolicyKubernetesClusterMapOutput() BackupPolicyKubernetesClusterMapOutput {
return o
}
func (o BackupPolicyKubernetesClusterMapOutput) ToBackupPolicyKubernetesClusterMapOutputWithContext(ctx context.Context) BackupPolicyKubernetesClusterMapOutput {
return o
}
func (o BackupPolicyKubernetesClusterMapOutput) MapIndex(k pulumi.StringInput) BackupPolicyKubernetesClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupPolicyKubernetesCluster {
return vs[0].(map[string]*BackupPolicyKubernetesCluster)[vs[1].(string)]
}).(BackupPolicyKubernetesClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyKubernetesClusterInput)(nil)).Elem(), &BackupPolicyKubernetesCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyKubernetesClusterArrayInput)(nil)).Elem(), BackupPolicyKubernetesClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyKubernetesClusterMapInput)(nil)).Elem(), BackupPolicyKubernetesClusterMap{})
pulumi.RegisterOutputType(BackupPolicyKubernetesClusterOutput{})
pulumi.RegisterOutputType(BackupPolicyKubernetesClusterArrayOutput{})
pulumi.RegisterOutputType(BackupPolicyKubernetesClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupInstanceKubernetesCluster.go | sdk/go/azure/dataprotection/backupInstanceKubernetesCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Instance to back up a Kubernetes Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// snap, err := core.NewResourceGroup(ctx, "snap", &core.ResourceGroupArgs{
// Name: pulumi.String("example-snap"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleKubernetesCluster, err := containerservice.NewKubernetesCluster(ctx, "example", &containerservice.KubernetesClusterArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// DnsPrefix: pulumi.String("dns"),
// DefaultNodePool: &containerservice.KubernetesClusterDefaultNodePoolArgs{
// Name: pulumi.String("default"),
// NodeCount: pulumi.Int(1),
// VmSize: pulumi.String("Standard_DS2_v2"),
// HostEncryptionEnabled: pulumi.Bool(true),
// },
// Identity: &containerservice.KubernetesClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = containerservice.NewClusterTrustedAccessRoleBinding(ctx, "aks_cluster_trusted_access", &containerservice.ClusterTrustedAccessRoleBindingArgs{
// KubernetesClusterId: exampleKubernetesCluster.ID(),
// Name: pulumi.String("example"),
// Roles: pulumi.StringArray{
// pulumi.String("Microsoft.DataProtection/backupVaults/backup-operator"),
// },
// SourceResourceId: exampleBackupVault.ID(),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// exampleKubernetesClusterExtension, err := containerservice.NewKubernetesClusterExtension(ctx, "example", &containerservice.KubernetesClusterExtensionArgs{
// Name: pulumi.String("example"),
// ClusterId: exampleKubernetesCluster.ID(),
// ExtensionType: pulumi.String("Microsoft.DataProtection.Kubernetes"),
// ReleaseTrain: pulumi.String("stable"),
// ReleaseNamespace: pulumi.String("dataprotection-microsoft"),
// ConfigurationSettings: pulumi.StringMap{
// "configuration.backupStorageLocation.bucket": exampleContainer.Name,
// "configuration.backupStorageLocation.config.resourceGroup": example.Name,
// "configuration.backupStorageLocation.config.storageAccount": exampleAccount.Name,
// "configuration.backupStorageLocation.config.subscriptionId": pulumi.String(current.SubscriptionId),
// "credentials.tenantId": pulumi.String(current.TenantId),
// },
// })
// if err != nil {
// return err
// }
// testExtensionAndStorageAccountPermission, err := authorization.NewAssignment(ctx, "test_extension_and_storage_account_permission", &authorization.AssignmentArgs{
// Scope: exampleAccount.ID(),
// RoleDefinitionName: pulumi.String("Storage Account Contributor"),
// PrincipalId: pulumi.String(exampleKubernetesClusterExtension.AksAssignedIdentities.ApplyT(func(aksAssignedIdentities []containerservice.KubernetesClusterExtensionAksAssignedIdentity) (*string, error) {
// return &aksAssignedIdentities[0].PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// testVaultMsiReadOnCluster, err := authorization.NewAssignment(ctx, "test_vault_msi_read_on_cluster", &authorization.AssignmentArgs{
// Scope: exampleKubernetesCluster.ID(),
// RoleDefinitionName: pulumi.String("Reader"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// testVaultMsiReadOnSnapRg, err := authorization.NewAssignment(ctx, "test_vault_msi_read_on_snap_rg", &authorization.AssignmentArgs{
// Scope: snap.ID(),
// RoleDefinitionName: pulumi.String("Reader"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// testVaultMsiSnapshotContributorOnSnapRg, err := authorization.NewAssignment(ctx, "test_vault_msi_snapshot_contributor_on_snap_rg", &authorization.AssignmentArgs{
// Scope: snap.ID(),
// RoleDefinitionName: pulumi.String("Disk Snapshot Contributor"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// testVaultDataOperatorOnSnapRg, err := authorization.NewAssignment(ctx, "test_vault_data_operator_on_snap_rg", &authorization.AssignmentArgs{
// Scope: snap.ID(),
// RoleDefinitionName: pulumi.String("Data Operator for Managed Disks"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// testVaultDataContributorOnStorage, err := authorization.NewAssignment(ctx, "test_vault_data_contributor_on_storage", &authorization.AssignmentArgs{
// Scope: exampleAccount.ID(),
// RoleDefinitionName: pulumi.String("Storage Blob Data Contributor"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// testClusterMsiContributorOnSnapRg, err := authorization.NewAssignment(ctx, "test_cluster_msi_contributor_on_snap_rg", &authorization.AssignmentArgs{
// Scope: snap.ID(),
// RoleDefinitionName: pulumi.String("Contributor"),
// PrincipalId: pulumi.String(exampleKubernetesCluster.Identity.ApplyT(func(identity containerservice.KubernetesClusterIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// exampleBackupPolicyKubernetesCluster, err := dataprotection.NewBackupPolicyKubernetesCluster(ctx, "example", &dataprotection.BackupPolicyKubernetesClusterArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// VaultName: exampleBackupVault.Name,
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2023-05-23T02:30:00+00:00/P1W"),
// },
// RetentionRules: dataprotection.BackupPolicyKubernetesClusterRetentionRuleArray{
// &dataprotection.BackupPolicyKubernetesClusterRetentionRuleArgs{
// Name: pulumi.String("Daily"),
// Priority: pulumi.Int(25),
// LifeCycles: dataprotection.BackupPolicyKubernetesClusterRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P84D"),
// DataStoreType: pulumi.String("OperationalStore"),
// },
// },
// Criteria: &dataprotection.BackupPolicyKubernetesClusterRetentionRuleCriteriaArgs{
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Thursday"),
// },
// MonthsOfYears: pulumi.StringArray{
// pulumi.String("November"),
// },
// WeeksOfMonths: pulumi.StringArray{
// pulumi.String("First"),
// },
// ScheduledBackupTimes: pulumi.StringArray{
// pulumi.String("2023-05-23T02:30:00Z"),
// },
// },
// },
// },
// DefaultRetentionRule: &dataprotection.BackupPolicyKubernetesClusterDefaultRetentionRuleArgs{
// LifeCycles: dataprotection.BackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P14D"),
// DataStoreType: pulumi.String("OperationalStore"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupInstanceKubernetesCluster(ctx, "example", &dataprotection.BackupInstanceKubernetesClusterArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// VaultId: exampleBackupVault.ID(),
// KubernetesClusterId: exampleKubernetesCluster.ID(),
// SnapshotResourceGroupName: snap.Name,
// BackupPolicyId: exampleBackupPolicyKubernetesCluster.ID(),
// BackupDatasourceParameters: &dataprotection.BackupInstanceKubernetesClusterBackupDatasourceParametersArgs{
// ExcludedNamespaces: pulumi.StringArray{
// pulumi.String("test-excluded-namespaces"),
// },
// ExcludedResourceTypes: pulumi.StringArray{
// pulumi.String("exvolumesnapshotcontents.snapshot.storage.k8s.io"),
// },
// ClusterScopedResourcesEnabled: pulumi.Bool(true),
// IncludedNamespaces: pulumi.StringArray{
// pulumi.String("test-included-namespaces"),
// },
// IncludedResourceTypes: pulumi.StringArray{
// pulumi.String("involumesnapshotcontents.snapshot.storage.k8s.io"),
// },
// LabelSelectors: pulumi.StringArray{
// pulumi.String("kubernetes.io/metadata.name:test"),
// },
// VolumeSnapshotEnabled: pulumi.Bool(true),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// testExtensionAndStorageAccountPermission,
// testVaultMsiReadOnCluster,
// testVaultMsiReadOnSnapRg,
// testClusterMsiContributorOnSnapRg,
// testVaultMsiSnapshotContributorOnSnapRg,
// testVaultDataOperatorOnSnapRg,
// testVaultDataContributorOnStorage,
// }))
// if 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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Instance Kubernetes Cluster can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupInstanceKubernetesCluster:BackupInstanceKubernetesCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
// ```
type BackupInstanceKubernetesCluster struct {
pulumi.CustomResourceState
// A `backupDatasourceParameters` block as defined below. Changing this forces a new resource to be created.
BackupDatasourceParameters BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput `pulumi:"backupDatasourceParameters"`
// The ID of the Backup Policy. Changing this forces a new resource to be created.
BackupPolicyId pulumi.StringOutput `pulumi:"backupPolicyId"`
// The ID of the Kubernetes Cluster. Changing this forces a new resource to be created.
KubernetesClusterId pulumi.StringOutput `pulumi:"kubernetesClusterId"`
// The location of the Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The protection state of the Backup Instance Kubernetes Cluster.
ProtectionState pulumi.StringOutput `pulumi:"protectionState"`
// The name of the Resource Group where snapshots are stored. Changing this forces a new resource to be created.
SnapshotResourceGroupName pulumi.StringOutput `pulumi:"snapshotResourceGroupName"`
// The ID of the Backup Vault within which the Backup Instance Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupInstanceKubernetesCluster registers a new resource with the given unique name, arguments, and options.
func NewBackupInstanceKubernetesCluster(ctx *pulumi.Context,
name string, args *BackupInstanceKubernetesClusterArgs, opts ...pulumi.ResourceOption) (*BackupInstanceKubernetesCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupPolicyId == nil {
return nil, errors.New("invalid value for required argument 'BackupPolicyId'")
}
if args.KubernetesClusterId == nil {
return nil, errors.New("invalid value for required argument 'KubernetesClusterId'")
}
if args.SnapshotResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'SnapshotResourceGroupName'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupInstanceKubernetesCluster
err := ctx.RegisterResource("azure:dataprotection/backupInstanceKubernetesCluster:BackupInstanceKubernetesCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupInstanceKubernetesCluster gets an existing BackupInstanceKubernetesCluster resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupInstanceKubernetesCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupInstanceKubernetesClusterState, opts ...pulumi.ResourceOption) (*BackupInstanceKubernetesCluster, error) {
var resource BackupInstanceKubernetesCluster
err := ctx.ReadResource("azure:dataprotection/backupInstanceKubernetesCluster:BackupInstanceKubernetesCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupInstanceKubernetesCluster resources.
type backupInstanceKubernetesClusterState struct {
// A `backupDatasourceParameters` block as defined below. Changing this forces a new resource to be created.
BackupDatasourceParameters *BackupInstanceKubernetesClusterBackupDatasourceParameters `pulumi:"backupDatasourceParameters"`
// The ID of the Backup Policy. Changing this forces a new resource to be created.
BackupPolicyId *string `pulumi:"backupPolicyId"`
// The ID of the Kubernetes Cluster. Changing this forces a new resource to be created.
KubernetesClusterId *string `pulumi:"kubernetesClusterId"`
// The location of the Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The protection state of the Backup Instance Kubernetes Cluster.
ProtectionState *string `pulumi:"protectionState"`
// The name of the Resource Group where snapshots are stored. Changing this forces a new resource to be created.
SnapshotResourceGroupName *string `pulumi:"snapshotResourceGroupName"`
// The ID of the Backup Vault within which the Backup Instance Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupInstanceKubernetesClusterState struct {
// A `backupDatasourceParameters` block as defined below. Changing this forces a new resource to be created.
BackupDatasourceParameters BackupInstanceKubernetesClusterBackupDatasourceParametersPtrInput
// The ID of the Backup Policy. Changing this forces a new resource to be created.
BackupPolicyId pulumi.StringPtrInput
// The ID of the Kubernetes Cluster. Changing this forces a new resource to be created.
KubernetesClusterId pulumi.StringPtrInput
// The location of the Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The protection state of the Backup Instance Kubernetes Cluster.
ProtectionState pulumi.StringPtrInput
// The name of the Resource Group where snapshots are stored. Changing this forces a new resource to be created.
SnapshotResourceGroupName pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Instance Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringPtrInput
}
func (BackupInstanceKubernetesClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceKubernetesClusterState)(nil)).Elem()
}
type backupInstanceKubernetesClusterArgs struct {
// A `backupDatasourceParameters` block as defined below. Changing this forces a new resource to be created.
BackupDatasourceParameters *BackupInstanceKubernetesClusterBackupDatasourceParameters `pulumi:"backupDatasourceParameters"`
// The ID of the Backup Policy. Changing this forces a new resource to be created.
BackupPolicyId string `pulumi:"backupPolicyId"`
// The ID of the Kubernetes Cluster. Changing this forces a new resource to be created.
KubernetesClusterId string `pulumi:"kubernetesClusterId"`
// The location of the Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where snapshots are stored. Changing this forces a new resource to be created.
SnapshotResourceGroupName string `pulumi:"snapshotResourceGroupName"`
// The ID of the Backup Vault within which the Backup Instance Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupInstanceKubernetesCluster resource.
type BackupInstanceKubernetesClusterArgs struct {
// A `backupDatasourceParameters` block as defined below. Changing this forces a new resource to be created.
BackupDatasourceParameters BackupInstanceKubernetesClusterBackupDatasourceParametersPtrInput
// The ID of the Backup Policy. Changing this forces a new resource to be created.
BackupPolicyId pulumi.StringInput
// The ID of the Kubernetes Cluster. Changing this forces a new resource to be created.
KubernetesClusterId pulumi.StringInput
// The location of the Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where snapshots are stored. Changing this forces a new resource to be created.
SnapshotResourceGroupName pulumi.StringInput
// The ID of the Backup Vault within which the Backup Instance Kubernetes Cluster should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringInput
}
func (BackupInstanceKubernetesClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceKubernetesClusterArgs)(nil)).Elem()
}
type BackupInstanceKubernetesClusterInput interface {
pulumi.Input
ToBackupInstanceKubernetesClusterOutput() BackupInstanceKubernetesClusterOutput
ToBackupInstanceKubernetesClusterOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterOutput
}
func (*BackupInstanceKubernetesCluster) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceKubernetesCluster)(nil)).Elem()
}
func (i *BackupInstanceKubernetesCluster) ToBackupInstanceKubernetesClusterOutput() BackupInstanceKubernetesClusterOutput {
return i.ToBackupInstanceKubernetesClusterOutputWithContext(context.Background())
}
func (i *BackupInstanceKubernetesCluster) ToBackupInstanceKubernetesClusterOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceKubernetesClusterOutput)
}
// BackupInstanceKubernetesClusterArrayInput is an input type that accepts BackupInstanceKubernetesClusterArray and BackupInstanceKubernetesClusterArrayOutput values.
// You can construct a concrete instance of `BackupInstanceKubernetesClusterArrayInput` via:
//
// BackupInstanceKubernetesClusterArray{ BackupInstanceKubernetesClusterArgs{...} }
type BackupInstanceKubernetesClusterArrayInput interface {
pulumi.Input
ToBackupInstanceKubernetesClusterArrayOutput() BackupInstanceKubernetesClusterArrayOutput
ToBackupInstanceKubernetesClusterArrayOutputWithContext(context.Context) BackupInstanceKubernetesClusterArrayOutput
}
type BackupInstanceKubernetesClusterArray []BackupInstanceKubernetesClusterInput
func (BackupInstanceKubernetesClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceKubernetesCluster)(nil)).Elem()
}
func (i BackupInstanceKubernetesClusterArray) ToBackupInstanceKubernetesClusterArrayOutput() BackupInstanceKubernetesClusterArrayOutput {
return i.ToBackupInstanceKubernetesClusterArrayOutputWithContext(context.Background())
}
func (i BackupInstanceKubernetesClusterArray) ToBackupInstanceKubernetesClusterArrayOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceKubernetesClusterArrayOutput)
}
// BackupInstanceKubernetesClusterMapInput is an input type that accepts BackupInstanceKubernetesClusterMap and BackupInstanceKubernetesClusterMapOutput values.
// You can construct a concrete instance of `BackupInstanceKubernetesClusterMapInput` via:
//
// BackupInstanceKubernetesClusterMap{ "key": BackupInstanceKubernetesClusterArgs{...} }
type BackupInstanceKubernetesClusterMapInput interface {
pulumi.Input
ToBackupInstanceKubernetesClusterMapOutput() BackupInstanceKubernetesClusterMapOutput
ToBackupInstanceKubernetesClusterMapOutputWithContext(context.Context) BackupInstanceKubernetesClusterMapOutput
}
type BackupInstanceKubernetesClusterMap map[string]BackupInstanceKubernetesClusterInput
func (BackupInstanceKubernetesClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceKubernetesCluster)(nil)).Elem()
}
func (i BackupInstanceKubernetesClusterMap) ToBackupInstanceKubernetesClusterMapOutput() BackupInstanceKubernetesClusterMapOutput {
return i.ToBackupInstanceKubernetesClusterMapOutputWithContext(context.Background())
}
func (i BackupInstanceKubernetesClusterMap) ToBackupInstanceKubernetesClusterMapOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceKubernetesClusterMapOutput)
}
type BackupInstanceKubernetesClusterOutput struct{ *pulumi.OutputState }
func (BackupInstanceKubernetesClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceKubernetesCluster)(nil)).Elem()
}
func (o BackupInstanceKubernetesClusterOutput) ToBackupInstanceKubernetesClusterOutput() BackupInstanceKubernetesClusterOutput {
return o
}
func (o BackupInstanceKubernetesClusterOutput) ToBackupInstanceKubernetesClusterOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterOutput {
return o
}
// A `backupDatasourceParameters` block as defined below. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterOutput) BackupDatasourceParameters() BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput {
return v.BackupDatasourceParameters
}).(BackupInstanceKubernetesClusterBackupDatasourceParametersPtrOutput)
}
// The ID of the Backup Policy. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterOutput) BackupPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) pulumi.StringOutput { return v.BackupPolicyId }).(pulumi.StringOutput)
}
// The ID of the Kubernetes Cluster. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterOutput) KubernetesClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) pulumi.StringOutput { return v.KubernetesClusterId }).(pulumi.StringOutput)
}
// The location of the Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Backup Instance Kubernetes Cluster. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The protection state of the Backup Instance Kubernetes Cluster.
func (o BackupInstanceKubernetesClusterOutput) ProtectionState() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) pulumi.StringOutput { return v.ProtectionState }).(pulumi.StringOutput)
}
// The name of the Resource Group where snapshots are stored. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterOutput) SnapshotResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) pulumi.StringOutput { return v.SnapshotResourceGroupName }).(pulumi.StringOutput)
}
// The ID of the Backup Vault within which the Backup Instance Kubernetes Cluster should exist. Changing this forces a new resource to be created.
func (o BackupInstanceKubernetesClusterOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceKubernetesCluster) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupInstanceKubernetesClusterArrayOutput struct{ *pulumi.OutputState }
func (BackupInstanceKubernetesClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceKubernetesCluster)(nil)).Elem()
}
func (o BackupInstanceKubernetesClusterArrayOutput) ToBackupInstanceKubernetesClusterArrayOutput() BackupInstanceKubernetesClusterArrayOutput {
return o
}
func (o BackupInstanceKubernetesClusterArrayOutput) ToBackupInstanceKubernetesClusterArrayOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterArrayOutput {
return o
}
func (o BackupInstanceKubernetesClusterArrayOutput) Index(i pulumi.IntInput) BackupInstanceKubernetesClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupInstanceKubernetesCluster {
return vs[0].([]*BackupInstanceKubernetesCluster)[vs[1].(int)]
}).(BackupInstanceKubernetesClusterOutput)
}
type BackupInstanceKubernetesClusterMapOutput struct{ *pulumi.OutputState }
func (BackupInstanceKubernetesClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceKubernetesCluster)(nil)).Elem()
}
func (o BackupInstanceKubernetesClusterMapOutput) ToBackupInstanceKubernetesClusterMapOutput() BackupInstanceKubernetesClusterMapOutput {
return o
}
func (o BackupInstanceKubernetesClusterMapOutput) ToBackupInstanceKubernetesClusterMapOutputWithContext(ctx context.Context) BackupInstanceKubernetesClusterMapOutput {
return o
}
func (o BackupInstanceKubernetesClusterMapOutput) MapIndex(k pulumi.StringInput) BackupInstanceKubernetesClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupInstanceKubernetesCluster {
return vs[0].(map[string]*BackupInstanceKubernetesCluster)[vs[1].(string)]
}).(BackupInstanceKubernetesClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceKubernetesClusterInput)(nil)).Elem(), &BackupInstanceKubernetesCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceKubernetesClusterArrayInput)(nil)).Elem(), BackupInstanceKubernetesClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceKubernetesClusterMapInput)(nil)).Elem(), BackupInstanceKubernetesClusterMap{})
pulumi.RegisterOutputType(BackupInstanceKubernetesClusterOutput{})
pulumi.RegisterOutputType(BackupInstanceKubernetesClusterArrayOutput{})
pulumi.RegisterOutputType(BackupInstanceKubernetesClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupInstanceMysqlFlexibleServer.go | sdk/go/azure/dataprotection/backupInstanceMysqlFlexibleServer.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Instance to back up MySQL Flexible Server.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mysql"
// "github.com/pulumi/pulumi/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
// }
// exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{
// Name: pulumi.String("example-mysqlfs"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AdministratorLogin: pulumi.String("adminTerraform"),
// AdministratorPassword: pulumi.String("QAZwsx123"),
// Version: pulumi.String("8.0.21"),
// SkuName: pulumi.String("B_Standard_B1ms"),
// Zone: pulumi.String("1"),
// })
// if err != nil {
// return err
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backupvault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// SoftDelete: pulumi.String("Off"),
// Identity: &dataprotection.BackupVaultIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: example.ID(),
// RoleDefinitionName: pulumi.String("Reader"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// example2, err := authorization.NewAssignment(ctx, "example2", &authorization.AssignmentArgs{
// Scope: exampleFlexibleServer.ID(),
// RoleDefinitionName: pulumi.String("MySQL Backup And Export Operator"),
// PrincipalId: pulumi.String(exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// exampleBackupPolicyMysqlFlexibleServer, err := dataprotection.NewBackupPolicyMysqlFlexibleServer(ctx, "example", &dataprotection.BackupPolicyMysqlFlexibleServerArgs{
// Name: pulumi.String("example-dp"),
// VaultId: exampleBackupVault.ID(),
// BackupRepeatingTimeIntervals: pulumi.StringArray{
// pulumi.String("R/2021-05-23T02:30:00+00:00/P1W"),
// },
// DefaultRetentionRule: &dataprotection.BackupPolicyMysqlFlexibleServerDefaultRetentionRuleArgs{
// LifeCycles: dataprotection.BackupPolicyMysqlFlexibleServerDefaultRetentionRuleLifeCycleArray{
// &dataprotection.BackupPolicyMysqlFlexibleServerDefaultRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P4M"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// },
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAssignment,
// example2,
// }))
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupInstanceMysqlFlexibleServer(ctx, "example", &dataprotection.BackupInstanceMysqlFlexibleServerArgs{
// Name: pulumi.String("example-dbi"),
// Location: example.Location,
// VaultId: exampleBackupVault.ID(),
// ServerId: exampleFlexibleServer.ID(),
// BackupPolicyId: exampleBackupPolicyMysqlFlexibleServer.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.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Instance MySQL Flexible Servers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupInstanceMysqlFlexibleServer:BackupInstanceMysqlFlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
// ```
type BackupInstanceMysqlFlexibleServer struct {
pulumi.CustomResourceState
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringOutput `pulumi:"backupPolicyId"`
// The location of the source database. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The protection state of the Backup Instance MySQL Flexible Server.
ProtectionState pulumi.StringOutput `pulumi:"protectionState"`
// The ID of the source server. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
// The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupInstanceMysqlFlexibleServer registers a new resource with the given unique name, arguments, and options.
func NewBackupInstanceMysqlFlexibleServer(ctx *pulumi.Context,
name string, args *BackupInstanceMysqlFlexibleServerArgs, opts ...pulumi.ResourceOption) (*BackupInstanceMysqlFlexibleServer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BackupPolicyId == nil {
return nil, errors.New("invalid value for required argument 'BackupPolicyId'")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupInstanceMysqlFlexibleServer
err := ctx.RegisterResource("azure:dataprotection/backupInstanceMysqlFlexibleServer:BackupInstanceMysqlFlexibleServer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupInstanceMysqlFlexibleServer gets an existing BackupInstanceMysqlFlexibleServer resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupInstanceMysqlFlexibleServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupInstanceMysqlFlexibleServerState, opts ...pulumi.ResourceOption) (*BackupInstanceMysqlFlexibleServer, error) {
var resource BackupInstanceMysqlFlexibleServer
err := ctx.ReadResource("azure:dataprotection/backupInstanceMysqlFlexibleServer:BackupInstanceMysqlFlexibleServer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupInstanceMysqlFlexibleServer resources.
type backupInstanceMysqlFlexibleServerState struct {
// The ID of the Backup Policy.
BackupPolicyId *string `pulumi:"backupPolicyId"`
// The location of the source database. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The protection state of the Backup Instance MySQL Flexible Server.
ProtectionState *string `pulumi:"protectionState"`
// The ID of the source server. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
// The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupInstanceMysqlFlexibleServerState struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringPtrInput
// The location of the source database. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The protection state of the Backup Instance MySQL Flexible Server.
ProtectionState pulumi.StringPtrInput
// The ID of the source server. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
// The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringPtrInput
}
func (BackupInstanceMysqlFlexibleServerState) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceMysqlFlexibleServerState)(nil)).Elem()
}
type backupInstanceMysqlFlexibleServerArgs struct {
// The ID of the Backup Policy.
BackupPolicyId string `pulumi:"backupPolicyId"`
// The location of the source database. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the source server. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
// The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupInstanceMysqlFlexibleServer resource.
type BackupInstanceMysqlFlexibleServerArgs struct {
// The ID of the Backup Policy.
BackupPolicyId pulumi.StringInput
// The location of the source database. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the source server. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
// The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
VaultId pulumi.StringInput
}
func (BackupInstanceMysqlFlexibleServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupInstanceMysqlFlexibleServerArgs)(nil)).Elem()
}
type BackupInstanceMysqlFlexibleServerInput interface {
pulumi.Input
ToBackupInstanceMysqlFlexibleServerOutput() BackupInstanceMysqlFlexibleServerOutput
ToBackupInstanceMysqlFlexibleServerOutputWithContext(ctx context.Context) BackupInstanceMysqlFlexibleServerOutput
}
func (*BackupInstanceMysqlFlexibleServer) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceMysqlFlexibleServer)(nil)).Elem()
}
func (i *BackupInstanceMysqlFlexibleServer) ToBackupInstanceMysqlFlexibleServerOutput() BackupInstanceMysqlFlexibleServerOutput {
return i.ToBackupInstanceMysqlFlexibleServerOutputWithContext(context.Background())
}
func (i *BackupInstanceMysqlFlexibleServer) ToBackupInstanceMysqlFlexibleServerOutputWithContext(ctx context.Context) BackupInstanceMysqlFlexibleServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceMysqlFlexibleServerOutput)
}
// BackupInstanceMysqlFlexibleServerArrayInput is an input type that accepts BackupInstanceMysqlFlexibleServerArray and BackupInstanceMysqlFlexibleServerArrayOutput values.
// You can construct a concrete instance of `BackupInstanceMysqlFlexibleServerArrayInput` via:
//
// BackupInstanceMysqlFlexibleServerArray{ BackupInstanceMysqlFlexibleServerArgs{...} }
type BackupInstanceMysqlFlexibleServerArrayInput interface {
pulumi.Input
ToBackupInstanceMysqlFlexibleServerArrayOutput() BackupInstanceMysqlFlexibleServerArrayOutput
ToBackupInstanceMysqlFlexibleServerArrayOutputWithContext(context.Context) BackupInstanceMysqlFlexibleServerArrayOutput
}
type BackupInstanceMysqlFlexibleServerArray []BackupInstanceMysqlFlexibleServerInput
func (BackupInstanceMysqlFlexibleServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceMysqlFlexibleServer)(nil)).Elem()
}
func (i BackupInstanceMysqlFlexibleServerArray) ToBackupInstanceMysqlFlexibleServerArrayOutput() BackupInstanceMysqlFlexibleServerArrayOutput {
return i.ToBackupInstanceMysqlFlexibleServerArrayOutputWithContext(context.Background())
}
func (i BackupInstanceMysqlFlexibleServerArray) ToBackupInstanceMysqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupInstanceMysqlFlexibleServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceMysqlFlexibleServerArrayOutput)
}
// BackupInstanceMysqlFlexibleServerMapInput is an input type that accepts BackupInstanceMysqlFlexibleServerMap and BackupInstanceMysqlFlexibleServerMapOutput values.
// You can construct a concrete instance of `BackupInstanceMysqlFlexibleServerMapInput` via:
//
// BackupInstanceMysqlFlexibleServerMap{ "key": BackupInstanceMysqlFlexibleServerArgs{...} }
type BackupInstanceMysqlFlexibleServerMapInput interface {
pulumi.Input
ToBackupInstanceMysqlFlexibleServerMapOutput() BackupInstanceMysqlFlexibleServerMapOutput
ToBackupInstanceMysqlFlexibleServerMapOutputWithContext(context.Context) BackupInstanceMysqlFlexibleServerMapOutput
}
type BackupInstanceMysqlFlexibleServerMap map[string]BackupInstanceMysqlFlexibleServerInput
func (BackupInstanceMysqlFlexibleServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceMysqlFlexibleServer)(nil)).Elem()
}
func (i BackupInstanceMysqlFlexibleServerMap) ToBackupInstanceMysqlFlexibleServerMapOutput() BackupInstanceMysqlFlexibleServerMapOutput {
return i.ToBackupInstanceMysqlFlexibleServerMapOutputWithContext(context.Background())
}
func (i BackupInstanceMysqlFlexibleServerMap) ToBackupInstanceMysqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupInstanceMysqlFlexibleServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupInstanceMysqlFlexibleServerMapOutput)
}
type BackupInstanceMysqlFlexibleServerOutput struct{ *pulumi.OutputState }
func (BackupInstanceMysqlFlexibleServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupInstanceMysqlFlexibleServer)(nil)).Elem()
}
func (o BackupInstanceMysqlFlexibleServerOutput) ToBackupInstanceMysqlFlexibleServerOutput() BackupInstanceMysqlFlexibleServerOutput {
return o
}
func (o BackupInstanceMysqlFlexibleServerOutput) ToBackupInstanceMysqlFlexibleServerOutputWithContext(ctx context.Context) BackupInstanceMysqlFlexibleServerOutput {
return o
}
// The ID of the Backup Policy.
func (o BackupInstanceMysqlFlexibleServerOutput) BackupPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceMysqlFlexibleServer) pulumi.StringOutput { return v.BackupPolicyId }).(pulumi.StringOutput)
}
// The location of the source database. Changing this forces a new resource to be created.
func (o BackupInstanceMysqlFlexibleServerOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceMysqlFlexibleServer) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created.
func (o BackupInstanceMysqlFlexibleServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceMysqlFlexibleServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The protection state of the Backup Instance MySQL Flexible Server.
func (o BackupInstanceMysqlFlexibleServerOutput) ProtectionState() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceMysqlFlexibleServer) pulumi.StringOutput { return v.ProtectionState }).(pulumi.StringOutput)
}
// The ID of the source server. Changing this forces a new resource to be created.
func (o BackupInstanceMysqlFlexibleServerOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceMysqlFlexibleServer) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
// The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created.
func (o BackupInstanceMysqlFlexibleServerOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupInstanceMysqlFlexibleServer) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupInstanceMysqlFlexibleServerArrayOutput struct{ *pulumi.OutputState }
func (BackupInstanceMysqlFlexibleServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupInstanceMysqlFlexibleServer)(nil)).Elem()
}
func (o BackupInstanceMysqlFlexibleServerArrayOutput) ToBackupInstanceMysqlFlexibleServerArrayOutput() BackupInstanceMysqlFlexibleServerArrayOutput {
return o
}
func (o BackupInstanceMysqlFlexibleServerArrayOutput) ToBackupInstanceMysqlFlexibleServerArrayOutputWithContext(ctx context.Context) BackupInstanceMysqlFlexibleServerArrayOutput {
return o
}
func (o BackupInstanceMysqlFlexibleServerArrayOutput) Index(i pulumi.IntInput) BackupInstanceMysqlFlexibleServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupInstanceMysqlFlexibleServer {
return vs[0].([]*BackupInstanceMysqlFlexibleServer)[vs[1].(int)]
}).(BackupInstanceMysqlFlexibleServerOutput)
}
type BackupInstanceMysqlFlexibleServerMapOutput struct{ *pulumi.OutputState }
func (BackupInstanceMysqlFlexibleServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupInstanceMysqlFlexibleServer)(nil)).Elem()
}
func (o BackupInstanceMysqlFlexibleServerMapOutput) ToBackupInstanceMysqlFlexibleServerMapOutput() BackupInstanceMysqlFlexibleServerMapOutput {
return o
}
func (o BackupInstanceMysqlFlexibleServerMapOutput) ToBackupInstanceMysqlFlexibleServerMapOutputWithContext(ctx context.Context) BackupInstanceMysqlFlexibleServerMapOutput {
return o
}
func (o BackupInstanceMysqlFlexibleServerMapOutput) MapIndex(k pulumi.StringInput) BackupInstanceMysqlFlexibleServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupInstanceMysqlFlexibleServer {
return vs[0].(map[string]*BackupInstanceMysqlFlexibleServer)[vs[1].(string)]
}).(BackupInstanceMysqlFlexibleServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceMysqlFlexibleServerInput)(nil)).Elem(), &BackupInstanceMysqlFlexibleServer{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceMysqlFlexibleServerArrayInput)(nil)).Elem(), BackupInstanceMysqlFlexibleServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupInstanceMysqlFlexibleServerMapInput)(nil)).Elem(), BackupInstanceMysqlFlexibleServerMap{})
pulumi.RegisterOutputType(BackupInstanceMysqlFlexibleServerOutput{})
pulumi.RegisterOutputType(BackupInstanceMysqlFlexibleServerArrayOutput{})
pulumi.RegisterOutputType(BackupInstanceMysqlFlexibleServerMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/backupPolicyBlobStorage.go | sdk/go/azure/dataprotection/backupPolicyBlobStorage.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Backup Policy Blob Storage.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/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
// }
// exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
// Name: pulumi.String("example-backup-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DatastoreType: pulumi.String("VaultStore"),
// Redundancy: pulumi.String("LocallyRedundant"),
// })
// if err != nil {
// return err
// }
// _, err = dataprotection.NewBackupPolicyBlobStorage(ctx, "example", &dataprotection.BackupPolicyBlobStorageArgs{
// Name: pulumi.String("example-backup-policy"),
// VaultId: exampleBackupVault.ID(),
// OperationalDefaultRetentionDuration: pulumi.String("P30D"),
// VaultDefaultRetentionDuration: pulumi.String("P7D"),
// RetentionRules: dataprotection.BackupPolicyBlobStorageRetentionRuleArray{
// &dataprotection.BackupPolicyBlobStorageRetentionRuleArgs{
// Name: pulumi.String("Weekly"),
// Priority: pulumi.Int(20),
// LifeCycle: &dataprotection.BackupPolicyBlobStorageRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P90D"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// Criteria: &dataprotection.BackupPolicyBlobStorageRetentionRuleCriteriaArgs{
// DaysOfWeeks: pulumi.StringArray{
// pulumi.String("Monday"),
// },
// },
// },
// &dataprotection.BackupPolicyBlobStorageRetentionRuleArgs{
// Name: pulumi.String("Monthly"),
// Priority: pulumi.Int(10),
// LifeCycle: &dataprotection.BackupPolicyBlobStorageRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P180D"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// Criteria: &dataprotection.BackupPolicyBlobStorageRetentionRuleCriteriaArgs{
// DaysOfMonths: pulumi.IntArray{
// pulumi.Int(1),
// },
// },
// },
// &dataprotection.BackupPolicyBlobStorageRetentionRuleArgs{
// Name: pulumi.String("Yearly"),
// Priority: pulumi.Int(5),
// LifeCycle: &dataprotection.BackupPolicyBlobStorageRetentionRuleLifeCycleArgs{
// Duration: pulumi.String("P365D"),
// DataStoreType: pulumi.String("VaultStore"),
// },
// Criteria: &dataprotection.BackupPolicyBlobStorageRetentionRuleCriteriaArgs{
// MonthsOfYears: pulumi.StringArray{
// pulumi.String("January"),
// },
// DaysOfMonths: pulumi.IntArray{
// pulumi.Int(1),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataProtection` - 2024-04-01
//
// ## Import
//
// Backup Policy Blob Storages can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1
// ```
type BackupPolicyBlobStorage struct {
pulumi.CustomResourceState
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayOutput `pulumi:"backupRepeatingTimeIntervals"`
// The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
OperationalDefaultRetentionDuration pulumi.StringPtrOutput `pulumi:"operationalDefaultRetentionDuration"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `retentionRule` also requires setting `vaultDefaultRetentionDuration`.
RetentionRules BackupPolicyBlobStorageRetentionRuleArrayOutput `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `vaultDefaultRetentionDuration` also requires setting `backupRepeatingTimeIntervals`. At least one of `operationalDefaultRetentionDuration` or `vaultDefaultRetentionDuration` must be specified.
VaultDefaultRetentionDuration pulumi.StringPtrOutput `pulumi:"vaultDefaultRetentionDuration"`
// The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewBackupPolicyBlobStorage registers a new resource with the given unique name, arguments, and options.
func NewBackupPolicyBlobStorage(ctx *pulumi.Context,
name string, args *BackupPolicyBlobStorageArgs, opts ...pulumi.ResourceOption) (*BackupPolicyBlobStorage, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BackupPolicyBlobStorage
err := ctx.RegisterResource("azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackupPolicyBlobStorage gets an existing BackupPolicyBlobStorage resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackupPolicyBlobStorage(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupPolicyBlobStorageState, opts ...pulumi.ResourceOption) (*BackupPolicyBlobStorage, error) {
var resource BackupPolicyBlobStorage
err := ctx.ReadResource("azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BackupPolicyBlobStorage resources.
type backupPolicyBlobStorageState struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
Name *string `pulumi:"name"`
// The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
OperationalDefaultRetentionDuration *string `pulumi:"operationalDefaultRetentionDuration"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `retentionRule` also requires setting `vaultDefaultRetentionDuration`.
RetentionRules []BackupPolicyBlobStorageRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
TimeZone *string `pulumi:"timeZone"`
// The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `vaultDefaultRetentionDuration` also requires setting `backupRepeatingTimeIntervals`. At least one of `operationalDefaultRetentionDuration` or `vaultDefaultRetentionDuration` must be specified.
VaultDefaultRetentionDuration *string `pulumi:"vaultDefaultRetentionDuration"`
// The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
VaultId *string `pulumi:"vaultId"`
}
type BackupPolicyBlobStorageState struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
Name pulumi.StringPtrInput
// The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
OperationalDefaultRetentionDuration pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `retentionRule` also requires setting `vaultDefaultRetentionDuration`.
RetentionRules BackupPolicyBlobStorageRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
TimeZone pulumi.StringPtrInput
// The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `vaultDefaultRetentionDuration` also requires setting `backupRepeatingTimeIntervals`. At least one of `operationalDefaultRetentionDuration` or `vaultDefaultRetentionDuration` must be specified.
VaultDefaultRetentionDuration pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
VaultId pulumi.StringPtrInput
}
func (BackupPolicyBlobStorageState) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyBlobStorageState)(nil)).Elem()
}
type backupPolicyBlobStorageArgs struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
BackupRepeatingTimeIntervals []string `pulumi:"backupRepeatingTimeIntervals"`
// The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
Name *string `pulumi:"name"`
// The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
OperationalDefaultRetentionDuration *string `pulumi:"operationalDefaultRetentionDuration"`
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `retentionRule` also requires setting `vaultDefaultRetentionDuration`.
RetentionRules []BackupPolicyBlobStorageRetentionRule `pulumi:"retentionRules"`
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
TimeZone *string `pulumi:"timeZone"`
// The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `vaultDefaultRetentionDuration` also requires setting `backupRepeatingTimeIntervals`. At least one of `operationalDefaultRetentionDuration` or `vaultDefaultRetentionDuration` must be specified.
VaultDefaultRetentionDuration *string `pulumi:"vaultDefaultRetentionDuration"`
// The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a BackupPolicyBlobStorage resource.
type BackupPolicyBlobStorageArgs struct {
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
BackupRepeatingTimeIntervals pulumi.StringArrayInput
// The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
Name pulumi.StringPtrInput
// The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
OperationalDefaultRetentionDuration pulumi.StringPtrInput
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `retentionRule` also requires setting `vaultDefaultRetentionDuration`.
RetentionRules BackupPolicyBlobStorageRetentionRuleArrayInput
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
TimeZone pulumi.StringPtrInput
// The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `vaultDefaultRetentionDuration` also requires setting `backupRepeatingTimeIntervals`. At least one of `operationalDefaultRetentionDuration` or `vaultDefaultRetentionDuration` must be specified.
VaultDefaultRetentionDuration pulumi.StringPtrInput
// The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
VaultId pulumi.StringInput
}
func (BackupPolicyBlobStorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupPolicyBlobStorageArgs)(nil)).Elem()
}
type BackupPolicyBlobStorageInput interface {
pulumi.Input
ToBackupPolicyBlobStorageOutput() BackupPolicyBlobStorageOutput
ToBackupPolicyBlobStorageOutputWithContext(ctx context.Context) BackupPolicyBlobStorageOutput
}
func (*BackupPolicyBlobStorage) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyBlobStorage)(nil)).Elem()
}
func (i *BackupPolicyBlobStorage) ToBackupPolicyBlobStorageOutput() BackupPolicyBlobStorageOutput {
return i.ToBackupPolicyBlobStorageOutputWithContext(context.Background())
}
func (i *BackupPolicyBlobStorage) ToBackupPolicyBlobStorageOutputWithContext(ctx context.Context) BackupPolicyBlobStorageOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyBlobStorageOutput)
}
// BackupPolicyBlobStorageArrayInput is an input type that accepts BackupPolicyBlobStorageArray and BackupPolicyBlobStorageArrayOutput values.
// You can construct a concrete instance of `BackupPolicyBlobStorageArrayInput` via:
//
// BackupPolicyBlobStorageArray{ BackupPolicyBlobStorageArgs{...} }
type BackupPolicyBlobStorageArrayInput interface {
pulumi.Input
ToBackupPolicyBlobStorageArrayOutput() BackupPolicyBlobStorageArrayOutput
ToBackupPolicyBlobStorageArrayOutputWithContext(context.Context) BackupPolicyBlobStorageArrayOutput
}
type BackupPolicyBlobStorageArray []BackupPolicyBlobStorageInput
func (BackupPolicyBlobStorageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyBlobStorage)(nil)).Elem()
}
func (i BackupPolicyBlobStorageArray) ToBackupPolicyBlobStorageArrayOutput() BackupPolicyBlobStorageArrayOutput {
return i.ToBackupPolicyBlobStorageArrayOutputWithContext(context.Background())
}
func (i BackupPolicyBlobStorageArray) ToBackupPolicyBlobStorageArrayOutputWithContext(ctx context.Context) BackupPolicyBlobStorageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyBlobStorageArrayOutput)
}
// BackupPolicyBlobStorageMapInput is an input type that accepts BackupPolicyBlobStorageMap and BackupPolicyBlobStorageMapOutput values.
// You can construct a concrete instance of `BackupPolicyBlobStorageMapInput` via:
//
// BackupPolicyBlobStorageMap{ "key": BackupPolicyBlobStorageArgs{...} }
type BackupPolicyBlobStorageMapInput interface {
pulumi.Input
ToBackupPolicyBlobStorageMapOutput() BackupPolicyBlobStorageMapOutput
ToBackupPolicyBlobStorageMapOutputWithContext(context.Context) BackupPolicyBlobStorageMapOutput
}
type BackupPolicyBlobStorageMap map[string]BackupPolicyBlobStorageInput
func (BackupPolicyBlobStorageMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyBlobStorage)(nil)).Elem()
}
func (i BackupPolicyBlobStorageMap) ToBackupPolicyBlobStorageMapOutput() BackupPolicyBlobStorageMapOutput {
return i.ToBackupPolicyBlobStorageMapOutputWithContext(context.Background())
}
func (i BackupPolicyBlobStorageMap) ToBackupPolicyBlobStorageMapOutputWithContext(ctx context.Context) BackupPolicyBlobStorageMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupPolicyBlobStorageMapOutput)
}
type BackupPolicyBlobStorageOutput struct{ *pulumi.OutputState }
func (BackupPolicyBlobStorageOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BackupPolicyBlobStorage)(nil)).Elem()
}
func (o BackupPolicyBlobStorageOutput) ToBackupPolicyBlobStorageOutput() BackupPolicyBlobStorageOutput {
return o
}
func (o BackupPolicyBlobStorageOutput) ToBackupPolicyBlobStorageOutputWithContext(ctx context.Context) BackupPolicyBlobStorageOutput {
return o
}
// Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageOutput) BackupRepeatingTimeIntervals() pulumi.StringArrayOutput {
return o.ApplyT(func(v *BackupPolicyBlobStorage) pulumi.StringArrayOutput { return v.BackupRepeatingTimeIntervals }).(pulumi.StringArrayOutput)
}
// The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyBlobStorage) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageOutput) OperationalDefaultRetentionDuration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyBlobStorage) pulumi.StringPtrOutput { return v.OperationalDefaultRetentionDuration }).(pulumi.StringPtrOutput)
}
// One or more `retentionRule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `retentionRule` also requires setting `vaultDefaultRetentionDuration`.
func (o BackupPolicyBlobStorageOutput) RetentionRules() BackupPolicyBlobStorageRetentionRuleArrayOutput {
return o.ApplyT(func(v *BackupPolicyBlobStorage) BackupPolicyBlobStorageRetentionRuleArrayOutput {
return v.RetentionRules
}).(BackupPolicyBlobStorageRetentionRuleArrayOutput)
}
// Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyBlobStorage) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
//
// > **Note:** Setting `vaultDefaultRetentionDuration` also requires setting `backupRepeatingTimeIntervals`. At least one of `operationalDefaultRetentionDuration` or `vaultDefaultRetentionDuration` must be specified.
func (o BackupPolicyBlobStorageOutput) VaultDefaultRetentionDuration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BackupPolicyBlobStorage) pulumi.StringPtrOutput { return v.VaultDefaultRetentionDuration }).(pulumi.StringPtrOutput)
}
// The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
func (o BackupPolicyBlobStorageOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *BackupPolicyBlobStorage) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type BackupPolicyBlobStorageArrayOutput struct{ *pulumi.OutputState }
func (BackupPolicyBlobStorageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BackupPolicyBlobStorage)(nil)).Elem()
}
func (o BackupPolicyBlobStorageArrayOutput) ToBackupPolicyBlobStorageArrayOutput() BackupPolicyBlobStorageArrayOutput {
return o
}
func (o BackupPolicyBlobStorageArrayOutput) ToBackupPolicyBlobStorageArrayOutputWithContext(ctx context.Context) BackupPolicyBlobStorageArrayOutput {
return o
}
func (o BackupPolicyBlobStorageArrayOutput) Index(i pulumi.IntInput) BackupPolicyBlobStorageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackupPolicyBlobStorage {
return vs[0].([]*BackupPolicyBlobStorage)[vs[1].(int)]
}).(BackupPolicyBlobStorageOutput)
}
type BackupPolicyBlobStorageMapOutput struct{ *pulumi.OutputState }
func (BackupPolicyBlobStorageMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BackupPolicyBlobStorage)(nil)).Elem()
}
func (o BackupPolicyBlobStorageMapOutput) ToBackupPolicyBlobStorageMapOutput() BackupPolicyBlobStorageMapOutput {
return o
}
func (o BackupPolicyBlobStorageMapOutput) ToBackupPolicyBlobStorageMapOutputWithContext(ctx context.Context) BackupPolicyBlobStorageMapOutput {
return o
}
func (o BackupPolicyBlobStorageMapOutput) MapIndex(k pulumi.StringInput) BackupPolicyBlobStorageOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackupPolicyBlobStorage {
return vs[0].(map[string]*BackupPolicyBlobStorage)[vs[1].(string)]
}).(BackupPolicyBlobStorageOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyBlobStorageInput)(nil)).Elem(), &BackupPolicyBlobStorage{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyBlobStorageArrayInput)(nil)).Elem(), BackupPolicyBlobStorageArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupPolicyBlobStorageMapInput)(nil)).Elem(), BackupPolicyBlobStorageMap{})
pulumi.RegisterOutputType(BackupPolicyBlobStorageOutput{})
pulumi.RegisterOutputType(BackupPolicyBlobStorageArrayOutput{})
pulumi.RegisterOutputType(BackupPolicyBlobStorageMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dataprotection/getBackupVault.go | sdk/go/azure/dataprotection/getBackupVault.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dataprotection
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 Backup Vault.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := dataprotection.LookupBackupVault(ctx, &dataprotection.LookupBackupVaultArgs{
// Name: "existing-backup-vault",
// ResourceGroupName: "existing-resource-group",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("azurermDataProtectionBackupVaultId", exampleAzurermVpnGateway.Id)
// ctx.Export("azurermDataProtectionBackupVaultPrincipalId", example.Identities[0].PrincipalId)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DataProtection` - 2024-04-01
func LookupBackupVault(ctx *pulumi.Context, args *LookupBackupVaultArgs, opts ...pulumi.InvokeOption) (*LookupBackupVaultResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupBackupVaultResult
err := ctx.Invoke("azure:dataprotection/getBackupVault:getBackupVault", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getBackupVault.
type LookupBackupVaultArgs struct {
// Specifies the name of the Backup Vault.
Name string `pulumi:"name"`
// The name of the Resource Group where the Backup Vault exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getBackupVault.
type LookupBackupVaultResult struct {
// Specifies the type of the data store.
DatastoreType string `pulumi:"datastoreType"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `identity` block as defined below.
Identities []GetBackupVaultIdentity `pulumi:"identities"`
// The Azure Region where the Backup Vault exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// Specifies the backup storage redundancy.
Redundancy string `pulumi:"redundancy"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which are assigned to the Backup Vault.
Tags map[string]string `pulumi:"tags"`
}
func LookupBackupVaultOutput(ctx *pulumi.Context, args LookupBackupVaultOutputArgs, opts ...pulumi.InvokeOption) LookupBackupVaultResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupBackupVaultResultOutput, error) {
args := v.(LookupBackupVaultArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:dataprotection/getBackupVault:getBackupVault", args, LookupBackupVaultResultOutput{}, options).(LookupBackupVaultResultOutput), nil
}).(LookupBackupVaultResultOutput)
}
// A collection of arguments for invoking getBackupVault.
type LookupBackupVaultOutputArgs struct {
// Specifies the name of the Backup Vault.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Backup Vault exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupBackupVaultOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBackupVaultArgs)(nil)).Elem()
}
// A collection of values returned by getBackupVault.
type LookupBackupVaultResultOutput struct{ *pulumi.OutputState }
func (LookupBackupVaultResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBackupVaultResult)(nil)).Elem()
}
func (o LookupBackupVaultResultOutput) ToLookupBackupVaultResultOutput() LookupBackupVaultResultOutput {
return o
}
func (o LookupBackupVaultResultOutput) ToLookupBackupVaultResultOutputWithContext(ctx context.Context) LookupBackupVaultResultOutput {
return o
}
// Specifies the type of the data store.
func (o LookupBackupVaultResultOutput) DatastoreType() pulumi.StringOutput {
return o.ApplyT(func(v LookupBackupVaultResult) string { return v.DatastoreType }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupBackupVaultResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupBackupVaultResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `identity` block as defined below.
func (o LookupBackupVaultResultOutput) Identities() GetBackupVaultIdentityArrayOutput {
return o.ApplyT(func(v LookupBackupVaultResult) []GetBackupVaultIdentity { return v.Identities }).(GetBackupVaultIdentityArrayOutput)
}
// The Azure Region where the Backup Vault exists.
func (o LookupBackupVaultResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupBackupVaultResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupBackupVaultResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupBackupVaultResult) string { return v.Name }).(pulumi.StringOutput)
}
// Specifies the backup storage redundancy.
func (o LookupBackupVaultResultOutput) Redundancy() pulumi.StringOutput {
return o.ApplyT(func(v LookupBackupVaultResult) string { return v.Redundancy }).(pulumi.StringOutput)
}
func (o LookupBackupVaultResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupBackupVaultResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which are assigned to the Backup Vault.
func (o LookupBackupVaultResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupBackupVaultResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupBackupVaultResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/init.go | sdk/go/azure/datashare/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 datashare
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:datashare/account:Account":
r = &Account{}
case "azure:datashare/datasetBlobStorage:DatasetBlobStorage":
r = &DatasetBlobStorage{}
case "azure:datashare/datasetDataLakeGen2:DatasetDataLakeGen2":
r = &DatasetDataLakeGen2{}
case "azure:datashare/datasetKustoCluster:DatasetKustoCluster":
r = &DatasetKustoCluster{}
case "azure:datashare/datasetKustoDatabase:DatasetKustoDatabase":
r = &DatasetKustoDatabase{}
case "azure:datashare/share:Share":
r = &Share{}
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",
"datashare/account",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"datashare/datasetBlobStorage",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"datashare/datasetDataLakeGen2",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"datashare/datasetKustoCluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"datashare/datasetKustoDatabase",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"datashare/share",
&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/datashare/share.go | sdk/go/azure/datashare/share.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Share.
//
// ## 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/datashare"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := datashare.NewAccount(ctx, "example", &datashare.AccountArgs{
// Name: pulumi.String("example-dsa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Identity: &datashare.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// })
// if err != nil {
// return err
// }
// _, err = datashare.NewShare(ctx, "example", &datashare.ShareArgs{
// Name: pulumi.String("example_dss"),
// AccountId: exampleAccount.ID(),
// Kind: pulumi.String("CopyBased"),
// Description: pulumi.String("example desc"),
// Terms: pulumi.String("example terms"),
// SnapshotSchedule: &datashare.ShareSnapshotScheduleArgs{
// Name: pulumi.String("example-ss"),
// Recurrence: pulumi.String("Day"),
// StartTime: pulumi.String("2020-04-17T04:47:52.9614956Z"),
// },
// })
// if 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.DataShare` - 2019-11-01
//
// ## Import
//
// Data Shares can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:datashare/share:Share example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1
// ```
type Share struct {
pulumi.CustomResourceState
// The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
AccountId pulumi.StringOutput `pulumi:"accountId"`
// The Data Share's description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
Kind pulumi.StringOutput `pulumi:"kind"`
// The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `snapshotSchedule` block as defined below.
SnapshotSchedule ShareSnapshotSchedulePtrOutput `pulumi:"snapshotSchedule"`
// The terms of the Data Share.
Terms pulumi.StringPtrOutput `pulumi:"terms"`
}
// NewShare registers a new resource with the given unique name, arguments, and options.
func NewShare(ctx *pulumi.Context,
name string, args *ShareArgs, opts ...pulumi.ResourceOption) (*Share, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccountId == nil {
return nil, errors.New("invalid value for required argument 'AccountId'")
}
if args.Kind == nil {
return nil, errors.New("invalid value for required argument 'Kind'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Share
err := ctx.RegisterResource("azure:datashare/share:Share", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetShare gets an existing Share resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetShare(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ShareState, opts ...pulumi.ResourceOption) (*Share, error) {
var resource Share
err := ctx.ReadResource("azure:datashare/share:Share", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Share resources.
type shareState struct {
// The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
AccountId *string `pulumi:"accountId"`
// The Data Share's description.
Description *string `pulumi:"description"`
// The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
Kind *string `pulumi:"kind"`
// The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
Name *string `pulumi:"name"`
// A `snapshotSchedule` block as defined below.
SnapshotSchedule *ShareSnapshotSchedule `pulumi:"snapshotSchedule"`
// The terms of the Data Share.
Terms *string `pulumi:"terms"`
}
type ShareState struct {
// The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
AccountId pulumi.StringPtrInput
// The Data Share's description.
Description pulumi.StringPtrInput
// The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
Kind pulumi.StringPtrInput
// The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
Name pulumi.StringPtrInput
// A `snapshotSchedule` block as defined below.
SnapshotSchedule ShareSnapshotSchedulePtrInput
// The terms of the Data Share.
Terms pulumi.StringPtrInput
}
func (ShareState) ElementType() reflect.Type {
return reflect.TypeOf((*shareState)(nil)).Elem()
}
type shareArgs struct {
// The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
AccountId string `pulumi:"accountId"`
// The Data Share's description.
Description *string `pulumi:"description"`
// The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
Kind string `pulumi:"kind"`
// The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
Name *string `pulumi:"name"`
// A `snapshotSchedule` block as defined below.
SnapshotSchedule *ShareSnapshotSchedule `pulumi:"snapshotSchedule"`
// The terms of the Data Share.
Terms *string `pulumi:"terms"`
}
// The set of arguments for constructing a Share resource.
type ShareArgs struct {
// The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
AccountId pulumi.StringInput
// The Data Share's description.
Description pulumi.StringPtrInput
// The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
Kind pulumi.StringInput
// The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
Name pulumi.StringPtrInput
// A `snapshotSchedule` block as defined below.
SnapshotSchedule ShareSnapshotSchedulePtrInput
// The terms of the Data Share.
Terms pulumi.StringPtrInput
}
func (ShareArgs) ElementType() reflect.Type {
return reflect.TypeOf((*shareArgs)(nil)).Elem()
}
type ShareInput interface {
pulumi.Input
ToShareOutput() ShareOutput
ToShareOutputWithContext(ctx context.Context) ShareOutput
}
func (*Share) ElementType() reflect.Type {
return reflect.TypeOf((**Share)(nil)).Elem()
}
func (i *Share) ToShareOutput() ShareOutput {
return i.ToShareOutputWithContext(context.Background())
}
func (i *Share) ToShareOutputWithContext(ctx context.Context) ShareOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareOutput)
}
// ShareArrayInput is an input type that accepts ShareArray and ShareArrayOutput values.
// You can construct a concrete instance of `ShareArrayInput` via:
//
// ShareArray{ ShareArgs{...} }
type ShareArrayInput interface {
pulumi.Input
ToShareArrayOutput() ShareArrayOutput
ToShareArrayOutputWithContext(context.Context) ShareArrayOutput
}
type ShareArray []ShareInput
func (ShareArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Share)(nil)).Elem()
}
func (i ShareArray) ToShareArrayOutput() ShareArrayOutput {
return i.ToShareArrayOutputWithContext(context.Background())
}
func (i ShareArray) ToShareArrayOutputWithContext(ctx context.Context) ShareArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareArrayOutput)
}
// ShareMapInput is an input type that accepts ShareMap and ShareMapOutput values.
// You can construct a concrete instance of `ShareMapInput` via:
//
// ShareMap{ "key": ShareArgs{...} }
type ShareMapInput interface {
pulumi.Input
ToShareMapOutput() ShareMapOutput
ToShareMapOutputWithContext(context.Context) ShareMapOutput
}
type ShareMap map[string]ShareInput
func (ShareMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Share)(nil)).Elem()
}
func (i ShareMap) ToShareMapOutput() ShareMapOutput {
return i.ToShareMapOutputWithContext(context.Background())
}
func (i ShareMap) ToShareMapOutputWithContext(ctx context.Context) ShareMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareMapOutput)
}
type ShareOutput struct{ *pulumi.OutputState }
func (ShareOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Share)(nil)).Elem()
}
func (o ShareOutput) ToShareOutput() ShareOutput {
return o
}
func (o ShareOutput) ToShareOutputWithContext(ctx context.Context) ShareOutput {
return o
}
// The ID of the Data Share account in which the Data Share is created. Changing this forces a new Data Share to be created.
func (o ShareOutput) AccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Share) pulumi.StringOutput { return v.AccountId }).(pulumi.StringOutput)
}
// The Data Share's description.
func (o ShareOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Share) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The kind of the Data Share. Possible values are `CopyBased` and `InPlace`. Changing this forces a new Data Share to be created.
func (o ShareOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v *Share) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput)
}
// The name which should be used for this Data Share. Changing this forces a new Data Share to be created.
func (o ShareOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Share) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `snapshotSchedule` block as defined below.
func (o ShareOutput) SnapshotSchedule() ShareSnapshotSchedulePtrOutput {
return o.ApplyT(func(v *Share) ShareSnapshotSchedulePtrOutput { return v.SnapshotSchedule }).(ShareSnapshotSchedulePtrOutput)
}
// The terms of the Data Share.
func (o ShareOutput) Terms() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Share) pulumi.StringPtrOutput { return v.Terms }).(pulumi.StringPtrOutput)
}
type ShareArrayOutput struct{ *pulumi.OutputState }
func (ShareArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Share)(nil)).Elem()
}
func (o ShareArrayOutput) ToShareArrayOutput() ShareArrayOutput {
return o
}
func (o ShareArrayOutput) ToShareArrayOutputWithContext(ctx context.Context) ShareArrayOutput {
return o
}
func (o ShareArrayOutput) Index(i pulumi.IntInput) ShareOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Share {
return vs[0].([]*Share)[vs[1].(int)]
}).(ShareOutput)
}
type ShareMapOutput struct{ *pulumi.OutputState }
func (ShareMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Share)(nil)).Elem()
}
func (o ShareMapOutput) ToShareMapOutput() ShareMapOutput {
return o
}
func (o ShareMapOutput) ToShareMapOutputWithContext(ctx context.Context) ShareMapOutput {
return o
}
func (o ShareMapOutput) MapIndex(k pulumi.StringInput) ShareOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Share {
return vs[0].(map[string]*Share)[vs[1].(string)]
}).(ShareOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ShareInput)(nil)).Elem(), &Share{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareArrayInput)(nil)).Elem(), ShareArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareMapInput)(nil)).Elem(), ShareMap{})
pulumi.RegisterOutputType(ShareOutput{})
pulumi.RegisterOutputType(ShareArrayOutput{})
pulumi.RegisterOutputType(ShareMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/getDatasetBlobStorage.go | sdk/go/azure/datashare/getDatasetBlobStorage.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
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 Data Share Blob Storage Dataset.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := datashare.LookupDatasetBlobStorage(ctx, &datashare.LookupDatasetBlobStorageArgs{
// Name: "example-dsbsds",
// DataShareId: "example-share-id",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DataShare` - 2019-11-01
func LookupDatasetBlobStorage(ctx *pulumi.Context, args *LookupDatasetBlobStorageArgs, opts ...pulumi.InvokeOption) (*LookupDatasetBlobStorageResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDatasetBlobStorageResult
err := ctx.Invoke("azure:datashare/getDatasetBlobStorage:getDatasetBlobStorage", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDatasetBlobStorage.
type LookupDatasetBlobStorageArgs struct {
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created.
DataShareId string `pulumi:"dataShareId"`
// The name of this Data Share Blob Storage Dataset.
Name string `pulumi:"name"`
}
// A collection of values returned by getDatasetBlobStorage.
type LookupDatasetBlobStorageResult struct {
// The name of the storage account container to be shared with the receiver.
ContainerName string `pulumi:"containerName"`
DataShareId string `pulumi:"dataShareId"`
// The name of the Data Share Dataset.
DisplayName string `pulumi:"displayName"`
// The path of the file in the storage container to be shared with the receiver.
FilePath string `pulumi:"filePath"`
// The folder path of the file in the storage container to be shared with the receiver.
FolderPath string `pulumi:"folderPath"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The name of the storage account to be shared with the receiver.
Name string `pulumi:"name"`
// A `storageAccount` block as defined below.
StorageAccounts []GetDatasetBlobStorageStorageAccount `pulumi:"storageAccounts"`
}
func LookupDatasetBlobStorageOutput(ctx *pulumi.Context, args LookupDatasetBlobStorageOutputArgs, opts ...pulumi.InvokeOption) LookupDatasetBlobStorageResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDatasetBlobStorageResultOutput, error) {
args := v.(LookupDatasetBlobStorageArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:datashare/getDatasetBlobStorage:getDatasetBlobStorage", args, LookupDatasetBlobStorageResultOutput{}, options).(LookupDatasetBlobStorageResultOutput), nil
}).(LookupDatasetBlobStorageResultOutput)
}
// A collection of arguments for invoking getDatasetBlobStorage.
type LookupDatasetBlobStorageOutputArgs struct {
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created.
DataShareId pulumi.StringInput `pulumi:"dataShareId"`
// The name of this Data Share Blob Storage Dataset.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupDatasetBlobStorageOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetBlobStorageArgs)(nil)).Elem()
}
// A collection of values returned by getDatasetBlobStorage.
type LookupDatasetBlobStorageResultOutput struct{ *pulumi.OutputState }
func (LookupDatasetBlobStorageResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetBlobStorageResult)(nil)).Elem()
}
func (o LookupDatasetBlobStorageResultOutput) ToLookupDatasetBlobStorageResultOutput() LookupDatasetBlobStorageResultOutput {
return o
}
func (o LookupDatasetBlobStorageResultOutput) ToLookupDatasetBlobStorageResultOutputWithContext(ctx context.Context) LookupDatasetBlobStorageResultOutput {
return o
}
// The name of the storage account container to be shared with the receiver.
func (o LookupDatasetBlobStorageResultOutput) ContainerName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) string { return v.ContainerName }).(pulumi.StringOutput)
}
func (o LookupDatasetBlobStorageResultOutput) DataShareId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) string { return v.DataShareId }).(pulumi.StringOutput)
}
// The name of the Data Share Dataset.
func (o LookupDatasetBlobStorageResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The path of the file in the storage container to be shared with the receiver.
func (o LookupDatasetBlobStorageResultOutput) FilePath() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) string { return v.FilePath }).(pulumi.StringOutput)
}
// The folder path of the file in the storage container to be shared with the receiver.
func (o LookupDatasetBlobStorageResultOutput) FolderPath() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) string { return v.FolderPath }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDatasetBlobStorageResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) string { return v.Id }).(pulumi.StringOutput)
}
// The name of the storage account to be shared with the receiver.
func (o LookupDatasetBlobStorageResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `storageAccount` block as defined below.
func (o LookupDatasetBlobStorageResultOutput) StorageAccounts() GetDatasetBlobStorageStorageAccountArrayOutput {
return o.ApplyT(func(v LookupDatasetBlobStorageResult) []GetDatasetBlobStorageStorageAccount { return v.StorageAccounts }).(GetDatasetBlobStorageStorageAccountArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDatasetBlobStorageResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/pulumiTypes.go | sdk/go/azure/datashare/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 datashare
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type AccountIdentity struct {
// The Principal ID for the Service Principal associated with the Identity of this Data Share Account.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Identity of this Data Share Account.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Data Share Account. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Data Share Account has been created. More details are available below.
Type string `pulumi:"type"`
}
// AccountIdentityInput is an input type that accepts AccountIdentityArgs and AccountIdentityOutput values.
// You can construct a concrete instance of `AccountIdentityInput` via:
//
// AccountIdentityArgs{...}
type AccountIdentityInput interface {
pulumi.Input
ToAccountIdentityOutput() AccountIdentityOutput
ToAccountIdentityOutputWithContext(context.Context) AccountIdentityOutput
}
type AccountIdentityArgs struct {
// The Principal ID for the Service Principal associated with the Identity of this Data Share Account.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Identity of this Data Share Account.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Data Share Account. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Data Share Account has been created. More details are available below.
Type pulumi.StringInput `pulumi:"type"`
}
func (AccountIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountIdentity)(nil)).Elem()
}
func (i AccountIdentityArgs) ToAccountIdentityOutput() AccountIdentityOutput {
return i.ToAccountIdentityOutputWithContext(context.Background())
}
func (i AccountIdentityArgs) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput)
}
func (i AccountIdentityArgs) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return i.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (i AccountIdentityArgs) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput).ToAccountIdentityPtrOutputWithContext(ctx)
}
// AccountIdentityPtrInput is an input type that accepts AccountIdentityArgs, AccountIdentityPtr and AccountIdentityPtrOutput values.
// You can construct a concrete instance of `AccountIdentityPtrInput` via:
//
// AccountIdentityArgs{...}
//
// or:
//
// nil
type AccountIdentityPtrInput interface {
pulumi.Input
ToAccountIdentityPtrOutput() AccountIdentityPtrOutput
ToAccountIdentityPtrOutputWithContext(context.Context) AccountIdentityPtrOutput
}
type accountIdentityPtrType AccountIdentityArgs
func AccountIdentityPtr(v *AccountIdentityArgs) AccountIdentityPtrInput {
return (*accountIdentityPtrType)(v)
}
func (*accountIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIdentity)(nil)).Elem()
}
func (i *accountIdentityPtrType) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return i.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (i *accountIdentityPtrType) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityPtrOutput)
}
type AccountIdentityOutput struct{ *pulumi.OutputState }
func (AccountIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountIdentity)(nil)).Elem()
}
func (o AccountIdentityOutput) ToAccountIdentityOutput() AccountIdentityOutput {
return o
}
func (o AccountIdentityOutput) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput {
return o
}
func (o AccountIdentityOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return o.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (o AccountIdentityOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountIdentity) *AccountIdentity {
return &v
}).(AccountIdentityPtrOutput)
}
// The Principal ID for the Service Principal associated with the Identity of this Data Share Account.
func (o AccountIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Identity of this Data Share Account.
func (o AccountIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Data Share Account. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Data Share Account has been created. More details are available below.
func (o AccountIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v AccountIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type AccountIdentityPtrOutput struct{ *pulumi.OutputState }
func (AccountIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIdentity)(nil)).Elem()
}
func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return o
}
func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return o
}
func (o AccountIdentityPtrOutput) Elem() AccountIdentityOutput {
return o.ApplyT(func(v *AccountIdentity) AccountIdentity {
if v != nil {
return *v
}
var ret AccountIdentity
return ret
}).(AccountIdentityOutput)
}
// The Principal ID for the Service Principal associated with the Identity of this Data Share Account.
func (o AccountIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Identity of this Data Share Account.
func (o AccountIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Data Share Account. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Data Share Account has been created. More details are available below.
func (o AccountIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type DatasetBlobStorageStorageAccount struct {
// The name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
Name string `pulumi:"name"`
// The resource group name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The subscription id of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
SubscriptionId string `pulumi:"subscriptionId"`
}
// DatasetBlobStorageStorageAccountInput is an input type that accepts DatasetBlobStorageStorageAccountArgs and DatasetBlobStorageStorageAccountOutput values.
// You can construct a concrete instance of `DatasetBlobStorageStorageAccountInput` via:
//
// DatasetBlobStorageStorageAccountArgs{...}
type DatasetBlobStorageStorageAccountInput interface {
pulumi.Input
ToDatasetBlobStorageStorageAccountOutput() DatasetBlobStorageStorageAccountOutput
ToDatasetBlobStorageStorageAccountOutputWithContext(context.Context) DatasetBlobStorageStorageAccountOutput
}
type DatasetBlobStorageStorageAccountArgs struct {
// The name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
Name pulumi.StringInput `pulumi:"name"`
// The resource group name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The subscription id of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
SubscriptionId pulumi.StringInput `pulumi:"subscriptionId"`
}
func (DatasetBlobStorageStorageAccountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DatasetBlobStorageStorageAccount)(nil)).Elem()
}
func (i DatasetBlobStorageStorageAccountArgs) ToDatasetBlobStorageStorageAccountOutput() DatasetBlobStorageStorageAccountOutput {
return i.ToDatasetBlobStorageStorageAccountOutputWithContext(context.Background())
}
func (i DatasetBlobStorageStorageAccountArgs) ToDatasetBlobStorageStorageAccountOutputWithContext(ctx context.Context) DatasetBlobStorageStorageAccountOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetBlobStorageStorageAccountOutput)
}
func (i DatasetBlobStorageStorageAccountArgs) ToDatasetBlobStorageStorageAccountPtrOutput() DatasetBlobStorageStorageAccountPtrOutput {
return i.ToDatasetBlobStorageStorageAccountPtrOutputWithContext(context.Background())
}
func (i DatasetBlobStorageStorageAccountArgs) ToDatasetBlobStorageStorageAccountPtrOutputWithContext(ctx context.Context) DatasetBlobStorageStorageAccountPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetBlobStorageStorageAccountOutput).ToDatasetBlobStorageStorageAccountPtrOutputWithContext(ctx)
}
// DatasetBlobStorageStorageAccountPtrInput is an input type that accepts DatasetBlobStorageStorageAccountArgs, DatasetBlobStorageStorageAccountPtr and DatasetBlobStorageStorageAccountPtrOutput values.
// You can construct a concrete instance of `DatasetBlobStorageStorageAccountPtrInput` via:
//
// DatasetBlobStorageStorageAccountArgs{...}
//
// or:
//
// nil
type DatasetBlobStorageStorageAccountPtrInput interface {
pulumi.Input
ToDatasetBlobStorageStorageAccountPtrOutput() DatasetBlobStorageStorageAccountPtrOutput
ToDatasetBlobStorageStorageAccountPtrOutputWithContext(context.Context) DatasetBlobStorageStorageAccountPtrOutput
}
type datasetBlobStorageStorageAccountPtrType DatasetBlobStorageStorageAccountArgs
func DatasetBlobStorageStorageAccountPtr(v *DatasetBlobStorageStorageAccountArgs) DatasetBlobStorageStorageAccountPtrInput {
return (*datasetBlobStorageStorageAccountPtrType)(v)
}
func (*datasetBlobStorageStorageAccountPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetBlobStorageStorageAccount)(nil)).Elem()
}
func (i *datasetBlobStorageStorageAccountPtrType) ToDatasetBlobStorageStorageAccountPtrOutput() DatasetBlobStorageStorageAccountPtrOutput {
return i.ToDatasetBlobStorageStorageAccountPtrOutputWithContext(context.Background())
}
func (i *datasetBlobStorageStorageAccountPtrType) ToDatasetBlobStorageStorageAccountPtrOutputWithContext(ctx context.Context) DatasetBlobStorageStorageAccountPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetBlobStorageStorageAccountPtrOutput)
}
type DatasetBlobStorageStorageAccountOutput struct{ *pulumi.OutputState }
func (DatasetBlobStorageStorageAccountOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DatasetBlobStorageStorageAccount)(nil)).Elem()
}
func (o DatasetBlobStorageStorageAccountOutput) ToDatasetBlobStorageStorageAccountOutput() DatasetBlobStorageStorageAccountOutput {
return o
}
func (o DatasetBlobStorageStorageAccountOutput) ToDatasetBlobStorageStorageAccountOutputWithContext(ctx context.Context) DatasetBlobStorageStorageAccountOutput {
return o
}
func (o DatasetBlobStorageStorageAccountOutput) ToDatasetBlobStorageStorageAccountPtrOutput() DatasetBlobStorageStorageAccountPtrOutput {
return o.ToDatasetBlobStorageStorageAccountPtrOutputWithContext(context.Background())
}
func (o DatasetBlobStorageStorageAccountOutput) ToDatasetBlobStorageStorageAccountPtrOutputWithContext(ctx context.Context) DatasetBlobStorageStorageAccountPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DatasetBlobStorageStorageAccount) *DatasetBlobStorageStorageAccount {
return &v
}).(DatasetBlobStorageStorageAccountPtrOutput)
}
// The name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageStorageAccountOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v DatasetBlobStorageStorageAccount) string { return v.Name }).(pulumi.StringOutput)
}
// The resource group name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageStorageAccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v DatasetBlobStorageStorageAccount) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The subscription id of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageStorageAccountOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v DatasetBlobStorageStorageAccount) string { return v.SubscriptionId }).(pulumi.StringOutput)
}
type DatasetBlobStorageStorageAccountPtrOutput struct{ *pulumi.OutputState }
func (DatasetBlobStorageStorageAccountPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetBlobStorageStorageAccount)(nil)).Elem()
}
func (o DatasetBlobStorageStorageAccountPtrOutput) ToDatasetBlobStorageStorageAccountPtrOutput() DatasetBlobStorageStorageAccountPtrOutput {
return o
}
func (o DatasetBlobStorageStorageAccountPtrOutput) ToDatasetBlobStorageStorageAccountPtrOutputWithContext(ctx context.Context) DatasetBlobStorageStorageAccountPtrOutput {
return o
}
func (o DatasetBlobStorageStorageAccountPtrOutput) Elem() DatasetBlobStorageStorageAccountOutput {
return o.ApplyT(func(v *DatasetBlobStorageStorageAccount) DatasetBlobStorageStorageAccount {
if v != nil {
return *v
}
var ret DatasetBlobStorageStorageAccount
return ret
}).(DatasetBlobStorageStorageAccountOutput)
}
// The name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageStorageAccountPtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatasetBlobStorageStorageAccount) *string {
if v == nil {
return nil
}
return &v.Name
}).(pulumi.StringPtrOutput)
}
// The resource group name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageStorageAccountPtrOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatasetBlobStorageStorageAccount) *string {
if v == nil {
return nil
}
return &v.ResourceGroupName
}).(pulumi.StringPtrOutput)
}
// The subscription id of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageStorageAccountPtrOutput) SubscriptionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatasetBlobStorageStorageAccount) *string {
if v == nil {
return nil
}
return &v.SubscriptionId
}).(pulumi.StringPtrOutput)
}
type ShareSnapshotSchedule struct {
// The name of the snapshot schedule.
Name string `pulumi:"name"`
// The interval of the synchronization with the source data. Possible values are `Hour` and `Day`.
Recurrence string `pulumi:"recurrence"`
// The synchronization with the source data's start time.
StartTime string `pulumi:"startTime"`
}
// ShareSnapshotScheduleInput is an input type that accepts ShareSnapshotScheduleArgs and ShareSnapshotScheduleOutput values.
// You can construct a concrete instance of `ShareSnapshotScheduleInput` via:
//
// ShareSnapshotScheduleArgs{...}
type ShareSnapshotScheduleInput interface {
pulumi.Input
ToShareSnapshotScheduleOutput() ShareSnapshotScheduleOutput
ToShareSnapshotScheduleOutputWithContext(context.Context) ShareSnapshotScheduleOutput
}
type ShareSnapshotScheduleArgs struct {
// The name of the snapshot schedule.
Name pulumi.StringInput `pulumi:"name"`
// The interval of the synchronization with the source data. Possible values are `Hour` and `Day`.
Recurrence pulumi.StringInput `pulumi:"recurrence"`
// The synchronization with the source data's start time.
StartTime pulumi.StringInput `pulumi:"startTime"`
}
func (ShareSnapshotScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ShareSnapshotSchedule)(nil)).Elem()
}
func (i ShareSnapshotScheduleArgs) ToShareSnapshotScheduleOutput() ShareSnapshotScheduleOutput {
return i.ToShareSnapshotScheduleOutputWithContext(context.Background())
}
func (i ShareSnapshotScheduleArgs) ToShareSnapshotScheduleOutputWithContext(ctx context.Context) ShareSnapshotScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareSnapshotScheduleOutput)
}
func (i ShareSnapshotScheduleArgs) ToShareSnapshotSchedulePtrOutput() ShareSnapshotSchedulePtrOutput {
return i.ToShareSnapshotSchedulePtrOutputWithContext(context.Background())
}
func (i ShareSnapshotScheduleArgs) ToShareSnapshotSchedulePtrOutputWithContext(ctx context.Context) ShareSnapshotSchedulePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareSnapshotScheduleOutput).ToShareSnapshotSchedulePtrOutputWithContext(ctx)
}
// ShareSnapshotSchedulePtrInput is an input type that accepts ShareSnapshotScheduleArgs, ShareSnapshotSchedulePtr and ShareSnapshotSchedulePtrOutput values.
// You can construct a concrete instance of `ShareSnapshotSchedulePtrInput` via:
//
// ShareSnapshotScheduleArgs{...}
//
// or:
//
// nil
type ShareSnapshotSchedulePtrInput interface {
pulumi.Input
ToShareSnapshotSchedulePtrOutput() ShareSnapshotSchedulePtrOutput
ToShareSnapshotSchedulePtrOutputWithContext(context.Context) ShareSnapshotSchedulePtrOutput
}
type shareSnapshotSchedulePtrType ShareSnapshotScheduleArgs
func ShareSnapshotSchedulePtr(v *ShareSnapshotScheduleArgs) ShareSnapshotSchedulePtrInput {
return (*shareSnapshotSchedulePtrType)(v)
}
func (*shareSnapshotSchedulePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ShareSnapshotSchedule)(nil)).Elem()
}
func (i *shareSnapshotSchedulePtrType) ToShareSnapshotSchedulePtrOutput() ShareSnapshotSchedulePtrOutput {
return i.ToShareSnapshotSchedulePtrOutputWithContext(context.Background())
}
func (i *shareSnapshotSchedulePtrType) ToShareSnapshotSchedulePtrOutputWithContext(ctx context.Context) ShareSnapshotSchedulePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareSnapshotSchedulePtrOutput)
}
type ShareSnapshotScheduleOutput struct{ *pulumi.OutputState }
func (ShareSnapshotScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ShareSnapshotSchedule)(nil)).Elem()
}
func (o ShareSnapshotScheduleOutput) ToShareSnapshotScheduleOutput() ShareSnapshotScheduleOutput {
return o
}
func (o ShareSnapshotScheduleOutput) ToShareSnapshotScheduleOutputWithContext(ctx context.Context) ShareSnapshotScheduleOutput {
return o
}
func (o ShareSnapshotScheduleOutput) ToShareSnapshotSchedulePtrOutput() ShareSnapshotSchedulePtrOutput {
return o.ToShareSnapshotSchedulePtrOutputWithContext(context.Background())
}
func (o ShareSnapshotScheduleOutput) ToShareSnapshotSchedulePtrOutputWithContext(ctx context.Context) ShareSnapshotSchedulePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ShareSnapshotSchedule) *ShareSnapshotSchedule {
return &v
}).(ShareSnapshotSchedulePtrOutput)
}
// The name of the snapshot schedule.
func (o ShareSnapshotScheduleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ShareSnapshotSchedule) string { return v.Name }).(pulumi.StringOutput)
}
// The interval of the synchronization with the source data. Possible values are `Hour` and `Day`.
func (o ShareSnapshotScheduleOutput) Recurrence() pulumi.StringOutput {
return o.ApplyT(func(v ShareSnapshotSchedule) string { return v.Recurrence }).(pulumi.StringOutput)
}
// The synchronization with the source data's start time.
func (o ShareSnapshotScheduleOutput) StartTime() pulumi.StringOutput {
return o.ApplyT(func(v ShareSnapshotSchedule) string { return v.StartTime }).(pulumi.StringOutput)
}
type ShareSnapshotSchedulePtrOutput struct{ *pulumi.OutputState }
func (ShareSnapshotSchedulePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ShareSnapshotSchedule)(nil)).Elem()
}
func (o ShareSnapshotSchedulePtrOutput) ToShareSnapshotSchedulePtrOutput() ShareSnapshotSchedulePtrOutput {
return o
}
func (o ShareSnapshotSchedulePtrOutput) ToShareSnapshotSchedulePtrOutputWithContext(ctx context.Context) ShareSnapshotSchedulePtrOutput {
return o
}
func (o ShareSnapshotSchedulePtrOutput) Elem() ShareSnapshotScheduleOutput {
return o.ApplyT(func(v *ShareSnapshotSchedule) ShareSnapshotSchedule {
if v != nil {
return *v
}
var ret ShareSnapshotSchedule
return ret
}).(ShareSnapshotScheduleOutput)
}
// The name of the snapshot schedule.
func (o ShareSnapshotSchedulePtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareSnapshotSchedule) *string {
if v == nil {
return nil
}
return &v.Name
}).(pulumi.StringPtrOutput)
}
// The interval of the synchronization with the source data. Possible values are `Hour` and `Day`.
func (o ShareSnapshotSchedulePtrOutput) Recurrence() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareSnapshotSchedule) *string {
if v == nil {
return nil
}
return &v.Recurrence
}).(pulumi.StringPtrOutput)
}
// The synchronization with the source data's start time.
func (o ShareSnapshotSchedulePtrOutput) StartTime() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareSnapshotSchedule) *string {
if v == nil {
return nil
}
return &v.StartTime
}).(pulumi.StringPtrOutput)
}
type GetAccountIdentity struct {
// The Principal ID associated with this Managed Service Identity.
PrincipalId string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId string `pulumi:"tenantId"`
// The identity type of this Managed Service Identity.
Type string `pulumi:"type"`
}
// GetAccountIdentityInput is an input type that accepts GetAccountIdentityArgs and GetAccountIdentityOutput values.
// You can construct a concrete instance of `GetAccountIdentityInput` via:
//
// GetAccountIdentityArgs{...}
type GetAccountIdentityInput interface {
pulumi.Input
ToGetAccountIdentityOutput() GetAccountIdentityOutput
ToGetAccountIdentityOutputWithContext(context.Context) GetAccountIdentityOutput
}
type GetAccountIdentityArgs struct {
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringInput `pulumi:"tenantId"`
// The identity type of this Managed Service Identity.
Type pulumi.StringInput `pulumi:"type"`
}
func (GetAccountIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAccountIdentity)(nil)).Elem()
}
func (i GetAccountIdentityArgs) ToGetAccountIdentityOutput() GetAccountIdentityOutput {
return i.ToGetAccountIdentityOutputWithContext(context.Background())
}
func (i GetAccountIdentityArgs) ToGetAccountIdentityOutputWithContext(ctx context.Context) GetAccountIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAccountIdentityOutput)
}
// GetAccountIdentityArrayInput is an input type that accepts GetAccountIdentityArray and GetAccountIdentityArrayOutput values.
// You can construct a concrete instance of `GetAccountIdentityArrayInput` via:
//
// GetAccountIdentityArray{ GetAccountIdentityArgs{...} }
type GetAccountIdentityArrayInput interface {
pulumi.Input
ToGetAccountIdentityArrayOutput() GetAccountIdentityArrayOutput
ToGetAccountIdentityArrayOutputWithContext(context.Context) GetAccountIdentityArrayOutput
}
type GetAccountIdentityArray []GetAccountIdentityInput
func (GetAccountIdentityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAccountIdentity)(nil)).Elem()
}
func (i GetAccountIdentityArray) ToGetAccountIdentityArrayOutput() GetAccountIdentityArrayOutput {
return i.ToGetAccountIdentityArrayOutputWithContext(context.Background())
}
func (i GetAccountIdentityArray) ToGetAccountIdentityArrayOutputWithContext(ctx context.Context) GetAccountIdentityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAccountIdentityArrayOutput)
}
type GetAccountIdentityOutput struct{ *pulumi.OutputState }
func (GetAccountIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAccountIdentity)(nil)).Elem()
}
func (o GetAccountIdentityOutput) ToGetAccountIdentityOutput() GetAccountIdentityOutput {
return o
}
func (o GetAccountIdentityOutput) ToGetAccountIdentityOutputWithContext(ctx context.Context) GetAccountIdentityOutput {
return o
}
// The Principal ID associated with this Managed Service Identity.
func (o GetAccountIdentityOutput) PrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountIdentity) string { return v.PrincipalId }).(pulumi.StringOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o GetAccountIdentityOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountIdentity) string { return v.TenantId }).(pulumi.StringOutput)
}
// The identity type of this Managed Service Identity.
func (o GetAccountIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type GetAccountIdentityArrayOutput struct{ *pulumi.OutputState }
func (GetAccountIdentityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAccountIdentity)(nil)).Elem()
}
func (o GetAccountIdentityArrayOutput) ToGetAccountIdentityArrayOutput() GetAccountIdentityArrayOutput {
return o
}
func (o GetAccountIdentityArrayOutput) ToGetAccountIdentityArrayOutputWithContext(ctx context.Context) GetAccountIdentityArrayOutput {
return o
}
func (o GetAccountIdentityArrayOutput) Index(i pulumi.IntInput) GetAccountIdentityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetAccountIdentity {
return vs[0].([]GetAccountIdentity)[vs[1].(int)]
}).(GetAccountIdentityOutput)
}
type GetDatasetBlobStorageStorageAccount struct {
// The name of this Data Share Blob Storage Dataset.
Name string `pulumi:"name"`
// The resource group name of the storage account to be shared with the receiver.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The subscription id of the storage account to be shared with the receiver.
SubscriptionId string `pulumi:"subscriptionId"`
}
// GetDatasetBlobStorageStorageAccountInput is an input type that accepts GetDatasetBlobStorageStorageAccountArgs and GetDatasetBlobStorageStorageAccountOutput values.
// You can construct a concrete instance of `GetDatasetBlobStorageStorageAccountInput` via:
//
// GetDatasetBlobStorageStorageAccountArgs{...}
type GetDatasetBlobStorageStorageAccountInput interface {
pulumi.Input
ToGetDatasetBlobStorageStorageAccountOutput() GetDatasetBlobStorageStorageAccountOutput
ToGetDatasetBlobStorageStorageAccountOutputWithContext(context.Context) GetDatasetBlobStorageStorageAccountOutput
}
type GetDatasetBlobStorageStorageAccountArgs struct {
// The name of this Data Share Blob Storage Dataset.
Name pulumi.StringInput `pulumi:"name"`
// The resource group name of the storage account to be shared with the receiver.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The subscription id of the storage account to be shared with the receiver.
SubscriptionId pulumi.StringInput `pulumi:"subscriptionId"`
}
func (GetDatasetBlobStorageStorageAccountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDatasetBlobStorageStorageAccount)(nil)).Elem()
}
func (i GetDatasetBlobStorageStorageAccountArgs) ToGetDatasetBlobStorageStorageAccountOutput() GetDatasetBlobStorageStorageAccountOutput {
return i.ToGetDatasetBlobStorageStorageAccountOutputWithContext(context.Background())
}
func (i GetDatasetBlobStorageStorageAccountArgs) ToGetDatasetBlobStorageStorageAccountOutputWithContext(ctx context.Context) GetDatasetBlobStorageStorageAccountOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetDatasetBlobStorageStorageAccountOutput)
}
// GetDatasetBlobStorageStorageAccountArrayInput is an input type that accepts GetDatasetBlobStorageStorageAccountArray and GetDatasetBlobStorageStorageAccountArrayOutput values.
// You can construct a concrete instance of `GetDatasetBlobStorageStorageAccountArrayInput` via:
//
// GetDatasetBlobStorageStorageAccountArray{ GetDatasetBlobStorageStorageAccountArgs{...} }
type GetDatasetBlobStorageStorageAccountArrayInput interface {
pulumi.Input
ToGetDatasetBlobStorageStorageAccountArrayOutput() GetDatasetBlobStorageStorageAccountArrayOutput
ToGetDatasetBlobStorageStorageAccountArrayOutputWithContext(context.Context) GetDatasetBlobStorageStorageAccountArrayOutput
}
type GetDatasetBlobStorageStorageAccountArray []GetDatasetBlobStorageStorageAccountInput
func (GetDatasetBlobStorageStorageAccountArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetDatasetBlobStorageStorageAccount)(nil)).Elem()
}
func (i GetDatasetBlobStorageStorageAccountArray) ToGetDatasetBlobStorageStorageAccountArrayOutput() GetDatasetBlobStorageStorageAccountArrayOutput {
return i.ToGetDatasetBlobStorageStorageAccountArrayOutputWithContext(context.Background())
}
func (i GetDatasetBlobStorageStorageAccountArray) ToGetDatasetBlobStorageStorageAccountArrayOutputWithContext(ctx context.Context) GetDatasetBlobStorageStorageAccountArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetDatasetBlobStorageStorageAccountArrayOutput)
}
type GetDatasetBlobStorageStorageAccountOutput struct{ *pulumi.OutputState }
func (GetDatasetBlobStorageStorageAccountOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDatasetBlobStorageStorageAccount)(nil)).Elem()
}
func (o GetDatasetBlobStorageStorageAccountOutput) ToGetDatasetBlobStorageStorageAccountOutput() GetDatasetBlobStorageStorageAccountOutput {
return o
}
func (o GetDatasetBlobStorageStorageAccountOutput) ToGetDatasetBlobStorageStorageAccountOutputWithContext(ctx context.Context) GetDatasetBlobStorageStorageAccountOutput {
return o
}
// The name of this Data Share Blob Storage Dataset.
func (o GetDatasetBlobStorageStorageAccountOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetDatasetBlobStorageStorageAccount) string { return v.Name }).(pulumi.StringOutput)
}
// The resource group name of the storage account to be shared with the receiver.
func (o GetDatasetBlobStorageStorageAccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetDatasetBlobStorageStorageAccount) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The subscription id of the storage account to be shared with the receiver.
| 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/datashare/getDatasetKustoCluster.go | sdk/go/azure/datashare/getDatasetKustoCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
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 Data Share Kusto Cluster Dataset.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := datashare.LookupDatasetKustoCluster(ctx, &datashare.LookupDatasetKustoClusterArgs{
// Name: "example-dskc",
// ShareId: "example-share-id",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DataShare` - 2019-11-01
func LookupDatasetKustoCluster(ctx *pulumi.Context, args *LookupDatasetKustoClusterArgs, opts ...pulumi.InvokeOption) (*LookupDatasetKustoClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDatasetKustoClusterResult
err := ctx.Invoke("azure:datashare/getDatasetKustoCluster:getDatasetKustoCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDatasetKustoCluster.
type LookupDatasetKustoClusterArgs struct {
// The name of this Data Share Kusto Cluster Dataset.
Name string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created.
ShareId string `pulumi:"shareId"`
}
// A collection of values returned by getDatasetKustoCluster.
type LookupDatasetKustoClusterResult struct {
// The name of the Data Share Dataset.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The resource ID of the Kusto Cluster to be shared with the receiver.
KustoClusterId string `pulumi:"kustoClusterId"`
// The location of the Kusto Cluster.
KustoClusterLocation string `pulumi:"kustoClusterLocation"`
Name string `pulumi:"name"`
ShareId string `pulumi:"shareId"`
}
func LookupDatasetKustoClusterOutput(ctx *pulumi.Context, args LookupDatasetKustoClusterOutputArgs, opts ...pulumi.InvokeOption) LookupDatasetKustoClusterResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDatasetKustoClusterResultOutput, error) {
args := v.(LookupDatasetKustoClusterArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:datashare/getDatasetKustoCluster:getDatasetKustoCluster", args, LookupDatasetKustoClusterResultOutput{}, options).(LookupDatasetKustoClusterResultOutput), nil
}).(LookupDatasetKustoClusterResultOutput)
}
// A collection of arguments for invoking getDatasetKustoCluster.
type LookupDatasetKustoClusterOutputArgs struct {
// The name of this Data Share Kusto Cluster Dataset.
Name pulumi.StringInput `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created.
ShareId pulumi.StringInput `pulumi:"shareId"`
}
func (LookupDatasetKustoClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetKustoClusterArgs)(nil)).Elem()
}
// A collection of values returned by getDatasetKustoCluster.
type LookupDatasetKustoClusterResultOutput struct{ *pulumi.OutputState }
func (LookupDatasetKustoClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetKustoClusterResult)(nil)).Elem()
}
func (o LookupDatasetKustoClusterResultOutput) ToLookupDatasetKustoClusterResultOutput() LookupDatasetKustoClusterResultOutput {
return o
}
func (o LookupDatasetKustoClusterResultOutput) ToLookupDatasetKustoClusterResultOutputWithContext(ctx context.Context) LookupDatasetKustoClusterResultOutput {
return o
}
// The name of the Data Share Dataset.
func (o LookupDatasetKustoClusterResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoClusterResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDatasetKustoClusterResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoClusterResult) string { return v.Id }).(pulumi.StringOutput)
}
// The resource ID of the Kusto Cluster to be shared with the receiver.
func (o LookupDatasetKustoClusterResultOutput) KustoClusterId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoClusterResult) string { return v.KustoClusterId }).(pulumi.StringOutput)
}
// The location of the Kusto Cluster.
func (o LookupDatasetKustoClusterResultOutput) KustoClusterLocation() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoClusterResult) string { return v.KustoClusterLocation }).(pulumi.StringOutput)
}
func (o LookupDatasetKustoClusterResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoClusterResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupDatasetKustoClusterResultOutput) ShareId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoClusterResult) string { return v.ShareId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDatasetKustoClusterResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/getShare.go | sdk/go/azure/datashare/getShare.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
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 Data Share.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := datashare.LookupAccount(ctx, &datashare.LookupAccountArgs{
// Name: "example-account",
// ResourceGroupName: "example-resource-group",
// }, nil)
// if err != nil {
// return err
// }
// exampleGetShare, err := datashare.LookupShare(ctx, &datashare.LookupShareArgs{
// Name: "existing",
// AccountId: example.Id,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", exampleGetShare.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DataShare` - 2019-11-01
func LookupShare(ctx *pulumi.Context, args *LookupShareArgs, opts ...pulumi.InvokeOption) (*LookupShareResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupShareResult
err := ctx.Invoke("azure:datashare/getShare:getShare", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getShare.
type LookupShareArgs struct {
// The ID of the Data Share account in which the Data Share is created.
AccountId string `pulumi:"accountId"`
// The name of this Data Share.
Name string `pulumi:"name"`
}
// A collection of values returned by getShare.
type LookupShareResult struct {
AccountId string `pulumi:"accountId"`
// The description of the Data Share.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The kind of the Data Share.
Kind string `pulumi:"kind"`
// The name of the snapshot schedule.
Name string `pulumi:"name"`
// A `snapshotSchedule` block as defined below.
SnapshotSchedules []GetShareSnapshotSchedule `pulumi:"snapshotSchedules"`
// The terms of the Data Share.
Terms string `pulumi:"terms"`
}
func LookupShareOutput(ctx *pulumi.Context, args LookupShareOutputArgs, opts ...pulumi.InvokeOption) LookupShareResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupShareResultOutput, error) {
args := v.(LookupShareArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:datashare/getShare:getShare", args, LookupShareResultOutput{}, options).(LookupShareResultOutput), nil
}).(LookupShareResultOutput)
}
// A collection of arguments for invoking getShare.
type LookupShareOutputArgs struct {
// The ID of the Data Share account in which the Data Share is created.
AccountId pulumi.StringInput `pulumi:"accountId"`
// The name of this Data Share.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupShareOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupShareArgs)(nil)).Elem()
}
// A collection of values returned by getShare.
type LookupShareResultOutput struct{ *pulumi.OutputState }
func (LookupShareResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupShareResult)(nil)).Elem()
}
func (o LookupShareResultOutput) ToLookupShareResultOutput() LookupShareResultOutput {
return o
}
func (o LookupShareResultOutput) ToLookupShareResultOutputWithContext(ctx context.Context) LookupShareResultOutput {
return o
}
func (o LookupShareResultOutput) AccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.AccountId }).(pulumi.StringOutput)
}
// The description of the Data Share.
func (o LookupShareResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.Description }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupShareResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.Id }).(pulumi.StringOutput)
}
// The kind of the Data Share.
func (o LookupShareResultOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.Kind }).(pulumi.StringOutput)
}
// The name of the snapshot schedule.
func (o LookupShareResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `snapshotSchedule` block as defined below.
func (o LookupShareResultOutput) SnapshotSchedules() GetShareSnapshotScheduleArrayOutput {
return o.ApplyT(func(v LookupShareResult) []GetShareSnapshotSchedule { return v.SnapshotSchedules }).(GetShareSnapshotScheduleArrayOutput)
}
// The terms of the Data Share.
func (o LookupShareResultOutput) Terms() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.Terms }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupShareResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/datasetBlobStorage.go | sdk/go/azure/datashare/datasetBlobStorage.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Share Blob Storage Dataset.
//
// ## Import
//
// Data Share Blob Storage Datasets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:datashare/datasetBlobStorage:DatasetBlobStorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1
// ```
type DatasetBlobStorage struct {
pulumi.CustomResourceState
// The name of the storage account container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
ContainerName pulumi.StringOutput `pulumi:"containerName"`
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created. Changing this forces a new Data Share Blob Storage Dataset to be created.
DataShareId pulumi.StringOutput `pulumi:"dataShareId"`
// The name of the Data Share Dataset.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The path of the file in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FilePath pulumi.StringPtrOutput `pulumi:"filePath"`
// The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FolderPath pulumi.StringPtrOutput `pulumi:"folderPath"`
// The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `storageAccount` block as defined below. Changing this forces a new resource to be created.
StorageAccount DatasetBlobStorageStorageAccountOutput `pulumi:"storageAccount"`
}
// NewDatasetBlobStorage registers a new resource with the given unique name, arguments, and options.
func NewDatasetBlobStorage(ctx *pulumi.Context,
name string, args *DatasetBlobStorageArgs, opts ...pulumi.ResourceOption) (*DatasetBlobStorage, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ContainerName == nil {
return nil, errors.New("invalid value for required argument 'ContainerName'")
}
if args.DataShareId == nil {
return nil, errors.New("invalid value for required argument 'DataShareId'")
}
if args.StorageAccount == nil {
return nil, errors.New("invalid value for required argument 'StorageAccount'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatasetBlobStorage
err := ctx.RegisterResource("azure:datashare/datasetBlobStorage:DatasetBlobStorage", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatasetBlobStorage gets an existing DatasetBlobStorage resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatasetBlobStorage(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatasetBlobStorageState, opts ...pulumi.ResourceOption) (*DatasetBlobStorage, error) {
var resource DatasetBlobStorage
err := ctx.ReadResource("azure:datashare/datasetBlobStorage:DatasetBlobStorage", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatasetBlobStorage resources.
type datasetBlobStorageState struct {
// The name of the storage account container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
ContainerName *string `pulumi:"containerName"`
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created. Changing this forces a new Data Share Blob Storage Dataset to be created.
DataShareId *string `pulumi:"dataShareId"`
// The name of the Data Share Dataset.
DisplayName *string `pulumi:"displayName"`
// The path of the file in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FilePath *string `pulumi:"filePath"`
// The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FolderPath *string `pulumi:"folderPath"`
// The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created.
Name *string `pulumi:"name"`
// A `storageAccount` block as defined below. Changing this forces a new resource to be created.
StorageAccount *DatasetBlobStorageStorageAccount `pulumi:"storageAccount"`
}
type DatasetBlobStorageState struct {
// The name of the storage account container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
ContainerName pulumi.StringPtrInput
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created. Changing this forces a new Data Share Blob Storage Dataset to be created.
DataShareId pulumi.StringPtrInput
// The name of the Data Share Dataset.
DisplayName pulumi.StringPtrInput
// The path of the file in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FilePath pulumi.StringPtrInput
// The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FolderPath pulumi.StringPtrInput
// The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created.
Name pulumi.StringPtrInput
// A `storageAccount` block as defined below. Changing this forces a new resource to be created.
StorageAccount DatasetBlobStorageStorageAccountPtrInput
}
func (DatasetBlobStorageState) ElementType() reflect.Type {
return reflect.TypeOf((*datasetBlobStorageState)(nil)).Elem()
}
type datasetBlobStorageArgs struct {
// The name of the storage account container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
ContainerName string `pulumi:"containerName"`
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created. Changing this forces a new Data Share Blob Storage Dataset to be created.
DataShareId string `pulumi:"dataShareId"`
// The path of the file in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FilePath *string `pulumi:"filePath"`
// The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FolderPath *string `pulumi:"folderPath"`
// The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created.
Name *string `pulumi:"name"`
// A `storageAccount` block as defined below. Changing this forces a new resource to be created.
StorageAccount DatasetBlobStorageStorageAccount `pulumi:"storageAccount"`
}
// The set of arguments for constructing a DatasetBlobStorage resource.
type DatasetBlobStorageArgs struct {
// The name of the storage account container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
ContainerName pulumi.StringInput
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created. Changing this forces a new Data Share Blob Storage Dataset to be created.
DataShareId pulumi.StringInput
// The path of the file in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FilePath pulumi.StringPtrInput
// The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
FolderPath pulumi.StringPtrInput
// The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created.
Name pulumi.StringPtrInput
// A `storageAccount` block as defined below. Changing this forces a new resource to be created.
StorageAccount DatasetBlobStorageStorageAccountInput
}
func (DatasetBlobStorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*datasetBlobStorageArgs)(nil)).Elem()
}
type DatasetBlobStorageInput interface {
pulumi.Input
ToDatasetBlobStorageOutput() DatasetBlobStorageOutput
ToDatasetBlobStorageOutputWithContext(ctx context.Context) DatasetBlobStorageOutput
}
func (*DatasetBlobStorage) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetBlobStorage)(nil)).Elem()
}
func (i *DatasetBlobStorage) ToDatasetBlobStorageOutput() DatasetBlobStorageOutput {
return i.ToDatasetBlobStorageOutputWithContext(context.Background())
}
func (i *DatasetBlobStorage) ToDatasetBlobStorageOutputWithContext(ctx context.Context) DatasetBlobStorageOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetBlobStorageOutput)
}
// DatasetBlobStorageArrayInput is an input type that accepts DatasetBlobStorageArray and DatasetBlobStorageArrayOutput values.
// You can construct a concrete instance of `DatasetBlobStorageArrayInput` via:
//
// DatasetBlobStorageArray{ DatasetBlobStorageArgs{...} }
type DatasetBlobStorageArrayInput interface {
pulumi.Input
ToDatasetBlobStorageArrayOutput() DatasetBlobStorageArrayOutput
ToDatasetBlobStorageArrayOutputWithContext(context.Context) DatasetBlobStorageArrayOutput
}
type DatasetBlobStorageArray []DatasetBlobStorageInput
func (DatasetBlobStorageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetBlobStorage)(nil)).Elem()
}
func (i DatasetBlobStorageArray) ToDatasetBlobStorageArrayOutput() DatasetBlobStorageArrayOutput {
return i.ToDatasetBlobStorageArrayOutputWithContext(context.Background())
}
func (i DatasetBlobStorageArray) ToDatasetBlobStorageArrayOutputWithContext(ctx context.Context) DatasetBlobStorageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetBlobStorageArrayOutput)
}
// DatasetBlobStorageMapInput is an input type that accepts DatasetBlobStorageMap and DatasetBlobStorageMapOutput values.
// You can construct a concrete instance of `DatasetBlobStorageMapInput` via:
//
// DatasetBlobStorageMap{ "key": DatasetBlobStorageArgs{...} }
type DatasetBlobStorageMapInput interface {
pulumi.Input
ToDatasetBlobStorageMapOutput() DatasetBlobStorageMapOutput
ToDatasetBlobStorageMapOutputWithContext(context.Context) DatasetBlobStorageMapOutput
}
type DatasetBlobStorageMap map[string]DatasetBlobStorageInput
func (DatasetBlobStorageMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetBlobStorage)(nil)).Elem()
}
func (i DatasetBlobStorageMap) ToDatasetBlobStorageMapOutput() DatasetBlobStorageMapOutput {
return i.ToDatasetBlobStorageMapOutputWithContext(context.Background())
}
func (i DatasetBlobStorageMap) ToDatasetBlobStorageMapOutputWithContext(ctx context.Context) DatasetBlobStorageMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetBlobStorageMapOutput)
}
type DatasetBlobStorageOutput struct{ *pulumi.OutputState }
func (DatasetBlobStorageOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetBlobStorage)(nil)).Elem()
}
func (o DatasetBlobStorageOutput) ToDatasetBlobStorageOutput() DatasetBlobStorageOutput {
return o
}
func (o DatasetBlobStorageOutput) ToDatasetBlobStorageOutputWithContext(ctx context.Context) DatasetBlobStorageOutput {
return o
}
// The name of the storage account container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageOutput) ContainerName() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetBlobStorage) pulumi.StringOutput { return v.ContainerName }).(pulumi.StringOutput)
}
// The ID of the Data Share in which this Data Share Blob Storage Dataset should be created. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageOutput) DataShareId() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetBlobStorage) pulumi.StringOutput { return v.DataShareId }).(pulumi.StringOutput)
}
// The name of the Data Share Dataset.
func (o DatasetBlobStorageOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetBlobStorage) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The path of the file in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageOutput) FilePath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatasetBlobStorage) pulumi.StringPtrOutput { return v.FilePath }).(pulumi.StringPtrOutput)
}
// The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageOutput) FolderPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatasetBlobStorage) pulumi.StringPtrOutput { return v.FolderPath }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created.
func (o DatasetBlobStorageOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetBlobStorage) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `storageAccount` block as defined below. Changing this forces a new resource to be created.
func (o DatasetBlobStorageOutput) StorageAccount() DatasetBlobStorageStorageAccountOutput {
return o.ApplyT(func(v *DatasetBlobStorage) DatasetBlobStorageStorageAccountOutput { return v.StorageAccount }).(DatasetBlobStorageStorageAccountOutput)
}
type DatasetBlobStorageArrayOutput struct{ *pulumi.OutputState }
func (DatasetBlobStorageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetBlobStorage)(nil)).Elem()
}
func (o DatasetBlobStorageArrayOutput) ToDatasetBlobStorageArrayOutput() DatasetBlobStorageArrayOutput {
return o
}
func (o DatasetBlobStorageArrayOutput) ToDatasetBlobStorageArrayOutputWithContext(ctx context.Context) DatasetBlobStorageArrayOutput {
return o
}
func (o DatasetBlobStorageArrayOutput) Index(i pulumi.IntInput) DatasetBlobStorageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatasetBlobStorage {
return vs[0].([]*DatasetBlobStorage)[vs[1].(int)]
}).(DatasetBlobStorageOutput)
}
type DatasetBlobStorageMapOutput struct{ *pulumi.OutputState }
func (DatasetBlobStorageMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetBlobStorage)(nil)).Elem()
}
func (o DatasetBlobStorageMapOutput) ToDatasetBlobStorageMapOutput() DatasetBlobStorageMapOutput {
return o
}
func (o DatasetBlobStorageMapOutput) ToDatasetBlobStorageMapOutputWithContext(ctx context.Context) DatasetBlobStorageMapOutput {
return o
}
func (o DatasetBlobStorageMapOutput) MapIndex(k pulumi.StringInput) DatasetBlobStorageOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatasetBlobStorage {
return vs[0].(map[string]*DatasetBlobStorage)[vs[1].(string)]
}).(DatasetBlobStorageOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatasetBlobStorageInput)(nil)).Elem(), &DatasetBlobStorage{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetBlobStorageArrayInput)(nil)).Elem(), DatasetBlobStorageArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetBlobStorageMapInput)(nil)).Elem(), DatasetBlobStorageMap{})
pulumi.RegisterOutputType(DatasetBlobStorageOutput{})
pulumi.RegisterOutputType(DatasetBlobStorageArrayOutput{})
pulumi.RegisterOutputType(DatasetBlobStorageMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/getAccount.go | sdk/go/azure/datashare/getAccount.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
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 Data Share Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := datashare.LookupAccount(ctx, &datashare.LookupAccountArgs{
// Name: "example-account",
// ResourceGroupName: "example-resource-group",
// }, 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.DataShare` - 2019-11-01
func LookupAccount(ctx *pulumi.Context, args *LookupAccountArgs, opts ...pulumi.InvokeOption) (*LookupAccountResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAccountResult
err := ctx.Invoke("azure:datashare/getAccount:getAccount", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccount.
type LookupAccountArgs struct {
// The name of this Data Share Account.
Name string `pulumi:"name"`
// The name of the Resource Group where the Data Share Account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAccount.
type LookupAccountResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as defined below.
Identities []GetAccountIdentity `pulumi:"identities"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Data Share Account.
Tags map[string]string `pulumi:"tags"`
}
func LookupAccountOutput(ctx *pulumi.Context, args LookupAccountOutputArgs, opts ...pulumi.InvokeOption) LookupAccountResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAccountResultOutput, error) {
args := v.(LookupAccountArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:datashare/getAccount:getAccount", args, LookupAccountResultOutput{}, options).(LookupAccountResultOutput), nil
}).(LookupAccountResultOutput)
}
// A collection of arguments for invoking getAccount.
type LookupAccountOutputArgs struct {
// The name of this Data Share Account.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Data Share Account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupAccountOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountArgs)(nil)).Elem()
}
// A collection of values returned by getAccount.
type LookupAccountResultOutput struct{ *pulumi.OutputState }
func (LookupAccountResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountResult)(nil)).Elem()
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutput() LookupAccountResultOutput {
return o
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutputWithContext(ctx context.Context) LookupAccountResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAccountResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o LookupAccountResultOutput) Identities() GetAccountIdentityArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountIdentity { return v.Identities }).(GetAccountIdentityArrayOutput)
}
func (o LookupAccountResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Data Share Account.
func (o LookupAccountResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAccountResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAccountResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/datasetKustoDatabase.go | sdk/go/azure/datashare/datasetKustoDatabase.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Share Kusto Database Dataset.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/kusto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := datashare.NewAccount(ctx, "example", &datashare.AccountArgs{
// Name: pulumi.String("example-dsa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Identity: &datashare.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleShare, err := datashare.NewShare(ctx, "example", &datashare.ShareArgs{
// Name: pulumi.String("example_ds"),
// AccountId: exampleAccount.ID(),
// Kind: pulumi.String("InPlace"),
// })
// if err != nil {
// return err
// }
// exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
// Name: pulumi.String("examplekc"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &kusto.ClusterSkuArgs{
// Name: pulumi.String("Dev(No SLA)_Standard_D11_v2"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{
// Name: pulumi.String("examplekd"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// ClusterName: exampleCluster.Name,
// })
// if err != nil {
// return err
// }
// exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: exampleCluster.ID(),
// RoleDefinitionName: pulumi.String("Contributor"),
// PrincipalId: pulumi.String(exampleAccount.Identity.ApplyT(func(identity datashare.AccountIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// _, err = datashare.NewDatasetKustoDatabase(ctx, "example", &datashare.DatasetKustoDatabaseArgs{
// Name: pulumi.String("example-dskd"),
// ShareId: exampleShare.ID(),
// KustoDatabaseId: exampleDatabase.ID(),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAssignment,
// }))
// if 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.DataShare` - 2019-11-01
//
// ## Import
//
// Data Share Kusto Database Datasets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:datashare/datasetKustoDatabase:DatasetKustoDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1
// ```
type DatasetKustoDatabase struct {
pulumi.CustomResourceState
// The name of the Data Share Dataset.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The location of the Kusto Cluster.
KustoClusterLocation pulumi.StringOutput `pulumi:"kustoClusterLocation"`
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId pulumi.StringOutput `pulumi:"kustoDatabaseId"`
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId pulumi.StringOutput `pulumi:"shareId"`
}
// NewDatasetKustoDatabase registers a new resource with the given unique name, arguments, and options.
func NewDatasetKustoDatabase(ctx *pulumi.Context,
name string, args *DatasetKustoDatabaseArgs, opts ...pulumi.ResourceOption) (*DatasetKustoDatabase, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.KustoDatabaseId == nil {
return nil, errors.New("invalid value for required argument 'KustoDatabaseId'")
}
if args.ShareId == nil {
return nil, errors.New("invalid value for required argument 'ShareId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatasetKustoDatabase
err := ctx.RegisterResource("azure:datashare/datasetKustoDatabase:DatasetKustoDatabase", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatasetKustoDatabase gets an existing DatasetKustoDatabase resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatasetKustoDatabase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatasetKustoDatabaseState, opts ...pulumi.ResourceOption) (*DatasetKustoDatabase, error) {
var resource DatasetKustoDatabase
err := ctx.ReadResource("azure:datashare/datasetKustoDatabase:DatasetKustoDatabase", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatasetKustoDatabase resources.
type datasetKustoDatabaseState struct {
// The name of the Data Share Dataset.
DisplayName *string `pulumi:"displayName"`
// The location of the Kusto Cluster.
KustoClusterLocation *string `pulumi:"kustoClusterLocation"`
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId *string `pulumi:"kustoDatabaseId"`
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId *string `pulumi:"shareId"`
}
type DatasetKustoDatabaseState struct {
// The name of the Data Share Dataset.
DisplayName pulumi.StringPtrInput
// The location of the Kusto Cluster.
KustoClusterLocation pulumi.StringPtrInput
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId pulumi.StringPtrInput
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId pulumi.StringPtrInput
}
func (DatasetKustoDatabaseState) ElementType() reflect.Type {
return reflect.TypeOf((*datasetKustoDatabaseState)(nil)).Elem()
}
type datasetKustoDatabaseArgs struct {
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId string `pulumi:"kustoDatabaseId"`
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId string `pulumi:"shareId"`
}
// The set of arguments for constructing a DatasetKustoDatabase resource.
type DatasetKustoDatabaseArgs struct {
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId pulumi.StringInput
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId pulumi.StringInput
}
func (DatasetKustoDatabaseArgs) ElementType() reflect.Type {
return reflect.TypeOf((*datasetKustoDatabaseArgs)(nil)).Elem()
}
type DatasetKustoDatabaseInput interface {
pulumi.Input
ToDatasetKustoDatabaseOutput() DatasetKustoDatabaseOutput
ToDatasetKustoDatabaseOutputWithContext(ctx context.Context) DatasetKustoDatabaseOutput
}
func (*DatasetKustoDatabase) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetKustoDatabase)(nil)).Elem()
}
func (i *DatasetKustoDatabase) ToDatasetKustoDatabaseOutput() DatasetKustoDatabaseOutput {
return i.ToDatasetKustoDatabaseOutputWithContext(context.Background())
}
func (i *DatasetKustoDatabase) ToDatasetKustoDatabaseOutputWithContext(ctx context.Context) DatasetKustoDatabaseOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabaseOutput)
}
// DatasetKustoDatabaseArrayInput is an input type that accepts DatasetKustoDatabaseArray and DatasetKustoDatabaseArrayOutput values.
// You can construct a concrete instance of `DatasetKustoDatabaseArrayInput` via:
//
// DatasetKustoDatabaseArray{ DatasetKustoDatabaseArgs{...} }
type DatasetKustoDatabaseArrayInput interface {
pulumi.Input
ToDatasetKustoDatabaseArrayOutput() DatasetKustoDatabaseArrayOutput
ToDatasetKustoDatabaseArrayOutputWithContext(context.Context) DatasetKustoDatabaseArrayOutput
}
type DatasetKustoDatabaseArray []DatasetKustoDatabaseInput
func (DatasetKustoDatabaseArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetKustoDatabase)(nil)).Elem()
}
func (i DatasetKustoDatabaseArray) ToDatasetKustoDatabaseArrayOutput() DatasetKustoDatabaseArrayOutput {
return i.ToDatasetKustoDatabaseArrayOutputWithContext(context.Background())
}
func (i DatasetKustoDatabaseArray) ToDatasetKustoDatabaseArrayOutputWithContext(ctx context.Context) DatasetKustoDatabaseArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabaseArrayOutput)
}
// DatasetKustoDatabaseMapInput is an input type that accepts DatasetKustoDatabaseMap and DatasetKustoDatabaseMapOutput values.
// You can construct a concrete instance of `DatasetKustoDatabaseMapInput` via:
//
// DatasetKustoDatabaseMap{ "key": DatasetKustoDatabaseArgs{...} }
type DatasetKustoDatabaseMapInput interface {
pulumi.Input
ToDatasetKustoDatabaseMapOutput() DatasetKustoDatabaseMapOutput
ToDatasetKustoDatabaseMapOutputWithContext(context.Context) DatasetKustoDatabaseMapOutput
}
type DatasetKustoDatabaseMap map[string]DatasetKustoDatabaseInput
func (DatasetKustoDatabaseMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetKustoDatabase)(nil)).Elem()
}
func (i DatasetKustoDatabaseMap) ToDatasetKustoDatabaseMapOutput() DatasetKustoDatabaseMapOutput {
return i.ToDatasetKustoDatabaseMapOutputWithContext(context.Background())
}
func (i DatasetKustoDatabaseMap) ToDatasetKustoDatabaseMapOutputWithContext(ctx context.Context) DatasetKustoDatabaseMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabaseMapOutput)
}
type DatasetKustoDatabaseOutput struct{ *pulumi.OutputState }
func (DatasetKustoDatabaseOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetKustoDatabase)(nil)).Elem()
}
func (o DatasetKustoDatabaseOutput) ToDatasetKustoDatabaseOutput() DatasetKustoDatabaseOutput {
return o
}
func (o DatasetKustoDatabaseOutput) ToDatasetKustoDatabaseOutputWithContext(ctx context.Context) DatasetKustoDatabaseOutput {
return o
}
// The name of the Data Share Dataset.
func (o DatasetKustoDatabaseOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoDatabase) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The location of the Kusto Cluster.
func (o DatasetKustoDatabaseOutput) KustoClusterLocation() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoDatabase) pulumi.StringOutput { return v.KustoClusterLocation }).(pulumi.StringOutput)
}
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
func (o DatasetKustoDatabaseOutput) KustoDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoDatabase) pulumi.StringOutput { return v.KustoDatabaseId }).(pulumi.StringOutput)
}
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
func (o DatasetKustoDatabaseOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoDatabase) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
func (o DatasetKustoDatabaseOutput) ShareId() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoDatabase) pulumi.StringOutput { return v.ShareId }).(pulumi.StringOutput)
}
type DatasetKustoDatabaseArrayOutput struct{ *pulumi.OutputState }
func (DatasetKustoDatabaseArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetKustoDatabase)(nil)).Elem()
}
func (o DatasetKustoDatabaseArrayOutput) ToDatasetKustoDatabaseArrayOutput() DatasetKustoDatabaseArrayOutput {
return o
}
func (o DatasetKustoDatabaseArrayOutput) ToDatasetKustoDatabaseArrayOutputWithContext(ctx context.Context) DatasetKustoDatabaseArrayOutput {
return o
}
func (o DatasetKustoDatabaseArrayOutput) Index(i pulumi.IntInput) DatasetKustoDatabaseOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatasetKustoDatabase {
return vs[0].([]*DatasetKustoDatabase)[vs[1].(int)]
}).(DatasetKustoDatabaseOutput)
}
type DatasetKustoDatabaseMapOutput struct{ *pulumi.OutputState }
func (DatasetKustoDatabaseMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetKustoDatabase)(nil)).Elem()
}
func (o DatasetKustoDatabaseMapOutput) ToDatasetKustoDatabaseMapOutput() DatasetKustoDatabaseMapOutput {
return o
}
func (o DatasetKustoDatabaseMapOutput) ToDatasetKustoDatabaseMapOutputWithContext(ctx context.Context) DatasetKustoDatabaseMapOutput {
return o
}
func (o DatasetKustoDatabaseMapOutput) MapIndex(k pulumi.StringInput) DatasetKustoDatabaseOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatasetKustoDatabase {
return vs[0].(map[string]*DatasetKustoDatabase)[vs[1].(string)]
}).(DatasetKustoDatabaseOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatasetKustoDatabaseInput)(nil)).Elem(), &DatasetKustoDatabase{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetKustoDatabaseArrayInput)(nil)).Elem(), DatasetKustoDatabaseArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetKustoDatabaseMapInput)(nil)).Elem(), DatasetKustoDatabaseMap{})
pulumi.RegisterOutputType(DatasetKustoDatabaseOutput{})
pulumi.RegisterOutputType(DatasetKustoDatabaseArrayOutput{})
pulumi.RegisterOutputType(DatasetKustoDatabaseMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/datasetKustoCluster.go | sdk/go/azure/datashare/datasetKustoCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Share Kusto Cluster Dataset.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/kusto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := datashare.NewAccount(ctx, "example", &datashare.AccountArgs{
// Name: pulumi.String("example-dsa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Identity: &datashare.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleShare, err := datashare.NewShare(ctx, "example", &datashare.ShareArgs{
// Name: pulumi.String("example_ds"),
// AccountId: exampleAccount.ID(),
// Kind: pulumi.String("InPlace"),
// })
// if err != nil {
// return err
// }
// exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
// Name: pulumi.String("examplekc"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &kusto.ClusterSkuArgs{
// Name: pulumi.String("Dev(No SLA)_Standard_D11_v2"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: exampleCluster.ID(),
// RoleDefinitionName: pulumi.String("Contributor"),
// PrincipalId: pulumi.String(exampleAccount.Identity.ApplyT(func(identity datashare.AccountIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// _, err = datashare.NewDatasetKustoCluster(ctx, "example", &datashare.DatasetKustoClusterArgs{
// Name: pulumi.String("example-dskc"),
// ShareId: exampleShare.ID(),
// KustoClusterId: exampleCluster.ID(),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAssignment,
// }))
// if 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.DataShare` - 2019-11-01
//
// ## Import
//
// Data Share Kusto Cluster Datasets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:datashare/datasetKustoCluster:DatasetKustoCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1
// ```
type DatasetKustoCluster struct {
pulumi.CustomResourceState
// The name of the Data Share Dataset.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
KustoClusterId pulumi.StringOutput `pulumi:"kustoClusterId"`
// The location of the Kusto Cluster.
KustoClusterLocation pulumi.StringOutput `pulumi:"kustoClusterLocation"`
// The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
ShareId pulumi.StringOutput `pulumi:"shareId"`
}
// NewDatasetKustoCluster registers a new resource with the given unique name, arguments, and options.
func NewDatasetKustoCluster(ctx *pulumi.Context,
name string, args *DatasetKustoClusterArgs, opts ...pulumi.ResourceOption) (*DatasetKustoCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.KustoClusterId == nil {
return nil, errors.New("invalid value for required argument 'KustoClusterId'")
}
if args.ShareId == nil {
return nil, errors.New("invalid value for required argument 'ShareId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatasetKustoCluster
err := ctx.RegisterResource("azure:datashare/datasetKustoCluster:DatasetKustoCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatasetKustoCluster gets an existing DatasetKustoCluster resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatasetKustoCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatasetKustoClusterState, opts ...pulumi.ResourceOption) (*DatasetKustoCluster, error) {
var resource DatasetKustoCluster
err := ctx.ReadResource("azure:datashare/datasetKustoCluster:DatasetKustoCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatasetKustoCluster resources.
type datasetKustoClusterState struct {
// The name of the Data Share Dataset.
DisplayName *string `pulumi:"displayName"`
// The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
KustoClusterId *string `pulumi:"kustoClusterId"`
// The location of the Kusto Cluster.
KustoClusterLocation *string `pulumi:"kustoClusterLocation"`
// The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
ShareId *string `pulumi:"shareId"`
}
type DatasetKustoClusterState struct {
// The name of the Data Share Dataset.
DisplayName pulumi.StringPtrInput
// The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
KustoClusterId pulumi.StringPtrInput
// The location of the Kusto Cluster.
KustoClusterLocation pulumi.StringPtrInput
// The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
ShareId pulumi.StringPtrInput
}
func (DatasetKustoClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*datasetKustoClusterState)(nil)).Elem()
}
type datasetKustoClusterArgs struct {
// The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
KustoClusterId string `pulumi:"kustoClusterId"`
// The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
ShareId string `pulumi:"shareId"`
}
// The set of arguments for constructing a DatasetKustoCluster resource.
type DatasetKustoClusterArgs struct {
// The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
KustoClusterId pulumi.StringInput
// The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
ShareId pulumi.StringInput
}
func (DatasetKustoClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*datasetKustoClusterArgs)(nil)).Elem()
}
type DatasetKustoClusterInput interface {
pulumi.Input
ToDatasetKustoClusterOutput() DatasetKustoClusterOutput
ToDatasetKustoClusterOutputWithContext(ctx context.Context) DatasetKustoClusterOutput
}
func (*DatasetKustoCluster) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetKustoCluster)(nil)).Elem()
}
func (i *DatasetKustoCluster) ToDatasetKustoClusterOutput() DatasetKustoClusterOutput {
return i.ToDatasetKustoClusterOutputWithContext(context.Background())
}
func (i *DatasetKustoCluster) ToDatasetKustoClusterOutputWithContext(ctx context.Context) DatasetKustoClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoClusterOutput)
}
// DatasetKustoClusterArrayInput is an input type that accepts DatasetKustoClusterArray and DatasetKustoClusterArrayOutput values.
// You can construct a concrete instance of `DatasetKustoClusterArrayInput` via:
//
// DatasetKustoClusterArray{ DatasetKustoClusterArgs{...} }
type DatasetKustoClusterArrayInput interface {
pulumi.Input
ToDatasetKustoClusterArrayOutput() DatasetKustoClusterArrayOutput
ToDatasetKustoClusterArrayOutputWithContext(context.Context) DatasetKustoClusterArrayOutput
}
type DatasetKustoClusterArray []DatasetKustoClusterInput
func (DatasetKustoClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetKustoCluster)(nil)).Elem()
}
func (i DatasetKustoClusterArray) ToDatasetKustoClusterArrayOutput() DatasetKustoClusterArrayOutput {
return i.ToDatasetKustoClusterArrayOutputWithContext(context.Background())
}
func (i DatasetKustoClusterArray) ToDatasetKustoClusterArrayOutputWithContext(ctx context.Context) DatasetKustoClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoClusterArrayOutput)
}
// DatasetKustoClusterMapInput is an input type that accepts DatasetKustoClusterMap and DatasetKustoClusterMapOutput values.
// You can construct a concrete instance of `DatasetKustoClusterMapInput` via:
//
// DatasetKustoClusterMap{ "key": DatasetKustoClusterArgs{...} }
type DatasetKustoClusterMapInput interface {
pulumi.Input
ToDatasetKustoClusterMapOutput() DatasetKustoClusterMapOutput
ToDatasetKustoClusterMapOutputWithContext(context.Context) DatasetKustoClusterMapOutput
}
type DatasetKustoClusterMap map[string]DatasetKustoClusterInput
func (DatasetKustoClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetKustoCluster)(nil)).Elem()
}
func (i DatasetKustoClusterMap) ToDatasetKustoClusterMapOutput() DatasetKustoClusterMapOutput {
return i.ToDatasetKustoClusterMapOutputWithContext(context.Background())
}
func (i DatasetKustoClusterMap) ToDatasetKustoClusterMapOutputWithContext(ctx context.Context) DatasetKustoClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoClusterMapOutput)
}
type DatasetKustoClusterOutput struct{ *pulumi.OutputState }
func (DatasetKustoClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetKustoCluster)(nil)).Elem()
}
func (o DatasetKustoClusterOutput) ToDatasetKustoClusterOutput() DatasetKustoClusterOutput {
return o
}
func (o DatasetKustoClusterOutput) ToDatasetKustoClusterOutputWithContext(ctx context.Context) DatasetKustoClusterOutput {
return o
}
// The name of the Data Share Dataset.
func (o DatasetKustoClusterOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoCluster) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
func (o DatasetKustoClusterOutput) KustoClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoCluster) pulumi.StringOutput { return v.KustoClusterId }).(pulumi.StringOutput)
}
// The location of the Kusto Cluster.
func (o DatasetKustoClusterOutput) KustoClusterLocation() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoCluster) pulumi.StringOutput { return v.KustoClusterLocation }).(pulumi.StringOutput)
}
// The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
func (o DatasetKustoClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.
func (o DatasetKustoClusterOutput) ShareId() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetKustoCluster) pulumi.StringOutput { return v.ShareId }).(pulumi.StringOutput)
}
type DatasetKustoClusterArrayOutput struct{ *pulumi.OutputState }
func (DatasetKustoClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetKustoCluster)(nil)).Elem()
}
func (o DatasetKustoClusterArrayOutput) ToDatasetKustoClusterArrayOutput() DatasetKustoClusterArrayOutput {
return o
}
func (o DatasetKustoClusterArrayOutput) ToDatasetKustoClusterArrayOutputWithContext(ctx context.Context) DatasetKustoClusterArrayOutput {
return o
}
func (o DatasetKustoClusterArrayOutput) Index(i pulumi.IntInput) DatasetKustoClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatasetKustoCluster {
return vs[0].([]*DatasetKustoCluster)[vs[1].(int)]
}).(DatasetKustoClusterOutput)
}
type DatasetKustoClusterMapOutput struct{ *pulumi.OutputState }
func (DatasetKustoClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetKustoCluster)(nil)).Elem()
}
func (o DatasetKustoClusterMapOutput) ToDatasetKustoClusterMapOutput() DatasetKustoClusterMapOutput {
return o
}
func (o DatasetKustoClusterMapOutput) ToDatasetKustoClusterMapOutputWithContext(ctx context.Context) DatasetKustoClusterMapOutput {
return o
}
func (o DatasetKustoClusterMapOutput) MapIndex(k pulumi.StringInput) DatasetKustoClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatasetKustoCluster {
return vs[0].(map[string]*DatasetKustoCluster)[vs[1].(string)]
}).(DatasetKustoClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatasetKustoClusterInput)(nil)).Elem(), &DatasetKustoCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetKustoClusterArrayInput)(nil)).Elem(), DatasetKustoClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetKustoClusterMapInput)(nil)).Elem(), DatasetKustoClusterMap{})
pulumi.RegisterOutputType(DatasetKustoClusterOutput{})
pulumi.RegisterOutputType(DatasetKustoClusterArrayOutput{})
pulumi.RegisterOutputType(DatasetKustoClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/getDatasetDataLakeGen2.go | sdk/go/azure/datashare/getDatasetDataLakeGen2.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
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 Data Share Data Lake Gen2 Dataset.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := datashare.LookupDatasetDataLakeGen2(ctx, &datashare.LookupDatasetDataLakeGen2Args{
// Name: "example-dsdlg2ds",
// ShareId: "example-share-id",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DataShare` - 2019-11-01
func LookupDatasetDataLakeGen2(ctx *pulumi.Context, args *LookupDatasetDataLakeGen2Args, opts ...pulumi.InvokeOption) (*LookupDatasetDataLakeGen2Result, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDatasetDataLakeGen2Result
err := ctx.Invoke("azure:datashare/getDatasetDataLakeGen2:getDatasetDataLakeGen2", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDatasetDataLakeGen2.
type LookupDatasetDataLakeGen2Args struct {
// The name of this Data Share Data Lake Gen2 Dataset.
Name string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created.
ShareId string `pulumi:"shareId"`
}
// A collection of values returned by getDatasetDataLakeGen2.
type LookupDatasetDataLakeGen2Result struct {
// The name of the Data Share Dataset.
DisplayName string `pulumi:"displayName"`
// The path of the file in the data lake file system to be shared with the receiver.
FilePath string `pulumi:"filePath"`
// The name of the data lake file system to be shared with the receiver.
FileSystemName string `pulumi:"fileSystemName"`
// The folder path in the data lake file system to be shared with the receiver.
FolderPath string `pulumi:"folderPath"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ShareId string `pulumi:"shareId"`
// The resource ID of the storage account of the data lake file system to be shared with the receiver.
StorageAccountId string `pulumi:"storageAccountId"`
}
func LookupDatasetDataLakeGen2Output(ctx *pulumi.Context, args LookupDatasetDataLakeGen2OutputArgs, opts ...pulumi.InvokeOption) LookupDatasetDataLakeGen2ResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDatasetDataLakeGen2ResultOutput, error) {
args := v.(LookupDatasetDataLakeGen2Args)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:datashare/getDatasetDataLakeGen2:getDatasetDataLakeGen2", args, LookupDatasetDataLakeGen2ResultOutput{}, options).(LookupDatasetDataLakeGen2ResultOutput), nil
}).(LookupDatasetDataLakeGen2ResultOutput)
}
// A collection of arguments for invoking getDatasetDataLakeGen2.
type LookupDatasetDataLakeGen2OutputArgs struct {
// The name of this Data Share Data Lake Gen2 Dataset.
Name pulumi.StringInput `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created.
ShareId pulumi.StringInput `pulumi:"shareId"`
}
func (LookupDatasetDataLakeGen2OutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetDataLakeGen2Args)(nil)).Elem()
}
// A collection of values returned by getDatasetDataLakeGen2.
type LookupDatasetDataLakeGen2ResultOutput struct{ *pulumi.OutputState }
func (LookupDatasetDataLakeGen2ResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetDataLakeGen2Result)(nil)).Elem()
}
func (o LookupDatasetDataLakeGen2ResultOutput) ToLookupDatasetDataLakeGen2ResultOutput() LookupDatasetDataLakeGen2ResultOutput {
return o
}
func (o LookupDatasetDataLakeGen2ResultOutput) ToLookupDatasetDataLakeGen2ResultOutputWithContext(ctx context.Context) LookupDatasetDataLakeGen2ResultOutput {
return o
}
// The name of the Data Share Dataset.
func (o LookupDatasetDataLakeGen2ResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The path of the file in the data lake file system to be shared with the receiver.
func (o LookupDatasetDataLakeGen2ResultOutput) FilePath() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.FilePath }).(pulumi.StringOutput)
}
// The name of the data lake file system to be shared with the receiver.
func (o LookupDatasetDataLakeGen2ResultOutput) FileSystemName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.FileSystemName }).(pulumi.StringOutput)
}
// The folder path in the data lake file system to be shared with the receiver.
func (o LookupDatasetDataLakeGen2ResultOutput) FolderPath() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.FolderPath }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDatasetDataLakeGen2ResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupDatasetDataLakeGen2ResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupDatasetDataLakeGen2ResultOutput) ShareId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.ShareId }).(pulumi.StringOutput)
}
// The resource ID of the storage account of the data lake file system to be shared with the receiver.
func (o LookupDatasetDataLakeGen2ResultOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetDataLakeGen2Result) string { return v.StorageAccountId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDatasetDataLakeGen2ResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/getDatasetKustoDatabase.go | sdk/go/azure/datashare/getDatasetKustoDatabase.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
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 Data Share Kusto Database Dataset.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := datashare.LookupDatasetKustoDatabase(ctx, &datashare.LookupDatasetKustoDatabaseArgs{
// Name: "example-dskdds",
// ShareId: "example-share-id",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DataShare` - 2019-11-01
func LookupDatasetKustoDatabase(ctx *pulumi.Context, args *LookupDatasetKustoDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupDatasetKustoDatabaseResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDatasetKustoDatabaseResult
err := ctx.Invoke("azure:datashare/getDatasetKustoDatabase:getDatasetKustoDatabase", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDatasetKustoDatabase.
type LookupDatasetKustoDatabaseArgs struct {
// The name of this Data Share Kusto Database Dataset.
Name string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created.
ShareId string `pulumi:"shareId"`
}
// A collection of values returned by getDatasetKustoDatabase.
type LookupDatasetKustoDatabaseResult struct {
// The name of the Data Share Dataset.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The location of the Kusto Cluster.
KustoClusterLocation string `pulumi:"kustoClusterLocation"`
// The resource ID of the Kusto Cluster Database to be shared with the receiver.
KustoDatabaseId string `pulumi:"kustoDatabaseId"`
Name string `pulumi:"name"`
ShareId string `pulumi:"shareId"`
}
func LookupDatasetKustoDatabaseOutput(ctx *pulumi.Context, args LookupDatasetKustoDatabaseOutputArgs, opts ...pulumi.InvokeOption) LookupDatasetKustoDatabaseResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDatasetKustoDatabaseResultOutput, error) {
args := v.(LookupDatasetKustoDatabaseArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:datashare/getDatasetKustoDatabase:getDatasetKustoDatabase", args, LookupDatasetKustoDatabaseResultOutput{}, options).(LookupDatasetKustoDatabaseResultOutput), nil
}).(LookupDatasetKustoDatabaseResultOutput)
}
// A collection of arguments for invoking getDatasetKustoDatabase.
type LookupDatasetKustoDatabaseOutputArgs struct {
// The name of this Data Share Kusto Database Dataset.
Name pulumi.StringInput `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created.
ShareId pulumi.StringInput `pulumi:"shareId"`
}
func (LookupDatasetKustoDatabaseOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetKustoDatabaseArgs)(nil)).Elem()
}
// A collection of values returned by getDatasetKustoDatabase.
type LookupDatasetKustoDatabaseResultOutput struct{ *pulumi.OutputState }
func (LookupDatasetKustoDatabaseResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatasetKustoDatabaseResult)(nil)).Elem()
}
func (o LookupDatasetKustoDatabaseResultOutput) ToLookupDatasetKustoDatabaseResultOutput() LookupDatasetKustoDatabaseResultOutput {
return o
}
func (o LookupDatasetKustoDatabaseResultOutput) ToLookupDatasetKustoDatabaseResultOutputWithContext(ctx context.Context) LookupDatasetKustoDatabaseResultOutput {
return o
}
// The name of the Data Share Dataset.
func (o LookupDatasetKustoDatabaseResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoDatabaseResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDatasetKustoDatabaseResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoDatabaseResult) string { return v.Id }).(pulumi.StringOutput)
}
// The location of the Kusto Cluster.
func (o LookupDatasetKustoDatabaseResultOutput) KustoClusterLocation() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoDatabaseResult) string { return v.KustoClusterLocation }).(pulumi.StringOutput)
}
// The resource ID of the Kusto Cluster Database to be shared with the receiver.
func (o LookupDatasetKustoDatabaseResultOutput) KustoDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoDatabaseResult) string { return v.KustoDatabaseId }).(pulumi.StringOutput)
}
func (o LookupDatasetKustoDatabaseResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoDatabaseResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupDatasetKustoDatabaseResultOutput) ShareId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatasetKustoDatabaseResult) string { return v.ShareId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDatasetKustoDatabaseResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/datasetDataLakeGen2.go | sdk/go/azure/datashare/datasetDataLakeGen2.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Share Data Lake Gen2 Dataset.
//
// ## Import
//
// Data Share Data Lake Gen2 Datasets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:datashare/datasetDataLakeGen2:DatasetDataLakeGen2 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1
// ```
type DatasetDataLakeGen2 struct {
pulumi.CustomResourceState
// The name of the Data Share Dataset.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The path of the file in the data lake file system to be shared with the receiver. Conflicts with `folderPath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FilePath pulumi.StringPtrOutput `pulumi:"filePath"`
// The name of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FileSystemName pulumi.StringOutput `pulumi:"fileSystemName"`
// The folder path in the data lake file system to be shared with the receiver. Conflicts with `filePath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FolderPath pulumi.StringPtrOutput `pulumi:"folderPath"`
// The name which should be used for this Data Share Data Lake Gen2 Dataset. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
ShareId pulumi.StringOutput `pulumi:"shareId"`
// The resource id of the storage account of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewDatasetDataLakeGen2 registers a new resource with the given unique name, arguments, and options.
func NewDatasetDataLakeGen2(ctx *pulumi.Context,
name string, args *DatasetDataLakeGen2Args, opts ...pulumi.ResourceOption) (*DatasetDataLakeGen2, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.FileSystemName == nil {
return nil, errors.New("invalid value for required argument 'FileSystemName'")
}
if args.ShareId == nil {
return nil, errors.New("invalid value for required argument 'ShareId'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatasetDataLakeGen2
err := ctx.RegisterResource("azure:datashare/datasetDataLakeGen2:DatasetDataLakeGen2", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatasetDataLakeGen2 gets an existing DatasetDataLakeGen2 resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatasetDataLakeGen2(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatasetDataLakeGen2State, opts ...pulumi.ResourceOption) (*DatasetDataLakeGen2, error) {
var resource DatasetDataLakeGen2
err := ctx.ReadResource("azure:datashare/datasetDataLakeGen2:DatasetDataLakeGen2", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatasetDataLakeGen2 resources.
type datasetDataLakeGen2State struct {
// The name of the Data Share Dataset.
DisplayName *string `pulumi:"displayName"`
// The path of the file in the data lake file system to be shared with the receiver. Conflicts with `folderPath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FilePath *string `pulumi:"filePath"`
// The name of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FileSystemName *string `pulumi:"fileSystemName"`
// The folder path in the data lake file system to be shared with the receiver. Conflicts with `filePath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FolderPath *string `pulumi:"folderPath"`
// The name which should be used for this Data Share Data Lake Gen2 Dataset. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
ShareId *string `pulumi:"shareId"`
// The resource id of the storage account of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type DatasetDataLakeGen2State struct {
// The name of the Data Share Dataset.
DisplayName pulumi.StringPtrInput
// The path of the file in the data lake file system to be shared with the receiver. Conflicts with `folderPath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FilePath pulumi.StringPtrInput
// The name of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FileSystemName pulumi.StringPtrInput
// The folder path in the data lake file system to be shared with the receiver. Conflicts with `filePath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FolderPath pulumi.StringPtrInput
// The name which should be used for this Data Share Data Lake Gen2 Dataset. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
ShareId pulumi.StringPtrInput
// The resource id of the storage account of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
StorageAccountId pulumi.StringPtrInput
}
func (DatasetDataLakeGen2State) ElementType() reflect.Type {
return reflect.TypeOf((*datasetDataLakeGen2State)(nil)).Elem()
}
type datasetDataLakeGen2Args struct {
// The path of the file in the data lake file system to be shared with the receiver. Conflicts with `folderPath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FilePath *string `pulumi:"filePath"`
// The name of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FileSystemName string `pulumi:"fileSystemName"`
// The folder path in the data lake file system to be shared with the receiver. Conflicts with `filePath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FolderPath *string `pulumi:"folderPath"`
// The name which should be used for this Data Share Data Lake Gen2 Dataset. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
ShareId string `pulumi:"shareId"`
// The resource id of the storage account of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a DatasetDataLakeGen2 resource.
type DatasetDataLakeGen2Args struct {
// The path of the file in the data lake file system to be shared with the receiver. Conflicts with `folderPath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FilePath pulumi.StringPtrInput
// The name of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FileSystemName pulumi.StringInput
// The folder path in the data lake file system to be shared with the receiver. Conflicts with `filePath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
FolderPath pulumi.StringPtrInput
// The name which should be used for this Data Share Data Lake Gen2 Dataset. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
ShareId pulumi.StringInput
// The resource id of the storage account of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
StorageAccountId pulumi.StringInput
}
func (DatasetDataLakeGen2Args) ElementType() reflect.Type {
return reflect.TypeOf((*datasetDataLakeGen2Args)(nil)).Elem()
}
type DatasetDataLakeGen2Input interface {
pulumi.Input
ToDatasetDataLakeGen2Output() DatasetDataLakeGen2Output
ToDatasetDataLakeGen2OutputWithContext(ctx context.Context) DatasetDataLakeGen2Output
}
func (*DatasetDataLakeGen2) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetDataLakeGen2)(nil)).Elem()
}
func (i *DatasetDataLakeGen2) ToDatasetDataLakeGen2Output() DatasetDataLakeGen2Output {
return i.ToDatasetDataLakeGen2OutputWithContext(context.Background())
}
func (i *DatasetDataLakeGen2) ToDatasetDataLakeGen2OutputWithContext(ctx context.Context) DatasetDataLakeGen2Output {
return pulumi.ToOutputWithContext(ctx, i).(DatasetDataLakeGen2Output)
}
// DatasetDataLakeGen2ArrayInput is an input type that accepts DatasetDataLakeGen2Array and DatasetDataLakeGen2ArrayOutput values.
// You can construct a concrete instance of `DatasetDataLakeGen2ArrayInput` via:
//
// DatasetDataLakeGen2Array{ DatasetDataLakeGen2Args{...} }
type DatasetDataLakeGen2ArrayInput interface {
pulumi.Input
ToDatasetDataLakeGen2ArrayOutput() DatasetDataLakeGen2ArrayOutput
ToDatasetDataLakeGen2ArrayOutputWithContext(context.Context) DatasetDataLakeGen2ArrayOutput
}
type DatasetDataLakeGen2Array []DatasetDataLakeGen2Input
func (DatasetDataLakeGen2Array) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetDataLakeGen2)(nil)).Elem()
}
func (i DatasetDataLakeGen2Array) ToDatasetDataLakeGen2ArrayOutput() DatasetDataLakeGen2ArrayOutput {
return i.ToDatasetDataLakeGen2ArrayOutputWithContext(context.Background())
}
func (i DatasetDataLakeGen2Array) ToDatasetDataLakeGen2ArrayOutputWithContext(ctx context.Context) DatasetDataLakeGen2ArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetDataLakeGen2ArrayOutput)
}
// DatasetDataLakeGen2MapInput is an input type that accepts DatasetDataLakeGen2Map and DatasetDataLakeGen2MapOutput values.
// You can construct a concrete instance of `DatasetDataLakeGen2MapInput` via:
//
// DatasetDataLakeGen2Map{ "key": DatasetDataLakeGen2Args{...} }
type DatasetDataLakeGen2MapInput interface {
pulumi.Input
ToDatasetDataLakeGen2MapOutput() DatasetDataLakeGen2MapOutput
ToDatasetDataLakeGen2MapOutputWithContext(context.Context) DatasetDataLakeGen2MapOutput
}
type DatasetDataLakeGen2Map map[string]DatasetDataLakeGen2Input
func (DatasetDataLakeGen2Map) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetDataLakeGen2)(nil)).Elem()
}
func (i DatasetDataLakeGen2Map) ToDatasetDataLakeGen2MapOutput() DatasetDataLakeGen2MapOutput {
return i.ToDatasetDataLakeGen2MapOutputWithContext(context.Background())
}
func (i DatasetDataLakeGen2Map) ToDatasetDataLakeGen2MapOutputWithContext(ctx context.Context) DatasetDataLakeGen2MapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetDataLakeGen2MapOutput)
}
type DatasetDataLakeGen2Output struct{ *pulumi.OutputState }
func (DatasetDataLakeGen2Output) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetDataLakeGen2)(nil)).Elem()
}
func (o DatasetDataLakeGen2Output) ToDatasetDataLakeGen2Output() DatasetDataLakeGen2Output {
return o
}
func (o DatasetDataLakeGen2Output) ToDatasetDataLakeGen2OutputWithContext(ctx context.Context) DatasetDataLakeGen2Output {
return o
}
// The name of the Data Share Dataset.
func (o DatasetDataLakeGen2Output) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetDataLakeGen2) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The path of the file in the data lake file system to be shared with the receiver. Conflicts with `folderPath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
func (o DatasetDataLakeGen2Output) FilePath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatasetDataLakeGen2) pulumi.StringPtrOutput { return v.FilePath }).(pulumi.StringPtrOutput)
}
// The name of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
func (o DatasetDataLakeGen2Output) FileSystemName() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetDataLakeGen2) pulumi.StringOutput { return v.FileSystemName }).(pulumi.StringOutput)
}
// The folder path in the data lake file system to be shared with the receiver. Conflicts with `filePath` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
func (o DatasetDataLakeGen2Output) FolderPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatasetDataLakeGen2) pulumi.StringPtrOutput { return v.FolderPath }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Data Share Data Lake Gen2 Dataset. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
func (o DatasetDataLakeGen2Output) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetDataLakeGen2) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
func (o DatasetDataLakeGen2Output) ShareId() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetDataLakeGen2) pulumi.StringOutput { return v.ShareId }).(pulumi.StringOutput)
}
// The resource id of the storage account of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created.
func (o DatasetDataLakeGen2Output) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *DatasetDataLakeGen2) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type DatasetDataLakeGen2ArrayOutput struct{ *pulumi.OutputState }
func (DatasetDataLakeGen2ArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatasetDataLakeGen2)(nil)).Elem()
}
func (o DatasetDataLakeGen2ArrayOutput) ToDatasetDataLakeGen2ArrayOutput() DatasetDataLakeGen2ArrayOutput {
return o
}
func (o DatasetDataLakeGen2ArrayOutput) ToDatasetDataLakeGen2ArrayOutputWithContext(ctx context.Context) DatasetDataLakeGen2ArrayOutput {
return o
}
func (o DatasetDataLakeGen2ArrayOutput) Index(i pulumi.IntInput) DatasetDataLakeGen2Output {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatasetDataLakeGen2 {
return vs[0].([]*DatasetDataLakeGen2)[vs[1].(int)]
}).(DatasetDataLakeGen2Output)
}
type DatasetDataLakeGen2MapOutput struct{ *pulumi.OutputState }
func (DatasetDataLakeGen2MapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatasetDataLakeGen2)(nil)).Elem()
}
func (o DatasetDataLakeGen2MapOutput) ToDatasetDataLakeGen2MapOutput() DatasetDataLakeGen2MapOutput {
return o
}
func (o DatasetDataLakeGen2MapOutput) ToDatasetDataLakeGen2MapOutputWithContext(ctx context.Context) DatasetDataLakeGen2MapOutput {
return o
}
func (o DatasetDataLakeGen2MapOutput) MapIndex(k pulumi.StringInput) DatasetDataLakeGen2Output {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatasetDataLakeGen2 {
return vs[0].(map[string]*DatasetDataLakeGen2)[vs[1].(string)]
}).(DatasetDataLakeGen2Output)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatasetDataLakeGen2Input)(nil)).Elem(), &DatasetDataLakeGen2{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetDataLakeGen2ArrayInput)(nil)).Elem(), DatasetDataLakeGen2Array{})
pulumi.RegisterInputType(reflect.TypeOf((*DatasetDataLakeGen2MapInput)(nil)).Elem(), DatasetDataLakeGen2Map{})
pulumi.RegisterOutputType(DatasetDataLakeGen2Output{})
pulumi.RegisterOutputType(DatasetDataLakeGen2ArrayOutput{})
pulumi.RegisterOutputType(DatasetDataLakeGen2MapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/datashare/account.go | sdk/go/azure/datashare/account.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datashare
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Share Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datashare"
// "github.com/pulumi/pulumi/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 = datashare.NewAccount(ctx, "example", &datashare.AccountArgs{
// Name: pulumi.String("example-dsa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Identity: &datashare.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataShare` - 2019-11-01
//
// ## Import
//
// Data Share Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:datashare/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1
// ```
type Account struct {
pulumi.CustomResourceState
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity AccountIdentityOutput `pulumi:"identity"`
// The Azure Region where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Data Share Account.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAccount registers a new resource with the given unique name, arguments, and options.
func NewAccount(ctx *pulumi.Context,
name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:datashare/account:Account", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccount gets an existing Account resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error) {
var resource Account
err := ctx.ReadResource("azure:datashare/account:Account", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Account resources.
type accountState struct {
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity *AccountIdentity `pulumi:"identity"`
// The Azure Region where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Data Share Account.
Tags map[string]string `pulumi:"tags"`
}
type AccountState struct {
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity AccountIdentityPtrInput
// The Azure Region where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Data Share Account.
Tags pulumi.StringMapInput
}
func (AccountState) ElementType() reflect.Type {
return reflect.TypeOf((*accountState)(nil)).Elem()
}
type accountArgs struct {
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity AccountIdentity `pulumi:"identity"`
// The Azure Region where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Data Share Account.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Account resource.
type AccountArgs struct {
// An `identity` block as defined below. Changing this forces a new resource to be created.
Identity AccountIdentityInput
// The Azure Region where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Data Share Account.
Tags pulumi.StringMapInput
}
func (AccountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountArgs)(nil)).Elem()
}
type AccountInput interface {
pulumi.Input
ToAccountOutput() AccountOutput
ToAccountOutputWithContext(ctx context.Context) AccountOutput
}
func (*Account) ElementType() reflect.Type {
return reflect.TypeOf((**Account)(nil)).Elem()
}
func (i *Account) ToAccountOutput() AccountOutput {
return i.ToAccountOutputWithContext(context.Background())
}
func (i *Account) ToAccountOutputWithContext(ctx context.Context) AccountOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountOutput)
}
// AccountArrayInput is an input type that accepts AccountArray and AccountArrayOutput values.
// You can construct a concrete instance of `AccountArrayInput` via:
//
// AccountArray{ AccountArgs{...} }
type AccountArrayInput interface {
pulumi.Input
ToAccountArrayOutput() AccountArrayOutput
ToAccountArrayOutputWithContext(context.Context) AccountArrayOutput
}
type AccountArray []AccountInput
func (AccountArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Account)(nil)).Elem()
}
func (i AccountArray) ToAccountArrayOutput() AccountArrayOutput {
return i.ToAccountArrayOutputWithContext(context.Background())
}
func (i AccountArray) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountArrayOutput)
}
// AccountMapInput is an input type that accepts AccountMap and AccountMapOutput values.
// You can construct a concrete instance of `AccountMapInput` via:
//
// AccountMap{ "key": AccountArgs{...} }
type AccountMapInput interface {
pulumi.Input
ToAccountMapOutput() AccountMapOutput
ToAccountMapOutputWithContext(context.Context) AccountMapOutput
}
type AccountMap map[string]AccountInput
func (AccountMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Account)(nil)).Elem()
}
func (i AccountMap) ToAccountMapOutput() AccountMapOutput {
return i.ToAccountMapOutputWithContext(context.Background())
}
func (i AccountMap) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountMapOutput)
}
type AccountOutput struct{ *pulumi.OutputState }
func (AccountOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Account)(nil)).Elem()
}
func (o AccountOutput) ToAccountOutput() AccountOutput {
return o
}
func (o AccountOutput) ToAccountOutputWithContext(ctx context.Context) AccountOutput {
return o
}
// An `identity` block as defined below. Changing this forces a new resource to be created.
func (o AccountOutput) Identity() AccountIdentityOutput {
return o.ApplyT(func(v *Account) AccountIdentityOutput { return v.Identity }).(AccountIdentityOutput)
}
// The Azure Region where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
func (o AccountOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created.
func (o AccountOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created.
func (o AccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Data Share Account.
func (o AccountOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type AccountArrayOutput struct{ *pulumi.OutputState }
func (AccountArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Account)(nil)).Elem()
}
func (o AccountArrayOutput) ToAccountArrayOutput() AccountArrayOutput {
return o
}
func (o AccountArrayOutput) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput {
return o
}
func (o AccountArrayOutput) Index(i pulumi.IntInput) AccountOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Account {
return vs[0].([]*Account)[vs[1].(int)]
}).(AccountOutput)
}
type AccountMapOutput struct{ *pulumi.OutputState }
func (AccountMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Account)(nil)).Elem()
}
func (o AccountMapOutput) ToAccountMapOutput() AccountMapOutput {
return o
}
func (o AccountMapOutput) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput {
return o
}
func (o AccountMapOutput) MapIndex(k pulumi.StringInput) AccountOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Account {
return vs[0].(map[string]*Account)[vs[1].(string)]
}).(AccountOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountInput)(nil)).Elem(), &Account{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountArrayInput)(nil)).Elem(), AccountArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountMapInput)(nil)).Elem(), AccountMap{})
pulumi.RegisterOutputType(AccountOutput{})
pulumi.RegisterOutputType(AccountArrayOutput{})
pulumi.RegisterOutputType(AccountMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatelink/init.go | sdk/go/azure/privatelink/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 privatelink
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:privatelink/applicationSecurityGroupAssociation:ApplicationSecurityGroupAssociation":
r = &ApplicationSecurityGroupAssociation{}
case "azure:privatelink/endpoint:Endpoint":
r = &Endpoint{}
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",
"privatelink/applicationSecurityGroupAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatelink/endpoint",
&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/privatelink/pulumiTypes.go | sdk/go/azure/privatelink/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 privatelink
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 EndpointCustomDnsConfig struct {
// The fully qualified domain name to the `privateDnsZone`.
Fqdn *string `pulumi:"fqdn"`
// A list of all IP Addresses that map to the `privateDnsZone` fqdn.
IpAddresses []string `pulumi:"ipAddresses"`
}
// EndpointCustomDnsConfigInput is an input type that accepts EndpointCustomDnsConfigArgs and EndpointCustomDnsConfigOutput values.
// You can construct a concrete instance of `EndpointCustomDnsConfigInput` via:
//
// EndpointCustomDnsConfigArgs{...}
type EndpointCustomDnsConfigInput interface {
pulumi.Input
ToEndpointCustomDnsConfigOutput() EndpointCustomDnsConfigOutput
ToEndpointCustomDnsConfigOutputWithContext(context.Context) EndpointCustomDnsConfigOutput
}
type EndpointCustomDnsConfigArgs struct {
// The fully qualified domain name to the `privateDnsZone`.
Fqdn pulumi.StringPtrInput `pulumi:"fqdn"`
// A list of all IP Addresses that map to the `privateDnsZone` fqdn.
IpAddresses pulumi.StringArrayInput `pulumi:"ipAddresses"`
}
func (EndpointCustomDnsConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointCustomDnsConfig)(nil)).Elem()
}
func (i EndpointCustomDnsConfigArgs) ToEndpointCustomDnsConfigOutput() EndpointCustomDnsConfigOutput {
return i.ToEndpointCustomDnsConfigOutputWithContext(context.Background())
}
func (i EndpointCustomDnsConfigArgs) ToEndpointCustomDnsConfigOutputWithContext(ctx context.Context) EndpointCustomDnsConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointCustomDnsConfigOutput)
}
// EndpointCustomDnsConfigArrayInput is an input type that accepts EndpointCustomDnsConfigArray and EndpointCustomDnsConfigArrayOutput values.
// You can construct a concrete instance of `EndpointCustomDnsConfigArrayInput` via:
//
// EndpointCustomDnsConfigArray{ EndpointCustomDnsConfigArgs{...} }
type EndpointCustomDnsConfigArrayInput interface {
pulumi.Input
ToEndpointCustomDnsConfigArrayOutput() EndpointCustomDnsConfigArrayOutput
ToEndpointCustomDnsConfigArrayOutputWithContext(context.Context) EndpointCustomDnsConfigArrayOutput
}
type EndpointCustomDnsConfigArray []EndpointCustomDnsConfigInput
func (EndpointCustomDnsConfigArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointCustomDnsConfig)(nil)).Elem()
}
func (i EndpointCustomDnsConfigArray) ToEndpointCustomDnsConfigArrayOutput() EndpointCustomDnsConfigArrayOutput {
return i.ToEndpointCustomDnsConfigArrayOutputWithContext(context.Background())
}
func (i EndpointCustomDnsConfigArray) ToEndpointCustomDnsConfigArrayOutputWithContext(ctx context.Context) EndpointCustomDnsConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointCustomDnsConfigArrayOutput)
}
type EndpointCustomDnsConfigOutput struct{ *pulumi.OutputState }
func (EndpointCustomDnsConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointCustomDnsConfig)(nil)).Elem()
}
func (o EndpointCustomDnsConfigOutput) ToEndpointCustomDnsConfigOutput() EndpointCustomDnsConfigOutput {
return o
}
func (o EndpointCustomDnsConfigOutput) ToEndpointCustomDnsConfigOutputWithContext(ctx context.Context) EndpointCustomDnsConfigOutput {
return o
}
// The fully qualified domain name to the `privateDnsZone`.
func (o EndpointCustomDnsConfigOutput) Fqdn() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointCustomDnsConfig) *string { return v.Fqdn }).(pulumi.StringPtrOutput)
}
// A list of all IP Addresses that map to the `privateDnsZone` fqdn.
func (o EndpointCustomDnsConfigOutput) IpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v EndpointCustomDnsConfig) []string { return v.IpAddresses }).(pulumi.StringArrayOutput)
}
type EndpointCustomDnsConfigArrayOutput struct{ *pulumi.OutputState }
func (EndpointCustomDnsConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointCustomDnsConfig)(nil)).Elem()
}
func (o EndpointCustomDnsConfigArrayOutput) ToEndpointCustomDnsConfigArrayOutput() EndpointCustomDnsConfigArrayOutput {
return o
}
func (o EndpointCustomDnsConfigArrayOutput) ToEndpointCustomDnsConfigArrayOutputWithContext(ctx context.Context) EndpointCustomDnsConfigArrayOutput {
return o
}
func (o EndpointCustomDnsConfigArrayOutput) Index(i pulumi.IntInput) EndpointCustomDnsConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointCustomDnsConfig {
return vs[0].([]EndpointCustomDnsConfig)[vs[1].(int)]
}).(EndpointCustomDnsConfigOutput)
}
type EndpointIpConfiguration struct {
// Specifies the member name this IP address applies to. If it is not specified, it will use the value of `subresourceName`. Changing this forces a new resource to be created.
//
// > **Note:** `memberName` will be required and will not take the value of `subresourceName` in the next major version.
MemberName *string `pulumi:"memberName"`
// Specifies the Name of the IP Configuration. Changing this forces a new resource to be created.
Name string `pulumi:"name"`
// Specifies the static IP address within the private endpoint's subnet to be used. Changing this forces a new resource to be created.
PrivateIpAddress string `pulumi:"privateIpAddress"`
// Specifies the subresource this IP address applies to. `subresourceNames` corresponds to `groupId`. Changing this forces a new resource to be created.
SubresourceName *string `pulumi:"subresourceName"`
}
// EndpointIpConfigurationInput is an input type that accepts EndpointIpConfigurationArgs and EndpointIpConfigurationOutput values.
// You can construct a concrete instance of `EndpointIpConfigurationInput` via:
//
// EndpointIpConfigurationArgs{...}
type EndpointIpConfigurationInput interface {
pulumi.Input
ToEndpointIpConfigurationOutput() EndpointIpConfigurationOutput
ToEndpointIpConfigurationOutputWithContext(context.Context) EndpointIpConfigurationOutput
}
type EndpointIpConfigurationArgs struct {
// Specifies the member name this IP address applies to. If it is not specified, it will use the value of `subresourceName`. Changing this forces a new resource to be created.
//
// > **Note:** `memberName` will be required and will not take the value of `subresourceName` in the next major version.
MemberName pulumi.StringPtrInput `pulumi:"memberName"`
// Specifies the Name of the IP Configuration. Changing this forces a new resource to be created.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the static IP address within the private endpoint's subnet to be used. Changing this forces a new resource to be created.
PrivateIpAddress pulumi.StringInput `pulumi:"privateIpAddress"`
// Specifies the subresource this IP address applies to. `subresourceNames` corresponds to `groupId`. Changing this forces a new resource to be created.
SubresourceName pulumi.StringPtrInput `pulumi:"subresourceName"`
}
func (EndpointIpConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointIpConfiguration)(nil)).Elem()
}
func (i EndpointIpConfigurationArgs) ToEndpointIpConfigurationOutput() EndpointIpConfigurationOutput {
return i.ToEndpointIpConfigurationOutputWithContext(context.Background())
}
func (i EndpointIpConfigurationArgs) ToEndpointIpConfigurationOutputWithContext(ctx context.Context) EndpointIpConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointIpConfigurationOutput)
}
// EndpointIpConfigurationArrayInput is an input type that accepts EndpointIpConfigurationArray and EndpointIpConfigurationArrayOutput values.
// You can construct a concrete instance of `EndpointIpConfigurationArrayInput` via:
//
// EndpointIpConfigurationArray{ EndpointIpConfigurationArgs{...} }
type EndpointIpConfigurationArrayInput interface {
pulumi.Input
ToEndpointIpConfigurationArrayOutput() EndpointIpConfigurationArrayOutput
ToEndpointIpConfigurationArrayOutputWithContext(context.Context) EndpointIpConfigurationArrayOutput
}
type EndpointIpConfigurationArray []EndpointIpConfigurationInput
func (EndpointIpConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointIpConfiguration)(nil)).Elem()
}
func (i EndpointIpConfigurationArray) ToEndpointIpConfigurationArrayOutput() EndpointIpConfigurationArrayOutput {
return i.ToEndpointIpConfigurationArrayOutputWithContext(context.Background())
}
func (i EndpointIpConfigurationArray) ToEndpointIpConfigurationArrayOutputWithContext(ctx context.Context) EndpointIpConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointIpConfigurationArrayOutput)
}
type EndpointIpConfigurationOutput struct{ *pulumi.OutputState }
func (EndpointIpConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointIpConfiguration)(nil)).Elem()
}
func (o EndpointIpConfigurationOutput) ToEndpointIpConfigurationOutput() EndpointIpConfigurationOutput {
return o
}
func (o EndpointIpConfigurationOutput) ToEndpointIpConfigurationOutputWithContext(ctx context.Context) EndpointIpConfigurationOutput {
return o
}
// Specifies the member name this IP address applies to. If it is not specified, it will use the value of `subresourceName`. Changing this forces a new resource to be created.
//
// > **Note:** `memberName` will be required and will not take the value of `subresourceName` in the next major version.
func (o EndpointIpConfigurationOutput) MemberName() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointIpConfiguration) *string { return v.MemberName }).(pulumi.StringPtrOutput)
}
// Specifies the Name of the IP Configuration. Changing this forces a new resource to be created.
func (o EndpointIpConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v EndpointIpConfiguration) string { return v.Name }).(pulumi.StringOutput)
}
// Specifies the static IP address within the private endpoint's subnet to be used. Changing this forces a new resource to be created.
func (o EndpointIpConfigurationOutput) PrivateIpAddress() pulumi.StringOutput {
return o.ApplyT(func(v EndpointIpConfiguration) string { return v.PrivateIpAddress }).(pulumi.StringOutput)
}
// Specifies the subresource this IP address applies to. `subresourceNames` corresponds to `groupId`. Changing this forces a new resource to be created.
func (o EndpointIpConfigurationOutput) SubresourceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointIpConfiguration) *string { return v.SubresourceName }).(pulumi.StringPtrOutput)
}
type EndpointIpConfigurationArrayOutput struct{ *pulumi.OutputState }
func (EndpointIpConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointIpConfiguration)(nil)).Elem()
}
func (o EndpointIpConfigurationArrayOutput) ToEndpointIpConfigurationArrayOutput() EndpointIpConfigurationArrayOutput {
return o
}
func (o EndpointIpConfigurationArrayOutput) ToEndpointIpConfigurationArrayOutputWithContext(ctx context.Context) EndpointIpConfigurationArrayOutput {
return o
}
func (o EndpointIpConfigurationArrayOutput) Index(i pulumi.IntInput) EndpointIpConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointIpConfiguration {
return vs[0].([]EndpointIpConfiguration)[vs[1].(int)]
}).(EndpointIpConfigurationOutput)
}
type EndpointNetworkInterface struct {
// The ID of the Private DNS Zone Config.
Id *string `pulumi:"id"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
}
// EndpointNetworkInterfaceInput is an input type that accepts EndpointNetworkInterfaceArgs and EndpointNetworkInterfaceOutput values.
// You can construct a concrete instance of `EndpointNetworkInterfaceInput` via:
//
// EndpointNetworkInterfaceArgs{...}
type EndpointNetworkInterfaceInput interface {
pulumi.Input
ToEndpointNetworkInterfaceOutput() EndpointNetworkInterfaceOutput
ToEndpointNetworkInterfaceOutputWithContext(context.Context) EndpointNetworkInterfaceOutput
}
type EndpointNetworkInterfaceArgs struct {
// The ID of the Private DNS Zone Config.
Id pulumi.StringPtrInput `pulumi:"id"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (EndpointNetworkInterfaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointNetworkInterface)(nil)).Elem()
}
func (i EndpointNetworkInterfaceArgs) ToEndpointNetworkInterfaceOutput() EndpointNetworkInterfaceOutput {
return i.ToEndpointNetworkInterfaceOutputWithContext(context.Background())
}
func (i EndpointNetworkInterfaceArgs) ToEndpointNetworkInterfaceOutputWithContext(ctx context.Context) EndpointNetworkInterfaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointNetworkInterfaceOutput)
}
// EndpointNetworkInterfaceArrayInput is an input type that accepts EndpointNetworkInterfaceArray and EndpointNetworkInterfaceArrayOutput values.
// You can construct a concrete instance of `EndpointNetworkInterfaceArrayInput` via:
//
// EndpointNetworkInterfaceArray{ EndpointNetworkInterfaceArgs{...} }
type EndpointNetworkInterfaceArrayInput interface {
pulumi.Input
ToEndpointNetworkInterfaceArrayOutput() EndpointNetworkInterfaceArrayOutput
ToEndpointNetworkInterfaceArrayOutputWithContext(context.Context) EndpointNetworkInterfaceArrayOutput
}
type EndpointNetworkInterfaceArray []EndpointNetworkInterfaceInput
func (EndpointNetworkInterfaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointNetworkInterface)(nil)).Elem()
}
func (i EndpointNetworkInterfaceArray) ToEndpointNetworkInterfaceArrayOutput() EndpointNetworkInterfaceArrayOutput {
return i.ToEndpointNetworkInterfaceArrayOutputWithContext(context.Background())
}
func (i EndpointNetworkInterfaceArray) ToEndpointNetworkInterfaceArrayOutputWithContext(ctx context.Context) EndpointNetworkInterfaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointNetworkInterfaceArrayOutput)
}
type EndpointNetworkInterfaceOutput struct{ *pulumi.OutputState }
func (EndpointNetworkInterfaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointNetworkInterface)(nil)).Elem()
}
func (o EndpointNetworkInterfaceOutput) ToEndpointNetworkInterfaceOutput() EndpointNetworkInterfaceOutput {
return o
}
func (o EndpointNetworkInterfaceOutput) ToEndpointNetworkInterfaceOutputWithContext(ctx context.Context) EndpointNetworkInterfaceOutput {
return o
}
// The ID of the Private DNS Zone Config.
func (o EndpointNetworkInterfaceOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointNetworkInterface) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
func (o EndpointNetworkInterfaceOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointNetworkInterface) *string { return v.Name }).(pulumi.StringPtrOutput)
}
type EndpointNetworkInterfaceArrayOutput struct{ *pulumi.OutputState }
func (EndpointNetworkInterfaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointNetworkInterface)(nil)).Elem()
}
func (o EndpointNetworkInterfaceArrayOutput) ToEndpointNetworkInterfaceArrayOutput() EndpointNetworkInterfaceArrayOutput {
return o
}
func (o EndpointNetworkInterfaceArrayOutput) ToEndpointNetworkInterfaceArrayOutputWithContext(ctx context.Context) EndpointNetworkInterfaceArrayOutput {
return o
}
func (o EndpointNetworkInterfaceArrayOutput) Index(i pulumi.IntInput) EndpointNetworkInterfaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointNetworkInterface {
return vs[0].([]EndpointNetworkInterface)[vs[1].(int)]
}).(EndpointNetworkInterfaceOutput)
}
type EndpointPrivateDnsZoneConfig struct {
// The ID of the Private DNS Zone Config.
Id *string `pulumi:"id"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A list of IP Addresses
PrivateDnsZoneId *string `pulumi:"privateDnsZoneId"`
// A `recordSets` block as defined below.
RecordSets []EndpointPrivateDnsZoneConfigRecordSet `pulumi:"recordSets"`
}
// EndpointPrivateDnsZoneConfigInput is an input type that accepts EndpointPrivateDnsZoneConfigArgs and EndpointPrivateDnsZoneConfigOutput values.
// You can construct a concrete instance of `EndpointPrivateDnsZoneConfigInput` via:
//
// EndpointPrivateDnsZoneConfigArgs{...}
type EndpointPrivateDnsZoneConfigInput interface {
pulumi.Input
ToEndpointPrivateDnsZoneConfigOutput() EndpointPrivateDnsZoneConfigOutput
ToEndpointPrivateDnsZoneConfigOutputWithContext(context.Context) EndpointPrivateDnsZoneConfigOutput
}
type EndpointPrivateDnsZoneConfigArgs struct {
// The ID of the Private DNS Zone Config.
Id pulumi.StringPtrInput `pulumi:"id"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
// A list of IP Addresses
PrivateDnsZoneId pulumi.StringPtrInput `pulumi:"privateDnsZoneId"`
// A `recordSets` block as defined below.
RecordSets EndpointPrivateDnsZoneConfigRecordSetArrayInput `pulumi:"recordSets"`
}
func (EndpointPrivateDnsZoneConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointPrivateDnsZoneConfig)(nil)).Elem()
}
func (i EndpointPrivateDnsZoneConfigArgs) ToEndpointPrivateDnsZoneConfigOutput() EndpointPrivateDnsZoneConfigOutput {
return i.ToEndpointPrivateDnsZoneConfigOutputWithContext(context.Background())
}
func (i EndpointPrivateDnsZoneConfigArgs) ToEndpointPrivateDnsZoneConfigOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointPrivateDnsZoneConfigOutput)
}
// EndpointPrivateDnsZoneConfigArrayInput is an input type that accepts EndpointPrivateDnsZoneConfigArray and EndpointPrivateDnsZoneConfigArrayOutput values.
// You can construct a concrete instance of `EndpointPrivateDnsZoneConfigArrayInput` via:
//
// EndpointPrivateDnsZoneConfigArray{ EndpointPrivateDnsZoneConfigArgs{...} }
type EndpointPrivateDnsZoneConfigArrayInput interface {
pulumi.Input
ToEndpointPrivateDnsZoneConfigArrayOutput() EndpointPrivateDnsZoneConfigArrayOutput
ToEndpointPrivateDnsZoneConfigArrayOutputWithContext(context.Context) EndpointPrivateDnsZoneConfigArrayOutput
}
type EndpointPrivateDnsZoneConfigArray []EndpointPrivateDnsZoneConfigInput
func (EndpointPrivateDnsZoneConfigArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointPrivateDnsZoneConfig)(nil)).Elem()
}
func (i EndpointPrivateDnsZoneConfigArray) ToEndpointPrivateDnsZoneConfigArrayOutput() EndpointPrivateDnsZoneConfigArrayOutput {
return i.ToEndpointPrivateDnsZoneConfigArrayOutputWithContext(context.Background())
}
func (i EndpointPrivateDnsZoneConfigArray) ToEndpointPrivateDnsZoneConfigArrayOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointPrivateDnsZoneConfigArrayOutput)
}
type EndpointPrivateDnsZoneConfigOutput struct{ *pulumi.OutputState }
func (EndpointPrivateDnsZoneConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointPrivateDnsZoneConfig)(nil)).Elem()
}
func (o EndpointPrivateDnsZoneConfigOutput) ToEndpointPrivateDnsZoneConfigOutput() EndpointPrivateDnsZoneConfigOutput {
return o
}
func (o EndpointPrivateDnsZoneConfigOutput) ToEndpointPrivateDnsZoneConfigOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigOutput {
return o
}
// The ID of the Private DNS Zone Config.
func (o EndpointPrivateDnsZoneConfigOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfig) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
func (o EndpointPrivateDnsZoneConfigOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfig) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// A list of IP Addresses
func (o EndpointPrivateDnsZoneConfigOutput) PrivateDnsZoneId() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfig) *string { return v.PrivateDnsZoneId }).(pulumi.StringPtrOutput)
}
// A `recordSets` block as defined below.
func (o EndpointPrivateDnsZoneConfigOutput) RecordSets() EndpointPrivateDnsZoneConfigRecordSetArrayOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfig) []EndpointPrivateDnsZoneConfigRecordSet { return v.RecordSets }).(EndpointPrivateDnsZoneConfigRecordSetArrayOutput)
}
type EndpointPrivateDnsZoneConfigArrayOutput struct{ *pulumi.OutputState }
func (EndpointPrivateDnsZoneConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointPrivateDnsZoneConfig)(nil)).Elem()
}
func (o EndpointPrivateDnsZoneConfigArrayOutput) ToEndpointPrivateDnsZoneConfigArrayOutput() EndpointPrivateDnsZoneConfigArrayOutput {
return o
}
func (o EndpointPrivateDnsZoneConfigArrayOutput) ToEndpointPrivateDnsZoneConfigArrayOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigArrayOutput {
return o
}
func (o EndpointPrivateDnsZoneConfigArrayOutput) Index(i pulumi.IntInput) EndpointPrivateDnsZoneConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointPrivateDnsZoneConfig {
return vs[0].([]EndpointPrivateDnsZoneConfig)[vs[1].(int)]
}).(EndpointPrivateDnsZoneConfigOutput)
}
type EndpointPrivateDnsZoneConfigRecordSet struct {
// The fully qualified domain name to the `privateDnsZone`.
Fqdn *string `pulumi:"fqdn"`
// A list of all IP Addresses that map to the `privateDnsZone` fqdn.
IpAddresses []string `pulumi:"ipAddresses"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The time to live for each connection to the `privateDnsZone`.
Ttl *int `pulumi:"ttl"`
// The type of DNS record.
Type *string `pulumi:"type"`
}
// EndpointPrivateDnsZoneConfigRecordSetInput is an input type that accepts EndpointPrivateDnsZoneConfigRecordSetArgs and EndpointPrivateDnsZoneConfigRecordSetOutput values.
// You can construct a concrete instance of `EndpointPrivateDnsZoneConfigRecordSetInput` via:
//
// EndpointPrivateDnsZoneConfigRecordSetArgs{...}
type EndpointPrivateDnsZoneConfigRecordSetInput interface {
pulumi.Input
ToEndpointPrivateDnsZoneConfigRecordSetOutput() EndpointPrivateDnsZoneConfigRecordSetOutput
ToEndpointPrivateDnsZoneConfigRecordSetOutputWithContext(context.Context) EndpointPrivateDnsZoneConfigRecordSetOutput
}
type EndpointPrivateDnsZoneConfigRecordSetArgs struct {
// The fully qualified domain name to the `privateDnsZone`.
Fqdn pulumi.StringPtrInput `pulumi:"fqdn"`
// A list of all IP Addresses that map to the `privateDnsZone` fqdn.
IpAddresses pulumi.StringArrayInput `pulumi:"ipAddresses"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
// The time to live for each connection to the `privateDnsZone`.
Ttl pulumi.IntPtrInput `pulumi:"ttl"`
// The type of DNS record.
Type pulumi.StringPtrInput `pulumi:"type"`
}
func (EndpointPrivateDnsZoneConfigRecordSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointPrivateDnsZoneConfigRecordSet)(nil)).Elem()
}
func (i EndpointPrivateDnsZoneConfigRecordSetArgs) ToEndpointPrivateDnsZoneConfigRecordSetOutput() EndpointPrivateDnsZoneConfigRecordSetOutput {
return i.ToEndpointPrivateDnsZoneConfigRecordSetOutputWithContext(context.Background())
}
func (i EndpointPrivateDnsZoneConfigRecordSetArgs) ToEndpointPrivateDnsZoneConfigRecordSetOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigRecordSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointPrivateDnsZoneConfigRecordSetOutput)
}
// EndpointPrivateDnsZoneConfigRecordSetArrayInput is an input type that accepts EndpointPrivateDnsZoneConfigRecordSetArray and EndpointPrivateDnsZoneConfigRecordSetArrayOutput values.
// You can construct a concrete instance of `EndpointPrivateDnsZoneConfigRecordSetArrayInput` via:
//
// EndpointPrivateDnsZoneConfigRecordSetArray{ EndpointPrivateDnsZoneConfigRecordSetArgs{...} }
type EndpointPrivateDnsZoneConfigRecordSetArrayInput interface {
pulumi.Input
ToEndpointPrivateDnsZoneConfigRecordSetArrayOutput() EndpointPrivateDnsZoneConfigRecordSetArrayOutput
ToEndpointPrivateDnsZoneConfigRecordSetArrayOutputWithContext(context.Context) EndpointPrivateDnsZoneConfigRecordSetArrayOutput
}
type EndpointPrivateDnsZoneConfigRecordSetArray []EndpointPrivateDnsZoneConfigRecordSetInput
func (EndpointPrivateDnsZoneConfigRecordSetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointPrivateDnsZoneConfigRecordSet)(nil)).Elem()
}
func (i EndpointPrivateDnsZoneConfigRecordSetArray) ToEndpointPrivateDnsZoneConfigRecordSetArrayOutput() EndpointPrivateDnsZoneConfigRecordSetArrayOutput {
return i.ToEndpointPrivateDnsZoneConfigRecordSetArrayOutputWithContext(context.Background())
}
func (i EndpointPrivateDnsZoneConfigRecordSetArray) ToEndpointPrivateDnsZoneConfigRecordSetArrayOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigRecordSetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointPrivateDnsZoneConfigRecordSetArrayOutput)
}
type EndpointPrivateDnsZoneConfigRecordSetOutput struct{ *pulumi.OutputState }
func (EndpointPrivateDnsZoneConfigRecordSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointPrivateDnsZoneConfigRecordSet)(nil)).Elem()
}
func (o EndpointPrivateDnsZoneConfigRecordSetOutput) ToEndpointPrivateDnsZoneConfigRecordSetOutput() EndpointPrivateDnsZoneConfigRecordSetOutput {
return o
}
func (o EndpointPrivateDnsZoneConfigRecordSetOutput) ToEndpointPrivateDnsZoneConfigRecordSetOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigRecordSetOutput {
return o
}
// The fully qualified domain name to the `privateDnsZone`.
func (o EndpointPrivateDnsZoneConfigRecordSetOutput) Fqdn() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfigRecordSet) *string { return v.Fqdn }).(pulumi.StringPtrOutput)
}
// A list of all IP Addresses that map to the `privateDnsZone` fqdn.
func (o EndpointPrivateDnsZoneConfigRecordSetOutput) IpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfigRecordSet) []string { return v.IpAddresses }).(pulumi.StringArrayOutput)
}
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
func (o EndpointPrivateDnsZoneConfigRecordSetOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfigRecordSet) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The time to live for each connection to the `privateDnsZone`.
func (o EndpointPrivateDnsZoneConfigRecordSetOutput) Ttl() pulumi.IntPtrOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfigRecordSet) *int { return v.Ttl }).(pulumi.IntPtrOutput)
}
// The type of DNS record.
func (o EndpointPrivateDnsZoneConfigRecordSetOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v EndpointPrivateDnsZoneConfigRecordSet) *string { return v.Type }).(pulumi.StringPtrOutput)
}
type EndpointPrivateDnsZoneConfigRecordSetArrayOutput struct{ *pulumi.OutputState }
func (EndpointPrivateDnsZoneConfigRecordSetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]EndpointPrivateDnsZoneConfigRecordSet)(nil)).Elem()
}
func (o EndpointPrivateDnsZoneConfigRecordSetArrayOutput) ToEndpointPrivateDnsZoneConfigRecordSetArrayOutput() EndpointPrivateDnsZoneConfigRecordSetArrayOutput {
return o
}
func (o EndpointPrivateDnsZoneConfigRecordSetArrayOutput) ToEndpointPrivateDnsZoneConfigRecordSetArrayOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneConfigRecordSetArrayOutput {
return o
}
func (o EndpointPrivateDnsZoneConfigRecordSetArrayOutput) Index(i pulumi.IntInput) EndpointPrivateDnsZoneConfigRecordSetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointPrivateDnsZoneConfigRecordSet {
return vs[0].([]EndpointPrivateDnsZoneConfigRecordSet)[vs[1].(int)]
}).(EndpointPrivateDnsZoneConfigRecordSetOutput)
}
type EndpointPrivateDnsZoneGroup struct {
// The ID of the Private DNS Zone Config.
Id *string `pulumi:"id"`
// Specifies the Name of the Private DNS Zone Group.
Name string `pulumi:"name"`
// Specifies the list of Private DNS Zones to include within the `privateDnsZoneGroup`.
PrivateDnsZoneIds []string `pulumi:"privateDnsZoneIds"`
}
// EndpointPrivateDnsZoneGroupInput is an input type that accepts EndpointPrivateDnsZoneGroupArgs and EndpointPrivateDnsZoneGroupOutput values.
// You can construct a concrete instance of `EndpointPrivateDnsZoneGroupInput` via:
//
// EndpointPrivateDnsZoneGroupArgs{...}
type EndpointPrivateDnsZoneGroupInput interface {
pulumi.Input
ToEndpointPrivateDnsZoneGroupOutput() EndpointPrivateDnsZoneGroupOutput
ToEndpointPrivateDnsZoneGroupOutputWithContext(context.Context) EndpointPrivateDnsZoneGroupOutput
}
type EndpointPrivateDnsZoneGroupArgs struct {
// The ID of the Private DNS Zone Config.
Id pulumi.StringPtrInput `pulumi:"id"`
// Specifies the Name of the Private DNS Zone Group.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the list of Private DNS Zones to include within the `privateDnsZoneGroup`.
PrivateDnsZoneIds pulumi.StringArrayInput `pulumi:"privateDnsZoneIds"`
}
func (EndpointPrivateDnsZoneGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointPrivateDnsZoneGroup)(nil)).Elem()
}
func (i EndpointPrivateDnsZoneGroupArgs) ToEndpointPrivateDnsZoneGroupOutput() EndpointPrivateDnsZoneGroupOutput {
return i.ToEndpointPrivateDnsZoneGroupOutputWithContext(context.Background())
}
func (i EndpointPrivateDnsZoneGroupArgs) ToEndpointPrivateDnsZoneGroupOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointPrivateDnsZoneGroupOutput)
}
func (i EndpointPrivateDnsZoneGroupArgs) ToEndpointPrivateDnsZoneGroupPtrOutput() EndpointPrivateDnsZoneGroupPtrOutput {
return i.ToEndpointPrivateDnsZoneGroupPtrOutputWithContext(context.Background())
}
func (i EndpointPrivateDnsZoneGroupArgs) ToEndpointPrivateDnsZoneGroupPtrOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneGroupPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointPrivateDnsZoneGroupOutput).ToEndpointPrivateDnsZoneGroupPtrOutputWithContext(ctx)
}
// EndpointPrivateDnsZoneGroupPtrInput is an input type that accepts EndpointPrivateDnsZoneGroupArgs, EndpointPrivateDnsZoneGroupPtr and EndpointPrivateDnsZoneGroupPtrOutput values.
// You can construct a concrete instance of `EndpointPrivateDnsZoneGroupPtrInput` via:
//
// EndpointPrivateDnsZoneGroupArgs{...}
//
// or:
//
// nil
type EndpointPrivateDnsZoneGroupPtrInput interface {
pulumi.Input
ToEndpointPrivateDnsZoneGroupPtrOutput() EndpointPrivateDnsZoneGroupPtrOutput
ToEndpointPrivateDnsZoneGroupPtrOutputWithContext(context.Context) EndpointPrivateDnsZoneGroupPtrOutput
}
type endpointPrivateDnsZoneGroupPtrType EndpointPrivateDnsZoneGroupArgs
func EndpointPrivateDnsZoneGroupPtr(v *EndpointPrivateDnsZoneGroupArgs) EndpointPrivateDnsZoneGroupPtrInput {
return (*endpointPrivateDnsZoneGroupPtrType)(v)
}
func (*endpointPrivateDnsZoneGroupPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointPrivateDnsZoneGroup)(nil)).Elem()
}
func (i *endpointPrivateDnsZoneGroupPtrType) ToEndpointPrivateDnsZoneGroupPtrOutput() EndpointPrivateDnsZoneGroupPtrOutput {
return i.ToEndpointPrivateDnsZoneGroupPtrOutputWithContext(context.Background())
}
func (i *endpointPrivateDnsZoneGroupPtrType) ToEndpointPrivateDnsZoneGroupPtrOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneGroupPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointPrivateDnsZoneGroupPtrOutput)
}
type EndpointPrivateDnsZoneGroupOutput struct{ *pulumi.OutputState }
func (EndpointPrivateDnsZoneGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((*EndpointPrivateDnsZoneGroup)(nil)).Elem()
}
func (o EndpointPrivateDnsZoneGroupOutput) ToEndpointPrivateDnsZoneGroupOutput() EndpointPrivateDnsZoneGroupOutput {
return o
}
func (o EndpointPrivateDnsZoneGroupOutput) ToEndpointPrivateDnsZoneGroupOutputWithContext(ctx context.Context) EndpointPrivateDnsZoneGroupOutput {
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/privatelink/getServiceEndpointConnections.go | sdk/go/azure/privatelink/getServiceEndpointConnections.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatelink
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 endpoint connection information about an existing Private Link Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := privatelink.GetServiceEndpointConnections(ctx, &privatelink.GetServiceEndpointConnectionsArgs{
// ServiceId: exampleAzurermPrivateLinkService.Id,
// ResourceGroupName: exampleAzurermResourceGroup.Name,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("privateEndpointStatus", example.PrivateEndpointConnections[0].Status)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2025-01-01
func GetServiceEndpointConnections(ctx *pulumi.Context, args *GetServiceEndpointConnectionsArgs, opts ...pulumi.InvokeOption) (*GetServiceEndpointConnectionsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetServiceEndpointConnectionsResult
err := ctx.Invoke("azure:privatelink/getServiceEndpointConnections:getServiceEndpointConnections", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getServiceEndpointConnections.
type GetServiceEndpointConnectionsArgs struct {
// The name of the resource group in which the private link service resides.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The resource ID of the private link service.
ServiceId string `pulumi:"serviceId"`
}
// A collection of values returned by getServiceEndpointConnections.
type GetServiceEndpointConnectionsResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
PrivateEndpointConnections []GetServiceEndpointConnectionsPrivateEndpointConnection `pulumi:"privateEndpointConnections"`
ResourceGroupName string `pulumi:"resourceGroupName"`
ServiceId string `pulumi:"serviceId"`
// The name of the private link service.
ServiceName string `pulumi:"serviceName"`
}
func GetServiceEndpointConnectionsOutput(ctx *pulumi.Context, args GetServiceEndpointConnectionsOutputArgs, opts ...pulumi.InvokeOption) GetServiceEndpointConnectionsResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetServiceEndpointConnectionsResultOutput, error) {
args := v.(GetServiceEndpointConnectionsArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatelink/getServiceEndpointConnections:getServiceEndpointConnections", args, GetServiceEndpointConnectionsResultOutput{}, options).(GetServiceEndpointConnectionsResultOutput), nil
}).(GetServiceEndpointConnectionsResultOutput)
}
// A collection of arguments for invoking getServiceEndpointConnections.
type GetServiceEndpointConnectionsOutputArgs struct {
// The name of the resource group in which the private link service resides.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The resource ID of the private link service.
ServiceId pulumi.StringInput `pulumi:"serviceId"`
}
func (GetServiceEndpointConnectionsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceEndpointConnectionsArgs)(nil)).Elem()
}
// A collection of values returned by getServiceEndpointConnections.
type GetServiceEndpointConnectionsResultOutput struct{ *pulumi.OutputState }
func (GetServiceEndpointConnectionsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceEndpointConnectionsResult)(nil)).Elem()
}
func (o GetServiceEndpointConnectionsResultOutput) ToGetServiceEndpointConnectionsResultOutput() GetServiceEndpointConnectionsResultOutput {
return o
}
func (o GetServiceEndpointConnectionsResultOutput) ToGetServiceEndpointConnectionsResultOutputWithContext(ctx context.Context) GetServiceEndpointConnectionsResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetServiceEndpointConnectionsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceEndpointConnectionsResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetServiceEndpointConnectionsResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceEndpointConnectionsResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o GetServiceEndpointConnectionsResultOutput) PrivateEndpointConnections() GetServiceEndpointConnectionsPrivateEndpointConnectionArrayOutput {
return o.ApplyT(func(v GetServiceEndpointConnectionsResult) []GetServiceEndpointConnectionsPrivateEndpointConnection {
return v.PrivateEndpointConnections
}).(GetServiceEndpointConnectionsPrivateEndpointConnectionArrayOutput)
}
func (o GetServiceEndpointConnectionsResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceEndpointConnectionsResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o GetServiceEndpointConnectionsResultOutput) ServiceId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceEndpointConnectionsResult) string { return v.ServiceId }).(pulumi.StringOutput)
}
// The name of the private link service.
func (o GetServiceEndpointConnectionsResultOutput) ServiceName() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceEndpointConnectionsResult) string { return v.ServiceName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetServiceEndpointConnectionsResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatelink/applicationSecurityGroupAssociation.go | sdk/go/azure/privatelink/applicationSecurityGroupAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatelink
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an association between Private Endpoint and Application Security Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-PEASGAsso"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("examplevnet"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.5.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// service, err := network.NewSubnet(ctx, "service", &network.SubnetArgs{
// Name: pulumi.String("examplenetservice"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.5.1.0/24"),
// },
// EnforcePrivateLinkServiceNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// endpoint, err := network.NewSubnet(ctx, "endpoint", &network.SubnetArgs{
// Name: pulumi.String("examplenetendpoint"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.5.2.0/24"),
// },
// EnforcePrivateLinkEndpointNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("examplepip"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// })
// if err != nil {
// return err
// }
// exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
// Name: pulumi.String("examplelb"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
// &lb.LoadBalancerFrontendIpConfigurationArgs{
// Name: examplePublicIp.Name,
// PublicIpAddressId: examplePublicIp.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleLinkService, err := privatedns.NewLinkService(ctx, "example", &privatedns.LinkServiceArgs{
// Name: pulumi.String("examplePLS"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AutoApprovalSubscriptionIds: pulumi.StringArray{
// pulumi.String(current.SubscriptionId),
// },
// VisibilitySubscriptionIds: pulumi.StringArray{
// pulumi.String(current.SubscriptionId),
// },
// NatIpConfigurations: privatedns.LinkServiceNatIpConfigurationArray{
// &privatedns.LinkServiceNatIpConfigurationArgs{
// Name: pulumi.String("primaryIpConfiguration"),
// Primary: pulumi.Bool(true),
// SubnetId: service.ID(),
// },
// },
// LoadBalancerFrontendIpConfigurationIds: pulumi.StringArray{
// pulumi.String(exampleLoadBalancer.FrontendIpConfigurations.ApplyT(func(frontendIpConfigurations []lb.LoadBalancerFrontendIpConfiguration) (*string, error) {
// return &frontendIpConfigurations[0].Id, nil
// }).(pulumi.StringPtrOutput)),
// },
// })
// if err != nil {
// return err
// }
// exampleEndpoint, err := privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-privatelink"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SubnetId: endpoint.ID(),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: exampleLinkService.Name,
// IsManualConnection: pulumi.Bool(false),
// PrivateConnectionResourceId: exampleLinkService.ID(),
// },
// })
// if err != nil {
// return err
// }
// exampleApplicationSecurityGroup, err := network.NewApplicationSecurityGroup(ctx, "example", &network.ApplicationSecurityGroupArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatelink.NewApplicationSecurityGroupAssociation(ctx, "example", &privatelink.ApplicationSecurityGroupAssociationArgs{
// PrivateEndpointId: exampleEndpoint.ID(),
// ApplicationSecurityGroupId: exampleApplicationSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2025-01-01
//
// ## Import
//
// Associations between Private Endpoint and Application Security Group can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatelink/applicationSecurityGroupAssociation:ApplicationSecurityGroupAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/privateEndpoints/endpoints1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/applicationSecurityGroups/securityGroup1",
// ```
type ApplicationSecurityGroupAssociation struct {
pulumi.CustomResourceState
// The id of application security group to associate. Changing this forces a new resource to be created.
ApplicationSecurityGroupId pulumi.StringOutput `pulumi:"applicationSecurityGroupId"`
// The id of private endpoint to associate. Changing this forces a new resource to be created.
PrivateEndpointId pulumi.StringOutput `pulumi:"privateEndpointId"`
}
// NewApplicationSecurityGroupAssociation registers a new resource with the given unique name, arguments, and options.
func NewApplicationSecurityGroupAssociation(ctx *pulumi.Context,
name string, args *ApplicationSecurityGroupAssociationArgs, opts ...pulumi.ResourceOption) (*ApplicationSecurityGroupAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApplicationSecurityGroupId == nil {
return nil, errors.New("invalid value for required argument 'ApplicationSecurityGroupId'")
}
if args.PrivateEndpointId == nil {
return nil, errors.New("invalid value for required argument 'PrivateEndpointId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApplicationSecurityGroupAssociation
err := ctx.RegisterResource("azure:privatelink/applicationSecurityGroupAssociation:ApplicationSecurityGroupAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApplicationSecurityGroupAssociation gets an existing ApplicationSecurityGroupAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApplicationSecurityGroupAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApplicationSecurityGroupAssociationState, opts ...pulumi.ResourceOption) (*ApplicationSecurityGroupAssociation, error) {
var resource ApplicationSecurityGroupAssociation
err := ctx.ReadResource("azure:privatelink/applicationSecurityGroupAssociation:ApplicationSecurityGroupAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApplicationSecurityGroupAssociation resources.
type applicationSecurityGroupAssociationState struct {
// The id of application security group to associate. Changing this forces a new resource to be created.
ApplicationSecurityGroupId *string `pulumi:"applicationSecurityGroupId"`
// The id of private endpoint to associate. Changing this forces a new resource to be created.
PrivateEndpointId *string `pulumi:"privateEndpointId"`
}
type ApplicationSecurityGroupAssociationState struct {
// The id of application security group to associate. Changing this forces a new resource to be created.
ApplicationSecurityGroupId pulumi.StringPtrInput
// The id of private endpoint to associate. Changing this forces a new resource to be created.
PrivateEndpointId pulumi.StringPtrInput
}
func (ApplicationSecurityGroupAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*applicationSecurityGroupAssociationState)(nil)).Elem()
}
type applicationSecurityGroupAssociationArgs struct {
// The id of application security group to associate. Changing this forces a new resource to be created.
ApplicationSecurityGroupId string `pulumi:"applicationSecurityGroupId"`
// The id of private endpoint to associate. Changing this forces a new resource to be created.
PrivateEndpointId string `pulumi:"privateEndpointId"`
}
// The set of arguments for constructing a ApplicationSecurityGroupAssociation resource.
type ApplicationSecurityGroupAssociationArgs struct {
// The id of application security group to associate. Changing this forces a new resource to be created.
ApplicationSecurityGroupId pulumi.StringInput
// The id of private endpoint to associate. Changing this forces a new resource to be created.
PrivateEndpointId pulumi.StringInput
}
func (ApplicationSecurityGroupAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*applicationSecurityGroupAssociationArgs)(nil)).Elem()
}
type ApplicationSecurityGroupAssociationInput interface {
pulumi.Input
ToApplicationSecurityGroupAssociationOutput() ApplicationSecurityGroupAssociationOutput
ToApplicationSecurityGroupAssociationOutputWithContext(ctx context.Context) ApplicationSecurityGroupAssociationOutput
}
func (*ApplicationSecurityGroupAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationSecurityGroupAssociation)(nil)).Elem()
}
func (i *ApplicationSecurityGroupAssociation) ToApplicationSecurityGroupAssociationOutput() ApplicationSecurityGroupAssociationOutput {
return i.ToApplicationSecurityGroupAssociationOutputWithContext(context.Background())
}
func (i *ApplicationSecurityGroupAssociation) ToApplicationSecurityGroupAssociationOutputWithContext(ctx context.Context) ApplicationSecurityGroupAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationSecurityGroupAssociationOutput)
}
// ApplicationSecurityGroupAssociationArrayInput is an input type that accepts ApplicationSecurityGroupAssociationArray and ApplicationSecurityGroupAssociationArrayOutput values.
// You can construct a concrete instance of `ApplicationSecurityGroupAssociationArrayInput` via:
//
// ApplicationSecurityGroupAssociationArray{ ApplicationSecurityGroupAssociationArgs{...} }
type ApplicationSecurityGroupAssociationArrayInput interface {
pulumi.Input
ToApplicationSecurityGroupAssociationArrayOutput() ApplicationSecurityGroupAssociationArrayOutput
ToApplicationSecurityGroupAssociationArrayOutputWithContext(context.Context) ApplicationSecurityGroupAssociationArrayOutput
}
type ApplicationSecurityGroupAssociationArray []ApplicationSecurityGroupAssociationInput
func (ApplicationSecurityGroupAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApplicationSecurityGroupAssociation)(nil)).Elem()
}
func (i ApplicationSecurityGroupAssociationArray) ToApplicationSecurityGroupAssociationArrayOutput() ApplicationSecurityGroupAssociationArrayOutput {
return i.ToApplicationSecurityGroupAssociationArrayOutputWithContext(context.Background())
}
func (i ApplicationSecurityGroupAssociationArray) ToApplicationSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) ApplicationSecurityGroupAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationSecurityGroupAssociationArrayOutput)
}
// ApplicationSecurityGroupAssociationMapInput is an input type that accepts ApplicationSecurityGroupAssociationMap and ApplicationSecurityGroupAssociationMapOutput values.
// You can construct a concrete instance of `ApplicationSecurityGroupAssociationMapInput` via:
//
// ApplicationSecurityGroupAssociationMap{ "key": ApplicationSecurityGroupAssociationArgs{...} }
type ApplicationSecurityGroupAssociationMapInput interface {
pulumi.Input
ToApplicationSecurityGroupAssociationMapOutput() ApplicationSecurityGroupAssociationMapOutput
ToApplicationSecurityGroupAssociationMapOutputWithContext(context.Context) ApplicationSecurityGroupAssociationMapOutput
}
type ApplicationSecurityGroupAssociationMap map[string]ApplicationSecurityGroupAssociationInput
func (ApplicationSecurityGroupAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApplicationSecurityGroupAssociation)(nil)).Elem()
}
func (i ApplicationSecurityGroupAssociationMap) ToApplicationSecurityGroupAssociationMapOutput() ApplicationSecurityGroupAssociationMapOutput {
return i.ToApplicationSecurityGroupAssociationMapOutputWithContext(context.Background())
}
func (i ApplicationSecurityGroupAssociationMap) ToApplicationSecurityGroupAssociationMapOutputWithContext(ctx context.Context) ApplicationSecurityGroupAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationSecurityGroupAssociationMapOutput)
}
type ApplicationSecurityGroupAssociationOutput struct{ *pulumi.OutputState }
func (ApplicationSecurityGroupAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationSecurityGroupAssociation)(nil)).Elem()
}
func (o ApplicationSecurityGroupAssociationOutput) ToApplicationSecurityGroupAssociationOutput() ApplicationSecurityGroupAssociationOutput {
return o
}
func (o ApplicationSecurityGroupAssociationOutput) ToApplicationSecurityGroupAssociationOutputWithContext(ctx context.Context) ApplicationSecurityGroupAssociationOutput {
return o
}
// The id of application security group to associate. Changing this forces a new resource to be created.
func (o ApplicationSecurityGroupAssociationOutput) ApplicationSecurityGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationSecurityGroupAssociation) pulumi.StringOutput { return v.ApplicationSecurityGroupId }).(pulumi.StringOutput)
}
// The id of private endpoint to associate. Changing this forces a new resource to be created.
func (o ApplicationSecurityGroupAssociationOutput) PrivateEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationSecurityGroupAssociation) pulumi.StringOutput { return v.PrivateEndpointId }).(pulumi.StringOutput)
}
type ApplicationSecurityGroupAssociationArrayOutput struct{ *pulumi.OutputState }
func (ApplicationSecurityGroupAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApplicationSecurityGroupAssociation)(nil)).Elem()
}
func (o ApplicationSecurityGroupAssociationArrayOutput) ToApplicationSecurityGroupAssociationArrayOutput() ApplicationSecurityGroupAssociationArrayOutput {
return o
}
func (o ApplicationSecurityGroupAssociationArrayOutput) ToApplicationSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) ApplicationSecurityGroupAssociationArrayOutput {
return o
}
func (o ApplicationSecurityGroupAssociationArrayOutput) Index(i pulumi.IntInput) ApplicationSecurityGroupAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApplicationSecurityGroupAssociation {
return vs[0].([]*ApplicationSecurityGroupAssociation)[vs[1].(int)]
}).(ApplicationSecurityGroupAssociationOutput)
}
type ApplicationSecurityGroupAssociationMapOutput struct{ *pulumi.OutputState }
func (ApplicationSecurityGroupAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApplicationSecurityGroupAssociation)(nil)).Elem()
}
func (o ApplicationSecurityGroupAssociationMapOutput) ToApplicationSecurityGroupAssociationMapOutput() ApplicationSecurityGroupAssociationMapOutput {
return o
}
func (o ApplicationSecurityGroupAssociationMapOutput) ToApplicationSecurityGroupAssociationMapOutputWithContext(ctx context.Context) ApplicationSecurityGroupAssociationMapOutput {
return o
}
func (o ApplicationSecurityGroupAssociationMapOutput) MapIndex(k pulumi.StringInput) ApplicationSecurityGroupAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApplicationSecurityGroupAssociation {
return vs[0].(map[string]*ApplicationSecurityGroupAssociation)[vs[1].(string)]
}).(ApplicationSecurityGroupAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationSecurityGroupAssociationInput)(nil)).Elem(), &ApplicationSecurityGroupAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationSecurityGroupAssociationArrayInput)(nil)).Elem(), ApplicationSecurityGroupAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationSecurityGroupAssociationMapInput)(nil)).Elem(), ApplicationSecurityGroupAssociationMap{})
pulumi.RegisterOutputType(ApplicationSecurityGroupAssociationOutput{})
pulumi.RegisterOutputType(ApplicationSecurityGroupAssociationArrayOutput{})
pulumi.RegisterOutputType(ApplicationSecurityGroupAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatelink/endpoint.go | sdk/go/azure/privatelink/endpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatelink
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private Endpoint.
//
// Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link. Private Endpoint uses a private IP address from your VNet, effectively bringing the service into your VNet. The service could be an Azure service such as Azure Storage, SQL, etc. or your own Private Link Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// service, err := network.NewSubnet(ctx, "service", &network.SubnetArgs{
// Name: pulumi.String("service"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// EnforcePrivateLinkServiceNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// endpoint, err := network.NewSubnet(ctx, "endpoint", &network.SubnetArgs{
// Name: pulumi.String("endpoint"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// EnforcePrivateLinkEndpointNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-pip"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// })
// if err != nil {
// return err
// }
// exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
// Name: pulumi.String("example-lb"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
// &lb.LoadBalancerFrontendIpConfigurationArgs{
// Name: examplePublicIp.Name,
// PublicIpAddressId: examplePublicIp.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleLinkService, err := privatedns.NewLinkService(ctx, "example", &privatedns.LinkServiceArgs{
// Name: pulumi.String("example-privatelink"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// NatIpConfigurations: privatedns.LinkServiceNatIpConfigurationArray{
// &privatedns.LinkServiceNatIpConfigurationArgs{
// Name: examplePublicIp.Name,
// Primary: pulumi.Bool(true),
// SubnetId: service.ID(),
// },
// },
// LoadBalancerFrontendIpConfigurationIds: pulumi.StringArray{
// pulumi.String(exampleLoadBalancer.FrontendIpConfigurations.ApplyT(func(frontendIpConfigurations []lb.LoadBalancerFrontendIpConfiguration) (*string, error) {
// return &frontendIpConfigurations[0].Id, nil
// }).(pulumi.StringPtrOutput)),
// },
// })
// if err != nil {
// return err
// }
// _, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-endpoint"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SubnetId: endpoint.ID(),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: pulumi.String("example-privateserviceconnection"),
// PrivateConnectionResourceId: exampleLinkService.ID(),
// IsManualConnection: pulumi.Bool(false),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// Using a Private Link Service Alias with existing resources:
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{
// Name: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// vnet, err := network.LookupVirtualNetwork(ctx, &network.LookupVirtualNetworkArgs{
// Name: "example-network",
// ResourceGroupName: example.Name,
// }, nil)
// if err != nil {
// return err
// }
// subnet, err := network.LookupSubnet(ctx, &network.LookupSubnetArgs{
// Name: "default",
// VirtualNetworkName: vnet.Name,
// ResourceGroupName: example.Name,
// }, nil)
// if err != nil {
// return err
// }
// _, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-endpoint"),
// Location: pulumi.String(example.Location),
// ResourceGroupName: pulumi.String(example.Name),
// SubnetId: pulumi.String(subnet.Id),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: pulumi.String("example-privateserviceconnection"),
// PrivateConnectionResourceAlias: pulumi.String("example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice"),
// IsManualConnection: pulumi.Bool(true),
// RequestMessage: pulumi.String("PL"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// Using a Private Endpoint pointing to an *owned* Azure service, with proper DNS configuration:
//
// ```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/privatedns"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("exampleaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("virtnetname"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("subnetname"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("privatelink.blob.core.windows.net"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-endpoint"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SubnetId: exampleSubnet.ID(),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: pulumi.String("example-privateserviceconnection"),
// PrivateConnectionResourceId: exampleAccount.ID(),
// SubresourceNames: pulumi.StringArray{
// pulumi.String("blob"),
// },
// IsManualConnection: pulumi.Bool(false),
// },
// PrivateDnsZoneGroup: &privatelink.EndpointPrivateDnsZoneGroupArgs{
// Name: pulumi.String("example-dns-zone-group"),
// PrivateDnsZoneIds: pulumi.StringArray{
// exampleZone.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewZoneVirtualNetworkLink(ctx, "example", &privatedns.ZoneVirtualNetworkLinkArgs{
// Name: pulumi.String("example-link"),
// ResourceGroupName: example.Name,
// PrivateDnsZoneName: exampleZone.Name,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Example HCL Configurations
//
// * How to conneca `Private Endpoint` to a Application Gateway
// * How to connect a `Private Endpoint` to a Cosmos MongoDB
// * How to connect a `Private Endpoint` to a Cosmos PostgreSQL
// * How to connect a `Private Endpoint` to a PostgreSQL Server
// * How to connect a `Private Endpoint` to a Private Link Service
// * How to connect a `Private Endpoint` to a Private DNS Group
// * How to connect a `Private Endpoint` to a Databricks Workspace
// * How to connect a `Private Endpoint` to a Managed Redis
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2025-01-01
//
// ## Import
//
// Private Endpoints can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatelink/endpoint:Endpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/privateEndpoints/endpoint1
// ```
type Endpoint struct {
pulumi.CustomResourceState
// A `customDnsConfigs` block as defined below.
CustomDnsConfigs EndpointCustomDnsConfigArrayOutput `pulumi:"customDnsConfigs"`
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName pulumi.StringPtrOutput `pulumi:"customNetworkInterfaceName"`
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations EndpointIpConfigurationArrayOutput `pulumi:"ipConfigurations"`
// 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 Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkInterface` block as defined below.
NetworkInterfaces EndpointNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"`
// A `privateDnsZoneConfigs` block as defined below.
PrivateDnsZoneConfigs EndpointPrivateDnsZoneConfigArrayOutput `pulumi:"privateDnsZoneConfigs"`
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup EndpointPrivateDnsZoneGroupPtrOutput `pulumi:"privateDnsZoneGroup"`
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnectionOutput `pulumi:"privateServiceConnection"`
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewEndpoint registers a new resource with the given unique name, arguments, and options.
func NewEndpoint(ctx *pulumi.Context,
name string, args *EndpointArgs, opts ...pulumi.ResourceOption) (*Endpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrivateServiceConnection == nil {
return nil, errors.New("invalid value for required argument 'PrivateServiceConnection'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Endpoint
err := ctx.RegisterResource("azure:privatelink/endpoint:Endpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpoint gets an existing Endpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointState, opts ...pulumi.ResourceOption) (*Endpoint, error) {
var resource Endpoint
err := ctx.ReadResource("azure:privatelink/endpoint:Endpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Endpoint resources.
type endpointState struct {
// A `customDnsConfigs` block as defined below.
CustomDnsConfigs []EndpointCustomDnsConfig `pulumi:"customDnsConfigs"`
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName *string `pulumi:"customNetworkInterfaceName"`
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations []EndpointIpConfiguration `pulumi:"ipConfigurations"`
// 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 Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkInterface` block as defined below.
NetworkInterfaces []EndpointNetworkInterface `pulumi:"networkInterfaces"`
// A `privateDnsZoneConfigs` block as defined below.
PrivateDnsZoneConfigs []EndpointPrivateDnsZoneConfig `pulumi:"privateDnsZoneConfigs"`
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup *EndpointPrivateDnsZoneGroup `pulumi:"privateDnsZoneGroup"`
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection *EndpointPrivateServiceConnection `pulumi:"privateServiceConnection"`
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type EndpointState struct {
// A `customDnsConfigs` block as defined below.
CustomDnsConfigs EndpointCustomDnsConfigArrayInput
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName pulumi.StringPtrInput
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations EndpointIpConfigurationArrayInput
// 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 Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkInterface` block as defined below.
NetworkInterfaces EndpointNetworkInterfaceArrayInput
// A `privateDnsZoneConfigs` block as defined below.
PrivateDnsZoneConfigs EndpointPrivateDnsZoneConfigArrayInput
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup EndpointPrivateDnsZoneGroupPtrInput
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnectionPtrInput
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointState)(nil)).Elem()
}
type endpointArgs struct {
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName *string `pulumi:"customNetworkInterfaceName"`
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations []EndpointIpConfiguration `pulumi:"ipConfigurations"`
// 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 Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup *EndpointPrivateDnsZoneGroup `pulumi:"privateDnsZoneGroup"`
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnection `pulumi:"privateServiceConnection"`
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId string `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Endpoint resource.
type EndpointArgs struct {
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName pulumi.StringPtrInput
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations EndpointIpConfigurationArrayInput
// 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 Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup EndpointPrivateDnsZoneGroupPtrInput
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnectionInput
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointArgs)(nil)).Elem()
}
type EndpointInput interface {
pulumi.Input
ToEndpointOutput() EndpointOutput
ToEndpointOutputWithContext(ctx context.Context) EndpointOutput
}
func (*Endpoint) ElementType() reflect.Type {
return reflect.TypeOf((**Endpoint)(nil)).Elem()
}
func (i *Endpoint) ToEndpointOutput() EndpointOutput {
return i.ToEndpointOutputWithContext(context.Background())
}
func (i *Endpoint) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointOutput)
}
// EndpointArrayInput is an input type that accepts EndpointArray and EndpointArrayOutput values.
// You can construct a concrete instance of `EndpointArrayInput` via:
//
// EndpointArray{ EndpointArgs{...} }
type EndpointArrayInput interface {
pulumi.Input
ToEndpointArrayOutput() EndpointArrayOutput
ToEndpointArrayOutputWithContext(context.Context) EndpointArrayOutput
}
type EndpointArray []EndpointInput
func (EndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Endpoint)(nil)).Elem()
}
func (i EndpointArray) ToEndpointArrayOutput() EndpointArrayOutput {
return i.ToEndpointArrayOutputWithContext(context.Background())
}
func (i EndpointArray) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointArrayOutput)
}
// EndpointMapInput is an input type that accepts EndpointMap and EndpointMapOutput values.
// You can construct a concrete instance of `EndpointMapInput` via:
//
// EndpointMap{ "key": EndpointArgs{...} }
type EndpointMapInput interface {
pulumi.Input
ToEndpointMapOutput() EndpointMapOutput
ToEndpointMapOutputWithContext(context.Context) EndpointMapOutput
}
type EndpointMap map[string]EndpointInput
func (EndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Endpoint)(nil)).Elem()
}
func (i EndpointMap) ToEndpointMapOutput() EndpointMapOutput {
return i.ToEndpointMapOutputWithContext(context.Background())
}
func (i EndpointMap) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointMapOutput)
}
type EndpointOutput struct{ *pulumi.OutputState }
func (EndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Endpoint)(nil)).Elem()
}
func (o EndpointOutput) ToEndpointOutput() EndpointOutput {
return o
}
func (o EndpointOutput) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput {
return o
}
// A `customDnsConfigs` block as defined below.
func (o EndpointOutput) CustomDnsConfigs() EndpointCustomDnsConfigArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointCustomDnsConfigArrayOutput { return v.CustomDnsConfigs }).(EndpointCustomDnsConfigArrayOutput)
}
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
func (o EndpointOutput) CustomNetworkInterfaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringPtrOutput { return v.CustomNetworkInterfaceName }).(pulumi.StringPtrOutput)
}
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
func (o EndpointOutput) IpConfigurations() EndpointIpConfigurationArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointIpConfigurationArrayOutput { return v.IpConfigurations }).(EndpointIpConfigurationArrayOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o EndpointOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
func (o EndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkInterface` block as defined below.
func (o EndpointOutput) NetworkInterfaces() EndpointNetworkInterfaceArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointNetworkInterfaceArrayOutput { return v.NetworkInterfaces }).(EndpointNetworkInterfaceArrayOutput)
}
// A `privateDnsZoneConfigs` block as defined below.
func (o EndpointOutput) PrivateDnsZoneConfigs() EndpointPrivateDnsZoneConfigArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointPrivateDnsZoneConfigArrayOutput { return v.PrivateDnsZoneConfigs }).(EndpointPrivateDnsZoneConfigArrayOutput)
}
// A `privateDnsZoneGroup` block as defined below.
func (o EndpointOutput) PrivateDnsZoneGroup() EndpointPrivateDnsZoneGroupPtrOutput {
return o.ApplyT(func(v *Endpoint) EndpointPrivateDnsZoneGroupPtrOutput { return v.PrivateDnsZoneGroup }).(EndpointPrivateDnsZoneGroupPtrOutput)
}
// A `privateServiceConnection` block as defined below.
func (o EndpointOutput) PrivateServiceConnection() EndpointPrivateServiceConnectionOutput {
return o.ApplyT(func(v *Endpoint) EndpointPrivateServiceConnectionOutput { return v.PrivateServiceConnection }).(EndpointPrivateServiceConnectionOutput)
}
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
func (o EndpointOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
func (o EndpointOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o EndpointOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type EndpointArrayOutput struct{ *pulumi.OutputState }
func (EndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Endpoint)(nil)).Elem()
}
func (o EndpointArrayOutput) ToEndpointArrayOutput() EndpointArrayOutput {
return o
}
func (o EndpointArrayOutput) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput {
return o
}
func (o EndpointArrayOutput) Index(i pulumi.IntInput) EndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Endpoint {
return vs[0].([]*Endpoint)[vs[1].(int)]
}).(EndpointOutput)
}
type EndpointMapOutput struct{ *pulumi.OutputState }
func (EndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Endpoint)(nil)).Elem()
}
func (o EndpointMapOutput) ToEndpointMapOutput() EndpointMapOutput {
return o
}
func (o EndpointMapOutput) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput {
return o
}
func (o EndpointMapOutput) MapIndex(k pulumi.StringInput) EndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Endpoint {
return vs[0].(map[string]*Endpoint)[vs[1].(string)]
}).(EndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointInput)(nil)).Elem(), &Endpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointArrayInput)(nil)).Elem(), EndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointMapInput)(nil)).Elem(), EndpointMap{})
pulumi.RegisterOutputType(EndpointOutput{})
pulumi.RegisterOutputType(EndpointArrayOutput{})
pulumi.RegisterOutputType(EndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatelink/getService.go | sdk/go/azure/privatelink/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 privatelink
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 Private Link Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := privatelink.GetService(ctx, &privatelink.GetServiceArgs{
// Name: "myPrivateLinkService",
// ResourceGroupName: "PrivateLinkServiceRG",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("privateLinkServiceId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2025-01-01
func GetService(ctx *pulumi.Context, args *GetServiceArgs, opts ...pulumi.InvokeOption) (*GetServiceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetServiceResult
err := ctx.Invoke("azure:privatelink/getService:getService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getService.
type GetServiceArgs struct {
// The name of the private link service.
Name string `pulumi:"name"`
// The name of the resource group in which the private link service resides.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getService.
type GetServiceResult struct {
// The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
Alias string `pulumi:"alias"`
// The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
AutoApprovalSubscriptionIds []string `pulumi:"autoApprovalSubscriptionIds"`
// Does the Private Link Service support the Proxy Protocol?
EnableProxyProtocol bool `pulumi:"enableProxyProtocol"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
LoadBalancerFrontendIpConfigurationIds []string `pulumi:"loadBalancerFrontendIpConfigurationIds"`
// The supported Azure location where the resource exists.
Location string `pulumi:"location"`
// The name of private link service NAT IP configuration.
Name string `pulumi:"name"`
// The `natIpConfiguration` block as defined below.
NatIpConfigurations []GetServiceNatIpConfiguration `pulumi:"natIpConfigurations"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
VisibilitySubscriptionIds []string `pulumi:"visibilitySubscriptionIds"`
}
func GetServiceOutput(ctx *pulumi.Context, args GetServiceOutputArgs, opts ...pulumi.InvokeOption) GetServiceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetServiceResultOutput, error) {
args := v.(GetServiceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatelink/getService:getService", args, GetServiceResultOutput{}, options).(GetServiceResultOutput), nil
}).(GetServiceResultOutput)
}
// A collection of arguments for invoking getService.
type GetServiceOutputArgs struct {
// The name of the private link service.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the private link service resides.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceArgs)(nil)).Elem()
}
// A collection of values returned by getService.
type GetServiceResultOutput struct{ *pulumi.OutputState }
func (GetServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceResult)(nil)).Elem()
}
func (o GetServiceResultOutput) ToGetServiceResultOutput() GetServiceResultOutput {
return o
}
func (o GetServiceResultOutput) ToGetServiceResultOutputWithContext(ctx context.Context) GetServiceResultOutput {
return o
}
// The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
func (o GetServiceResultOutput) Alias() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceResult) string { return v.Alias }).(pulumi.StringOutput)
}
// The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
func (o GetServiceResultOutput) AutoApprovalSubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetServiceResult) []string { return v.AutoApprovalSubscriptionIds }).(pulumi.StringArrayOutput)
}
// Does the Private Link Service support the Proxy Protocol?
func (o GetServiceResultOutput) EnableProxyProtocol() pulumi.BoolOutput {
return o.ApplyT(func(v GetServiceResult) bool { return v.EnableProxyProtocol }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetServiceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
func (o GetServiceResultOutput) LoadBalancerFrontendIpConfigurationIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetServiceResult) []string { return v.LoadBalancerFrontendIpConfigurationIds }).(pulumi.StringArrayOutput)
}
// The supported Azure location where the resource exists.
func (o GetServiceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceResult) string { return v.Location }).(pulumi.StringOutput)
}
// The name of private link service NAT IP configuration.
func (o GetServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The `natIpConfiguration` block as defined below.
func (o GetServiceResultOutput) NatIpConfigurations() GetServiceNatIpConfigurationArrayOutput {
return o.ApplyT(func(v GetServiceResult) []GetServiceNatIpConfiguration { return v.NatIpConfigurations }).(GetServiceNatIpConfigurationArrayOutput)
}
func (o GetServiceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o GetServiceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
func (o GetServiceResultOutput) VisibilitySubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetServiceResult) []string { return v.VisibilitySubscriptionIds }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(GetServiceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatelink/getEndpointConnection.go | sdk/go/azure/privatelink/getEndpointConnection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatelink
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 the connection status information about an existing Private Endpoint Connection.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := privatelink.GetEndpointConnection(ctx, &privatelink.GetEndpointConnectionArgs{
// Name: "example-private-endpoint",
// ResourceGroupName: "example-rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("privateEndpointStatus", example.PrivateServiceConnections[0].Status)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2025-01-01
func GetEndpointConnection(ctx *pulumi.Context, args *GetEndpointConnectionArgs, opts ...pulumi.InvokeOption) (*GetEndpointConnectionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetEndpointConnectionResult
err := ctx.Invoke("azure:privatelink/getEndpointConnection:getEndpointConnection", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getEndpointConnection.
type GetEndpointConnectionArgs struct {
// Specifies the Name of the private endpoint.
Name string `pulumi:"name"`
// Specifies the Name of the Resource Group within which the private endpoint exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getEndpointConnection.
type GetEndpointConnectionResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The supported Azure location where the resource exists.
Location string `pulumi:"location"`
// The name of the private endpoint.
Name string `pulumi:"name"`
NetworkInterfaces []GetEndpointConnectionNetworkInterface `pulumi:"networkInterfaces"`
PrivateServiceConnections []GetEndpointConnectionPrivateServiceConnection `pulumi:"privateServiceConnections"`
ResourceGroupName string `pulumi:"resourceGroupName"`
}
func GetEndpointConnectionOutput(ctx *pulumi.Context, args GetEndpointConnectionOutputArgs, opts ...pulumi.InvokeOption) GetEndpointConnectionResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetEndpointConnectionResultOutput, error) {
args := v.(GetEndpointConnectionArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatelink/getEndpointConnection:getEndpointConnection", args, GetEndpointConnectionResultOutput{}, options).(GetEndpointConnectionResultOutput), nil
}).(GetEndpointConnectionResultOutput)
}
// A collection of arguments for invoking getEndpointConnection.
type GetEndpointConnectionOutputArgs struct {
// Specifies the Name of the private endpoint.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the Name of the Resource Group within which the private endpoint exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetEndpointConnectionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetEndpointConnectionArgs)(nil)).Elem()
}
// A collection of values returned by getEndpointConnection.
type GetEndpointConnectionResultOutput struct{ *pulumi.OutputState }
func (GetEndpointConnectionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetEndpointConnectionResult)(nil)).Elem()
}
func (o GetEndpointConnectionResultOutput) ToGetEndpointConnectionResultOutput() GetEndpointConnectionResultOutput {
return o
}
func (o GetEndpointConnectionResultOutput) ToGetEndpointConnectionResultOutputWithContext(ctx context.Context) GetEndpointConnectionResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetEndpointConnectionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetEndpointConnectionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The supported Azure location where the resource exists.
func (o GetEndpointConnectionResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetEndpointConnectionResult) string { return v.Location }).(pulumi.StringOutput)
}
// The name of the private endpoint.
func (o GetEndpointConnectionResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetEndpointConnectionResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetEndpointConnectionResultOutput) NetworkInterfaces() GetEndpointConnectionNetworkInterfaceArrayOutput {
return o.ApplyT(func(v GetEndpointConnectionResult) []GetEndpointConnectionNetworkInterface {
return v.NetworkInterfaces
}).(GetEndpointConnectionNetworkInterfaceArrayOutput)
}
func (o GetEndpointConnectionResultOutput) PrivateServiceConnections() GetEndpointConnectionPrivateServiceConnectionArrayOutput {
return o.ApplyT(func(v GetEndpointConnectionResult) []GetEndpointConnectionPrivateServiceConnection {
return v.PrivateServiceConnections
}).(GetEndpointConnectionPrivateServiceConnectionArrayOutput)
}
func (o GetEndpointConnectionResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetEndpointConnectionResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetEndpointConnectionResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/init.go | sdk/go/azure/privatedns/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 privatedns
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:privatedns/aAAARecord:AAAARecord":
r = &AAAARecord{}
case "azure:privatedns/aRecord:ARecord":
r = &ARecord{}
case "azure:privatedns/cnameRecord:CnameRecord":
r = &CnameRecord{}
case "azure:privatedns/linkService:LinkService":
r = &LinkService{}
case "azure:privatedns/mxRecord:MxRecord":
r = &MxRecord{}
case "azure:privatedns/pTRRecord:PTRRecord":
r = &PTRRecord{}
case "azure:privatedns/resolver:Resolver":
r = &Resolver{}
case "azure:privatedns/resolverDnsForwardingRuleset:ResolverDnsForwardingRuleset":
r = &ResolverDnsForwardingRuleset{}
case "azure:privatedns/resolverForwardingRule:ResolverForwardingRule":
r = &ResolverForwardingRule{}
case "azure:privatedns/resolverInboundEndpoint:ResolverInboundEndpoint":
r = &ResolverInboundEndpoint{}
case "azure:privatedns/resolverOutboundEndpoint:ResolverOutboundEndpoint":
r = &ResolverOutboundEndpoint{}
case "azure:privatedns/resolverVirtualNetworkLink:ResolverVirtualNetworkLink":
r = &ResolverVirtualNetworkLink{}
case "azure:privatedns/sRVRecord:SRVRecord":
r = &SRVRecord{}
case "azure:privatedns/txtRecord:TxtRecord":
r = &TxtRecord{}
case "azure:privatedns/zone:Zone":
r = &Zone{}
case "azure:privatedns/zoneVirtualNetworkLink:ZoneVirtualNetworkLink":
r = &ZoneVirtualNetworkLink{}
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",
"privatedns/aAAARecord",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/aRecord",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/cnameRecord",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/linkService",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/mxRecord",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/pTRRecord",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/resolver",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/resolverDnsForwardingRuleset",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/resolverForwardingRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/resolverInboundEndpoint",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/resolverOutboundEndpoint",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/resolverVirtualNetworkLink",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/sRVRecord",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/txtRecord",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/zone",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"privatedns/zoneVirtualNetworkLink",
&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/privatedns/getCnameRecord.go | sdk/go/azure/privatedns/getCnameRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.NewCnameRecord(ctx, "example", &privatedns.CnameRecordArgs{
// Name: pulumi.String("test"),
// ZoneName: pulumi.String("test-zone"),
// ResourceGroupName: pulumi.String("test-rg"),
// })
// if err != nil {
// return err
// }
// ctx.Export("privateDnsCnameRecordId", exampleAzurermPrivateDnsCnameRecord.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func LookupCnameRecord(ctx *pulumi.Context, args *LookupCnameRecordArgs, opts ...pulumi.InvokeOption) (*LookupCnameRecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupCnameRecordResult
err := ctx.Invoke("azure:privatedns/getCnameRecord:getCnameRecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCnameRecord.
type LookupCnameRecordArgs struct {
// The name of the Private DNS CNAME Record.
Name string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getCnameRecord.
type LookupCnameRecordResult struct {
// The FQDN of the Private DNS CName Record.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// The target of the CNAME.
Record string `pulumi:"record"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
TargetResourceId string `pulumi:"targetResourceId"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func LookupCnameRecordOutput(ctx *pulumi.Context, args LookupCnameRecordOutputArgs, opts ...pulumi.InvokeOption) LookupCnameRecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupCnameRecordResultOutput, error) {
args := v.(LookupCnameRecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getCnameRecord:getCnameRecord", args, LookupCnameRecordResultOutput{}, options).(LookupCnameRecordResultOutput), nil
}).(LookupCnameRecordResultOutput)
}
// A collection of arguments for invoking getCnameRecord.
type LookupCnameRecordOutputArgs struct {
// The name of the Private DNS CNAME Record.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (LookupCnameRecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCnameRecordArgs)(nil)).Elem()
}
// A collection of values returned by getCnameRecord.
type LookupCnameRecordResultOutput struct{ *pulumi.OutputState }
func (LookupCnameRecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCnameRecordResult)(nil)).Elem()
}
func (o LookupCnameRecordResultOutput) ToLookupCnameRecordResultOutput() LookupCnameRecordResultOutput {
return o
}
func (o LookupCnameRecordResultOutput) ToLookupCnameRecordResultOutputWithContext(ctx context.Context) LookupCnameRecordResultOutput {
return o
}
// The FQDN of the Private DNS CName Record.
func (o LookupCnameRecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v LookupCnameRecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupCnameRecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupCnameRecordResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupCnameRecordResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupCnameRecordResult) string { return v.Name }).(pulumi.StringOutput)
}
// The target of the CNAME.
func (o LookupCnameRecordResultOutput) Record() pulumi.StringOutput {
return o.ApplyT(func(v LookupCnameRecordResult) string { return v.Record }).(pulumi.StringOutput)
}
func (o LookupCnameRecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCnameRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupCnameRecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupCnameRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func (o LookupCnameRecordResultOutput) TargetResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCnameRecordResult) string { return v.TargetResourceId }).(pulumi.StringOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o LookupCnameRecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v LookupCnameRecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o LookupCnameRecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCnameRecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupCnameRecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getMxRecord.go | sdk/go/azure/privatedns/getMxRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.NewMxRecord(ctx, "example", &privatedns.MxRecordArgs{
// Name: pulumi.String("test"),
// ZoneName: pulumi.String("test-zone"),
// ResourceGroupName: pulumi.String("test-rg"),
// })
// if err != nil {
// return err
// }
// ctx.Export("privateDnsMxRecordId", exampleAzurermPrivateDnsMxRecord.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func LookupMxRecord(ctx *pulumi.Context, args *LookupMxRecordArgs, opts ...pulumi.InvokeOption) (*LookupMxRecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupMxRecordResult
err := ctx.Invoke("azure:privatedns/getMxRecord:getMxRecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMxRecord.
type LookupMxRecordArgs struct {
// The name of the Private DNS MX Record.
Name *string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getMxRecord.
type LookupMxRecordResult struct {
// The FQDN of the Private DNS MX Record.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name *string `pulumi:"name"`
// A list of values that make up the MX record. Each `record` block supports fields documented below.
Records []GetMxRecordRecord `pulumi:"records"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func LookupMxRecordOutput(ctx *pulumi.Context, args LookupMxRecordOutputArgs, opts ...pulumi.InvokeOption) LookupMxRecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupMxRecordResultOutput, error) {
args := v.(LookupMxRecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getMxRecord:getMxRecord", args, LookupMxRecordResultOutput{}, options).(LookupMxRecordResultOutput), nil
}).(LookupMxRecordResultOutput)
}
// A collection of arguments for invoking getMxRecord.
type LookupMxRecordOutputArgs struct {
// The name of the Private DNS MX Record.
Name pulumi.StringPtrInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (LookupMxRecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMxRecordArgs)(nil)).Elem()
}
// A collection of values returned by getMxRecord.
type LookupMxRecordResultOutput struct{ *pulumi.OutputState }
func (LookupMxRecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMxRecordResult)(nil)).Elem()
}
func (o LookupMxRecordResultOutput) ToLookupMxRecordResultOutput() LookupMxRecordResultOutput {
return o
}
func (o LookupMxRecordResultOutput) ToLookupMxRecordResultOutputWithContext(ctx context.Context) LookupMxRecordResultOutput {
return o
}
// The FQDN of the Private DNS MX Record.
func (o LookupMxRecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v LookupMxRecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupMxRecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupMxRecordResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupMxRecordResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupMxRecordResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// A list of values that make up the MX record. Each `record` block supports fields documented below.
func (o LookupMxRecordResultOutput) Records() GetMxRecordRecordArrayOutput {
return o.ApplyT(func(v LookupMxRecordResult) []GetMxRecordRecord { return v.Records }).(GetMxRecordRecordArrayOutput)
}
func (o LookupMxRecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupMxRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupMxRecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupMxRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o LookupMxRecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v LookupMxRecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o LookupMxRecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v LookupMxRecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupMxRecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/pulumiTypes.go | sdk/go/azure/privatedns/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 privatedns
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 LinkServiceNatIpConfiguration struct {
// Specifies the name which should be used for the NAT IP Configuration. Changing this forces a new resource to be created.
Name string `pulumi:"name"`
// Is this is the Primary IP Configuration? Changing this forces a new resource to be created.
Primary bool `pulumi:"primary"`
// Specifies a Private Static IP Address for this IP Configuration.
PrivateIpAddress *string `pulumi:"privateIpAddress"`
// The version of the IP Protocol which should be used. At this time the only supported value is `IPv4`. Defaults to `IPv4`.
PrivateIpAddressVersion *string `pulumi:"privateIpAddressVersion"`
// Specifies the ID of the Subnet which should be used for the Private Link Service.
//
// > **Note:** Verify that the Subnet's `enforcePrivateLinkServiceNetworkPolicies` attribute is set to `true`.
SubnetId string `pulumi:"subnetId"`
}
// LinkServiceNatIpConfigurationInput is an input type that accepts LinkServiceNatIpConfigurationArgs and LinkServiceNatIpConfigurationOutput values.
// You can construct a concrete instance of `LinkServiceNatIpConfigurationInput` via:
//
// LinkServiceNatIpConfigurationArgs{...}
type LinkServiceNatIpConfigurationInput interface {
pulumi.Input
ToLinkServiceNatIpConfigurationOutput() LinkServiceNatIpConfigurationOutput
ToLinkServiceNatIpConfigurationOutputWithContext(context.Context) LinkServiceNatIpConfigurationOutput
}
type LinkServiceNatIpConfigurationArgs struct {
// Specifies the name which should be used for the NAT IP Configuration. Changing this forces a new resource to be created.
Name pulumi.StringInput `pulumi:"name"`
// Is this is the Primary IP Configuration? Changing this forces a new resource to be created.
Primary pulumi.BoolInput `pulumi:"primary"`
// Specifies a Private Static IP Address for this IP Configuration.
PrivateIpAddress pulumi.StringPtrInput `pulumi:"privateIpAddress"`
// The version of the IP Protocol which should be used. At this time the only supported value is `IPv4`. Defaults to `IPv4`.
PrivateIpAddressVersion pulumi.StringPtrInput `pulumi:"privateIpAddressVersion"`
// Specifies the ID of the Subnet which should be used for the Private Link Service.
//
// > **Note:** Verify that the Subnet's `enforcePrivateLinkServiceNetworkPolicies` attribute is set to `true`.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
}
func (LinkServiceNatIpConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LinkServiceNatIpConfiguration)(nil)).Elem()
}
func (i LinkServiceNatIpConfigurationArgs) ToLinkServiceNatIpConfigurationOutput() LinkServiceNatIpConfigurationOutput {
return i.ToLinkServiceNatIpConfigurationOutputWithContext(context.Background())
}
func (i LinkServiceNatIpConfigurationArgs) ToLinkServiceNatIpConfigurationOutputWithContext(ctx context.Context) LinkServiceNatIpConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkServiceNatIpConfigurationOutput)
}
// LinkServiceNatIpConfigurationArrayInput is an input type that accepts LinkServiceNatIpConfigurationArray and LinkServiceNatIpConfigurationArrayOutput values.
// You can construct a concrete instance of `LinkServiceNatIpConfigurationArrayInput` via:
//
// LinkServiceNatIpConfigurationArray{ LinkServiceNatIpConfigurationArgs{...} }
type LinkServiceNatIpConfigurationArrayInput interface {
pulumi.Input
ToLinkServiceNatIpConfigurationArrayOutput() LinkServiceNatIpConfigurationArrayOutput
ToLinkServiceNatIpConfigurationArrayOutputWithContext(context.Context) LinkServiceNatIpConfigurationArrayOutput
}
type LinkServiceNatIpConfigurationArray []LinkServiceNatIpConfigurationInput
func (LinkServiceNatIpConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]LinkServiceNatIpConfiguration)(nil)).Elem()
}
func (i LinkServiceNatIpConfigurationArray) ToLinkServiceNatIpConfigurationArrayOutput() LinkServiceNatIpConfigurationArrayOutput {
return i.ToLinkServiceNatIpConfigurationArrayOutputWithContext(context.Background())
}
func (i LinkServiceNatIpConfigurationArray) ToLinkServiceNatIpConfigurationArrayOutputWithContext(ctx context.Context) LinkServiceNatIpConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkServiceNatIpConfigurationArrayOutput)
}
type LinkServiceNatIpConfigurationOutput struct{ *pulumi.OutputState }
func (LinkServiceNatIpConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LinkServiceNatIpConfiguration)(nil)).Elem()
}
func (o LinkServiceNatIpConfigurationOutput) ToLinkServiceNatIpConfigurationOutput() LinkServiceNatIpConfigurationOutput {
return o
}
func (o LinkServiceNatIpConfigurationOutput) ToLinkServiceNatIpConfigurationOutputWithContext(ctx context.Context) LinkServiceNatIpConfigurationOutput {
return o
}
// Specifies the name which should be used for the NAT IP Configuration. Changing this forces a new resource to be created.
func (o LinkServiceNatIpConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LinkServiceNatIpConfiguration) string { return v.Name }).(pulumi.StringOutput)
}
// Is this is the Primary IP Configuration? Changing this forces a new resource to be created.
func (o LinkServiceNatIpConfigurationOutput) Primary() pulumi.BoolOutput {
return o.ApplyT(func(v LinkServiceNatIpConfiguration) bool { return v.Primary }).(pulumi.BoolOutput)
}
// Specifies a Private Static IP Address for this IP Configuration.
func (o LinkServiceNatIpConfigurationOutput) PrivateIpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v LinkServiceNatIpConfiguration) *string { return v.PrivateIpAddress }).(pulumi.StringPtrOutput)
}
// The version of the IP Protocol which should be used. At this time the only supported value is `IPv4`. Defaults to `IPv4`.
func (o LinkServiceNatIpConfigurationOutput) PrivateIpAddressVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v LinkServiceNatIpConfiguration) *string { return v.PrivateIpAddressVersion }).(pulumi.StringPtrOutput)
}
// Specifies the ID of the Subnet which should be used for the Private Link Service.
//
// > **Note:** Verify that the Subnet's `enforcePrivateLinkServiceNetworkPolicies` attribute is set to `true`.
func (o LinkServiceNatIpConfigurationOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v LinkServiceNatIpConfiguration) string { return v.SubnetId }).(pulumi.StringOutput)
}
type LinkServiceNatIpConfigurationArrayOutput struct{ *pulumi.OutputState }
func (LinkServiceNatIpConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]LinkServiceNatIpConfiguration)(nil)).Elem()
}
func (o LinkServiceNatIpConfigurationArrayOutput) ToLinkServiceNatIpConfigurationArrayOutput() LinkServiceNatIpConfigurationArrayOutput {
return o
}
func (o LinkServiceNatIpConfigurationArrayOutput) ToLinkServiceNatIpConfigurationArrayOutputWithContext(ctx context.Context) LinkServiceNatIpConfigurationArrayOutput {
return o
}
func (o LinkServiceNatIpConfigurationArrayOutput) Index(i pulumi.IntInput) LinkServiceNatIpConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) LinkServiceNatIpConfiguration {
return vs[0].([]LinkServiceNatIpConfiguration)[vs[1].(int)]
}).(LinkServiceNatIpConfigurationOutput)
}
type MxRecordRecord struct {
// The FQDN of the exchange to MX record points to.
Exchange string `pulumi:"exchange"`
// The preference of the MX record.
Preference int `pulumi:"preference"`
}
// MxRecordRecordInput is an input type that accepts MxRecordRecordArgs and MxRecordRecordOutput values.
// You can construct a concrete instance of `MxRecordRecordInput` via:
//
// MxRecordRecordArgs{...}
type MxRecordRecordInput interface {
pulumi.Input
ToMxRecordRecordOutput() MxRecordRecordOutput
ToMxRecordRecordOutputWithContext(context.Context) MxRecordRecordOutput
}
type MxRecordRecordArgs struct {
// The FQDN of the exchange to MX record points to.
Exchange pulumi.StringInput `pulumi:"exchange"`
// The preference of the MX record.
Preference pulumi.IntInput `pulumi:"preference"`
}
func (MxRecordRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*MxRecordRecord)(nil)).Elem()
}
func (i MxRecordRecordArgs) ToMxRecordRecordOutput() MxRecordRecordOutput {
return i.ToMxRecordRecordOutputWithContext(context.Background())
}
func (i MxRecordRecordArgs) ToMxRecordRecordOutputWithContext(ctx context.Context) MxRecordRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(MxRecordRecordOutput)
}
// MxRecordRecordArrayInput is an input type that accepts MxRecordRecordArray and MxRecordRecordArrayOutput values.
// You can construct a concrete instance of `MxRecordRecordArrayInput` via:
//
// MxRecordRecordArray{ MxRecordRecordArgs{...} }
type MxRecordRecordArrayInput interface {
pulumi.Input
ToMxRecordRecordArrayOutput() MxRecordRecordArrayOutput
ToMxRecordRecordArrayOutputWithContext(context.Context) MxRecordRecordArrayOutput
}
type MxRecordRecordArray []MxRecordRecordInput
func (MxRecordRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]MxRecordRecord)(nil)).Elem()
}
func (i MxRecordRecordArray) ToMxRecordRecordArrayOutput() MxRecordRecordArrayOutput {
return i.ToMxRecordRecordArrayOutputWithContext(context.Background())
}
func (i MxRecordRecordArray) ToMxRecordRecordArrayOutputWithContext(ctx context.Context) MxRecordRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MxRecordRecordArrayOutput)
}
type MxRecordRecordOutput struct{ *pulumi.OutputState }
func (MxRecordRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MxRecordRecord)(nil)).Elem()
}
func (o MxRecordRecordOutput) ToMxRecordRecordOutput() MxRecordRecordOutput {
return o
}
func (o MxRecordRecordOutput) ToMxRecordRecordOutputWithContext(ctx context.Context) MxRecordRecordOutput {
return o
}
// The FQDN of the exchange to MX record points to.
func (o MxRecordRecordOutput) Exchange() pulumi.StringOutput {
return o.ApplyT(func(v MxRecordRecord) string { return v.Exchange }).(pulumi.StringOutput)
}
// The preference of the MX record.
func (o MxRecordRecordOutput) Preference() pulumi.IntOutput {
return o.ApplyT(func(v MxRecordRecord) int { return v.Preference }).(pulumi.IntOutput)
}
type MxRecordRecordArrayOutput struct{ *pulumi.OutputState }
func (MxRecordRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]MxRecordRecord)(nil)).Elem()
}
func (o MxRecordRecordArrayOutput) ToMxRecordRecordArrayOutput() MxRecordRecordArrayOutput {
return o
}
func (o MxRecordRecordArrayOutput) ToMxRecordRecordArrayOutputWithContext(ctx context.Context) MxRecordRecordArrayOutput {
return o
}
func (o MxRecordRecordArrayOutput) Index(i pulumi.IntInput) MxRecordRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) MxRecordRecord {
return vs[0].([]MxRecordRecord)[vs[1].(int)]
}).(MxRecordRecordOutput)
}
type ResolverForwardingRuleTargetDnsServer struct {
// DNS server IP address.
IpAddress string `pulumi:"ipAddress"`
// DNS server port.
Port *int `pulumi:"port"`
}
// ResolverForwardingRuleTargetDnsServerInput is an input type that accepts ResolverForwardingRuleTargetDnsServerArgs and ResolverForwardingRuleTargetDnsServerOutput values.
// You can construct a concrete instance of `ResolverForwardingRuleTargetDnsServerInput` via:
//
// ResolverForwardingRuleTargetDnsServerArgs{...}
type ResolverForwardingRuleTargetDnsServerInput interface {
pulumi.Input
ToResolverForwardingRuleTargetDnsServerOutput() ResolverForwardingRuleTargetDnsServerOutput
ToResolverForwardingRuleTargetDnsServerOutputWithContext(context.Context) ResolverForwardingRuleTargetDnsServerOutput
}
type ResolverForwardingRuleTargetDnsServerArgs struct {
// DNS server IP address.
IpAddress pulumi.StringInput `pulumi:"ipAddress"`
// DNS server port.
Port pulumi.IntPtrInput `pulumi:"port"`
}
func (ResolverForwardingRuleTargetDnsServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ResolverForwardingRuleTargetDnsServer)(nil)).Elem()
}
func (i ResolverForwardingRuleTargetDnsServerArgs) ToResolverForwardingRuleTargetDnsServerOutput() ResolverForwardingRuleTargetDnsServerOutput {
return i.ToResolverForwardingRuleTargetDnsServerOutputWithContext(context.Background())
}
func (i ResolverForwardingRuleTargetDnsServerArgs) ToResolverForwardingRuleTargetDnsServerOutputWithContext(ctx context.Context) ResolverForwardingRuleTargetDnsServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverForwardingRuleTargetDnsServerOutput)
}
// ResolverForwardingRuleTargetDnsServerArrayInput is an input type that accepts ResolverForwardingRuleTargetDnsServerArray and ResolverForwardingRuleTargetDnsServerArrayOutput values.
// You can construct a concrete instance of `ResolverForwardingRuleTargetDnsServerArrayInput` via:
//
// ResolverForwardingRuleTargetDnsServerArray{ ResolverForwardingRuleTargetDnsServerArgs{...} }
type ResolverForwardingRuleTargetDnsServerArrayInput interface {
pulumi.Input
ToResolverForwardingRuleTargetDnsServerArrayOutput() ResolverForwardingRuleTargetDnsServerArrayOutput
ToResolverForwardingRuleTargetDnsServerArrayOutputWithContext(context.Context) ResolverForwardingRuleTargetDnsServerArrayOutput
}
type ResolverForwardingRuleTargetDnsServerArray []ResolverForwardingRuleTargetDnsServerInput
func (ResolverForwardingRuleTargetDnsServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ResolverForwardingRuleTargetDnsServer)(nil)).Elem()
}
func (i ResolverForwardingRuleTargetDnsServerArray) ToResolverForwardingRuleTargetDnsServerArrayOutput() ResolverForwardingRuleTargetDnsServerArrayOutput {
return i.ToResolverForwardingRuleTargetDnsServerArrayOutputWithContext(context.Background())
}
func (i ResolverForwardingRuleTargetDnsServerArray) ToResolverForwardingRuleTargetDnsServerArrayOutputWithContext(ctx context.Context) ResolverForwardingRuleTargetDnsServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverForwardingRuleTargetDnsServerArrayOutput)
}
type ResolverForwardingRuleTargetDnsServerOutput struct{ *pulumi.OutputState }
func (ResolverForwardingRuleTargetDnsServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ResolverForwardingRuleTargetDnsServer)(nil)).Elem()
}
func (o ResolverForwardingRuleTargetDnsServerOutput) ToResolverForwardingRuleTargetDnsServerOutput() ResolverForwardingRuleTargetDnsServerOutput {
return o
}
func (o ResolverForwardingRuleTargetDnsServerOutput) ToResolverForwardingRuleTargetDnsServerOutputWithContext(ctx context.Context) ResolverForwardingRuleTargetDnsServerOutput {
return o
}
// DNS server IP address.
func (o ResolverForwardingRuleTargetDnsServerOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v ResolverForwardingRuleTargetDnsServer) string { return v.IpAddress }).(pulumi.StringOutput)
}
// DNS server port.
func (o ResolverForwardingRuleTargetDnsServerOutput) Port() pulumi.IntPtrOutput {
return o.ApplyT(func(v ResolverForwardingRuleTargetDnsServer) *int { return v.Port }).(pulumi.IntPtrOutput)
}
type ResolverForwardingRuleTargetDnsServerArrayOutput struct{ *pulumi.OutputState }
func (ResolverForwardingRuleTargetDnsServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ResolverForwardingRuleTargetDnsServer)(nil)).Elem()
}
func (o ResolverForwardingRuleTargetDnsServerArrayOutput) ToResolverForwardingRuleTargetDnsServerArrayOutput() ResolverForwardingRuleTargetDnsServerArrayOutput {
return o
}
func (o ResolverForwardingRuleTargetDnsServerArrayOutput) ToResolverForwardingRuleTargetDnsServerArrayOutputWithContext(ctx context.Context) ResolverForwardingRuleTargetDnsServerArrayOutput {
return o
}
func (o ResolverForwardingRuleTargetDnsServerArrayOutput) Index(i pulumi.IntInput) ResolverForwardingRuleTargetDnsServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ResolverForwardingRuleTargetDnsServer {
return vs[0].([]ResolverForwardingRuleTargetDnsServer)[vs[1].(int)]
}).(ResolverForwardingRuleTargetDnsServerOutput)
}
type ResolverInboundEndpointIpConfigurations struct {
// Private IP address of the IP configuration.
PrivateIpAddress *string `pulumi:"privateIpAddress"`
// Private IP address allocation method. Allowed value is `Dynamic` and `Static`. Defaults to `Dynamic`.
PrivateIpAllocationMethod *string `pulumi:"privateIpAllocationMethod"`
// The subnet ID of the IP configuration.
SubnetId string `pulumi:"subnetId"`
}
// ResolverInboundEndpointIpConfigurationsInput is an input type that accepts ResolverInboundEndpointIpConfigurationsArgs and ResolverInboundEndpointIpConfigurationsOutput values.
// You can construct a concrete instance of `ResolverInboundEndpointIpConfigurationsInput` via:
//
// ResolverInboundEndpointIpConfigurationsArgs{...}
type ResolverInboundEndpointIpConfigurationsInput interface {
pulumi.Input
ToResolverInboundEndpointIpConfigurationsOutput() ResolverInboundEndpointIpConfigurationsOutput
ToResolverInboundEndpointIpConfigurationsOutputWithContext(context.Context) ResolverInboundEndpointIpConfigurationsOutput
}
type ResolverInboundEndpointIpConfigurationsArgs struct {
// Private IP address of the IP configuration.
PrivateIpAddress pulumi.StringPtrInput `pulumi:"privateIpAddress"`
// Private IP address allocation method. Allowed value is `Dynamic` and `Static`. Defaults to `Dynamic`.
PrivateIpAllocationMethod pulumi.StringPtrInput `pulumi:"privateIpAllocationMethod"`
// The subnet ID of the IP configuration.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
}
func (ResolverInboundEndpointIpConfigurationsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ResolverInboundEndpointIpConfigurations)(nil)).Elem()
}
func (i ResolverInboundEndpointIpConfigurationsArgs) ToResolverInboundEndpointIpConfigurationsOutput() ResolverInboundEndpointIpConfigurationsOutput {
return i.ToResolverInboundEndpointIpConfigurationsOutputWithContext(context.Background())
}
func (i ResolverInboundEndpointIpConfigurationsArgs) ToResolverInboundEndpointIpConfigurationsOutputWithContext(ctx context.Context) ResolverInboundEndpointIpConfigurationsOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverInboundEndpointIpConfigurationsOutput)
}
func (i ResolverInboundEndpointIpConfigurationsArgs) ToResolverInboundEndpointIpConfigurationsPtrOutput() ResolverInboundEndpointIpConfigurationsPtrOutput {
return i.ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(context.Background())
}
func (i ResolverInboundEndpointIpConfigurationsArgs) ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(ctx context.Context) ResolverInboundEndpointIpConfigurationsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverInboundEndpointIpConfigurationsOutput).ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(ctx)
}
// ResolverInboundEndpointIpConfigurationsPtrInput is an input type that accepts ResolverInboundEndpointIpConfigurationsArgs, ResolverInboundEndpointIpConfigurationsPtr and ResolverInboundEndpointIpConfigurationsPtrOutput values.
// You can construct a concrete instance of `ResolverInboundEndpointIpConfigurationsPtrInput` via:
//
// ResolverInboundEndpointIpConfigurationsArgs{...}
//
// or:
//
// nil
type ResolverInboundEndpointIpConfigurationsPtrInput interface {
pulumi.Input
ToResolverInboundEndpointIpConfigurationsPtrOutput() ResolverInboundEndpointIpConfigurationsPtrOutput
ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(context.Context) ResolverInboundEndpointIpConfigurationsPtrOutput
}
type resolverInboundEndpointIpConfigurationsPtrType ResolverInboundEndpointIpConfigurationsArgs
func ResolverInboundEndpointIpConfigurationsPtr(v *ResolverInboundEndpointIpConfigurationsArgs) ResolverInboundEndpointIpConfigurationsPtrInput {
return (*resolverInboundEndpointIpConfigurationsPtrType)(v)
}
func (*resolverInboundEndpointIpConfigurationsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverInboundEndpointIpConfigurations)(nil)).Elem()
}
func (i *resolverInboundEndpointIpConfigurationsPtrType) ToResolverInboundEndpointIpConfigurationsPtrOutput() ResolverInboundEndpointIpConfigurationsPtrOutput {
return i.ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(context.Background())
}
func (i *resolverInboundEndpointIpConfigurationsPtrType) ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(ctx context.Context) ResolverInboundEndpointIpConfigurationsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverInboundEndpointIpConfigurationsPtrOutput)
}
type ResolverInboundEndpointIpConfigurationsOutput struct{ *pulumi.OutputState }
func (ResolverInboundEndpointIpConfigurationsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ResolverInboundEndpointIpConfigurations)(nil)).Elem()
}
func (o ResolverInboundEndpointIpConfigurationsOutput) ToResolverInboundEndpointIpConfigurationsOutput() ResolverInboundEndpointIpConfigurationsOutput {
return o
}
func (o ResolverInboundEndpointIpConfigurationsOutput) ToResolverInboundEndpointIpConfigurationsOutputWithContext(ctx context.Context) ResolverInboundEndpointIpConfigurationsOutput {
return o
}
func (o ResolverInboundEndpointIpConfigurationsOutput) ToResolverInboundEndpointIpConfigurationsPtrOutput() ResolverInboundEndpointIpConfigurationsPtrOutput {
return o.ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(context.Background())
}
func (o ResolverInboundEndpointIpConfigurationsOutput) ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(ctx context.Context) ResolverInboundEndpointIpConfigurationsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ResolverInboundEndpointIpConfigurations) *ResolverInboundEndpointIpConfigurations {
return &v
}).(ResolverInboundEndpointIpConfigurationsPtrOutput)
}
// Private IP address of the IP configuration.
func (o ResolverInboundEndpointIpConfigurationsOutput) PrivateIpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v ResolverInboundEndpointIpConfigurations) *string { return v.PrivateIpAddress }).(pulumi.StringPtrOutput)
}
// Private IP address allocation method. Allowed value is `Dynamic` and `Static`. Defaults to `Dynamic`.
func (o ResolverInboundEndpointIpConfigurationsOutput) PrivateIpAllocationMethod() pulumi.StringPtrOutput {
return o.ApplyT(func(v ResolverInboundEndpointIpConfigurations) *string { return v.PrivateIpAllocationMethod }).(pulumi.StringPtrOutput)
}
// The subnet ID of the IP configuration.
func (o ResolverInboundEndpointIpConfigurationsOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v ResolverInboundEndpointIpConfigurations) string { return v.SubnetId }).(pulumi.StringOutput)
}
type ResolverInboundEndpointIpConfigurationsPtrOutput struct{ *pulumi.OutputState }
func (ResolverInboundEndpointIpConfigurationsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverInboundEndpointIpConfigurations)(nil)).Elem()
}
func (o ResolverInboundEndpointIpConfigurationsPtrOutput) ToResolverInboundEndpointIpConfigurationsPtrOutput() ResolverInboundEndpointIpConfigurationsPtrOutput {
return o
}
func (o ResolverInboundEndpointIpConfigurationsPtrOutput) ToResolverInboundEndpointIpConfigurationsPtrOutputWithContext(ctx context.Context) ResolverInboundEndpointIpConfigurationsPtrOutput {
return o
}
func (o ResolverInboundEndpointIpConfigurationsPtrOutput) Elem() ResolverInboundEndpointIpConfigurationsOutput {
return o.ApplyT(func(v *ResolverInboundEndpointIpConfigurations) ResolverInboundEndpointIpConfigurations {
if v != nil {
return *v
}
var ret ResolverInboundEndpointIpConfigurations
return ret
}).(ResolverInboundEndpointIpConfigurationsOutput)
}
// Private IP address of the IP configuration.
func (o ResolverInboundEndpointIpConfigurationsPtrOutput) PrivateIpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ResolverInboundEndpointIpConfigurations) *string {
if v == nil {
return nil
}
return v.PrivateIpAddress
}).(pulumi.StringPtrOutput)
}
// Private IP address allocation method. Allowed value is `Dynamic` and `Static`. Defaults to `Dynamic`.
func (o ResolverInboundEndpointIpConfigurationsPtrOutput) PrivateIpAllocationMethod() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ResolverInboundEndpointIpConfigurations) *string {
if v == nil {
return nil
}
return v.PrivateIpAllocationMethod
}).(pulumi.StringPtrOutput)
}
// The subnet ID of the IP configuration.
func (o ResolverInboundEndpointIpConfigurationsPtrOutput) SubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ResolverInboundEndpointIpConfigurations) *string {
if v == nil {
return nil
}
return &v.SubnetId
}).(pulumi.StringPtrOutput)
}
type SRVRecordRecord struct {
// The Port the service is listening on.
Port int `pulumi:"port"`
// The priority of the SRV record.
Priority int `pulumi:"priority"`
// The FQDN of the service.
Target string `pulumi:"target"`
// The Weight of the SRV record.
Weight int `pulumi:"weight"`
}
// SRVRecordRecordInput is an input type that accepts SRVRecordRecordArgs and SRVRecordRecordOutput values.
// You can construct a concrete instance of `SRVRecordRecordInput` via:
//
// SRVRecordRecordArgs{...}
type SRVRecordRecordInput interface {
pulumi.Input
ToSRVRecordRecordOutput() SRVRecordRecordOutput
ToSRVRecordRecordOutputWithContext(context.Context) SRVRecordRecordOutput
}
type SRVRecordRecordArgs struct {
// The Port the service is listening on.
Port pulumi.IntInput `pulumi:"port"`
// The priority of the SRV record.
Priority pulumi.IntInput `pulumi:"priority"`
// The FQDN of the service.
Target pulumi.StringInput `pulumi:"target"`
// The Weight of the SRV record.
Weight pulumi.IntInput `pulumi:"weight"`
}
func (SRVRecordRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SRVRecordRecord)(nil)).Elem()
}
func (i SRVRecordRecordArgs) ToSRVRecordRecordOutput() SRVRecordRecordOutput {
return i.ToSRVRecordRecordOutputWithContext(context.Background())
}
func (i SRVRecordRecordArgs) ToSRVRecordRecordOutputWithContext(ctx context.Context) SRVRecordRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(SRVRecordRecordOutput)
}
// SRVRecordRecordArrayInput is an input type that accepts SRVRecordRecordArray and SRVRecordRecordArrayOutput values.
// You can construct a concrete instance of `SRVRecordRecordArrayInput` via:
//
// SRVRecordRecordArray{ SRVRecordRecordArgs{...} }
type SRVRecordRecordArrayInput interface {
pulumi.Input
ToSRVRecordRecordArrayOutput() SRVRecordRecordArrayOutput
ToSRVRecordRecordArrayOutputWithContext(context.Context) SRVRecordRecordArrayOutput
}
type SRVRecordRecordArray []SRVRecordRecordInput
func (SRVRecordRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]SRVRecordRecord)(nil)).Elem()
}
func (i SRVRecordRecordArray) ToSRVRecordRecordArrayOutput() SRVRecordRecordArrayOutput {
return i.ToSRVRecordRecordArrayOutputWithContext(context.Background())
}
func (i SRVRecordRecordArray) ToSRVRecordRecordArrayOutputWithContext(ctx context.Context) SRVRecordRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SRVRecordRecordArrayOutput)
}
type SRVRecordRecordOutput struct{ *pulumi.OutputState }
func (SRVRecordRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SRVRecordRecord)(nil)).Elem()
}
func (o SRVRecordRecordOutput) ToSRVRecordRecordOutput() SRVRecordRecordOutput {
return o
}
func (o SRVRecordRecordOutput) ToSRVRecordRecordOutputWithContext(ctx context.Context) SRVRecordRecordOutput {
return o
}
// The Port the service is listening on.
func (o SRVRecordRecordOutput) Port() pulumi.IntOutput {
return o.ApplyT(func(v SRVRecordRecord) int { return v.Port }).(pulumi.IntOutput)
}
// The priority of the SRV record.
func (o SRVRecordRecordOutput) Priority() pulumi.IntOutput {
return o.ApplyT(func(v SRVRecordRecord) int { return v.Priority }).(pulumi.IntOutput)
}
// The FQDN of the service.
func (o SRVRecordRecordOutput) Target() pulumi.StringOutput {
return o.ApplyT(func(v SRVRecordRecord) string { return v.Target }).(pulumi.StringOutput)
}
// The Weight of the SRV record.
func (o SRVRecordRecordOutput) Weight() pulumi.IntOutput {
return o.ApplyT(func(v SRVRecordRecord) int { return v.Weight }).(pulumi.IntOutput)
}
type SRVRecordRecordArrayOutput struct{ *pulumi.OutputState }
func (SRVRecordRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]SRVRecordRecord)(nil)).Elem()
}
func (o SRVRecordRecordArrayOutput) ToSRVRecordRecordArrayOutput() SRVRecordRecordArrayOutput {
return o
}
func (o SRVRecordRecordArrayOutput) ToSRVRecordRecordArrayOutputWithContext(ctx context.Context) SRVRecordRecordArrayOutput {
return o
}
func (o SRVRecordRecordArrayOutput) Index(i pulumi.IntInput) SRVRecordRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) SRVRecordRecord {
return vs[0].([]SRVRecordRecord)[vs[1].(int)]
}).(SRVRecordRecordOutput)
}
type TxtRecordRecord struct {
// The value of the TXT record. Max length: 1024 characters
Value string `pulumi:"value"`
}
// TxtRecordRecordInput is an input type that accepts TxtRecordRecordArgs and TxtRecordRecordOutput values.
// You can construct a concrete instance of `TxtRecordRecordInput` via:
//
// TxtRecordRecordArgs{...}
type TxtRecordRecordInput interface {
pulumi.Input
ToTxtRecordRecordOutput() TxtRecordRecordOutput
ToTxtRecordRecordOutputWithContext(context.Context) TxtRecordRecordOutput
}
type TxtRecordRecordArgs struct {
// The value of the TXT record. Max length: 1024 characters
Value pulumi.StringInput `pulumi:"value"`
}
func (TxtRecordRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*TxtRecordRecord)(nil)).Elem()
}
func (i TxtRecordRecordArgs) ToTxtRecordRecordOutput() TxtRecordRecordOutput {
return i.ToTxtRecordRecordOutputWithContext(context.Background())
}
func (i TxtRecordRecordArgs) ToTxtRecordRecordOutputWithContext(ctx context.Context) TxtRecordRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(TxtRecordRecordOutput)
}
// TxtRecordRecordArrayInput is an input type that accepts TxtRecordRecordArray and TxtRecordRecordArrayOutput values.
// You can construct a concrete instance of `TxtRecordRecordArrayInput` via:
//
// TxtRecordRecordArray{ TxtRecordRecordArgs{...} }
type TxtRecordRecordArrayInput interface {
pulumi.Input
ToTxtRecordRecordArrayOutput() TxtRecordRecordArrayOutput
ToTxtRecordRecordArrayOutputWithContext(context.Context) TxtRecordRecordArrayOutput
}
type TxtRecordRecordArray []TxtRecordRecordInput
func (TxtRecordRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]TxtRecordRecord)(nil)).Elem()
}
func (i TxtRecordRecordArray) ToTxtRecordRecordArrayOutput() TxtRecordRecordArrayOutput {
return i.ToTxtRecordRecordArrayOutputWithContext(context.Background())
}
func (i TxtRecordRecordArray) ToTxtRecordRecordArrayOutputWithContext(ctx context.Context) TxtRecordRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TxtRecordRecordArrayOutput)
}
type TxtRecordRecordOutput struct{ *pulumi.OutputState }
func (TxtRecordRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TxtRecordRecord)(nil)).Elem()
}
func (o TxtRecordRecordOutput) ToTxtRecordRecordOutput() TxtRecordRecordOutput {
return o
}
func (o TxtRecordRecordOutput) ToTxtRecordRecordOutputWithContext(ctx context.Context) TxtRecordRecordOutput {
return o
}
// The value of the TXT record. Max length: 1024 characters
func (o TxtRecordRecordOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v TxtRecordRecord) string { return v.Value }).(pulumi.StringOutput)
}
type TxtRecordRecordArrayOutput struct{ *pulumi.OutputState }
func (TxtRecordRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]TxtRecordRecord)(nil)).Elem()
}
func (o TxtRecordRecordArrayOutput) ToTxtRecordRecordArrayOutput() TxtRecordRecordArrayOutput {
return o
}
func (o TxtRecordRecordArrayOutput) ToTxtRecordRecordArrayOutputWithContext(ctx context.Context) TxtRecordRecordArrayOutput {
return o
}
func (o TxtRecordRecordArrayOutput) Index(i pulumi.IntInput) TxtRecordRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) TxtRecordRecord {
return vs[0].([]TxtRecordRecord)[vs[1].(int)]
}).(TxtRecordRecordOutput)
}
type ZoneSoaRecord struct {
// The email contact for the SOA record.
| 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/privatedns/getDnsZone.go | sdk/go/azure/privatedns/getDnsZone.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
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 Private DNS Zone.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := privatedns.GetDnsZone(ctx, &privatedns.GetDnsZoneArgs{
// Name: "contoso.internal",
// ResourceGroupName: pulumi.StringRef("contoso-dns"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("privateDnsZoneId", example.Id)
// return nil
// })
// }
//
// ```
func GetDnsZone(ctx *pulumi.Context, args *GetDnsZoneArgs, opts ...pulumi.InvokeOption) (*GetDnsZoneResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetDnsZoneResult
err := ctx.Invoke("azure:privatedns/getDnsZone:getDnsZone", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDnsZone.
type GetDnsZoneArgs struct {
// The name of the Private DNS Zone.
Name string `pulumi:"name"`
// The Name of the Resource Group where the Private DNS Zone exists.
// If the Name of the Resource Group is not provided, the first Private DNS Zone from the list of Private
// DNS Zones in your subscription that matches `name` will be returned.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags for the zone.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getDnsZone.
type GetDnsZoneResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Maximum number of recordsets that can be created in this Private Zone.
MaxNumberOfRecordSets int `pulumi:"maxNumberOfRecordSets"`
// Maximum number of Virtual Networks that can be linked to this Private Zone.
MaxNumberOfVirtualNetworkLinks int `pulumi:"maxNumberOfVirtualNetworkLinks"`
// Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
MaxNumberOfVirtualNetworkLinksWithRegistration int `pulumi:"maxNumberOfVirtualNetworkLinksWithRegistration"`
Name string `pulumi:"name"`
// The number of recordsets currently in the zone.
NumberOfRecordSets int `pulumi:"numberOfRecordSets"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags for the zone.
Tags map[string]string `pulumi:"tags"`
}
func GetDnsZoneOutput(ctx *pulumi.Context, args GetDnsZoneOutputArgs, opts ...pulumi.InvokeOption) GetDnsZoneResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetDnsZoneResultOutput, error) {
args := v.(GetDnsZoneArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getDnsZone:getDnsZone", args, GetDnsZoneResultOutput{}, options).(GetDnsZoneResultOutput), nil
}).(GetDnsZoneResultOutput)
}
// A collection of arguments for invoking getDnsZone.
type GetDnsZoneOutputArgs struct {
// The name of the Private DNS Zone.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the Private DNS Zone exists.
// If the Name of the Resource Group is not provided, the first Private DNS Zone from the list of Private
// DNS Zones in your subscription that matches `name` will be returned.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
// A mapping of tags for the zone.
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (GetDnsZoneOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDnsZoneArgs)(nil)).Elem()
}
// A collection of values returned by getDnsZone.
type GetDnsZoneResultOutput struct{ *pulumi.OutputState }
func (GetDnsZoneResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDnsZoneResult)(nil)).Elem()
}
func (o GetDnsZoneResultOutput) ToGetDnsZoneResultOutput() GetDnsZoneResultOutput {
return o
}
func (o GetDnsZoneResultOutput) ToGetDnsZoneResultOutputWithContext(ctx context.Context) GetDnsZoneResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetDnsZoneResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetDnsZoneResult) string { return v.Id }).(pulumi.StringOutput)
}
// Maximum number of recordsets that can be created in this Private Zone.
func (o GetDnsZoneResultOutput) MaxNumberOfRecordSets() pulumi.IntOutput {
return o.ApplyT(func(v GetDnsZoneResult) int { return v.MaxNumberOfRecordSets }).(pulumi.IntOutput)
}
// Maximum number of Virtual Networks that can be linked to this Private Zone.
func (o GetDnsZoneResultOutput) MaxNumberOfVirtualNetworkLinks() pulumi.IntOutput {
return o.ApplyT(func(v GetDnsZoneResult) int { return v.MaxNumberOfVirtualNetworkLinks }).(pulumi.IntOutput)
}
// Maximum number of Virtual Networks that can be linked to this Private Zone with registration enabled.
func (o GetDnsZoneResultOutput) MaxNumberOfVirtualNetworkLinksWithRegistration() pulumi.IntOutput {
return o.ApplyT(func(v GetDnsZoneResult) int { return v.MaxNumberOfVirtualNetworkLinksWithRegistration }).(pulumi.IntOutput)
}
func (o GetDnsZoneResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetDnsZoneResult) string { return v.Name }).(pulumi.StringOutput)
}
// The number of recordsets currently in the zone.
func (o GetDnsZoneResultOutput) NumberOfRecordSets() pulumi.IntOutput {
return o.ApplyT(func(v GetDnsZoneResult) int { return v.NumberOfRecordSets }).(pulumi.IntOutput)
}
func (o GetDnsZoneResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetDnsZoneResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags for the zone.
func (o GetDnsZoneResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetDnsZoneResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(GetDnsZoneResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/resolverInboundEndpoint.go | sdk/go/azure/privatedns/resolverInboundEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private DNS Resolver Inbound Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/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"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// exampleResolver, err := privatedns.NewResolver(ctx, "example", &privatedns.ResolverArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("inbounddns"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/28"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("Microsoft.Network.dnsResolvers"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// Name: pulumi.String("Microsoft.Network/dnsResolvers"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewResolverInboundEndpoint(ctx, "example", &privatedns.ResolverInboundEndpointArgs{
// Name: pulumi.String("example-drie"),
// PrivateDnsResolverId: exampleResolver.ID(),
// Location: exampleResolver.Location,
// IpConfigurations: &privatedns.ResolverInboundEndpointIpConfigurationsArgs{
// PrivateIpAllocationMethod: pulumi.String("Dynamic"),
// SubnetId: exampleSubnet.ID(),
// },
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2022-07-01
//
// ## Import
//
// Private DNS Resolver Inbound Endpoint can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/resolverInboundEndpoint:ResolverInboundEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/dnsResolvers/dnsResolver1/inboundEndpoints/inboundEndpoint1
// ```
type ResolverInboundEndpoint struct {
pulumi.CustomResourceState
// One `ipConfigurations` block as defined below. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
IpConfigurations ResolverInboundEndpointIpConfigurationsOutput `pulumi:"ipConfigurations"`
// Specifies the Azure Region where the Private DNS Resolver Inbound Endpoint should exist. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
PrivateDnsResolverId pulumi.StringOutput `pulumi:"privateDnsResolverId"`
// A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewResolverInboundEndpoint registers a new resource with the given unique name, arguments, and options.
func NewResolverInboundEndpoint(ctx *pulumi.Context,
name string, args *ResolverInboundEndpointArgs, opts ...pulumi.ResourceOption) (*ResolverInboundEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IpConfigurations == nil {
return nil, errors.New("invalid value for required argument 'IpConfigurations'")
}
if args.PrivateDnsResolverId == nil {
return nil, errors.New("invalid value for required argument 'PrivateDnsResolverId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ResolverInboundEndpoint
err := ctx.RegisterResource("azure:privatedns/resolverInboundEndpoint:ResolverInboundEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResolverInboundEndpoint gets an existing ResolverInboundEndpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResolverInboundEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResolverInboundEndpointState, opts ...pulumi.ResourceOption) (*ResolverInboundEndpoint, error) {
var resource ResolverInboundEndpoint
err := ctx.ReadResource("azure:privatedns/resolverInboundEndpoint:ResolverInboundEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ResolverInboundEndpoint resources.
type resolverInboundEndpointState struct {
// One `ipConfigurations` block as defined below. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
IpConfigurations *ResolverInboundEndpointIpConfigurations `pulumi:"ipConfigurations"`
// Specifies the Azure Region where the Private DNS Resolver Inbound Endpoint should exist. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
PrivateDnsResolverId *string `pulumi:"privateDnsResolverId"`
// A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint.
Tags map[string]string `pulumi:"tags"`
}
type ResolverInboundEndpointState struct {
// One `ipConfigurations` block as defined below. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
IpConfigurations ResolverInboundEndpointIpConfigurationsPtrInput
// Specifies the Azure Region where the Private DNS Resolver Inbound Endpoint should exist. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
PrivateDnsResolverId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint.
Tags pulumi.StringMapInput
}
func (ResolverInboundEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*resolverInboundEndpointState)(nil)).Elem()
}
type resolverInboundEndpointArgs struct {
// One `ipConfigurations` block as defined below. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
IpConfigurations ResolverInboundEndpointIpConfigurations `pulumi:"ipConfigurations"`
// Specifies the Azure Region where the Private DNS Resolver Inbound Endpoint should exist. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
PrivateDnsResolverId string `pulumi:"privateDnsResolverId"`
// A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ResolverInboundEndpoint resource.
type ResolverInboundEndpointArgs struct {
// One `ipConfigurations` block as defined below. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
IpConfigurations ResolverInboundEndpointIpConfigurationsInput
// Specifies the Azure Region where the Private DNS Resolver Inbound Endpoint should exist. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
PrivateDnsResolverId pulumi.StringInput
// A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint.
Tags pulumi.StringMapInput
}
func (ResolverInboundEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resolverInboundEndpointArgs)(nil)).Elem()
}
type ResolverInboundEndpointInput interface {
pulumi.Input
ToResolverInboundEndpointOutput() ResolverInboundEndpointOutput
ToResolverInboundEndpointOutputWithContext(ctx context.Context) ResolverInboundEndpointOutput
}
func (*ResolverInboundEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverInboundEndpoint)(nil)).Elem()
}
func (i *ResolverInboundEndpoint) ToResolverInboundEndpointOutput() ResolverInboundEndpointOutput {
return i.ToResolverInboundEndpointOutputWithContext(context.Background())
}
func (i *ResolverInboundEndpoint) ToResolverInboundEndpointOutputWithContext(ctx context.Context) ResolverInboundEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverInboundEndpointOutput)
}
// ResolverInboundEndpointArrayInput is an input type that accepts ResolverInboundEndpointArray and ResolverInboundEndpointArrayOutput values.
// You can construct a concrete instance of `ResolverInboundEndpointArrayInput` via:
//
// ResolverInboundEndpointArray{ ResolverInboundEndpointArgs{...} }
type ResolverInboundEndpointArrayInput interface {
pulumi.Input
ToResolverInboundEndpointArrayOutput() ResolverInboundEndpointArrayOutput
ToResolverInboundEndpointArrayOutputWithContext(context.Context) ResolverInboundEndpointArrayOutput
}
type ResolverInboundEndpointArray []ResolverInboundEndpointInput
func (ResolverInboundEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverInboundEndpoint)(nil)).Elem()
}
func (i ResolverInboundEndpointArray) ToResolverInboundEndpointArrayOutput() ResolverInboundEndpointArrayOutput {
return i.ToResolverInboundEndpointArrayOutputWithContext(context.Background())
}
func (i ResolverInboundEndpointArray) ToResolverInboundEndpointArrayOutputWithContext(ctx context.Context) ResolverInboundEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverInboundEndpointArrayOutput)
}
// ResolverInboundEndpointMapInput is an input type that accepts ResolverInboundEndpointMap and ResolverInboundEndpointMapOutput values.
// You can construct a concrete instance of `ResolverInboundEndpointMapInput` via:
//
// ResolverInboundEndpointMap{ "key": ResolverInboundEndpointArgs{...} }
type ResolverInboundEndpointMapInput interface {
pulumi.Input
ToResolverInboundEndpointMapOutput() ResolverInboundEndpointMapOutput
ToResolverInboundEndpointMapOutputWithContext(context.Context) ResolverInboundEndpointMapOutput
}
type ResolverInboundEndpointMap map[string]ResolverInboundEndpointInput
func (ResolverInboundEndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverInboundEndpoint)(nil)).Elem()
}
func (i ResolverInboundEndpointMap) ToResolverInboundEndpointMapOutput() ResolverInboundEndpointMapOutput {
return i.ToResolverInboundEndpointMapOutputWithContext(context.Background())
}
func (i ResolverInboundEndpointMap) ToResolverInboundEndpointMapOutputWithContext(ctx context.Context) ResolverInboundEndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverInboundEndpointMapOutput)
}
type ResolverInboundEndpointOutput struct{ *pulumi.OutputState }
func (ResolverInboundEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverInboundEndpoint)(nil)).Elem()
}
func (o ResolverInboundEndpointOutput) ToResolverInboundEndpointOutput() ResolverInboundEndpointOutput {
return o
}
func (o ResolverInboundEndpointOutput) ToResolverInboundEndpointOutputWithContext(ctx context.Context) ResolverInboundEndpointOutput {
return o
}
// One `ipConfigurations` block as defined below. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
func (o ResolverInboundEndpointOutput) IpConfigurations() ResolverInboundEndpointIpConfigurationsOutput {
return o.ApplyT(func(v *ResolverInboundEndpoint) ResolverInboundEndpointIpConfigurationsOutput {
return v.IpConfigurations
}).(ResolverInboundEndpointIpConfigurationsOutput)
}
// Specifies the Azure Region where the Private DNS Resolver Inbound Endpoint should exist. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
func (o ResolverInboundEndpointOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverInboundEndpoint) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
func (o ResolverInboundEndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverInboundEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created.
func (o ResolverInboundEndpointOutput) PrivateDnsResolverId() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverInboundEndpoint) pulumi.StringOutput { return v.PrivateDnsResolverId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint.
func (o ResolverInboundEndpointOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ResolverInboundEndpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ResolverInboundEndpointArrayOutput struct{ *pulumi.OutputState }
func (ResolverInboundEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverInboundEndpoint)(nil)).Elem()
}
func (o ResolverInboundEndpointArrayOutput) ToResolverInboundEndpointArrayOutput() ResolverInboundEndpointArrayOutput {
return o
}
func (o ResolverInboundEndpointArrayOutput) ToResolverInboundEndpointArrayOutputWithContext(ctx context.Context) ResolverInboundEndpointArrayOutput {
return o
}
func (o ResolverInboundEndpointArrayOutput) Index(i pulumi.IntInput) ResolverInboundEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverInboundEndpoint {
return vs[0].([]*ResolverInboundEndpoint)[vs[1].(int)]
}).(ResolverInboundEndpointOutput)
}
type ResolverInboundEndpointMapOutput struct{ *pulumi.OutputState }
func (ResolverInboundEndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverInboundEndpoint)(nil)).Elem()
}
func (o ResolverInboundEndpointMapOutput) ToResolverInboundEndpointMapOutput() ResolverInboundEndpointMapOutput {
return o
}
func (o ResolverInboundEndpointMapOutput) ToResolverInboundEndpointMapOutputWithContext(ctx context.Context) ResolverInboundEndpointMapOutput {
return o
}
func (o ResolverInboundEndpointMapOutput) MapIndex(k pulumi.StringInput) ResolverInboundEndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverInboundEndpoint {
return vs[0].(map[string]*ResolverInboundEndpoint)[vs[1].(string)]
}).(ResolverInboundEndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResolverInboundEndpointInput)(nil)).Elem(), &ResolverInboundEndpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverInboundEndpointArrayInput)(nil)).Elem(), ResolverInboundEndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverInboundEndpointMapInput)(nil)).Elem(), ResolverInboundEndpointMap{})
pulumi.RegisterOutputType(ResolverInboundEndpointOutput{})
pulumi.RegisterOutputType(ResolverInboundEndpointArrayOutput{})
pulumi.RegisterOutputType(ResolverInboundEndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/resolver.go | sdk/go/azure/privatedns/resolver.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private DNS Resolver.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewResolver(ctx, "test", &privatedns.ResolverArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2022-07-01
//
// ## Import
//
// DNS Resolver can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/resolver:Resolver example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/dnsResolvers/dnsResolver1
// ```
type Resolver struct {
pulumi.CustomResourceState
// Specifies the Azure Region where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the Resource Group where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Private DNS Resolver.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
VirtualNetworkId pulumi.StringOutput `pulumi:"virtualNetworkId"`
}
// NewResolver registers a new resource with the given unique name, arguments, and options.
func NewResolver(ctx *pulumi.Context,
name string, args *ResolverArgs, opts ...pulumi.ResourceOption) (*Resolver, 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.VirtualNetworkId == nil {
return nil, errors.New("invalid value for required argument 'VirtualNetworkId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Resolver
err := ctx.RegisterResource("azure:privatedns/resolver:Resolver", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResolver gets an existing Resolver resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResolver(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResolverState, opts ...pulumi.ResourceOption) (*Resolver, error) {
var resource Resolver
err := ctx.ReadResource("azure:privatedns/resolver:Resolver", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Resolver resources.
type resolverState struct {
// Specifies the Azure Region where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Private DNS Resolver.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
type ResolverState struct {
// Specifies the Azure Region where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Private DNS Resolver.
Tags pulumi.StringMapInput
// The ID of the Virtual Network that is linked to the Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
VirtualNetworkId pulumi.StringPtrInput
}
func (ResolverState) ElementType() reflect.Type {
return reflect.TypeOf((*resolverState)(nil)).Elem()
}
type resolverArgs struct {
// Specifies the Azure Region where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Private DNS Resolver.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
// The set of arguments for constructing a Resolver resource.
type ResolverArgs struct {
// Specifies the Azure Region where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Private DNS Resolver.
Tags pulumi.StringMapInput
// The ID of the Virtual Network that is linked to the Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
VirtualNetworkId pulumi.StringInput
}
func (ResolverArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resolverArgs)(nil)).Elem()
}
type ResolverInput interface {
pulumi.Input
ToResolverOutput() ResolverOutput
ToResolverOutputWithContext(ctx context.Context) ResolverOutput
}
func (*Resolver) ElementType() reflect.Type {
return reflect.TypeOf((**Resolver)(nil)).Elem()
}
func (i *Resolver) ToResolverOutput() ResolverOutput {
return i.ToResolverOutputWithContext(context.Background())
}
func (i *Resolver) ToResolverOutputWithContext(ctx context.Context) ResolverOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverOutput)
}
// ResolverArrayInput is an input type that accepts ResolverArray and ResolverArrayOutput values.
// You can construct a concrete instance of `ResolverArrayInput` via:
//
// ResolverArray{ ResolverArgs{...} }
type ResolverArrayInput interface {
pulumi.Input
ToResolverArrayOutput() ResolverArrayOutput
ToResolverArrayOutputWithContext(context.Context) ResolverArrayOutput
}
type ResolverArray []ResolverInput
func (ResolverArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Resolver)(nil)).Elem()
}
func (i ResolverArray) ToResolverArrayOutput() ResolverArrayOutput {
return i.ToResolverArrayOutputWithContext(context.Background())
}
func (i ResolverArray) ToResolverArrayOutputWithContext(ctx context.Context) ResolverArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverArrayOutput)
}
// ResolverMapInput is an input type that accepts ResolverMap and ResolverMapOutput values.
// You can construct a concrete instance of `ResolverMapInput` via:
//
// ResolverMap{ "key": ResolverArgs{...} }
type ResolverMapInput interface {
pulumi.Input
ToResolverMapOutput() ResolverMapOutput
ToResolverMapOutputWithContext(context.Context) ResolverMapOutput
}
type ResolverMap map[string]ResolverInput
func (ResolverMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Resolver)(nil)).Elem()
}
func (i ResolverMap) ToResolverMapOutput() ResolverMapOutput {
return i.ToResolverMapOutputWithContext(context.Background())
}
func (i ResolverMap) ToResolverMapOutputWithContext(ctx context.Context) ResolverMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverMapOutput)
}
type ResolverOutput struct{ *pulumi.OutputState }
func (ResolverOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Resolver)(nil)).Elem()
}
func (o ResolverOutput) ToResolverOutput() ResolverOutput {
return o
}
func (o ResolverOutput) ToResolverOutputWithContext(ctx context.Context) ResolverOutput {
return o
}
// Specifies the Azure Region where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
func (o ResolverOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
func (o ResolverOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group where the Private DNS Resolver should exist. Changing this forces a new Private DNS Resolver to be created.
func (o ResolverOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Private DNS Resolver.
func (o ResolverOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Resolver) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Virtual Network that is linked to the Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created.
func (o ResolverOutput) VirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v *Resolver) pulumi.StringOutput { return v.VirtualNetworkId }).(pulumi.StringOutput)
}
type ResolverArrayOutput struct{ *pulumi.OutputState }
func (ResolverArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Resolver)(nil)).Elem()
}
func (o ResolverArrayOutput) ToResolverArrayOutput() ResolverArrayOutput {
return o
}
func (o ResolverArrayOutput) ToResolverArrayOutputWithContext(ctx context.Context) ResolverArrayOutput {
return o
}
func (o ResolverArrayOutput) Index(i pulumi.IntInput) ResolverOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Resolver {
return vs[0].([]*Resolver)[vs[1].(int)]
}).(ResolverOutput)
}
type ResolverMapOutput struct{ *pulumi.OutputState }
func (ResolverMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Resolver)(nil)).Elem()
}
func (o ResolverMapOutput) ToResolverMapOutput() ResolverMapOutput {
return o
}
func (o ResolverMapOutput) ToResolverMapOutputWithContext(ctx context.Context) ResolverMapOutput {
return o
}
func (o ResolverMapOutput) MapIndex(k pulumi.StringInput) ResolverOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Resolver {
return vs[0].(map[string]*Resolver)[vs[1].(string)]
}).(ResolverOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResolverInput)(nil)).Elem(), &Resolver{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverArrayInput)(nil)).Elem(), ResolverArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverMapInput)(nil)).Elem(), ResolverMap{})
pulumi.RegisterOutputType(ResolverOutput{})
pulumi.RegisterOutputType(ResolverArrayOutput{})
pulumi.RegisterOutputType(ResolverMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getResolverDnsForwardingRuleset.go | sdk/go/azure/privatedns/getResolverDnsForwardingRuleset.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets information about an existing Private DNS Resolver Dns Forwarding Ruleset.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.LookupResolverDnsForwardingRuleset(ctx, &privatedns.LookupResolverDnsForwardingRulesetArgs{
// Name: "example-ruleset",
// ResourceGroupName: "example-ruleset-resourcegroup",
// }, 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.Network` - 2022-07-01
func LookupResolverDnsForwardingRuleset(ctx *pulumi.Context, args *LookupResolverDnsForwardingRulesetArgs, opts ...pulumi.InvokeOption) (*LookupResolverDnsForwardingRulesetResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupResolverDnsForwardingRulesetResult
err := ctx.Invoke("azure:privatedns/getResolverDnsForwardingRuleset:getResolverDnsForwardingRuleset", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getResolverDnsForwardingRuleset.
type LookupResolverDnsForwardingRulesetArgs struct {
// Name of the existing Private DNS Resolver Dns Forwarding Ruleset.
Name string `pulumi:"name"`
// Name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getResolverDnsForwardingRuleset.
type LookupResolverDnsForwardingRulesetResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Private DNS Resolver Dns Forwarding Ruleset exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The IDs list of the Private DNS Resolver Outbound Endpoints that are linked to the Private DNS Resolver Dns Forwarding Ruleset.
PrivateDnsResolverOutboundEndpointIds []string `pulumi:"privateDnsResolverOutboundEndpointIds"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The tags assigned to the Private DNS Resolver Dns Forwarding Ruleset.
Tags map[string]string `pulumi:"tags"`
}
func LookupResolverDnsForwardingRulesetOutput(ctx *pulumi.Context, args LookupResolverDnsForwardingRulesetOutputArgs, opts ...pulumi.InvokeOption) LookupResolverDnsForwardingRulesetResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupResolverDnsForwardingRulesetResultOutput, error) {
args := v.(LookupResolverDnsForwardingRulesetArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getResolverDnsForwardingRuleset:getResolverDnsForwardingRuleset", args, LookupResolverDnsForwardingRulesetResultOutput{}, options).(LookupResolverDnsForwardingRulesetResultOutput), nil
}).(LookupResolverDnsForwardingRulesetResultOutput)
}
// A collection of arguments for invoking getResolverDnsForwardingRuleset.
type LookupResolverDnsForwardingRulesetOutputArgs struct {
// Name of the existing Private DNS Resolver Dns Forwarding Ruleset.
Name pulumi.StringInput `pulumi:"name"`
// Name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupResolverDnsForwardingRulesetOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverDnsForwardingRulesetArgs)(nil)).Elem()
}
// A collection of values returned by getResolverDnsForwardingRuleset.
type LookupResolverDnsForwardingRulesetResultOutput struct{ *pulumi.OutputState }
func (LookupResolverDnsForwardingRulesetResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverDnsForwardingRulesetResult)(nil)).Elem()
}
func (o LookupResolverDnsForwardingRulesetResultOutput) ToLookupResolverDnsForwardingRulesetResultOutput() LookupResolverDnsForwardingRulesetResultOutput {
return o
}
func (o LookupResolverDnsForwardingRulesetResultOutput) ToLookupResolverDnsForwardingRulesetResultOutputWithContext(ctx context.Context) LookupResolverDnsForwardingRulesetResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupResolverDnsForwardingRulesetResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverDnsForwardingRulesetResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Private DNS Resolver Dns Forwarding Ruleset exists.
func (o LookupResolverDnsForwardingRulesetResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverDnsForwardingRulesetResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupResolverDnsForwardingRulesetResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverDnsForwardingRulesetResult) string { return v.Name }).(pulumi.StringOutput)
}
// The IDs list of the Private DNS Resolver Outbound Endpoints that are linked to the Private DNS Resolver Dns Forwarding Ruleset.
func (o LookupResolverDnsForwardingRulesetResultOutput) PrivateDnsResolverOutboundEndpointIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupResolverDnsForwardingRulesetResult) []string {
return v.PrivateDnsResolverOutboundEndpointIds
}).(pulumi.StringArrayOutput)
}
func (o LookupResolverDnsForwardingRulesetResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverDnsForwardingRulesetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The tags assigned to the Private DNS Resolver Dns Forwarding Ruleset.
func (o LookupResolverDnsForwardingRulesetResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupResolverDnsForwardingRulesetResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupResolverDnsForwardingRulesetResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getResolver.go | sdk/go/azure/privatedns/getResolver.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets information about an existing Private DNS Resolver.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.LookupResolver(ctx, &privatedns.LookupResolverArgs{
// Name: "example",
// ResourceGroupName: "example-resourcegroup-name",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2022-07-01
func LookupResolver(ctx *pulumi.Context, args *LookupResolverArgs, opts ...pulumi.InvokeOption) (*LookupResolverResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupResolverResult
err := ctx.Invoke("azure:privatedns/getResolver:getResolver", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getResolver.
type LookupResolverArgs struct {
// Name of the Private DNS Resolver.
Name string `pulumi:"name"`
// Name of the Resource Group where the Private DNS Resolver exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getResolver.
type LookupResolverResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Private DNS Resolver exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The tags assigned to the Private DNS Resolver.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
func LookupResolverOutput(ctx *pulumi.Context, args LookupResolverOutputArgs, opts ...pulumi.InvokeOption) LookupResolverResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupResolverResultOutput, error) {
args := v.(LookupResolverArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getResolver:getResolver", args, LookupResolverResultOutput{}, options).(LookupResolverResultOutput), nil
}).(LookupResolverResultOutput)
}
// A collection of arguments for invoking getResolver.
type LookupResolverOutputArgs struct {
// Name of the Private DNS Resolver.
Name pulumi.StringInput `pulumi:"name"`
// Name of the Resource Group where the Private DNS Resolver exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupResolverOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverArgs)(nil)).Elem()
}
// A collection of values returned by getResolver.
type LookupResolverResultOutput struct{ *pulumi.OutputState }
func (LookupResolverResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverResult)(nil)).Elem()
}
func (o LookupResolverResultOutput) ToLookupResolverResultOutput() LookupResolverResultOutput {
return o
}
func (o LookupResolverResultOutput) ToLookupResolverResultOutputWithContext(ctx context.Context) LookupResolverResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupResolverResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Private DNS Resolver exists.
func (o LookupResolverResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupResolverResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupResolverResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The tags assigned to the Private DNS Resolver.
func (o LookupResolverResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupResolverResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Virtual Network that is linked to the Private DNS Resolver.
func (o LookupResolverResultOutput) VirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverResult) string { return v.VirtualNetworkId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupResolverResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getZoneVirtualNetworkLink.go | sdk/go/azure/privatedns/getZoneVirtualNetworkLink.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
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 Private DNS zone Virtual Network Link. These Links enable DNS resolution and registration inside Azure Virtual Networks using Azure Private DNS.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := privatedns.LookupZoneVirtualNetworkLink(ctx, &privatedns.LookupZoneVirtualNetworkLinkArgs{
// Name: "test",
// ResourceGroupName: "test-rg",
// PrivateDnsZoneName: "test-zone",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("privateDnsARecordId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func LookupZoneVirtualNetworkLink(ctx *pulumi.Context, args *LookupZoneVirtualNetworkLinkArgs, opts ...pulumi.InvokeOption) (*LookupZoneVirtualNetworkLinkResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupZoneVirtualNetworkLinkResult
err := ctx.Invoke("azure:privatedns/getZoneVirtualNetworkLink:getZoneVirtualNetworkLink", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getZoneVirtualNetworkLink.
type LookupZoneVirtualNetworkLinkArgs struct {
// The name of the Private DNS Zone Virtual Network Link.
Name string `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot).
PrivateDnsZoneName string `pulumi:"privateDnsZoneName"`
// Specifies the resource group where the Private DNS Zone exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getZoneVirtualNetworkLink.
type LookupZoneVirtualNetworkLinkResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
PrivateDnsZoneName string `pulumi:"privateDnsZoneName"`
// Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
RegistrationEnabled bool `pulumi:"registrationEnabled"`
// The resolution policy of the Private DNS Zone Virtual Network Link.
ResolutionPolicy string `pulumi:"resolutionPolicy"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network that is linked to the DNS Zone.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
func LookupZoneVirtualNetworkLinkOutput(ctx *pulumi.Context, args LookupZoneVirtualNetworkLinkOutputArgs, opts ...pulumi.InvokeOption) LookupZoneVirtualNetworkLinkResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupZoneVirtualNetworkLinkResultOutput, error) {
args := v.(LookupZoneVirtualNetworkLinkArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getZoneVirtualNetworkLink:getZoneVirtualNetworkLink", args, LookupZoneVirtualNetworkLinkResultOutput{}, options).(LookupZoneVirtualNetworkLinkResultOutput), nil
}).(LookupZoneVirtualNetworkLinkResultOutput)
}
// A collection of arguments for invoking getZoneVirtualNetworkLink.
type LookupZoneVirtualNetworkLinkOutputArgs struct {
// The name of the Private DNS Zone Virtual Network Link.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot).
PrivateDnsZoneName pulumi.StringInput `pulumi:"privateDnsZoneName"`
// Specifies the resource group where the Private DNS Zone exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupZoneVirtualNetworkLinkOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupZoneVirtualNetworkLinkArgs)(nil)).Elem()
}
// A collection of values returned by getZoneVirtualNetworkLink.
type LookupZoneVirtualNetworkLinkResultOutput struct{ *pulumi.OutputState }
func (LookupZoneVirtualNetworkLinkResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupZoneVirtualNetworkLinkResult)(nil)).Elem()
}
func (o LookupZoneVirtualNetworkLinkResultOutput) ToLookupZoneVirtualNetworkLinkResultOutput() LookupZoneVirtualNetworkLinkResultOutput {
return o
}
func (o LookupZoneVirtualNetworkLinkResultOutput) ToLookupZoneVirtualNetworkLinkResultOutputWithContext(ctx context.Context) LookupZoneVirtualNetworkLinkResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupZoneVirtualNetworkLinkResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupZoneVirtualNetworkLinkResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupZoneVirtualNetworkLinkResultOutput) PrivateDnsZoneName() pulumi.StringOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) string { return v.PrivateDnsZoneName }).(pulumi.StringOutput)
}
// Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
func (o LookupZoneVirtualNetworkLinkResultOutput) RegistrationEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) bool { return v.RegistrationEnabled }).(pulumi.BoolOutput)
}
// The resolution policy of the Private DNS Zone Virtual Network Link.
func (o LookupZoneVirtualNetworkLinkResultOutput) ResolutionPolicy() pulumi.StringOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) string { return v.ResolutionPolicy }).(pulumi.StringOutput)
}
func (o LookupZoneVirtualNetworkLinkResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o LookupZoneVirtualNetworkLinkResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Virtual Network that is linked to the DNS Zone.
func (o LookupZoneVirtualNetworkLinkResultOutput) VirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v LookupZoneVirtualNetworkLinkResult) string { return v.VirtualNetworkId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupZoneVirtualNetworkLinkResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/cnameRecord.go | sdk/go/azure/privatedns/cnameRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage DNS CNAME Records within Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("mydomain.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewCnameRecord(ctx, "example", &privatedns.CnameRecordArgs{
// Name: pulumi.String("test"),
// ZoneName: exampleZone.Name,
// ResourceGroupName: example.Name,
// Ttl: pulumi.Int(300),
// Record: pulumi.String("contoso.com"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS CName Records can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/cnameRecord:CnameRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1/CNAME/myrecord1
// ```
type CnameRecord struct {
pulumi.CustomResourceState
// The FQDN of the DNS CNAME Record.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// The name of the DNS CNAME Record. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The target of the CNAME.
Record pulumi.StringOutput `pulumi:"record"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds. Possible values are between `0` and `2147483647`.
Ttl pulumi.IntOutput `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringOutput `pulumi:"zoneName"`
}
// NewCnameRecord registers a new resource with the given unique name, arguments, and options.
func NewCnameRecord(ctx *pulumi.Context,
name string, args *CnameRecordArgs, opts ...pulumi.ResourceOption) (*CnameRecord, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Record == nil {
return nil, errors.New("invalid value for required argument 'Record'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Ttl == nil {
return nil, errors.New("invalid value for required argument 'Ttl'")
}
if args.ZoneName == nil {
return nil, errors.New("invalid value for required argument 'ZoneName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CnameRecord
err := ctx.RegisterResource("azure:privatedns/cnameRecord:CnameRecord", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCnameRecord gets an existing CnameRecord resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCnameRecord(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CnameRecordState, opts ...pulumi.ResourceOption) (*CnameRecord, error) {
var resource CnameRecord
err := ctx.ReadResource("azure:privatedns/cnameRecord:CnameRecord", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CnameRecord resources.
type cnameRecordState struct {
// The FQDN of the DNS CNAME Record.
Fqdn *string `pulumi:"fqdn"`
// The name of the DNS CNAME Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The target of the CNAME.
Record *string `pulumi:"record"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds. Possible values are between `0` and `2147483647`.
Ttl *int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName *string `pulumi:"zoneName"`
}
type CnameRecordState struct {
// The FQDN of the DNS CNAME Record.
Fqdn pulumi.StringPtrInput
// The name of the DNS CNAME Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The target of the CNAME.
Record pulumi.StringPtrInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds. Possible values are between `0` and `2147483647`.
Ttl pulumi.IntPtrInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringPtrInput
}
func (CnameRecordState) ElementType() reflect.Type {
return reflect.TypeOf((*cnameRecordState)(nil)).Elem()
}
type cnameRecordArgs struct {
// The name of the DNS CNAME Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The target of the CNAME.
Record string `pulumi:"record"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds. Possible values are between `0` and `2147483647`.
Ttl int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName string `pulumi:"zoneName"`
}
// The set of arguments for constructing a CnameRecord resource.
type CnameRecordArgs struct {
// The name of the DNS CNAME Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The target of the CNAME.
Record pulumi.StringInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds. Possible values are between `0` and `2147483647`.
Ttl pulumi.IntInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringInput
}
func (CnameRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*cnameRecordArgs)(nil)).Elem()
}
type CnameRecordInput interface {
pulumi.Input
ToCnameRecordOutput() CnameRecordOutput
ToCnameRecordOutputWithContext(ctx context.Context) CnameRecordOutput
}
func (*CnameRecord) ElementType() reflect.Type {
return reflect.TypeOf((**CnameRecord)(nil)).Elem()
}
func (i *CnameRecord) ToCnameRecordOutput() CnameRecordOutput {
return i.ToCnameRecordOutputWithContext(context.Background())
}
func (i *CnameRecord) ToCnameRecordOutputWithContext(ctx context.Context) CnameRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(CnameRecordOutput)
}
// CnameRecordArrayInput is an input type that accepts CnameRecordArray and CnameRecordArrayOutput values.
// You can construct a concrete instance of `CnameRecordArrayInput` via:
//
// CnameRecordArray{ CnameRecordArgs{...} }
type CnameRecordArrayInput interface {
pulumi.Input
ToCnameRecordArrayOutput() CnameRecordArrayOutput
ToCnameRecordArrayOutputWithContext(context.Context) CnameRecordArrayOutput
}
type CnameRecordArray []CnameRecordInput
func (CnameRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CnameRecord)(nil)).Elem()
}
func (i CnameRecordArray) ToCnameRecordArrayOutput() CnameRecordArrayOutput {
return i.ToCnameRecordArrayOutputWithContext(context.Background())
}
func (i CnameRecordArray) ToCnameRecordArrayOutputWithContext(ctx context.Context) CnameRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CnameRecordArrayOutput)
}
// CnameRecordMapInput is an input type that accepts CnameRecordMap and CnameRecordMapOutput values.
// You can construct a concrete instance of `CnameRecordMapInput` via:
//
// CnameRecordMap{ "key": CnameRecordArgs{...} }
type CnameRecordMapInput interface {
pulumi.Input
ToCnameRecordMapOutput() CnameRecordMapOutput
ToCnameRecordMapOutputWithContext(context.Context) CnameRecordMapOutput
}
type CnameRecordMap map[string]CnameRecordInput
func (CnameRecordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CnameRecord)(nil)).Elem()
}
func (i CnameRecordMap) ToCnameRecordMapOutput() CnameRecordMapOutput {
return i.ToCnameRecordMapOutputWithContext(context.Background())
}
func (i CnameRecordMap) ToCnameRecordMapOutputWithContext(ctx context.Context) CnameRecordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CnameRecordMapOutput)
}
type CnameRecordOutput struct{ *pulumi.OutputState }
func (CnameRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CnameRecord)(nil)).Elem()
}
func (o CnameRecordOutput) ToCnameRecordOutput() CnameRecordOutput {
return o
}
func (o CnameRecordOutput) ToCnameRecordOutputWithContext(ctx context.Context) CnameRecordOutput {
return o
}
// The FQDN of the DNS CNAME Record.
func (o CnameRecordOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *CnameRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// The name of the DNS CNAME Record. Changing this forces a new resource to be created.
func (o CnameRecordOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CnameRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The target of the CNAME.
func (o CnameRecordOutput) Record() pulumi.StringOutput {
return o.ApplyT(func(v *CnameRecord) pulumi.StringOutput { return v.Record }).(pulumi.StringOutput)
}
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
func (o CnameRecordOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *CnameRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o CnameRecordOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *CnameRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds. Possible values are between `0` and `2147483647`.
func (o CnameRecordOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v *CnameRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput)
}
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
func (o CnameRecordOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *CnameRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput)
}
type CnameRecordArrayOutput struct{ *pulumi.OutputState }
func (CnameRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CnameRecord)(nil)).Elem()
}
func (o CnameRecordArrayOutput) ToCnameRecordArrayOutput() CnameRecordArrayOutput {
return o
}
func (o CnameRecordArrayOutput) ToCnameRecordArrayOutputWithContext(ctx context.Context) CnameRecordArrayOutput {
return o
}
func (o CnameRecordArrayOutput) Index(i pulumi.IntInput) CnameRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CnameRecord {
return vs[0].([]*CnameRecord)[vs[1].(int)]
}).(CnameRecordOutput)
}
type CnameRecordMapOutput struct{ *pulumi.OutputState }
func (CnameRecordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CnameRecord)(nil)).Elem()
}
func (o CnameRecordMapOutput) ToCnameRecordMapOutput() CnameRecordMapOutput {
return o
}
func (o CnameRecordMapOutput) ToCnameRecordMapOutputWithContext(ctx context.Context) CnameRecordMapOutput {
return o
}
func (o CnameRecordMapOutput) MapIndex(k pulumi.StringInput) CnameRecordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CnameRecord {
return vs[0].(map[string]*CnameRecord)[vs[1].(string)]
}).(CnameRecordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CnameRecordInput)(nil)).Elem(), &CnameRecord{})
pulumi.RegisterInputType(reflect.TypeOf((*CnameRecordArrayInput)(nil)).Elem(), CnameRecordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CnameRecordMapInput)(nil)).Elem(), CnameRecordMap{})
pulumi.RegisterOutputType(CnameRecordOutput{})
pulumi.RegisterOutputType(CnameRecordArrayOutput{})
pulumi.RegisterOutputType(CnameRecordMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/zone.go | sdk/go/azure/privatedns/zone.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage Private DNS zones within Azure DNS. These zones are hosted on Azure's name servers.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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 = privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("mydomain.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS Zones can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/zone:Zone zone1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1
// ```
type Zone struct {
pulumi.CustomResourceState
// The maximum number of record sets that can be created in this Private DNS zone.
MaxNumberOfRecordSets pulumi.IntOutput `pulumi:"maxNumberOfRecordSets"`
// The maximum number of virtual networks that can be linked to this Private DNS zone.
MaxNumberOfVirtualNetworkLinks pulumi.IntOutput `pulumi:"maxNumberOfVirtualNetworkLinks"`
// The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
MaxNumberOfVirtualNetworkLinksWithRegistration pulumi.IntOutput `pulumi:"maxNumberOfVirtualNetworkLinksWithRegistration"`
// The name of the Private DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created.
//
// > **Note:** If you are going to be using the Private DNS Zone with a Private Endpoint the name of the Private DNS Zone must follow the **Private DNS Zone name** schema in the [product documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-dns#virtual-network-and-on-premises-workloads-using-a-dns-forwarder) in order for the two resources to be connected successfully.
Name pulumi.StringOutput `pulumi:"name"`
// The current number of record sets in this Private DNS zone.
NumberOfRecordSets pulumi.IntOutput `pulumi:"numberOfRecordSets"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// An `soaRecord` block as defined below. Changing this forces a new resource to be created.
SoaRecord ZoneSoaRecordOutput `pulumi:"soaRecord"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewZone registers a new resource with the given unique name, arguments, and options.
func NewZone(ctx *pulumi.Context,
name string, args *ZoneArgs, opts ...pulumi.ResourceOption) (*Zone, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Zone
err := ctx.RegisterResource("azure:privatedns/zone:Zone", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetZone gets an existing Zone resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetZone(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ZoneState, opts ...pulumi.ResourceOption) (*Zone, error) {
var resource Zone
err := ctx.ReadResource("azure:privatedns/zone:Zone", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Zone resources.
type zoneState struct {
// The maximum number of record sets that can be created in this Private DNS zone.
MaxNumberOfRecordSets *int `pulumi:"maxNumberOfRecordSets"`
// The maximum number of virtual networks that can be linked to this Private DNS zone.
MaxNumberOfVirtualNetworkLinks *int `pulumi:"maxNumberOfVirtualNetworkLinks"`
// The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
MaxNumberOfVirtualNetworkLinksWithRegistration *int `pulumi:"maxNumberOfVirtualNetworkLinksWithRegistration"`
// The name of the Private DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created.
//
// > **Note:** If you are going to be using the Private DNS Zone with a Private Endpoint the name of the Private DNS Zone must follow the **Private DNS Zone name** schema in the [product documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-dns#virtual-network-and-on-premises-workloads-using-a-dns-forwarder) in order for the two resources to be connected successfully.
Name *string `pulumi:"name"`
// The current number of record sets in this Private DNS zone.
NumberOfRecordSets *int `pulumi:"numberOfRecordSets"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// An `soaRecord` block as defined below. Changing this forces a new resource to be created.
SoaRecord *ZoneSoaRecord `pulumi:"soaRecord"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type ZoneState struct {
// The maximum number of record sets that can be created in this Private DNS zone.
MaxNumberOfRecordSets pulumi.IntPtrInput
// The maximum number of virtual networks that can be linked to this Private DNS zone.
MaxNumberOfVirtualNetworkLinks pulumi.IntPtrInput
// The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
MaxNumberOfVirtualNetworkLinksWithRegistration pulumi.IntPtrInput
// The name of the Private DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created.
//
// > **Note:** If you are going to be using the Private DNS Zone with a Private Endpoint the name of the Private DNS Zone must follow the **Private DNS Zone name** schema in the [product documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-dns#virtual-network-and-on-premises-workloads-using-a-dns-forwarder) in order for the two resources to be connected successfully.
Name pulumi.StringPtrInput
// The current number of record sets in this Private DNS zone.
NumberOfRecordSets pulumi.IntPtrInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// An `soaRecord` block as defined below. Changing this forces a new resource to be created.
SoaRecord ZoneSoaRecordPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ZoneState) ElementType() reflect.Type {
return reflect.TypeOf((*zoneState)(nil)).Elem()
}
type zoneArgs struct {
// The name of the Private DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created.
//
// > **Note:** If you are going to be using the Private DNS Zone with a Private Endpoint the name of the Private DNS Zone must follow the **Private DNS Zone name** schema in the [product documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-dns#virtual-network-and-on-premises-workloads-using-a-dns-forwarder) in order for the two resources to be connected successfully.
Name *string `pulumi:"name"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// An `soaRecord` block as defined below. Changing this forces a new resource to be created.
SoaRecord *ZoneSoaRecord `pulumi:"soaRecord"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Zone resource.
type ZoneArgs struct {
// The name of the Private DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created.
//
// > **Note:** If you are going to be using the Private DNS Zone with a Private Endpoint the name of the Private DNS Zone must follow the **Private DNS Zone name** schema in the [product documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-dns#virtual-network-and-on-premises-workloads-using-a-dns-forwarder) in order for the two resources to be connected successfully.
Name pulumi.StringPtrInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// An `soaRecord` block as defined below. Changing this forces a new resource to be created.
SoaRecord ZoneSoaRecordPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ZoneArgs) ElementType() reflect.Type {
return reflect.TypeOf((*zoneArgs)(nil)).Elem()
}
type ZoneInput interface {
pulumi.Input
ToZoneOutput() ZoneOutput
ToZoneOutputWithContext(ctx context.Context) ZoneOutput
}
func (*Zone) ElementType() reflect.Type {
return reflect.TypeOf((**Zone)(nil)).Elem()
}
func (i *Zone) ToZoneOutput() ZoneOutput {
return i.ToZoneOutputWithContext(context.Background())
}
func (i *Zone) ToZoneOutputWithContext(ctx context.Context) ZoneOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZoneOutput)
}
// ZoneArrayInput is an input type that accepts ZoneArray and ZoneArrayOutput values.
// You can construct a concrete instance of `ZoneArrayInput` via:
//
// ZoneArray{ ZoneArgs{...} }
type ZoneArrayInput interface {
pulumi.Input
ToZoneArrayOutput() ZoneArrayOutput
ToZoneArrayOutputWithContext(context.Context) ZoneArrayOutput
}
type ZoneArray []ZoneInput
func (ZoneArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Zone)(nil)).Elem()
}
func (i ZoneArray) ToZoneArrayOutput() ZoneArrayOutput {
return i.ToZoneArrayOutputWithContext(context.Background())
}
func (i ZoneArray) ToZoneArrayOutputWithContext(ctx context.Context) ZoneArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZoneArrayOutput)
}
// ZoneMapInput is an input type that accepts ZoneMap and ZoneMapOutput values.
// You can construct a concrete instance of `ZoneMapInput` via:
//
// ZoneMap{ "key": ZoneArgs{...} }
type ZoneMapInput interface {
pulumi.Input
ToZoneMapOutput() ZoneMapOutput
ToZoneMapOutputWithContext(context.Context) ZoneMapOutput
}
type ZoneMap map[string]ZoneInput
func (ZoneMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Zone)(nil)).Elem()
}
func (i ZoneMap) ToZoneMapOutput() ZoneMapOutput {
return i.ToZoneMapOutputWithContext(context.Background())
}
func (i ZoneMap) ToZoneMapOutputWithContext(ctx context.Context) ZoneMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZoneMapOutput)
}
type ZoneOutput struct{ *pulumi.OutputState }
func (ZoneOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Zone)(nil)).Elem()
}
func (o ZoneOutput) ToZoneOutput() ZoneOutput {
return o
}
func (o ZoneOutput) ToZoneOutputWithContext(ctx context.Context) ZoneOutput {
return o
}
// The maximum number of record sets that can be created in this Private DNS zone.
func (o ZoneOutput) MaxNumberOfRecordSets() pulumi.IntOutput {
return o.ApplyT(func(v *Zone) pulumi.IntOutput { return v.MaxNumberOfRecordSets }).(pulumi.IntOutput)
}
// The maximum number of virtual networks that can be linked to this Private DNS zone.
func (o ZoneOutput) MaxNumberOfVirtualNetworkLinks() pulumi.IntOutput {
return o.ApplyT(func(v *Zone) pulumi.IntOutput { return v.MaxNumberOfVirtualNetworkLinks }).(pulumi.IntOutput)
}
// The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled.
func (o ZoneOutput) MaxNumberOfVirtualNetworkLinksWithRegistration() pulumi.IntOutput {
return o.ApplyT(func(v *Zone) pulumi.IntOutput { return v.MaxNumberOfVirtualNetworkLinksWithRegistration }).(pulumi.IntOutput)
}
// The name of the Private DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created.
//
// > **Note:** If you are going to be using the Private DNS Zone with a Private Endpoint the name of the Private DNS Zone must follow the **Private DNS Zone name** schema in the [product documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-dns#virtual-network-and-on-premises-workloads-using-a-dns-forwarder) in order for the two resources to be connected successfully.
func (o ZoneOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Zone) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The current number of record sets in this Private DNS zone.
func (o ZoneOutput) NumberOfRecordSets() pulumi.IntOutput {
return o.ApplyT(func(v *Zone) pulumi.IntOutput { return v.NumberOfRecordSets }).(pulumi.IntOutput)
}
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
func (o ZoneOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Zone) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// An `soaRecord` block as defined below. Changing this forces a new resource to be created.
func (o ZoneOutput) SoaRecord() ZoneSoaRecordOutput {
return o.ApplyT(func(v *Zone) ZoneSoaRecordOutput { return v.SoaRecord }).(ZoneSoaRecordOutput)
}
// A mapping of tags to assign to the resource.
func (o ZoneOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Zone) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ZoneArrayOutput struct{ *pulumi.OutputState }
func (ZoneArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Zone)(nil)).Elem()
}
func (o ZoneArrayOutput) ToZoneArrayOutput() ZoneArrayOutput {
return o
}
func (o ZoneArrayOutput) ToZoneArrayOutputWithContext(ctx context.Context) ZoneArrayOutput {
return o
}
func (o ZoneArrayOutput) Index(i pulumi.IntInput) ZoneOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Zone {
return vs[0].([]*Zone)[vs[1].(int)]
}).(ZoneOutput)
}
type ZoneMapOutput struct{ *pulumi.OutputState }
func (ZoneMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Zone)(nil)).Elem()
}
func (o ZoneMapOutput) ToZoneMapOutput() ZoneMapOutput {
return o
}
func (o ZoneMapOutput) ToZoneMapOutputWithContext(ctx context.Context) ZoneMapOutput {
return o
}
func (o ZoneMapOutput) MapIndex(k pulumi.StringInput) ZoneOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Zone {
return vs[0].(map[string]*Zone)[vs[1].(string)]
}).(ZoneOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ZoneInput)(nil)).Elem(), &Zone{})
pulumi.RegisterInputType(reflect.TypeOf((*ZoneArrayInput)(nil)).Elem(), ZoneArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ZoneMapInput)(nil)).Elem(), ZoneMap{})
pulumi.RegisterOutputType(ZoneOutput{})
pulumi.RegisterOutputType(ZoneArrayOutput{})
pulumi.RegisterOutputType(ZoneMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/txtRecord.go | sdk/go/azure/privatedns/txtRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage DNS TXT Records within Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("contoso.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewTxtRecord(ctx, "example", &privatedns.TxtRecordArgs{
// Name: pulumi.String("test"),
// ResourceGroupName: example.Name,
// ZoneName: exampleZone.Name,
// Ttl: pulumi.Int(300),
// Records: privatedns.TxtRecordRecordArray{
// &privatedns.TxtRecordRecordArgs{
// Value: pulumi.String("v=spf1 mx ~all"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS TXT Records can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/txtRecord:TxtRecord test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/contoso.com/TXT/test
// ```
type TxtRecord struct {
pulumi.CustomResourceState
// The FQDN of the DNS TXT Record.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// The name of the DNS TXT Record. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `record` blocks as defined below.
Records TxtRecordRecordArrayOutput `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntOutput `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringOutput `pulumi:"zoneName"`
}
// NewTxtRecord registers a new resource with the given unique name, arguments, and options.
func NewTxtRecord(ctx *pulumi.Context,
name string, args *TxtRecordArgs, opts ...pulumi.ResourceOption) (*TxtRecord, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Records == nil {
return nil, errors.New("invalid value for required argument 'Records'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Ttl == nil {
return nil, errors.New("invalid value for required argument 'Ttl'")
}
if args.ZoneName == nil {
return nil, errors.New("invalid value for required argument 'ZoneName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource TxtRecord
err := ctx.RegisterResource("azure:privatedns/txtRecord:TxtRecord", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTxtRecord gets an existing TxtRecord resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTxtRecord(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TxtRecordState, opts ...pulumi.ResourceOption) (*TxtRecord, error) {
var resource TxtRecord
err := ctx.ReadResource("azure:privatedns/txtRecord:TxtRecord", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TxtRecord resources.
type txtRecordState struct {
// The FQDN of the DNS TXT Record.
Fqdn *string `pulumi:"fqdn"`
// The name of the DNS TXT Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `record` blocks as defined below.
Records []TxtRecordRecord `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl *int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName *string `pulumi:"zoneName"`
}
type TxtRecordState struct {
// The FQDN of the DNS TXT Record.
Fqdn pulumi.StringPtrInput
// The name of the DNS TXT Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `record` blocks as defined below.
Records TxtRecordRecordArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntPtrInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringPtrInput
}
func (TxtRecordState) ElementType() reflect.Type {
return reflect.TypeOf((*txtRecordState)(nil)).Elem()
}
type txtRecordArgs struct {
// The name of the DNS TXT Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `record` blocks as defined below.
Records []TxtRecordRecord `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName string `pulumi:"zoneName"`
}
// The set of arguments for constructing a TxtRecord resource.
type TxtRecordArgs struct {
// The name of the DNS TXT Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `record` blocks as defined below.
Records TxtRecordRecordArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringInput
}
func (TxtRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*txtRecordArgs)(nil)).Elem()
}
type TxtRecordInput interface {
pulumi.Input
ToTxtRecordOutput() TxtRecordOutput
ToTxtRecordOutputWithContext(ctx context.Context) TxtRecordOutput
}
func (*TxtRecord) ElementType() reflect.Type {
return reflect.TypeOf((**TxtRecord)(nil)).Elem()
}
func (i *TxtRecord) ToTxtRecordOutput() TxtRecordOutput {
return i.ToTxtRecordOutputWithContext(context.Background())
}
func (i *TxtRecord) ToTxtRecordOutputWithContext(ctx context.Context) TxtRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(TxtRecordOutput)
}
// TxtRecordArrayInput is an input type that accepts TxtRecordArray and TxtRecordArrayOutput values.
// You can construct a concrete instance of `TxtRecordArrayInput` via:
//
// TxtRecordArray{ TxtRecordArgs{...} }
type TxtRecordArrayInput interface {
pulumi.Input
ToTxtRecordArrayOutput() TxtRecordArrayOutput
ToTxtRecordArrayOutputWithContext(context.Context) TxtRecordArrayOutput
}
type TxtRecordArray []TxtRecordInput
func (TxtRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TxtRecord)(nil)).Elem()
}
func (i TxtRecordArray) ToTxtRecordArrayOutput() TxtRecordArrayOutput {
return i.ToTxtRecordArrayOutputWithContext(context.Background())
}
func (i TxtRecordArray) ToTxtRecordArrayOutputWithContext(ctx context.Context) TxtRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TxtRecordArrayOutput)
}
// TxtRecordMapInput is an input type that accepts TxtRecordMap and TxtRecordMapOutput values.
// You can construct a concrete instance of `TxtRecordMapInput` via:
//
// TxtRecordMap{ "key": TxtRecordArgs{...} }
type TxtRecordMapInput interface {
pulumi.Input
ToTxtRecordMapOutput() TxtRecordMapOutput
ToTxtRecordMapOutputWithContext(context.Context) TxtRecordMapOutput
}
type TxtRecordMap map[string]TxtRecordInput
func (TxtRecordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TxtRecord)(nil)).Elem()
}
func (i TxtRecordMap) ToTxtRecordMapOutput() TxtRecordMapOutput {
return i.ToTxtRecordMapOutputWithContext(context.Background())
}
func (i TxtRecordMap) ToTxtRecordMapOutputWithContext(ctx context.Context) TxtRecordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TxtRecordMapOutput)
}
type TxtRecordOutput struct{ *pulumi.OutputState }
func (TxtRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TxtRecord)(nil)).Elem()
}
func (o TxtRecordOutput) ToTxtRecordOutput() TxtRecordOutput {
return o
}
func (o TxtRecordOutput) ToTxtRecordOutputWithContext(ctx context.Context) TxtRecordOutput {
return o
}
// The FQDN of the DNS TXT Record.
func (o TxtRecordOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// The name of the DNS TXT Record. Changing this forces a new resource to be created.
func (o TxtRecordOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `record` blocks as defined below.
func (o TxtRecordOutput) Records() TxtRecordRecordArrayOutput {
return o.ApplyT(func(v *TxtRecord) TxtRecordRecordArrayOutput { return v.Records }).(TxtRecordRecordArrayOutput)
}
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
func (o TxtRecordOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o TxtRecordOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *TxtRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds.
func (o TxtRecordOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v *TxtRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput)
}
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
func (o TxtRecordOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput)
}
type TxtRecordArrayOutput struct{ *pulumi.OutputState }
func (TxtRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TxtRecord)(nil)).Elem()
}
func (o TxtRecordArrayOutput) ToTxtRecordArrayOutput() TxtRecordArrayOutput {
return o
}
func (o TxtRecordArrayOutput) ToTxtRecordArrayOutputWithContext(ctx context.Context) TxtRecordArrayOutput {
return o
}
func (o TxtRecordArrayOutput) Index(i pulumi.IntInput) TxtRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TxtRecord {
return vs[0].([]*TxtRecord)[vs[1].(int)]
}).(TxtRecordOutput)
}
type TxtRecordMapOutput struct{ *pulumi.OutputState }
func (TxtRecordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TxtRecord)(nil)).Elem()
}
func (o TxtRecordMapOutput) ToTxtRecordMapOutput() TxtRecordMapOutput {
return o
}
func (o TxtRecordMapOutput) ToTxtRecordMapOutputWithContext(ctx context.Context) TxtRecordMapOutput {
return o
}
func (o TxtRecordMapOutput) MapIndex(k pulumi.StringInput) TxtRecordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TxtRecord {
return vs[0].(map[string]*TxtRecord)[vs[1].(string)]
}).(TxtRecordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TxtRecordInput)(nil)).Elem(), &TxtRecord{})
pulumi.RegisterInputType(reflect.TypeOf((*TxtRecordArrayInput)(nil)).Elem(), TxtRecordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TxtRecordMapInput)(nil)).Elem(), TxtRecordMap{})
pulumi.RegisterOutputType(TxtRecordOutput{})
pulumi.RegisterOutputType(TxtRecordArrayOutput{})
pulumi.RegisterOutputType(TxtRecordMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/resolverVirtualNetworkLink.go | sdk/go/azure/privatedns/resolverVirtualNetworkLink.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private DNS Resolver Virtual Network Link.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("west europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// 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("outbounddns"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.64/28"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("Microsoft.Network.dnsResolvers"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// Name: pulumi.String("Microsoft.Network/dnsResolvers"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleResolver, err := privatedns.NewResolver(ctx, "example", &privatedns.ResolverArgs{
// Name: pulumi.String("example-resolver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// exampleResolverOutboundEndpoint, err := privatedns.NewResolverOutboundEndpoint(ctx, "example", &privatedns.ResolverOutboundEndpointArgs{
// Name: pulumi.String("example-endpoint"),
// PrivateDnsResolverId: exampleResolver.ID(),
// Location: exampleResolver.Location,
// SubnetId: exampleSubnet.ID(),
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// exampleResolverDnsForwardingRuleset, err := privatedns.NewResolverDnsForwardingRuleset(ctx, "example", &privatedns.ResolverDnsForwardingRulesetArgs{
// Name: pulumi.String("example-ruleset"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PrivateDnsResolverOutboundEndpointIds: pulumi.StringArray{
// exampleResolverOutboundEndpoint.ID(),
// },
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewResolverVirtualNetworkLink(ctx, "example", &privatedns.ResolverVirtualNetworkLinkArgs{
// Name: pulumi.String("example-link"),
// DnsForwardingRulesetId: exampleResolverDnsForwardingRuleset.ID(),
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// Metadata: 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.Network` - 2022-07-01
//
// ## Import
//
// Private DNS Resolver Virtual Network Link can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/resolverVirtualNetworkLink:ResolverVirtualNetworkLink example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/dnsForwardingRulesets/dnsForwardingRuleset1/virtualNetworkLinks/virtualNetworkLink1
// ```
type ResolverVirtualNetworkLink struct {
pulumi.CustomResourceState
// Specifies the ID of the Private DNS Resolver DNS Forwarding Ruleset. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
DnsForwardingRulesetId pulumi.StringOutput `pulumi:"dnsForwardingRulesetId"`
// Metadata attached to the Private DNS Resolver Virtual Network Link.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringOutput `pulumi:"virtualNetworkId"`
}
// NewResolverVirtualNetworkLink registers a new resource with the given unique name, arguments, and options.
func NewResolverVirtualNetworkLink(ctx *pulumi.Context,
name string, args *ResolverVirtualNetworkLinkArgs, opts ...pulumi.ResourceOption) (*ResolverVirtualNetworkLink, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DnsForwardingRulesetId == nil {
return nil, errors.New("invalid value for required argument 'DnsForwardingRulesetId'")
}
if args.VirtualNetworkId == nil {
return nil, errors.New("invalid value for required argument 'VirtualNetworkId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ResolverVirtualNetworkLink
err := ctx.RegisterResource("azure:privatedns/resolverVirtualNetworkLink:ResolverVirtualNetworkLink", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResolverVirtualNetworkLink gets an existing ResolverVirtualNetworkLink resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResolverVirtualNetworkLink(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResolverVirtualNetworkLinkState, opts ...pulumi.ResourceOption) (*ResolverVirtualNetworkLink, error) {
var resource ResolverVirtualNetworkLink
err := ctx.ReadResource("azure:privatedns/resolverVirtualNetworkLink:ResolverVirtualNetworkLink", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ResolverVirtualNetworkLink resources.
type resolverVirtualNetworkLinkState struct {
// Specifies the ID of the Private DNS Resolver DNS Forwarding Ruleset. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
DnsForwardingRulesetId *string `pulumi:"dnsForwardingRulesetId"`
// Metadata attached to the Private DNS Resolver Virtual Network Link.
Metadata map[string]string `pulumi:"metadata"`
// Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
Name *string `pulumi:"name"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link. Changing this forces a new resource to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
type ResolverVirtualNetworkLinkState struct {
// Specifies the ID of the Private DNS Resolver DNS Forwarding Ruleset. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
DnsForwardingRulesetId pulumi.StringPtrInput
// Metadata attached to the Private DNS Resolver Virtual Network Link.
Metadata pulumi.StringMapInput
// Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
Name pulumi.StringPtrInput
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringPtrInput
}
func (ResolverVirtualNetworkLinkState) ElementType() reflect.Type {
return reflect.TypeOf((*resolverVirtualNetworkLinkState)(nil)).Elem()
}
type resolverVirtualNetworkLinkArgs struct {
// Specifies the ID of the Private DNS Resolver DNS Forwarding Ruleset. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
DnsForwardingRulesetId string `pulumi:"dnsForwardingRulesetId"`
// Metadata attached to the Private DNS Resolver Virtual Network Link.
Metadata map[string]string `pulumi:"metadata"`
// Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
Name *string `pulumi:"name"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link. Changing this forces a new resource to be created.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
// The set of arguments for constructing a ResolverVirtualNetworkLink resource.
type ResolverVirtualNetworkLinkArgs struct {
// Specifies the ID of the Private DNS Resolver DNS Forwarding Ruleset. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
DnsForwardingRulesetId pulumi.StringInput
// Metadata attached to the Private DNS Resolver Virtual Network Link.
Metadata pulumi.StringMapInput
// Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
Name pulumi.StringPtrInput
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringInput
}
func (ResolverVirtualNetworkLinkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resolverVirtualNetworkLinkArgs)(nil)).Elem()
}
type ResolverVirtualNetworkLinkInput interface {
pulumi.Input
ToResolverVirtualNetworkLinkOutput() ResolverVirtualNetworkLinkOutput
ToResolverVirtualNetworkLinkOutputWithContext(ctx context.Context) ResolverVirtualNetworkLinkOutput
}
func (*ResolverVirtualNetworkLink) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverVirtualNetworkLink)(nil)).Elem()
}
func (i *ResolverVirtualNetworkLink) ToResolverVirtualNetworkLinkOutput() ResolverVirtualNetworkLinkOutput {
return i.ToResolverVirtualNetworkLinkOutputWithContext(context.Background())
}
func (i *ResolverVirtualNetworkLink) ToResolverVirtualNetworkLinkOutputWithContext(ctx context.Context) ResolverVirtualNetworkLinkOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverVirtualNetworkLinkOutput)
}
// ResolverVirtualNetworkLinkArrayInput is an input type that accepts ResolverVirtualNetworkLinkArray and ResolverVirtualNetworkLinkArrayOutput values.
// You can construct a concrete instance of `ResolverVirtualNetworkLinkArrayInput` via:
//
// ResolverVirtualNetworkLinkArray{ ResolverVirtualNetworkLinkArgs{...} }
type ResolverVirtualNetworkLinkArrayInput interface {
pulumi.Input
ToResolverVirtualNetworkLinkArrayOutput() ResolverVirtualNetworkLinkArrayOutput
ToResolverVirtualNetworkLinkArrayOutputWithContext(context.Context) ResolverVirtualNetworkLinkArrayOutput
}
type ResolverVirtualNetworkLinkArray []ResolverVirtualNetworkLinkInput
func (ResolverVirtualNetworkLinkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverVirtualNetworkLink)(nil)).Elem()
}
func (i ResolverVirtualNetworkLinkArray) ToResolverVirtualNetworkLinkArrayOutput() ResolverVirtualNetworkLinkArrayOutput {
return i.ToResolverVirtualNetworkLinkArrayOutputWithContext(context.Background())
}
func (i ResolverVirtualNetworkLinkArray) ToResolverVirtualNetworkLinkArrayOutputWithContext(ctx context.Context) ResolverVirtualNetworkLinkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverVirtualNetworkLinkArrayOutput)
}
// ResolverVirtualNetworkLinkMapInput is an input type that accepts ResolverVirtualNetworkLinkMap and ResolverVirtualNetworkLinkMapOutput values.
// You can construct a concrete instance of `ResolverVirtualNetworkLinkMapInput` via:
//
// ResolverVirtualNetworkLinkMap{ "key": ResolverVirtualNetworkLinkArgs{...} }
type ResolverVirtualNetworkLinkMapInput interface {
pulumi.Input
ToResolverVirtualNetworkLinkMapOutput() ResolverVirtualNetworkLinkMapOutput
ToResolverVirtualNetworkLinkMapOutputWithContext(context.Context) ResolverVirtualNetworkLinkMapOutput
}
type ResolverVirtualNetworkLinkMap map[string]ResolverVirtualNetworkLinkInput
func (ResolverVirtualNetworkLinkMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverVirtualNetworkLink)(nil)).Elem()
}
func (i ResolverVirtualNetworkLinkMap) ToResolverVirtualNetworkLinkMapOutput() ResolverVirtualNetworkLinkMapOutput {
return i.ToResolverVirtualNetworkLinkMapOutputWithContext(context.Background())
}
func (i ResolverVirtualNetworkLinkMap) ToResolverVirtualNetworkLinkMapOutputWithContext(ctx context.Context) ResolverVirtualNetworkLinkMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverVirtualNetworkLinkMapOutput)
}
type ResolverVirtualNetworkLinkOutput struct{ *pulumi.OutputState }
func (ResolverVirtualNetworkLinkOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverVirtualNetworkLink)(nil)).Elem()
}
func (o ResolverVirtualNetworkLinkOutput) ToResolverVirtualNetworkLinkOutput() ResolverVirtualNetworkLinkOutput {
return o
}
func (o ResolverVirtualNetworkLinkOutput) ToResolverVirtualNetworkLinkOutputWithContext(ctx context.Context) ResolverVirtualNetworkLinkOutput {
return o
}
// Specifies the ID of the Private DNS Resolver DNS Forwarding Ruleset. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
func (o ResolverVirtualNetworkLinkOutput) DnsForwardingRulesetId() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverVirtualNetworkLink) pulumi.StringOutput { return v.DnsForwardingRulesetId }).(pulumi.StringOutput)
}
// Metadata attached to the Private DNS Resolver Virtual Network Link.
func (o ResolverVirtualNetworkLinkOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *ResolverVirtualNetworkLink) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created.
func (o ResolverVirtualNetworkLinkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverVirtualNetworkLink) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link. Changing this forces a new resource to be created.
func (o ResolverVirtualNetworkLinkOutput) VirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverVirtualNetworkLink) pulumi.StringOutput { return v.VirtualNetworkId }).(pulumi.StringOutput)
}
type ResolverVirtualNetworkLinkArrayOutput struct{ *pulumi.OutputState }
func (ResolverVirtualNetworkLinkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverVirtualNetworkLink)(nil)).Elem()
}
func (o ResolverVirtualNetworkLinkArrayOutput) ToResolverVirtualNetworkLinkArrayOutput() ResolverVirtualNetworkLinkArrayOutput {
return o
}
func (o ResolverVirtualNetworkLinkArrayOutput) ToResolverVirtualNetworkLinkArrayOutputWithContext(ctx context.Context) ResolverVirtualNetworkLinkArrayOutput {
return o
}
func (o ResolverVirtualNetworkLinkArrayOutput) Index(i pulumi.IntInput) ResolverVirtualNetworkLinkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverVirtualNetworkLink {
return vs[0].([]*ResolverVirtualNetworkLink)[vs[1].(int)]
}).(ResolverVirtualNetworkLinkOutput)
}
type ResolverVirtualNetworkLinkMapOutput struct{ *pulumi.OutputState }
func (ResolverVirtualNetworkLinkMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverVirtualNetworkLink)(nil)).Elem()
}
func (o ResolverVirtualNetworkLinkMapOutput) ToResolverVirtualNetworkLinkMapOutput() ResolverVirtualNetworkLinkMapOutput {
return o
}
func (o ResolverVirtualNetworkLinkMapOutput) ToResolverVirtualNetworkLinkMapOutputWithContext(ctx context.Context) ResolverVirtualNetworkLinkMapOutput {
return o
}
func (o ResolverVirtualNetworkLinkMapOutput) MapIndex(k pulumi.StringInput) ResolverVirtualNetworkLinkOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverVirtualNetworkLink {
return vs[0].(map[string]*ResolverVirtualNetworkLink)[vs[1].(string)]
}).(ResolverVirtualNetworkLinkOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResolverVirtualNetworkLinkInput)(nil)).Elem(), &ResolverVirtualNetworkLink{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverVirtualNetworkLinkArrayInput)(nil)).Elem(), ResolverVirtualNetworkLinkArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverVirtualNetworkLinkMapInput)(nil)).Elem(), ResolverVirtualNetworkLinkMap{})
pulumi.RegisterOutputType(ResolverVirtualNetworkLinkOutput{})
pulumi.RegisterOutputType(ResolverVirtualNetworkLinkArrayOutput{})
pulumi.RegisterOutputType(ResolverVirtualNetworkLinkMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/resolverOutboundEndpoint.go | sdk/go/azure/privatedns/resolverOutboundEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private DNS Resolver Outbound Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("west europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// 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("outbounddns"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.64/28"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("Microsoft.Network.dnsResolvers"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// Name: pulumi.String("Microsoft.Network/dnsResolvers"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleResolver, err := privatedns.NewResolver(ctx, "example", &privatedns.ResolverArgs{
// Name: pulumi.String("example-resolver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewResolverOutboundEndpoint(ctx, "example", &privatedns.ResolverOutboundEndpointArgs{
// Name: pulumi.String("example-endpoint"),
// PrivateDnsResolverId: exampleResolver.ID(),
// Location: exampleResolver.Location,
// SubnetId: exampleSubnet.ID(),
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2022-07-01
//
// ## Import
//
// Private DNS Resolver Outbound Endpoint can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/resolverOutboundEndpoint:ResolverOutboundEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/dnsResolvers/dnsResolver1/outboundEndpoints/outboundEndpoint1
// ```
type ResolverOutboundEndpoint struct {
pulumi.CustomResourceState
// Specifies the Azure Region where the Private DNS Resolver Outbound Endpoint should exist. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
PrivateDnsResolverId pulumi.StringOutput `pulumi:"privateDnsResolverId"`
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewResolverOutboundEndpoint registers a new resource with the given unique name, arguments, and options.
func NewResolverOutboundEndpoint(ctx *pulumi.Context,
name string, args *ResolverOutboundEndpointArgs, opts ...pulumi.ResourceOption) (*ResolverOutboundEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrivateDnsResolverId == nil {
return nil, errors.New("invalid value for required argument 'PrivateDnsResolverId'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ResolverOutboundEndpoint
err := ctx.RegisterResource("azure:privatedns/resolverOutboundEndpoint:ResolverOutboundEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResolverOutboundEndpoint gets an existing ResolverOutboundEndpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResolverOutboundEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResolverOutboundEndpointState, opts ...pulumi.ResourceOption) (*ResolverOutboundEndpoint, error) {
var resource ResolverOutboundEndpoint
err := ctx.ReadResource("azure:privatedns/resolverOutboundEndpoint:ResolverOutboundEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ResolverOutboundEndpoint resources.
type resolverOutboundEndpointState struct {
// Specifies the Azure Region where the Private DNS Resolver Outbound Endpoint should exist. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
PrivateDnsResolverId *string `pulumi:"privateDnsResolverId"`
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint. Changing this forces a new resource to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint.
Tags map[string]string `pulumi:"tags"`
}
type ResolverOutboundEndpointState struct {
// Specifies the Azure Region where the Private DNS Resolver Outbound Endpoint should exist. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
PrivateDnsResolverId pulumi.StringPtrInput
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint.
Tags pulumi.StringMapInput
}
func (ResolverOutboundEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*resolverOutboundEndpointState)(nil)).Elem()
}
type resolverOutboundEndpointArgs struct {
// Specifies the Azure Region where the Private DNS Resolver Outbound Endpoint should exist. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
PrivateDnsResolverId string `pulumi:"privateDnsResolverId"`
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint. Changing this forces a new resource to be created.
SubnetId string `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ResolverOutboundEndpoint resource.
type ResolverOutboundEndpointArgs struct {
// Specifies the Azure Region where the Private DNS Resolver Outbound Endpoint should exist. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
PrivateDnsResolverId pulumi.StringInput
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringInput
// A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint.
Tags pulumi.StringMapInput
}
func (ResolverOutboundEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resolverOutboundEndpointArgs)(nil)).Elem()
}
type ResolverOutboundEndpointInput interface {
pulumi.Input
ToResolverOutboundEndpointOutput() ResolverOutboundEndpointOutput
ToResolverOutboundEndpointOutputWithContext(ctx context.Context) ResolverOutboundEndpointOutput
}
func (*ResolverOutboundEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverOutboundEndpoint)(nil)).Elem()
}
func (i *ResolverOutboundEndpoint) ToResolverOutboundEndpointOutput() ResolverOutboundEndpointOutput {
return i.ToResolverOutboundEndpointOutputWithContext(context.Background())
}
func (i *ResolverOutboundEndpoint) ToResolverOutboundEndpointOutputWithContext(ctx context.Context) ResolverOutboundEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverOutboundEndpointOutput)
}
// ResolverOutboundEndpointArrayInput is an input type that accepts ResolverOutboundEndpointArray and ResolverOutboundEndpointArrayOutput values.
// You can construct a concrete instance of `ResolverOutboundEndpointArrayInput` via:
//
// ResolverOutboundEndpointArray{ ResolverOutboundEndpointArgs{...} }
type ResolverOutboundEndpointArrayInput interface {
pulumi.Input
ToResolverOutboundEndpointArrayOutput() ResolverOutboundEndpointArrayOutput
ToResolverOutboundEndpointArrayOutputWithContext(context.Context) ResolverOutboundEndpointArrayOutput
}
type ResolverOutboundEndpointArray []ResolverOutboundEndpointInput
func (ResolverOutboundEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverOutboundEndpoint)(nil)).Elem()
}
func (i ResolverOutboundEndpointArray) ToResolverOutboundEndpointArrayOutput() ResolverOutboundEndpointArrayOutput {
return i.ToResolverOutboundEndpointArrayOutputWithContext(context.Background())
}
func (i ResolverOutboundEndpointArray) ToResolverOutboundEndpointArrayOutputWithContext(ctx context.Context) ResolverOutboundEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverOutboundEndpointArrayOutput)
}
// ResolverOutboundEndpointMapInput is an input type that accepts ResolverOutboundEndpointMap and ResolverOutboundEndpointMapOutput values.
// You can construct a concrete instance of `ResolverOutboundEndpointMapInput` via:
//
// ResolverOutboundEndpointMap{ "key": ResolverOutboundEndpointArgs{...} }
type ResolverOutboundEndpointMapInput interface {
pulumi.Input
ToResolverOutboundEndpointMapOutput() ResolverOutboundEndpointMapOutput
ToResolverOutboundEndpointMapOutputWithContext(context.Context) ResolverOutboundEndpointMapOutput
}
type ResolverOutboundEndpointMap map[string]ResolverOutboundEndpointInput
func (ResolverOutboundEndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverOutboundEndpoint)(nil)).Elem()
}
func (i ResolverOutboundEndpointMap) ToResolverOutboundEndpointMapOutput() ResolverOutboundEndpointMapOutput {
return i.ToResolverOutboundEndpointMapOutputWithContext(context.Background())
}
func (i ResolverOutboundEndpointMap) ToResolverOutboundEndpointMapOutputWithContext(ctx context.Context) ResolverOutboundEndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverOutboundEndpointMapOutput)
}
type ResolverOutboundEndpointOutput struct{ *pulumi.OutputState }
func (ResolverOutboundEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverOutboundEndpoint)(nil)).Elem()
}
func (o ResolverOutboundEndpointOutput) ToResolverOutboundEndpointOutput() ResolverOutboundEndpointOutput {
return o
}
func (o ResolverOutboundEndpointOutput) ToResolverOutboundEndpointOutputWithContext(ctx context.Context) ResolverOutboundEndpointOutput {
return o
}
// Specifies the Azure Region where the Private DNS Resolver Outbound Endpoint should exist. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
func (o ResolverOutboundEndpointOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverOutboundEndpoint) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
func (o ResolverOutboundEndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverOutboundEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created.
func (o ResolverOutboundEndpointOutput) PrivateDnsResolverId() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverOutboundEndpoint) pulumi.StringOutput { return v.PrivateDnsResolverId }).(pulumi.StringOutput)
}
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint. Changing this forces a new resource to be created.
func (o ResolverOutboundEndpointOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverOutboundEndpoint) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint.
func (o ResolverOutboundEndpointOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ResolverOutboundEndpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ResolverOutboundEndpointArrayOutput struct{ *pulumi.OutputState }
func (ResolverOutboundEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverOutboundEndpoint)(nil)).Elem()
}
func (o ResolverOutboundEndpointArrayOutput) ToResolverOutboundEndpointArrayOutput() ResolverOutboundEndpointArrayOutput {
return o
}
func (o ResolverOutboundEndpointArrayOutput) ToResolverOutboundEndpointArrayOutputWithContext(ctx context.Context) ResolverOutboundEndpointArrayOutput {
return o
}
func (o ResolverOutboundEndpointArrayOutput) Index(i pulumi.IntInput) ResolverOutboundEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverOutboundEndpoint {
return vs[0].([]*ResolverOutboundEndpoint)[vs[1].(int)]
}).(ResolverOutboundEndpointOutput)
}
type ResolverOutboundEndpointMapOutput struct{ *pulumi.OutputState }
func (ResolverOutboundEndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverOutboundEndpoint)(nil)).Elem()
}
func (o ResolverOutboundEndpointMapOutput) ToResolverOutboundEndpointMapOutput() ResolverOutboundEndpointMapOutput {
return o
}
func (o ResolverOutboundEndpointMapOutput) ToResolverOutboundEndpointMapOutputWithContext(ctx context.Context) ResolverOutboundEndpointMapOutput {
return o
}
func (o ResolverOutboundEndpointMapOutput) MapIndex(k pulumi.StringInput) ResolverOutboundEndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverOutboundEndpoint {
return vs[0].(map[string]*ResolverOutboundEndpoint)[vs[1].(string)]
}).(ResolverOutboundEndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResolverOutboundEndpointInput)(nil)).Elem(), &ResolverOutboundEndpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverOutboundEndpointArrayInput)(nil)).Elem(), ResolverOutboundEndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverOutboundEndpointMapInput)(nil)).Elem(), ResolverOutboundEndpointMap{})
pulumi.RegisterOutputType(ResolverOutboundEndpointOutput{})
pulumi.RegisterOutputType(ResolverOutboundEndpointArrayOutput{})
pulumi.RegisterOutputType(ResolverOutboundEndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/arecord.go | sdk/go/azure/privatedns/arecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage DNS A Records within Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("mydomain.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewARecord(ctx, "example", &privatedns.ARecordArgs{
// Name: pulumi.String("test"),
// ZoneName: exampleZone.Name,
// ResourceGroupName: example.Name,
// Ttl: pulumi.Int(300),
// Records: pulumi.StringArray{
// pulumi.String("10.0.180.17"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS A Records can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/aRecord:ARecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1/A/myrecord1
// ```
type ARecord struct {
pulumi.CustomResourceState
// The FQDN of the DNS A Record.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// List of IPv4 Addresses.
Records pulumi.StringArrayOutput `pulumi:"records"`
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntOutput `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringOutput `pulumi:"zoneName"`
}
// NewARecord registers a new resource with the given unique name, arguments, and options.
func NewARecord(ctx *pulumi.Context,
name string, args *ARecordArgs, opts ...pulumi.ResourceOption) (*ARecord, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Records == nil {
return nil, errors.New("invalid value for required argument 'Records'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Ttl == nil {
return nil, errors.New("invalid value for required argument 'Ttl'")
}
if args.ZoneName == nil {
return nil, errors.New("invalid value for required argument 'ZoneName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ARecord
err := ctx.RegisterResource("azure:privatedns/aRecord:ARecord", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetARecord gets an existing ARecord resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetARecord(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ARecordState, opts ...pulumi.ResourceOption) (*ARecord, error) {
var resource ARecord
err := ctx.ReadResource("azure:privatedns/aRecord:ARecord", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ARecord resources.
type arecordState struct {
// The FQDN of the DNS A Record.
Fqdn *string `pulumi:"fqdn"`
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// List of IPv4 Addresses.
Records []string `pulumi:"records"`
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl *int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName *string `pulumi:"zoneName"`
}
type ARecordState struct {
// The FQDN of the DNS A Record.
Fqdn pulumi.StringPtrInput
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// List of IPv4 Addresses.
Records pulumi.StringArrayInput
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntPtrInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringPtrInput
}
func (ARecordState) ElementType() reflect.Type {
return reflect.TypeOf((*arecordState)(nil)).Elem()
}
type arecordArgs struct {
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// List of IPv4 Addresses.
Records []string `pulumi:"records"`
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName string `pulumi:"zoneName"`
}
// The set of arguments for constructing a ARecord resource.
type ARecordArgs struct {
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// List of IPv4 Addresses.
Records pulumi.StringArrayInput
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringInput
}
func (ARecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*arecordArgs)(nil)).Elem()
}
type ARecordInput interface {
pulumi.Input
ToARecordOutput() ARecordOutput
ToARecordOutputWithContext(ctx context.Context) ARecordOutput
}
func (*ARecord) ElementType() reflect.Type {
return reflect.TypeOf((**ARecord)(nil)).Elem()
}
func (i *ARecord) ToARecordOutput() ARecordOutput {
return i.ToARecordOutputWithContext(context.Background())
}
func (i *ARecord) ToARecordOutputWithContext(ctx context.Context) ARecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(ARecordOutput)
}
// ARecordArrayInput is an input type that accepts ARecordArray and ARecordArrayOutput values.
// You can construct a concrete instance of `ARecordArrayInput` via:
//
// ARecordArray{ ARecordArgs{...} }
type ARecordArrayInput interface {
pulumi.Input
ToARecordArrayOutput() ARecordArrayOutput
ToARecordArrayOutputWithContext(context.Context) ARecordArrayOutput
}
type ARecordArray []ARecordInput
func (ARecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ARecord)(nil)).Elem()
}
func (i ARecordArray) ToARecordArrayOutput() ARecordArrayOutput {
return i.ToARecordArrayOutputWithContext(context.Background())
}
func (i ARecordArray) ToARecordArrayOutputWithContext(ctx context.Context) ARecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ARecordArrayOutput)
}
// ARecordMapInput is an input type that accepts ARecordMap and ARecordMapOutput values.
// You can construct a concrete instance of `ARecordMapInput` via:
//
// ARecordMap{ "key": ARecordArgs{...} }
type ARecordMapInput interface {
pulumi.Input
ToARecordMapOutput() ARecordMapOutput
ToARecordMapOutputWithContext(context.Context) ARecordMapOutput
}
type ARecordMap map[string]ARecordInput
func (ARecordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ARecord)(nil)).Elem()
}
func (i ARecordMap) ToARecordMapOutput() ARecordMapOutput {
return i.ToARecordMapOutputWithContext(context.Background())
}
func (i ARecordMap) ToARecordMapOutputWithContext(ctx context.Context) ARecordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ARecordMapOutput)
}
type ARecordOutput struct{ *pulumi.OutputState }
func (ARecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ARecord)(nil)).Elem()
}
func (o ARecordOutput) ToARecordOutput() ARecordOutput {
return o
}
func (o ARecordOutput) ToARecordOutputWithContext(ctx context.Context) ARecordOutput {
return o
}
// The FQDN of the DNS A Record.
func (o ARecordOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// The name of the DNS A Record. Changing this forces a new resource to be created.
func (o ARecordOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// List of IPv4 Addresses.
func (o ARecordOutput) Records() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ARecord) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput)
}
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
func (o ARecordOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o ARecordOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ARecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds.
func (o ARecordOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v *ARecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput)
}
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
func (o ARecordOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput)
}
type ARecordArrayOutput struct{ *pulumi.OutputState }
func (ARecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ARecord)(nil)).Elem()
}
func (o ARecordArrayOutput) ToARecordArrayOutput() ARecordArrayOutput {
return o
}
func (o ARecordArrayOutput) ToARecordArrayOutputWithContext(ctx context.Context) ARecordArrayOutput {
return o
}
func (o ARecordArrayOutput) Index(i pulumi.IntInput) ARecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ARecord {
return vs[0].([]*ARecord)[vs[1].(int)]
}).(ARecordOutput)
}
type ARecordMapOutput struct{ *pulumi.OutputState }
func (ARecordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ARecord)(nil)).Elem()
}
func (o ARecordMapOutput) ToARecordMapOutput() ARecordMapOutput {
return o
}
func (o ARecordMapOutput) ToARecordMapOutputWithContext(ctx context.Context) ARecordMapOutput {
return o
}
func (o ARecordMapOutput) MapIndex(k pulumi.StringInput) ARecordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ARecord {
return vs[0].(map[string]*ARecord)[vs[1].(string)]
}).(ARecordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ARecordInput)(nil)).Elem(), &ARecord{})
pulumi.RegisterInputType(reflect.TypeOf((*ARecordArrayInput)(nil)).Elem(), ARecordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ARecordMapInput)(nil)).Elem(), ARecordMap{})
pulumi.RegisterOutputType(ARecordOutput{})
pulumi.RegisterOutputType(ARecordArrayOutput{})
pulumi.RegisterOutputType(ARecordMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/aaaarecord.go | sdk/go/azure/privatedns/aaaarecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage DNS AAAA Records within Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// test, err := privatedns.NewZone(ctx, "test", &privatedns.ZoneArgs{
// Name: pulumi.String("mydomain.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewAAAARecord(ctx, "test", &privatedns.AAAARecordArgs{
// Name: pulumi.String("test"),
// ZoneName: test.Name,
// ResourceGroupName: example.Name,
// Ttl: pulumi.Int(300),
// Records: pulumi.StringArray{
// pulumi.String("fd5d:70bc:930e:d008:0000:0000:0000:7334"),
// pulumi.String("fd5d:70bc:930e:d008::7335"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS AAAA Records can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/aAAARecord:AAAARecord test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1/AAAA/myrecord1
// ```
type AAAARecord struct {
pulumi.CustomResourceState
// The FQDN of the DNS AAAA Record.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A list of IPv6 Addresses.
Records pulumi.StringArrayOutput `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntOutput `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringOutput `pulumi:"zoneName"`
}
// NewAAAARecord registers a new resource with the given unique name, arguments, and options.
func NewAAAARecord(ctx *pulumi.Context,
name string, args *AAAARecordArgs, opts ...pulumi.ResourceOption) (*AAAARecord, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Records == nil {
return nil, errors.New("invalid value for required argument 'Records'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Ttl == nil {
return nil, errors.New("invalid value for required argument 'Ttl'")
}
if args.ZoneName == nil {
return nil, errors.New("invalid value for required argument 'ZoneName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AAAARecord
err := ctx.RegisterResource("azure:privatedns/aAAARecord:AAAARecord", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAAAARecord gets an existing AAAARecord resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAAAARecord(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AAAARecordState, opts ...pulumi.ResourceOption) (*AAAARecord, error) {
var resource AAAARecord
err := ctx.ReadResource("azure:privatedns/aAAARecord:AAAARecord", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AAAARecord resources.
type aaaarecordState struct {
// The FQDN of the DNS AAAA Record.
Fqdn *string `pulumi:"fqdn"`
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A list of IPv6 Addresses.
Records []string `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl *int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName *string `pulumi:"zoneName"`
}
type AAAARecordState struct {
// The FQDN of the DNS AAAA Record.
Fqdn pulumi.StringPtrInput
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A list of IPv6 Addresses.
Records pulumi.StringArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntPtrInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringPtrInput
}
func (AAAARecordState) ElementType() reflect.Type {
return reflect.TypeOf((*aaaarecordState)(nil)).Elem()
}
type aaaarecordArgs struct {
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A list of IPv6 Addresses.
Records []string `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName string `pulumi:"zoneName"`
}
// The set of arguments for constructing a AAAARecord resource.
type AAAARecordArgs struct {
// The name of the DNS A Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A list of IPv6 Addresses.
Records pulumi.StringArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringInput
}
func (AAAARecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*aaaarecordArgs)(nil)).Elem()
}
type AAAARecordInput interface {
pulumi.Input
ToAAAARecordOutput() AAAARecordOutput
ToAAAARecordOutputWithContext(ctx context.Context) AAAARecordOutput
}
func (*AAAARecord) ElementType() reflect.Type {
return reflect.TypeOf((**AAAARecord)(nil)).Elem()
}
func (i *AAAARecord) ToAAAARecordOutput() AAAARecordOutput {
return i.ToAAAARecordOutputWithContext(context.Background())
}
func (i *AAAARecord) ToAAAARecordOutputWithContext(ctx context.Context) AAAARecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(AAAARecordOutput)
}
// AAAARecordArrayInput is an input type that accepts AAAARecordArray and AAAARecordArrayOutput values.
// You can construct a concrete instance of `AAAARecordArrayInput` via:
//
// AAAARecordArray{ AAAARecordArgs{...} }
type AAAARecordArrayInput interface {
pulumi.Input
ToAAAARecordArrayOutput() AAAARecordArrayOutput
ToAAAARecordArrayOutputWithContext(context.Context) AAAARecordArrayOutput
}
type AAAARecordArray []AAAARecordInput
func (AAAARecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AAAARecord)(nil)).Elem()
}
func (i AAAARecordArray) ToAAAARecordArrayOutput() AAAARecordArrayOutput {
return i.ToAAAARecordArrayOutputWithContext(context.Background())
}
func (i AAAARecordArray) ToAAAARecordArrayOutputWithContext(ctx context.Context) AAAARecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AAAARecordArrayOutput)
}
// AAAARecordMapInput is an input type that accepts AAAARecordMap and AAAARecordMapOutput values.
// You can construct a concrete instance of `AAAARecordMapInput` via:
//
// AAAARecordMap{ "key": AAAARecordArgs{...} }
type AAAARecordMapInput interface {
pulumi.Input
ToAAAARecordMapOutput() AAAARecordMapOutput
ToAAAARecordMapOutputWithContext(context.Context) AAAARecordMapOutput
}
type AAAARecordMap map[string]AAAARecordInput
func (AAAARecordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AAAARecord)(nil)).Elem()
}
func (i AAAARecordMap) ToAAAARecordMapOutput() AAAARecordMapOutput {
return i.ToAAAARecordMapOutputWithContext(context.Background())
}
func (i AAAARecordMap) ToAAAARecordMapOutputWithContext(ctx context.Context) AAAARecordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AAAARecordMapOutput)
}
type AAAARecordOutput struct{ *pulumi.OutputState }
func (AAAARecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AAAARecord)(nil)).Elem()
}
func (o AAAARecordOutput) ToAAAARecordOutput() AAAARecordOutput {
return o
}
func (o AAAARecordOutput) ToAAAARecordOutputWithContext(ctx context.Context) AAAARecordOutput {
return o
}
// The FQDN of the DNS AAAA Record.
func (o AAAARecordOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *AAAARecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// The name of the DNS A Record. Changing this forces a new resource to be created.
func (o AAAARecordOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AAAARecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A list of IPv6 Addresses.
func (o AAAARecordOutput) Records() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AAAARecord) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput)
}
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
func (o AAAARecordOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *AAAARecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o AAAARecordOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *AAAARecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds.
func (o AAAARecordOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v *AAAARecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput)
}
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
func (o AAAARecordOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *AAAARecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput)
}
type AAAARecordArrayOutput struct{ *pulumi.OutputState }
func (AAAARecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AAAARecord)(nil)).Elem()
}
func (o AAAARecordArrayOutput) ToAAAARecordArrayOutput() AAAARecordArrayOutput {
return o
}
func (o AAAARecordArrayOutput) ToAAAARecordArrayOutputWithContext(ctx context.Context) AAAARecordArrayOutput {
return o
}
func (o AAAARecordArrayOutput) Index(i pulumi.IntInput) AAAARecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AAAARecord {
return vs[0].([]*AAAARecord)[vs[1].(int)]
}).(AAAARecordOutput)
}
type AAAARecordMapOutput struct{ *pulumi.OutputState }
func (AAAARecordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AAAARecord)(nil)).Elem()
}
func (o AAAARecordMapOutput) ToAAAARecordMapOutput() AAAARecordMapOutput {
return o
}
func (o AAAARecordMapOutput) ToAAAARecordMapOutputWithContext(ctx context.Context) AAAARecordMapOutput {
return o
}
func (o AAAARecordMapOutput) MapIndex(k pulumi.StringInput) AAAARecordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AAAARecord {
return vs[0].(map[string]*AAAARecord)[vs[1].(string)]
}).(AAAARecordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AAAARecordInput)(nil)).Elem(), &AAAARecord{})
pulumi.RegisterInputType(reflect.TypeOf((*AAAARecordArrayInput)(nil)).Elem(), AAAARecordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AAAARecordMapInput)(nil)).Elem(), AAAARecordMap{})
pulumi.RegisterOutputType(AAAARecordOutput{})
pulumi.RegisterOutputType(AAAARecordArrayOutput{})
pulumi.RegisterOutputType(AAAARecordMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/srvrecord.go | sdk/go/azure/privatedns/srvrecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage DNS SRV Records within Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("contoso.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewSRVRecord(ctx, "example", &privatedns.SRVRecordArgs{
// Name: pulumi.String("test"),
// ResourceGroupName: example.Name,
// ZoneName: exampleZone.Name,
// Ttl: pulumi.Int(300),
// Records: privatedns.SRVRecordRecordArray{
// &privatedns.SRVRecordRecordArgs{
// Priority: pulumi.Int(1),
// Weight: pulumi.Int(5),
// Port: pulumi.Int(8080),
// Target: pulumi.String("target1.contoso.com"),
// },
// &privatedns.SRVRecordRecordArgs{
// Priority: pulumi.Int(10),
// Weight: pulumi.Int(10),
// Port: pulumi.Int(8080),
// Target: pulumi.String("target2.contoso.com"),
// },
// },
// Tags: pulumi.StringMap{
// "Environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS SRV Records can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/sRVRecord:SRVRecord test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/contoso.com/SRV/test
// ```
type SRVRecord struct {
pulumi.CustomResourceState
// The FQDN of the DNS SRV Record.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// The name of the DNS SRV Record. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `record` blocks as defined below.
Records SRVRecordRecordArrayOutput `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntOutput `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringOutput `pulumi:"zoneName"`
}
// NewSRVRecord registers a new resource with the given unique name, arguments, and options.
func NewSRVRecord(ctx *pulumi.Context,
name string, args *SRVRecordArgs, opts ...pulumi.ResourceOption) (*SRVRecord, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Records == nil {
return nil, errors.New("invalid value for required argument 'Records'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Ttl == nil {
return nil, errors.New("invalid value for required argument 'Ttl'")
}
if args.ZoneName == nil {
return nil, errors.New("invalid value for required argument 'ZoneName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SRVRecord
err := ctx.RegisterResource("azure:privatedns/sRVRecord:SRVRecord", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSRVRecord gets an existing SRVRecord resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSRVRecord(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SRVRecordState, opts ...pulumi.ResourceOption) (*SRVRecord, error) {
var resource SRVRecord
err := ctx.ReadResource("azure:privatedns/sRVRecord:SRVRecord", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SRVRecord resources.
type srvrecordState struct {
// The FQDN of the DNS SRV Record.
Fqdn *string `pulumi:"fqdn"`
// The name of the DNS SRV Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `record` blocks as defined below.
Records []SRVRecordRecord `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl *int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName *string `pulumi:"zoneName"`
}
type SRVRecordState struct {
// The FQDN of the DNS SRV Record.
Fqdn pulumi.StringPtrInput
// The name of the DNS SRV Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `record` blocks as defined below.
Records SRVRecordRecordArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntPtrInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringPtrInput
}
func (SRVRecordState) ElementType() reflect.Type {
return reflect.TypeOf((*srvrecordState)(nil)).Elem()
}
type srvrecordArgs struct {
// The name of the DNS SRV Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `record` blocks as defined below.
Records []SRVRecordRecord `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName string `pulumi:"zoneName"`
}
// The set of arguments for constructing a SRVRecord resource.
type SRVRecordArgs struct {
// The name of the DNS SRV Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `record` blocks as defined below.
Records SRVRecordRecordArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringInput
}
func (SRVRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*srvrecordArgs)(nil)).Elem()
}
type SRVRecordInput interface {
pulumi.Input
ToSRVRecordOutput() SRVRecordOutput
ToSRVRecordOutputWithContext(ctx context.Context) SRVRecordOutput
}
func (*SRVRecord) ElementType() reflect.Type {
return reflect.TypeOf((**SRVRecord)(nil)).Elem()
}
func (i *SRVRecord) ToSRVRecordOutput() SRVRecordOutput {
return i.ToSRVRecordOutputWithContext(context.Background())
}
func (i *SRVRecord) ToSRVRecordOutputWithContext(ctx context.Context) SRVRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(SRVRecordOutput)
}
// SRVRecordArrayInput is an input type that accepts SRVRecordArray and SRVRecordArrayOutput values.
// You can construct a concrete instance of `SRVRecordArrayInput` via:
//
// SRVRecordArray{ SRVRecordArgs{...} }
type SRVRecordArrayInput interface {
pulumi.Input
ToSRVRecordArrayOutput() SRVRecordArrayOutput
ToSRVRecordArrayOutputWithContext(context.Context) SRVRecordArrayOutput
}
type SRVRecordArray []SRVRecordInput
func (SRVRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SRVRecord)(nil)).Elem()
}
func (i SRVRecordArray) ToSRVRecordArrayOutput() SRVRecordArrayOutput {
return i.ToSRVRecordArrayOutputWithContext(context.Background())
}
func (i SRVRecordArray) ToSRVRecordArrayOutputWithContext(ctx context.Context) SRVRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SRVRecordArrayOutput)
}
// SRVRecordMapInput is an input type that accepts SRVRecordMap and SRVRecordMapOutput values.
// You can construct a concrete instance of `SRVRecordMapInput` via:
//
// SRVRecordMap{ "key": SRVRecordArgs{...} }
type SRVRecordMapInput interface {
pulumi.Input
ToSRVRecordMapOutput() SRVRecordMapOutput
ToSRVRecordMapOutputWithContext(context.Context) SRVRecordMapOutput
}
type SRVRecordMap map[string]SRVRecordInput
func (SRVRecordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SRVRecord)(nil)).Elem()
}
func (i SRVRecordMap) ToSRVRecordMapOutput() SRVRecordMapOutput {
return i.ToSRVRecordMapOutputWithContext(context.Background())
}
func (i SRVRecordMap) ToSRVRecordMapOutputWithContext(ctx context.Context) SRVRecordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SRVRecordMapOutput)
}
type SRVRecordOutput struct{ *pulumi.OutputState }
func (SRVRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SRVRecord)(nil)).Elem()
}
func (o SRVRecordOutput) ToSRVRecordOutput() SRVRecordOutput {
return o
}
func (o SRVRecordOutput) ToSRVRecordOutputWithContext(ctx context.Context) SRVRecordOutput {
return o
}
// The FQDN of the DNS SRV Record.
func (o SRVRecordOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *SRVRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// The name of the DNS SRV Record. Changing this forces a new resource to be created.
func (o SRVRecordOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SRVRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `record` blocks as defined below.
func (o SRVRecordOutput) Records() SRVRecordRecordArrayOutput {
return o.ApplyT(func(v *SRVRecord) SRVRecordRecordArrayOutput { return v.Records }).(SRVRecordRecordArrayOutput)
}
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
func (o SRVRecordOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SRVRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o SRVRecordOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *SRVRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds.
func (o SRVRecordOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v *SRVRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput)
}
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
func (o SRVRecordOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *SRVRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput)
}
type SRVRecordArrayOutput struct{ *pulumi.OutputState }
func (SRVRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SRVRecord)(nil)).Elem()
}
func (o SRVRecordArrayOutput) ToSRVRecordArrayOutput() SRVRecordArrayOutput {
return o
}
func (o SRVRecordArrayOutput) ToSRVRecordArrayOutputWithContext(ctx context.Context) SRVRecordArrayOutput {
return o
}
func (o SRVRecordArrayOutput) Index(i pulumi.IntInput) SRVRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SRVRecord {
return vs[0].([]*SRVRecord)[vs[1].(int)]
}).(SRVRecordOutput)
}
type SRVRecordMapOutput struct{ *pulumi.OutputState }
func (SRVRecordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SRVRecord)(nil)).Elem()
}
func (o SRVRecordMapOutput) ToSRVRecordMapOutput() SRVRecordMapOutput {
return o
}
func (o SRVRecordMapOutput) ToSRVRecordMapOutputWithContext(ctx context.Context) SRVRecordMapOutput {
return o
}
func (o SRVRecordMapOutput) MapIndex(k pulumi.StringInput) SRVRecordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SRVRecord {
return vs[0].(map[string]*SRVRecord)[vs[1].(string)]
}).(SRVRecordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SRVRecordInput)(nil)).Elem(), &SRVRecord{})
pulumi.RegisterInputType(reflect.TypeOf((*SRVRecordArrayInput)(nil)).Elem(), SRVRecordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SRVRecordMapInput)(nil)).Elem(), SRVRecordMap{})
pulumi.RegisterOutputType(SRVRecordOutput{})
pulumi.RegisterOutputType(SRVRecordArrayOutput{})
pulumi.RegisterOutputType(SRVRecordMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/ptrrecord.go | sdk/go/azure/privatedns/ptrrecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage DNS PTR Records within Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("2.0.192.in-addr.arpa"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewPTRRecord(ctx, "example", &privatedns.PTRRecordArgs{
// Name: pulumi.String("15"),
// ZoneName: exampleZone.Name,
// ResourceGroupName: example.Name,
// Ttl: pulumi.Int(300),
// Records: pulumi.StringArray{
// pulumi.String("test.example.com"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS PTR Records can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/pTRRecord:PTRRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/2.0.192.in-addr.arpa/PTR/15
// ```
type PTRRecord struct {
pulumi.CustomResourceState
// The FQDN of the DNS PTR Record.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// The name of the DNS PTR Record. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// List of Fully Qualified Domain Names.
Records pulumi.StringArrayOutput `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntOutput `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringOutput `pulumi:"zoneName"`
}
// NewPTRRecord registers a new resource with the given unique name, arguments, and options.
func NewPTRRecord(ctx *pulumi.Context,
name string, args *PTRRecordArgs, opts ...pulumi.ResourceOption) (*PTRRecord, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Records == nil {
return nil, errors.New("invalid value for required argument 'Records'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Ttl == nil {
return nil, errors.New("invalid value for required argument 'Ttl'")
}
if args.ZoneName == nil {
return nil, errors.New("invalid value for required argument 'ZoneName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource PTRRecord
err := ctx.RegisterResource("azure:privatedns/pTRRecord:PTRRecord", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPTRRecord gets an existing PTRRecord resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPTRRecord(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PTRRecordState, opts ...pulumi.ResourceOption) (*PTRRecord, error) {
var resource PTRRecord
err := ctx.ReadResource("azure:privatedns/pTRRecord:PTRRecord", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PTRRecord resources.
type ptrrecordState struct {
// The FQDN of the DNS PTR Record.
Fqdn *string `pulumi:"fqdn"`
// The name of the DNS PTR Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// List of Fully Qualified Domain Names.
Records []string `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl *int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName *string `pulumi:"zoneName"`
}
type PTRRecordState struct {
// The FQDN of the DNS PTR Record.
Fqdn pulumi.StringPtrInput
// The name of the DNS PTR Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// List of Fully Qualified Domain Names.
Records pulumi.StringArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntPtrInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringPtrInput
}
func (PTRRecordState) ElementType() reflect.Type {
return reflect.TypeOf((*ptrrecordState)(nil)).Elem()
}
type ptrrecordArgs struct {
// The name of the DNS PTR Record. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// List of Fully Qualified Domain Names.
Records []string `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName string `pulumi:"zoneName"`
}
// The set of arguments for constructing a PTRRecord resource.
type PTRRecordArgs struct {
// The name of the DNS PTR Record. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// List of Fully Qualified Domain Names.
Records pulumi.StringArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringInput
}
func (PTRRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ptrrecordArgs)(nil)).Elem()
}
type PTRRecordInput interface {
pulumi.Input
ToPTRRecordOutput() PTRRecordOutput
ToPTRRecordOutputWithContext(ctx context.Context) PTRRecordOutput
}
func (*PTRRecord) ElementType() reflect.Type {
return reflect.TypeOf((**PTRRecord)(nil)).Elem()
}
func (i *PTRRecord) ToPTRRecordOutput() PTRRecordOutput {
return i.ToPTRRecordOutputWithContext(context.Background())
}
func (i *PTRRecord) ToPTRRecordOutputWithContext(ctx context.Context) PTRRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(PTRRecordOutput)
}
// PTRRecordArrayInput is an input type that accepts PTRRecordArray and PTRRecordArrayOutput values.
// You can construct a concrete instance of `PTRRecordArrayInput` via:
//
// PTRRecordArray{ PTRRecordArgs{...} }
type PTRRecordArrayInput interface {
pulumi.Input
ToPTRRecordArrayOutput() PTRRecordArrayOutput
ToPTRRecordArrayOutputWithContext(context.Context) PTRRecordArrayOutput
}
type PTRRecordArray []PTRRecordInput
func (PTRRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PTRRecord)(nil)).Elem()
}
func (i PTRRecordArray) ToPTRRecordArrayOutput() PTRRecordArrayOutput {
return i.ToPTRRecordArrayOutputWithContext(context.Background())
}
func (i PTRRecordArray) ToPTRRecordArrayOutputWithContext(ctx context.Context) PTRRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PTRRecordArrayOutput)
}
// PTRRecordMapInput is an input type that accepts PTRRecordMap and PTRRecordMapOutput values.
// You can construct a concrete instance of `PTRRecordMapInput` via:
//
// PTRRecordMap{ "key": PTRRecordArgs{...} }
type PTRRecordMapInput interface {
pulumi.Input
ToPTRRecordMapOutput() PTRRecordMapOutput
ToPTRRecordMapOutputWithContext(context.Context) PTRRecordMapOutput
}
type PTRRecordMap map[string]PTRRecordInput
func (PTRRecordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PTRRecord)(nil)).Elem()
}
func (i PTRRecordMap) ToPTRRecordMapOutput() PTRRecordMapOutput {
return i.ToPTRRecordMapOutputWithContext(context.Background())
}
func (i PTRRecordMap) ToPTRRecordMapOutputWithContext(ctx context.Context) PTRRecordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PTRRecordMapOutput)
}
type PTRRecordOutput struct{ *pulumi.OutputState }
func (PTRRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PTRRecord)(nil)).Elem()
}
func (o PTRRecordOutput) ToPTRRecordOutput() PTRRecordOutput {
return o
}
func (o PTRRecordOutput) ToPTRRecordOutputWithContext(ctx context.Context) PTRRecordOutput {
return o
}
// The FQDN of the DNS PTR Record.
func (o PTRRecordOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *PTRRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// The name of the DNS PTR Record. Changing this forces a new resource to be created.
func (o PTRRecordOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PTRRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// List of Fully Qualified Domain Names.
func (o PTRRecordOutput) Records() pulumi.StringArrayOutput {
return o.ApplyT(func(v *PTRRecord) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput)
}
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
func (o PTRRecordOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *PTRRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o PTRRecordOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *PTRRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds.
func (o PTRRecordOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v *PTRRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput)
}
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
func (o PTRRecordOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *PTRRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput)
}
type PTRRecordArrayOutput struct{ *pulumi.OutputState }
func (PTRRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PTRRecord)(nil)).Elem()
}
func (o PTRRecordArrayOutput) ToPTRRecordArrayOutput() PTRRecordArrayOutput {
return o
}
func (o PTRRecordArrayOutput) ToPTRRecordArrayOutputWithContext(ctx context.Context) PTRRecordArrayOutput {
return o
}
func (o PTRRecordArrayOutput) Index(i pulumi.IntInput) PTRRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PTRRecord {
return vs[0].([]*PTRRecord)[vs[1].(int)]
}).(PTRRecordOutput)
}
type PTRRecordMapOutput struct{ *pulumi.OutputState }
func (PTRRecordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PTRRecord)(nil)).Elem()
}
func (o PTRRecordMapOutput) ToPTRRecordMapOutput() PTRRecordMapOutput {
return o
}
func (o PTRRecordMapOutput) ToPTRRecordMapOutputWithContext(ctx context.Context) PTRRecordMapOutput {
return o
}
func (o PTRRecordMapOutput) MapIndex(k pulumi.StringInput) PTRRecordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PTRRecord {
return vs[0].(map[string]*PTRRecord)[vs[1].(string)]
}).(PTRRecordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PTRRecordInput)(nil)).Elem(), &PTRRecord{})
pulumi.RegisterInputType(reflect.TypeOf((*PTRRecordArrayInput)(nil)).Elem(), PTRRecordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PTRRecordMapInput)(nil)).Elem(), PTRRecordMap{})
pulumi.RegisterOutputType(PTRRecordOutput{})
pulumi.RegisterOutputType(PTRRecordArrayOutput{})
pulumi.RegisterOutputType(PTRRecordMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/zoneVirtualNetworkLink.go | sdk/go/azure/privatedns/zoneVirtualNetworkLink.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage Private DNS zone Virtual Network Links. These Links enable DNS resolution and registration inside Azure Virtual Networks using Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("mydomain.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("test-network"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewZoneVirtualNetworkLink(ctx, "example", &privatedns.ZoneVirtualNetworkLinkArgs{
// Name: pulumi.String("test"),
// ResourceGroupName: example.Name,
// PrivateDnsZoneName: exampleZone.Name,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS Zone Virtual Network Links can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/zoneVirtualNetworkLink:ZoneVirtualNetworkLink link1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/zone1.com/virtualNetworkLinks/myVnetLink1
// ```
type ZoneVirtualNetworkLink struct {
pulumi.CustomResourceState
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName pulumi.StringOutput `pulumi:"privateDnsZoneName"`
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled pulumi.BoolPtrOutput `pulumi:"registrationEnabled"`
// Specifies the resolution policy of the Private DNS Zone Virtual Network Link. Possible values are `Default` and `NxDomainRedirect`.
ResolutionPolicy pulumi.StringOutput `pulumi:"resolutionPolicy"`
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringOutput `pulumi:"virtualNetworkId"`
}
// NewZoneVirtualNetworkLink registers a new resource with the given unique name, arguments, and options.
func NewZoneVirtualNetworkLink(ctx *pulumi.Context,
name string, args *ZoneVirtualNetworkLinkArgs, opts ...pulumi.ResourceOption) (*ZoneVirtualNetworkLink, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrivateDnsZoneName == nil {
return nil, errors.New("invalid value for required argument 'PrivateDnsZoneName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.VirtualNetworkId == nil {
return nil, errors.New("invalid value for required argument 'VirtualNetworkId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ZoneVirtualNetworkLink
err := ctx.RegisterResource("azure:privatedns/zoneVirtualNetworkLink:ZoneVirtualNetworkLink", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetZoneVirtualNetworkLink gets an existing ZoneVirtualNetworkLink resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetZoneVirtualNetworkLink(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ZoneVirtualNetworkLinkState, opts ...pulumi.ResourceOption) (*ZoneVirtualNetworkLink, error) {
var resource ZoneVirtualNetworkLink
err := ctx.ReadResource("azure:privatedns/zoneVirtualNetworkLink:ZoneVirtualNetworkLink", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ZoneVirtualNetworkLink resources.
type zoneVirtualNetworkLinkState struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName *string `pulumi:"privateDnsZoneName"`
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled *bool `pulumi:"registrationEnabled"`
// Specifies the resolution policy of the Private DNS Zone Virtual Network Link. Possible values are `Default` and `NxDomainRedirect`.
ResolutionPolicy *string `pulumi:"resolutionPolicy"`
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
type ZoneVirtualNetworkLinkState struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName pulumi.StringPtrInput
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled pulumi.BoolPtrInput
// Specifies the resolution policy of the Private DNS Zone Virtual Network Link. Possible values are `Default` and `NxDomainRedirect`.
ResolutionPolicy pulumi.StringPtrInput
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringPtrInput
}
func (ZoneVirtualNetworkLinkState) ElementType() reflect.Type {
return reflect.TypeOf((*zoneVirtualNetworkLinkState)(nil)).Elem()
}
type zoneVirtualNetworkLinkArgs struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName string `pulumi:"privateDnsZoneName"`
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled *bool `pulumi:"registrationEnabled"`
// Specifies the resolution policy of the Private DNS Zone Virtual Network Link. Possible values are `Default` and `NxDomainRedirect`.
ResolutionPolicy *string `pulumi:"resolutionPolicy"`
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
// The set of arguments for constructing a ZoneVirtualNetworkLink resource.
type ZoneVirtualNetworkLinkArgs struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName pulumi.StringInput
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled pulumi.BoolPtrInput
// Specifies the resolution policy of the Private DNS Zone Virtual Network Link. Possible values are `Default` and `NxDomainRedirect`.
ResolutionPolicy pulumi.StringPtrInput
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringInput
}
func (ZoneVirtualNetworkLinkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*zoneVirtualNetworkLinkArgs)(nil)).Elem()
}
type ZoneVirtualNetworkLinkInput interface {
pulumi.Input
ToZoneVirtualNetworkLinkOutput() ZoneVirtualNetworkLinkOutput
ToZoneVirtualNetworkLinkOutputWithContext(ctx context.Context) ZoneVirtualNetworkLinkOutput
}
func (*ZoneVirtualNetworkLink) ElementType() reflect.Type {
return reflect.TypeOf((**ZoneVirtualNetworkLink)(nil)).Elem()
}
func (i *ZoneVirtualNetworkLink) ToZoneVirtualNetworkLinkOutput() ZoneVirtualNetworkLinkOutput {
return i.ToZoneVirtualNetworkLinkOutputWithContext(context.Background())
}
func (i *ZoneVirtualNetworkLink) ToZoneVirtualNetworkLinkOutputWithContext(ctx context.Context) ZoneVirtualNetworkLinkOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZoneVirtualNetworkLinkOutput)
}
// ZoneVirtualNetworkLinkArrayInput is an input type that accepts ZoneVirtualNetworkLinkArray and ZoneVirtualNetworkLinkArrayOutput values.
// You can construct a concrete instance of `ZoneVirtualNetworkLinkArrayInput` via:
//
// ZoneVirtualNetworkLinkArray{ ZoneVirtualNetworkLinkArgs{...} }
type ZoneVirtualNetworkLinkArrayInput interface {
pulumi.Input
ToZoneVirtualNetworkLinkArrayOutput() ZoneVirtualNetworkLinkArrayOutput
ToZoneVirtualNetworkLinkArrayOutputWithContext(context.Context) ZoneVirtualNetworkLinkArrayOutput
}
type ZoneVirtualNetworkLinkArray []ZoneVirtualNetworkLinkInput
func (ZoneVirtualNetworkLinkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ZoneVirtualNetworkLink)(nil)).Elem()
}
func (i ZoneVirtualNetworkLinkArray) ToZoneVirtualNetworkLinkArrayOutput() ZoneVirtualNetworkLinkArrayOutput {
return i.ToZoneVirtualNetworkLinkArrayOutputWithContext(context.Background())
}
func (i ZoneVirtualNetworkLinkArray) ToZoneVirtualNetworkLinkArrayOutputWithContext(ctx context.Context) ZoneVirtualNetworkLinkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZoneVirtualNetworkLinkArrayOutput)
}
// ZoneVirtualNetworkLinkMapInput is an input type that accepts ZoneVirtualNetworkLinkMap and ZoneVirtualNetworkLinkMapOutput values.
// You can construct a concrete instance of `ZoneVirtualNetworkLinkMapInput` via:
//
// ZoneVirtualNetworkLinkMap{ "key": ZoneVirtualNetworkLinkArgs{...} }
type ZoneVirtualNetworkLinkMapInput interface {
pulumi.Input
ToZoneVirtualNetworkLinkMapOutput() ZoneVirtualNetworkLinkMapOutput
ToZoneVirtualNetworkLinkMapOutputWithContext(context.Context) ZoneVirtualNetworkLinkMapOutput
}
type ZoneVirtualNetworkLinkMap map[string]ZoneVirtualNetworkLinkInput
func (ZoneVirtualNetworkLinkMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ZoneVirtualNetworkLink)(nil)).Elem()
}
func (i ZoneVirtualNetworkLinkMap) ToZoneVirtualNetworkLinkMapOutput() ZoneVirtualNetworkLinkMapOutput {
return i.ToZoneVirtualNetworkLinkMapOutputWithContext(context.Background())
}
func (i ZoneVirtualNetworkLinkMap) ToZoneVirtualNetworkLinkMapOutputWithContext(ctx context.Context) ZoneVirtualNetworkLinkMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZoneVirtualNetworkLinkMapOutput)
}
type ZoneVirtualNetworkLinkOutput struct{ *pulumi.OutputState }
func (ZoneVirtualNetworkLinkOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ZoneVirtualNetworkLink)(nil)).Elem()
}
func (o ZoneVirtualNetworkLinkOutput) ToZoneVirtualNetworkLinkOutput() ZoneVirtualNetworkLinkOutput {
return o
}
func (o ZoneVirtualNetworkLinkOutput) ToZoneVirtualNetworkLinkOutputWithContext(ctx context.Context) ZoneVirtualNetworkLinkOutput {
return o
}
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
func (o ZoneVirtualNetworkLinkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ZoneVirtualNetworkLink) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
func (o ZoneVirtualNetworkLinkOutput) PrivateDnsZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *ZoneVirtualNetworkLink) pulumi.StringOutput { return v.PrivateDnsZoneName }).(pulumi.StringOutput)
}
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
func (o ZoneVirtualNetworkLinkOutput) RegistrationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ZoneVirtualNetworkLink) pulumi.BoolPtrOutput { return v.RegistrationEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the resolution policy of the Private DNS Zone Virtual Network Link. Possible values are `Default` and `NxDomainRedirect`.
func (o ZoneVirtualNetworkLinkOutput) ResolutionPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *ZoneVirtualNetworkLink) pulumi.StringOutput { return v.ResolutionPolicy }).(pulumi.StringOutput)
}
// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created.
func (o ZoneVirtualNetworkLinkOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ZoneVirtualNetworkLink) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o ZoneVirtualNetworkLinkOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ZoneVirtualNetworkLink) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
func (o ZoneVirtualNetworkLinkOutput) VirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v *ZoneVirtualNetworkLink) pulumi.StringOutput { return v.VirtualNetworkId }).(pulumi.StringOutput)
}
type ZoneVirtualNetworkLinkArrayOutput struct{ *pulumi.OutputState }
func (ZoneVirtualNetworkLinkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ZoneVirtualNetworkLink)(nil)).Elem()
}
func (o ZoneVirtualNetworkLinkArrayOutput) ToZoneVirtualNetworkLinkArrayOutput() ZoneVirtualNetworkLinkArrayOutput {
return o
}
func (o ZoneVirtualNetworkLinkArrayOutput) ToZoneVirtualNetworkLinkArrayOutputWithContext(ctx context.Context) ZoneVirtualNetworkLinkArrayOutput {
return o
}
func (o ZoneVirtualNetworkLinkArrayOutput) Index(i pulumi.IntInput) ZoneVirtualNetworkLinkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ZoneVirtualNetworkLink {
return vs[0].([]*ZoneVirtualNetworkLink)[vs[1].(int)]
}).(ZoneVirtualNetworkLinkOutput)
}
type ZoneVirtualNetworkLinkMapOutput struct{ *pulumi.OutputState }
func (ZoneVirtualNetworkLinkMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ZoneVirtualNetworkLink)(nil)).Elem()
}
func (o ZoneVirtualNetworkLinkMapOutput) ToZoneVirtualNetworkLinkMapOutput() ZoneVirtualNetworkLinkMapOutput {
return o
}
func (o ZoneVirtualNetworkLinkMapOutput) ToZoneVirtualNetworkLinkMapOutputWithContext(ctx context.Context) ZoneVirtualNetworkLinkMapOutput {
return o
}
func (o ZoneVirtualNetworkLinkMapOutput) MapIndex(k pulumi.StringInput) ZoneVirtualNetworkLinkOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ZoneVirtualNetworkLink {
return vs[0].(map[string]*ZoneVirtualNetworkLink)[vs[1].(string)]
}).(ZoneVirtualNetworkLinkOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ZoneVirtualNetworkLinkInput)(nil)).Elem(), &ZoneVirtualNetworkLink{})
pulumi.RegisterInputType(reflect.TypeOf((*ZoneVirtualNetworkLinkArrayInput)(nil)).Elem(), ZoneVirtualNetworkLinkArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ZoneVirtualNetworkLinkMapInput)(nil)).Elem(), ZoneVirtualNetworkLinkMap{})
pulumi.RegisterOutputType(ZoneVirtualNetworkLinkOutput{})
pulumi.RegisterOutputType(ZoneVirtualNetworkLinkArrayOutput{})
pulumi.RegisterOutputType(ZoneVirtualNetworkLinkMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getARecord.go | sdk/go/azure/privatedns/getARecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := privatedns.LookupARecord(ctx, &privatedns.LookupARecordArgs{
// Name: "test",
// ZoneName: "test-zone",
// ResourceGroupName: "test-rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("privateDnsARecordId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func LookupARecord(ctx *pulumi.Context, args *LookupARecordArgs, opts ...pulumi.InvokeOption) (*LookupARecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupARecordResult
err := ctx.Invoke("azure:privatedns/getARecord:getARecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getARecord.
type LookupARecordArgs struct {
// The name of the Private DNS A Record.
Name string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getARecord.
type LookupARecordResult struct {
// The FQDN of the Private DNS A Record.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// List of IPv4 Addresses.
Records []string `pulumi:"records"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Private DNS A Record.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func LookupARecordOutput(ctx *pulumi.Context, args LookupARecordOutputArgs, opts ...pulumi.InvokeOption) LookupARecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupARecordResultOutput, error) {
args := v.(LookupARecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getARecord:getARecord", args, LookupARecordResultOutput{}, options).(LookupARecordResultOutput), nil
}).(LookupARecordResultOutput)
}
// A collection of arguments for invoking getARecord.
type LookupARecordOutputArgs struct {
// The name of the Private DNS A Record.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (LookupARecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupARecordArgs)(nil)).Elem()
}
// A collection of values returned by getARecord.
type LookupARecordResultOutput struct{ *pulumi.OutputState }
func (LookupARecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupARecordResult)(nil)).Elem()
}
func (o LookupARecordResultOutput) ToLookupARecordResultOutput() LookupARecordResultOutput {
return o
}
func (o LookupARecordResultOutput) ToLookupARecordResultOutputWithContext(ctx context.Context) LookupARecordResultOutput {
return o
}
// The FQDN of the Private DNS A Record.
func (o LookupARecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v LookupARecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupARecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupARecordResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupARecordResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupARecordResult) string { return v.Name }).(pulumi.StringOutput)
}
// List of IPv4 Addresses.
func (o LookupARecordResultOutput) Records() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupARecordResult) []string { return v.Records }).(pulumi.StringArrayOutput)
}
func (o LookupARecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupARecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Private DNS A Record.
func (o LookupARecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupARecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o LookupARecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v LookupARecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o LookupARecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v LookupARecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupARecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getResolverVirtualNetworkLink.go | sdk/go/azure/privatedns/getResolverVirtualNetworkLink.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets information about an existing Private DNS Resolver Virtual Network Link.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.LookupResolverVirtualNetworkLink(ctx, &privatedns.LookupResolverVirtualNetworkLinkArgs{
// Name: "example-link",
// DnsForwardingRulesetId: "example-dns-forwarding-ruleset-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.Network` - 2022-07-01
func LookupResolverVirtualNetworkLink(ctx *pulumi.Context, args *LookupResolverVirtualNetworkLinkArgs, opts ...pulumi.InvokeOption) (*LookupResolverVirtualNetworkLinkResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupResolverVirtualNetworkLinkResult
err := ctx.Invoke("azure:privatedns/getResolverVirtualNetworkLink:getResolverVirtualNetworkLink", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getResolverVirtualNetworkLink.
type LookupResolverVirtualNetworkLinkArgs struct {
// ID of the Private DNS Resolver DNS Forwarding Ruleset.
DnsForwardingRulesetId string `pulumi:"dnsForwardingRulesetId"`
// Name of the Private DNS Resolver Virtual Network Link.
Name string `pulumi:"name"`
}
// A collection of values returned by getResolverVirtualNetworkLink.
type LookupResolverVirtualNetworkLinkResult struct {
DnsForwardingRulesetId string `pulumi:"dnsForwardingRulesetId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The metadata attached to the Private DNS Resolver Virtual Network Link.
Metadata map[string]string `pulumi:"metadata"`
Name string `pulumi:"name"`
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
func LookupResolverVirtualNetworkLinkOutput(ctx *pulumi.Context, args LookupResolverVirtualNetworkLinkOutputArgs, opts ...pulumi.InvokeOption) LookupResolverVirtualNetworkLinkResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupResolverVirtualNetworkLinkResultOutput, error) {
args := v.(LookupResolverVirtualNetworkLinkArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getResolverVirtualNetworkLink:getResolverVirtualNetworkLink", args, LookupResolverVirtualNetworkLinkResultOutput{}, options).(LookupResolverVirtualNetworkLinkResultOutput), nil
}).(LookupResolverVirtualNetworkLinkResultOutput)
}
// A collection of arguments for invoking getResolverVirtualNetworkLink.
type LookupResolverVirtualNetworkLinkOutputArgs struct {
// ID of the Private DNS Resolver DNS Forwarding Ruleset.
DnsForwardingRulesetId pulumi.StringInput `pulumi:"dnsForwardingRulesetId"`
// Name of the Private DNS Resolver Virtual Network Link.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupResolverVirtualNetworkLinkOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverVirtualNetworkLinkArgs)(nil)).Elem()
}
// A collection of values returned by getResolverVirtualNetworkLink.
type LookupResolverVirtualNetworkLinkResultOutput struct{ *pulumi.OutputState }
func (LookupResolverVirtualNetworkLinkResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverVirtualNetworkLinkResult)(nil)).Elem()
}
func (o LookupResolverVirtualNetworkLinkResultOutput) ToLookupResolverVirtualNetworkLinkResultOutput() LookupResolverVirtualNetworkLinkResultOutput {
return o
}
func (o LookupResolverVirtualNetworkLinkResultOutput) ToLookupResolverVirtualNetworkLinkResultOutputWithContext(ctx context.Context) LookupResolverVirtualNetworkLinkResultOutput {
return o
}
func (o LookupResolverVirtualNetworkLinkResultOutput) DnsForwardingRulesetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverVirtualNetworkLinkResult) string { return v.DnsForwardingRulesetId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupResolverVirtualNetworkLinkResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverVirtualNetworkLinkResult) string { return v.Id }).(pulumi.StringOutput)
}
// The metadata attached to the Private DNS Resolver Virtual Network Link.
func (o LookupResolverVirtualNetworkLinkResultOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupResolverVirtualNetworkLinkResult) map[string]string { return v.Metadata }).(pulumi.StringMapOutput)
}
func (o LookupResolverVirtualNetworkLinkResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverVirtualNetworkLinkResult) string { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link.
func (o LookupResolverVirtualNetworkLinkResultOutput) VirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverVirtualNetworkLinkResult) string { return v.VirtualNetworkId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupResolverVirtualNetworkLinkResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getSrvRecord.go | sdk/go/azure/privatedns/getSrvRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.NewSRVRecord(ctx, "example", &privatedns.SRVRecordArgs{
// Name: pulumi.String("test"),
// ZoneName: pulumi.String("test-zone"),
// ResourceGroupName: pulumi.String("test-rg"),
// })
// if err != nil {
// return err
// }
// ctx.Export("privateDnsSrvRecordId", exampleAzurermPrivateDnsSrvRecord.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func GetSrvRecord(ctx *pulumi.Context, args *GetSrvRecordArgs, opts ...pulumi.InvokeOption) (*GetSrvRecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSrvRecordResult
err := ctx.Invoke("azure:privatedns/getSrvRecord:getSrvRecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSrvRecord.
type GetSrvRecordArgs struct {
// The name of the Private DNS SRV Record.
Name string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getSrvRecord.
type GetSrvRecordResult struct {
// The FQDN of the Private DNS SRV Record.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// A list of values that make up the SRV record. Each `record` block supports fields documented below.
Records []GetSrvRecordRecord `pulumi:"records"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func GetSrvRecordOutput(ctx *pulumi.Context, args GetSrvRecordOutputArgs, opts ...pulumi.InvokeOption) GetSrvRecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetSrvRecordResultOutput, error) {
args := v.(GetSrvRecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getSrvRecord:getSrvRecord", args, GetSrvRecordResultOutput{}, options).(GetSrvRecordResultOutput), nil
}).(GetSrvRecordResultOutput)
}
// A collection of arguments for invoking getSrvRecord.
type GetSrvRecordOutputArgs struct {
// The name of the Private DNS SRV Record.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (GetSrvRecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSrvRecordArgs)(nil)).Elem()
}
// A collection of values returned by getSrvRecord.
type GetSrvRecordResultOutput struct{ *pulumi.OutputState }
func (GetSrvRecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSrvRecordResult)(nil)).Elem()
}
func (o GetSrvRecordResultOutput) ToGetSrvRecordResultOutput() GetSrvRecordResultOutput {
return o
}
func (o GetSrvRecordResultOutput) ToGetSrvRecordResultOutputWithContext(ctx context.Context) GetSrvRecordResultOutput {
return o
}
// The FQDN of the Private DNS SRV Record.
func (o GetSrvRecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v GetSrvRecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSrvRecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSrvRecordResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetSrvRecordResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetSrvRecordResult) string { return v.Name }).(pulumi.StringOutput)
}
// A list of values that make up the SRV record. Each `record` block supports fields documented below.
func (o GetSrvRecordResultOutput) Records() GetSrvRecordRecordArrayOutput {
return o.ApplyT(func(v GetSrvRecordResult) []GetSrvRecordRecord { return v.Records }).(GetSrvRecordRecordArrayOutput)
}
func (o GetSrvRecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetSrvRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o GetSrvRecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetSrvRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o GetSrvRecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v GetSrvRecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o GetSrvRecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v GetSrvRecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSrvRecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getAAAARecord.go | sdk/go/azure/privatedns/getAAAARecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.NewAAAARecord(ctx, "example", &privatedns.AAAARecordArgs{
// Name: pulumi.String("test"),
// ZoneName: pulumi.String("test-zone"),
// ResourceGroupName: pulumi.String("test-rg"),
// })
// if err != nil {
// return err
// }
// ctx.Export("privateDnsAaaaRecordId", exampleAzurermPrivateDnsAaaaRecord.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func LookupAAAARecord(ctx *pulumi.Context, args *LookupAAAARecordArgs, opts ...pulumi.InvokeOption) (*LookupAAAARecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAAAARecordResult
err := ctx.Invoke("azure:privatedns/getAAAARecord:getAAAARecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAAAARecord.
type LookupAAAARecordArgs struct {
// The name of the Private DNS AAAA Record.
Name string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getAAAARecord.
type LookupAAAARecordResult struct {
// The FQDN of the Private DNS AAAA Record.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// List of IPv6 Addresses.
Records []string `pulumi:"records"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func LookupAAAARecordOutput(ctx *pulumi.Context, args LookupAAAARecordOutputArgs, opts ...pulumi.InvokeOption) LookupAAAARecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAAAARecordResultOutput, error) {
args := v.(LookupAAAARecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getAAAARecord:getAAAARecord", args, LookupAAAARecordResultOutput{}, options).(LookupAAAARecordResultOutput), nil
}).(LookupAAAARecordResultOutput)
}
// A collection of arguments for invoking getAAAARecord.
type LookupAAAARecordOutputArgs struct {
// The name of the Private DNS AAAA Record.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (LookupAAAARecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAAAARecordArgs)(nil)).Elem()
}
// A collection of values returned by getAAAARecord.
type LookupAAAARecordResultOutput struct{ *pulumi.OutputState }
func (LookupAAAARecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAAAARecordResult)(nil)).Elem()
}
func (o LookupAAAARecordResultOutput) ToLookupAAAARecordResultOutput() LookupAAAARecordResultOutput {
return o
}
func (o LookupAAAARecordResultOutput) ToLookupAAAARecordResultOutputWithContext(ctx context.Context) LookupAAAARecordResultOutput {
return o
}
// The FQDN of the Private DNS AAAA Record.
func (o LookupAAAARecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v LookupAAAARecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAAAARecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAAAARecordResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupAAAARecordResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAAAARecordResult) string { return v.Name }).(pulumi.StringOutput)
}
// List of IPv6 Addresses.
func (o LookupAAAARecordResultOutput) Records() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAAAARecordResult) []string { return v.Records }).(pulumi.StringArrayOutput)
}
func (o LookupAAAARecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAAAARecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupAAAARecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAAAARecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o LookupAAAARecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v LookupAAAARecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o LookupAAAARecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAAAARecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAAAARecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/mxRecord.go | sdk/go/azure/privatedns/mxRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables you to manage DNS MX Records within Azure Private DNS.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/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
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("contoso.com"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewMxRecord(ctx, "example", &privatedns.MxRecordArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// ZoneName: exampleZone.Name,
// Ttl: pulumi.Int(300),
// Records: privatedns.MxRecordRecordArray{
// &privatedns.MxRecordRecordArgs{
// Preference: pulumi.Int(10),
// Exchange: pulumi.String("mx1.contoso.com"),
// },
// &privatedns.MxRecordRecordArgs{
// Preference: pulumi.Int(20),
// Exchange: pulumi.String("backupmx.contoso.com"),
// },
// },
// Tags: pulumi.StringMap{
// "Environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
//
// ## Import
//
// Private DNS MX Records can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/mxRecord:MxRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/privateDnsZones/contoso.com/MX/@
// ```
type MxRecord struct {
pulumi.CustomResourceState
// The FQDN of the DNS MX Record.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// The name of the DNS MX Record. Changing this forces a new resource to be created. Default to '@' for root zone entry.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `record` blocks as defined below.
Records MxRecordRecordArrayOutput `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntOutput `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringOutput `pulumi:"zoneName"`
}
// NewMxRecord registers a new resource with the given unique name, arguments, and options.
func NewMxRecord(ctx *pulumi.Context,
name string, args *MxRecordArgs, opts ...pulumi.ResourceOption) (*MxRecord, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Records == nil {
return nil, errors.New("invalid value for required argument 'Records'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Ttl == nil {
return nil, errors.New("invalid value for required argument 'Ttl'")
}
if args.ZoneName == nil {
return nil, errors.New("invalid value for required argument 'ZoneName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MxRecord
err := ctx.RegisterResource("azure:privatedns/mxRecord:MxRecord", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMxRecord gets an existing MxRecord resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMxRecord(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MxRecordState, opts ...pulumi.ResourceOption) (*MxRecord, error) {
var resource MxRecord
err := ctx.ReadResource("azure:privatedns/mxRecord:MxRecord", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MxRecord resources.
type mxRecordState struct {
// The FQDN of the DNS MX Record.
Fqdn *string `pulumi:"fqdn"`
// The name of the DNS MX Record. Changing this forces a new resource to be created. Default to '@' for root zone entry.
Name *string `pulumi:"name"`
// One or more `record` blocks as defined below.
Records []MxRecordRecord `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl *int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName *string `pulumi:"zoneName"`
}
type MxRecordState struct {
// The FQDN of the DNS MX Record.
Fqdn pulumi.StringPtrInput
// The name of the DNS MX Record. Changing this forces a new resource to be created. Default to '@' for root zone entry.
Name pulumi.StringPtrInput
// One or more `record` blocks as defined below.
Records MxRecordRecordArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntPtrInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringPtrInput
}
func (MxRecordState) ElementType() reflect.Type {
return reflect.TypeOf((*mxRecordState)(nil)).Elem()
}
type mxRecordArgs struct {
// The name of the DNS MX Record. Changing this forces a new resource to be created. Default to '@' for root zone entry.
Name *string `pulumi:"name"`
// One or more `record` blocks as defined below.
Records []MxRecordRecord `pulumi:"records"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the DNS record in seconds.
Ttl int `pulumi:"ttl"`
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName string `pulumi:"zoneName"`
}
// The set of arguments for constructing a MxRecord resource.
type MxRecordArgs struct {
// The name of the DNS MX Record. Changing this forces a new resource to be created. Default to '@' for root zone entry.
Name pulumi.StringPtrInput
// One or more `record` blocks as defined below.
Records MxRecordRecordArrayInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Time To Live (TTL) of the DNS record in seconds.
Ttl pulumi.IntInput
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
ZoneName pulumi.StringInput
}
func (MxRecordArgs) ElementType() reflect.Type {
return reflect.TypeOf((*mxRecordArgs)(nil)).Elem()
}
type MxRecordInput interface {
pulumi.Input
ToMxRecordOutput() MxRecordOutput
ToMxRecordOutputWithContext(ctx context.Context) MxRecordOutput
}
func (*MxRecord) ElementType() reflect.Type {
return reflect.TypeOf((**MxRecord)(nil)).Elem()
}
func (i *MxRecord) ToMxRecordOutput() MxRecordOutput {
return i.ToMxRecordOutputWithContext(context.Background())
}
func (i *MxRecord) ToMxRecordOutputWithContext(ctx context.Context) MxRecordOutput {
return pulumi.ToOutputWithContext(ctx, i).(MxRecordOutput)
}
// MxRecordArrayInput is an input type that accepts MxRecordArray and MxRecordArrayOutput values.
// You can construct a concrete instance of `MxRecordArrayInput` via:
//
// MxRecordArray{ MxRecordArgs{...} }
type MxRecordArrayInput interface {
pulumi.Input
ToMxRecordArrayOutput() MxRecordArrayOutput
ToMxRecordArrayOutputWithContext(context.Context) MxRecordArrayOutput
}
type MxRecordArray []MxRecordInput
func (MxRecordArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MxRecord)(nil)).Elem()
}
func (i MxRecordArray) ToMxRecordArrayOutput() MxRecordArrayOutput {
return i.ToMxRecordArrayOutputWithContext(context.Background())
}
func (i MxRecordArray) ToMxRecordArrayOutputWithContext(ctx context.Context) MxRecordArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MxRecordArrayOutput)
}
// MxRecordMapInput is an input type that accepts MxRecordMap and MxRecordMapOutput values.
// You can construct a concrete instance of `MxRecordMapInput` via:
//
// MxRecordMap{ "key": MxRecordArgs{...} }
type MxRecordMapInput interface {
pulumi.Input
ToMxRecordMapOutput() MxRecordMapOutput
ToMxRecordMapOutputWithContext(context.Context) MxRecordMapOutput
}
type MxRecordMap map[string]MxRecordInput
func (MxRecordMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MxRecord)(nil)).Elem()
}
func (i MxRecordMap) ToMxRecordMapOutput() MxRecordMapOutput {
return i.ToMxRecordMapOutputWithContext(context.Background())
}
func (i MxRecordMap) ToMxRecordMapOutputWithContext(ctx context.Context) MxRecordMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MxRecordMapOutput)
}
type MxRecordOutput struct{ *pulumi.OutputState }
func (MxRecordOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MxRecord)(nil)).Elem()
}
func (o MxRecordOutput) ToMxRecordOutput() MxRecordOutput {
return o
}
func (o MxRecordOutput) ToMxRecordOutputWithContext(ctx context.Context) MxRecordOutput {
return o
}
// The FQDN of the DNS MX Record.
func (o MxRecordOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// The name of the DNS MX Record. Changing this forces a new resource to be created. Default to '@' for root zone entry.
func (o MxRecordOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `record` blocks as defined below.
func (o MxRecordOutput) Records() MxRecordRecordArrayOutput {
return o.ApplyT(func(v *MxRecord) MxRecordRecordArrayOutput { return v.Records }).(MxRecordRecordArrayOutput)
}
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
func (o MxRecordOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o MxRecordOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *MxRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the DNS record in seconds.
func (o MxRecordOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v *MxRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput)
}
// Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created.
func (o MxRecordOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput)
}
type MxRecordArrayOutput struct{ *pulumi.OutputState }
func (MxRecordArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MxRecord)(nil)).Elem()
}
func (o MxRecordArrayOutput) ToMxRecordArrayOutput() MxRecordArrayOutput {
return o
}
func (o MxRecordArrayOutput) ToMxRecordArrayOutputWithContext(ctx context.Context) MxRecordArrayOutput {
return o
}
func (o MxRecordArrayOutput) Index(i pulumi.IntInput) MxRecordOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MxRecord {
return vs[0].([]*MxRecord)[vs[1].(int)]
}).(MxRecordOutput)
}
type MxRecordMapOutput struct{ *pulumi.OutputState }
func (MxRecordMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MxRecord)(nil)).Elem()
}
func (o MxRecordMapOutput) ToMxRecordMapOutput() MxRecordMapOutput {
return o
}
func (o MxRecordMapOutput) ToMxRecordMapOutputWithContext(ctx context.Context) MxRecordMapOutput {
return o
}
func (o MxRecordMapOutput) MapIndex(k pulumi.StringInput) MxRecordOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MxRecord {
return vs[0].(map[string]*MxRecord)[vs[1].(string)]
}).(MxRecordOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MxRecordInput)(nil)).Elem(), &MxRecord{})
pulumi.RegisterInputType(reflect.TypeOf((*MxRecordArrayInput)(nil)).Elem(), MxRecordArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MxRecordMapInput)(nil)).Elem(), MxRecordMap{})
pulumi.RegisterOutputType(MxRecordOutput{})
pulumi.RegisterOutputType(MxRecordArrayOutput{})
pulumi.RegisterOutputType(MxRecordMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getResolverInboundEndpoint.go | sdk/go/azure/privatedns/getResolverInboundEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets information about an existing Private DNS Resolver Inbound Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.LookupResolverInboundEndpoint(ctx, &privatedns.LookupResolverInboundEndpointArgs{
// Name: "example-drie",
// PrivateDnsResolverId: "example-private-dns-resolver-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.Network` - 2022-07-01
func LookupResolverInboundEndpoint(ctx *pulumi.Context, args *LookupResolverInboundEndpointArgs, opts ...pulumi.InvokeOption) (*LookupResolverInboundEndpointResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupResolverInboundEndpointResult
err := ctx.Invoke("azure:privatedns/getResolverInboundEndpoint:getResolverInboundEndpoint", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getResolverInboundEndpoint.
type LookupResolverInboundEndpointArgs struct {
// Name of the Private DNS Resolver Inbound Endpoint.
Name string `pulumi:"name"`
// ID of the Private DNS Resolver.
PrivateDnsResolverId string `pulumi:"privateDnsResolverId"`
}
// A collection of values returned by getResolverInboundEndpoint.
type LookupResolverInboundEndpointResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A list of `ipConfigurations` block as defined below.
IpConfigurations []GetResolverInboundEndpointIpConfiguration `pulumi:"ipConfigurations"`
// The Azure Region where the Private DNS Resolver Inbound Endpoint exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
PrivateDnsResolverId string `pulumi:"privateDnsResolverId"`
// The tags assigned to the Private DNS Resolver Inbound Endpoint.
Tags map[string]string `pulumi:"tags"`
}
func LookupResolverInboundEndpointOutput(ctx *pulumi.Context, args LookupResolverInboundEndpointOutputArgs, opts ...pulumi.InvokeOption) LookupResolverInboundEndpointResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupResolverInboundEndpointResultOutput, error) {
args := v.(LookupResolverInboundEndpointArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getResolverInboundEndpoint:getResolverInboundEndpoint", args, LookupResolverInboundEndpointResultOutput{}, options).(LookupResolverInboundEndpointResultOutput), nil
}).(LookupResolverInboundEndpointResultOutput)
}
// A collection of arguments for invoking getResolverInboundEndpoint.
type LookupResolverInboundEndpointOutputArgs struct {
// Name of the Private DNS Resolver Inbound Endpoint.
Name pulumi.StringInput `pulumi:"name"`
// ID of the Private DNS Resolver.
PrivateDnsResolverId pulumi.StringInput `pulumi:"privateDnsResolverId"`
}
func (LookupResolverInboundEndpointOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverInboundEndpointArgs)(nil)).Elem()
}
// A collection of values returned by getResolverInboundEndpoint.
type LookupResolverInboundEndpointResultOutput struct{ *pulumi.OutputState }
func (LookupResolverInboundEndpointResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverInboundEndpointResult)(nil)).Elem()
}
func (o LookupResolverInboundEndpointResultOutput) ToLookupResolverInboundEndpointResultOutput() LookupResolverInboundEndpointResultOutput {
return o
}
func (o LookupResolverInboundEndpointResultOutput) ToLookupResolverInboundEndpointResultOutputWithContext(ctx context.Context) LookupResolverInboundEndpointResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupResolverInboundEndpointResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverInboundEndpointResult) string { return v.Id }).(pulumi.StringOutput)
}
// A list of `ipConfigurations` block as defined below.
func (o LookupResolverInboundEndpointResultOutput) IpConfigurations() GetResolverInboundEndpointIpConfigurationArrayOutput {
return o.ApplyT(func(v LookupResolverInboundEndpointResult) []GetResolverInboundEndpointIpConfiguration {
return v.IpConfigurations
}).(GetResolverInboundEndpointIpConfigurationArrayOutput)
}
// The Azure Region where the Private DNS Resolver Inbound Endpoint exists.
func (o LookupResolverInboundEndpointResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverInboundEndpointResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupResolverInboundEndpointResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverInboundEndpointResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupResolverInboundEndpointResultOutput) PrivateDnsResolverId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverInboundEndpointResult) string { return v.PrivateDnsResolverId }).(pulumi.StringOutput)
}
// The tags assigned to the Private DNS Resolver Inbound Endpoint.
func (o LookupResolverInboundEndpointResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupResolverInboundEndpointResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupResolverInboundEndpointResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getResolverOutboundEndpoint.go | sdk/go/azure/privatedns/getResolverOutboundEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets information about an existing Private DNS Resolver Outbound Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.LookupResolverOutboundEndpoint(ctx, &privatedns.LookupResolverOutboundEndpointArgs{
// Name: "example-endpoint",
// PrivateDnsResolverId: "example-private-dns-resolver-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.Network` - 2022-07-01
func LookupResolverOutboundEndpoint(ctx *pulumi.Context, args *LookupResolverOutboundEndpointArgs, opts ...pulumi.InvokeOption) (*LookupResolverOutboundEndpointResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupResolverOutboundEndpointResult
err := ctx.Invoke("azure:privatedns/getResolverOutboundEndpoint:getResolverOutboundEndpoint", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getResolverOutboundEndpoint.
type LookupResolverOutboundEndpointArgs struct {
// Name of the Private DNS Resolver Outbound Endpoint.
Name string `pulumi:"name"`
// ID of the Private DNS Resolver Outbound Endpoint.
PrivateDnsResolverId string `pulumi:"privateDnsResolverId"`
}
// A collection of values returned by getResolverOutboundEndpoint.
type LookupResolverOutboundEndpointResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Private DNS Resolver Outbound Endpoint exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
PrivateDnsResolverId string `pulumi:"privateDnsResolverId"`
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint.
SubnetId string `pulumi:"subnetId"`
// The tags assigned to the Private DNS Resolver Outbound Endpoint.
Tags map[string]string `pulumi:"tags"`
}
func LookupResolverOutboundEndpointOutput(ctx *pulumi.Context, args LookupResolverOutboundEndpointOutputArgs, opts ...pulumi.InvokeOption) LookupResolverOutboundEndpointResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupResolverOutboundEndpointResultOutput, error) {
args := v.(LookupResolverOutboundEndpointArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getResolverOutboundEndpoint:getResolverOutboundEndpoint", args, LookupResolverOutboundEndpointResultOutput{}, options).(LookupResolverOutboundEndpointResultOutput), nil
}).(LookupResolverOutboundEndpointResultOutput)
}
// A collection of arguments for invoking getResolverOutboundEndpoint.
type LookupResolverOutboundEndpointOutputArgs struct {
// Name of the Private DNS Resolver Outbound Endpoint.
Name pulumi.StringInput `pulumi:"name"`
// ID of the Private DNS Resolver Outbound Endpoint.
PrivateDnsResolverId pulumi.StringInput `pulumi:"privateDnsResolverId"`
}
func (LookupResolverOutboundEndpointOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverOutboundEndpointArgs)(nil)).Elem()
}
// A collection of values returned by getResolverOutboundEndpoint.
type LookupResolverOutboundEndpointResultOutput struct{ *pulumi.OutputState }
func (LookupResolverOutboundEndpointResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverOutboundEndpointResult)(nil)).Elem()
}
func (o LookupResolverOutboundEndpointResultOutput) ToLookupResolverOutboundEndpointResultOutput() LookupResolverOutboundEndpointResultOutput {
return o
}
func (o LookupResolverOutboundEndpointResultOutput) ToLookupResolverOutboundEndpointResultOutputWithContext(ctx context.Context) LookupResolverOutboundEndpointResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupResolverOutboundEndpointResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverOutboundEndpointResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Private DNS Resolver Outbound Endpoint exists.
func (o LookupResolverOutboundEndpointResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverOutboundEndpointResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupResolverOutboundEndpointResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverOutboundEndpointResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupResolverOutboundEndpointResultOutput) PrivateDnsResolverId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverOutboundEndpointResult) string { return v.PrivateDnsResolverId }).(pulumi.StringOutput)
}
// The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint.
func (o LookupResolverOutboundEndpointResultOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverOutboundEndpointResult) string { return v.SubnetId }).(pulumi.StringOutput)
}
// The tags assigned to the Private DNS Resolver Outbound Endpoint.
func (o LookupResolverOutboundEndpointResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupResolverOutboundEndpointResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupResolverOutboundEndpointResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/linkService.go | sdk/go/azure/privatedns/linkService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private Link Service.
//
// > **Note:** Private Link is now in [GA](https://docs.microsoft.com/en-gb/azure/private-link/).
//
// ## 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/lb"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.5.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.5.1.0/24"),
// },
// EnforcePrivateLinkServiceNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-api"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// })
// if err != nil {
// return err
// }
// exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
// Name: pulumi.String("example-lb"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
// &lb.LoadBalancerFrontendIpConfigurationArgs{
// Name: examplePublicIp.Name,
// PublicIpAddressId: examplePublicIp.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewLinkService(ctx, "example", &privatedns.LinkServiceArgs{
// Name: pulumi.String("example-privatelink"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AutoApprovalSubscriptionIds: pulumi.StringArray{
// pulumi.String("00000000-0000-0000-0000-000000000000"),
// },
// VisibilitySubscriptionIds: pulumi.StringArray{
// pulumi.String("00000000-0000-0000-0000-000000000000"),
// },
// LoadBalancerFrontendIpConfigurationIds: pulumi.StringArray{
// pulumi.String(exampleLoadBalancer.FrontendIpConfigurations.ApplyT(func(frontendIpConfigurations []lb.LoadBalancerFrontendIpConfiguration) (*string, error) {
// return &frontendIpConfigurations[0].Id, nil
// }).(pulumi.StringPtrOutput)),
// },
// NatIpConfigurations: privatedns.LinkServiceNatIpConfigurationArray{
// &privatedns.LinkServiceNatIpConfigurationArgs{
// Name: pulumi.String("primary"),
// PrivateIpAddress: pulumi.String("10.5.1.17"),
// PrivateIpAddressVersion: pulumi.String("IPv4"),
// SubnetId: exampleSubnet.ID(),
// Primary: pulumi.Bool(true),
// },
// &privatedns.LinkServiceNatIpConfigurationArgs{
// Name: pulumi.String("secondary"),
// PrivateIpAddress: pulumi.String("10.5.1.18"),
// PrivateIpAddressVersion: pulumi.String("IPv4"),
// SubnetId: exampleSubnet.ID(),
// Primary: 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.Network` - 2025-01-01
//
// ## Import
//
// Private Link Services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/linkService:LinkService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/privateLinkServices/service1
// ```
type LinkService struct {
pulumi.CustomResourceState
// A globally unique DNS Name for your Private Link Service. You can use this alias to request a connection to your Private Link Service.
Alias pulumi.StringOutput `pulumi:"alias"`
// A list of Subscription UUID/GUID's that will be automatically be able to use this Private Link Service.
AutoApprovalSubscriptionIds pulumi.StringArrayOutput `pulumi:"autoApprovalSubscriptionIds"`
// The destination IP address of the Private Link Service.
DestinationIpAddress pulumi.StringPtrOutput `pulumi:"destinationIpAddress"`
// Should the Private Link Service support the Proxy Protocol?
EnableProxyProtocol pulumi.BoolPtrOutput `pulumi:"enableProxyProtocol"`
// List of FQDNs allowed for the Private Link Service.
Fqdns pulumi.StringArrayOutput `pulumi:"fqdns"`
// A list of Frontend IP Configuration IDs from a Standard Load Balancer, where traffic from the Private Link Service should be routed. You can use Load Balancer Rules to direct this traffic to appropriate backend pools where your applications are running. Changing this forces a new resource to be created.
LoadBalancerFrontendIpConfigurationIds pulumi.StringArrayOutput `pulumi:"loadBalancerFrontendIpConfigurationIds"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of this Private Link Service. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more (up to 8) `natIpConfiguration` block as defined below.
NatIpConfigurations LinkServiceNatIpConfigurationArrayOutput `pulumi:"natIpConfigurations"`
// The name of the Resource Group where the Private Link Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A list of Subscription UUID/GUID's that will be able to see this Private Link Service.
//
// > **Note:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service.
VisibilitySubscriptionIds pulumi.StringArrayOutput `pulumi:"visibilitySubscriptionIds"`
}
// NewLinkService registers a new resource with the given unique name, arguments, and options.
func NewLinkService(ctx *pulumi.Context,
name string, args *LinkServiceArgs, opts ...pulumi.ResourceOption) (*LinkService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NatIpConfigurations == nil {
return nil, errors.New("invalid value for required argument 'NatIpConfigurations'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LinkService
err := ctx.RegisterResource("azure:privatedns/linkService:LinkService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLinkService gets an existing LinkService resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLinkService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LinkServiceState, opts ...pulumi.ResourceOption) (*LinkService, error) {
var resource LinkService
err := ctx.ReadResource("azure:privatedns/linkService:LinkService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LinkService resources.
type linkServiceState struct {
// A globally unique DNS Name for your Private Link Service. You can use this alias to request a connection to your Private Link Service.
Alias *string `pulumi:"alias"`
// A list of Subscription UUID/GUID's that will be automatically be able to use this Private Link Service.
AutoApprovalSubscriptionIds []string `pulumi:"autoApprovalSubscriptionIds"`
// The destination IP address of the Private Link Service.
DestinationIpAddress *string `pulumi:"destinationIpAddress"`
// Should the Private Link Service support the Proxy Protocol?
EnableProxyProtocol *bool `pulumi:"enableProxyProtocol"`
// List of FQDNs allowed for the Private Link Service.
Fqdns []string `pulumi:"fqdns"`
// A list of Frontend IP Configuration IDs from a Standard Load Balancer, where traffic from the Private Link Service should be routed. You can use Load Balancer Rules to direct this traffic to appropriate backend pools where your applications are running. Changing this forces a new resource to be created.
LoadBalancerFrontendIpConfigurationIds []string `pulumi:"loadBalancerFrontendIpConfigurationIds"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of this Private Link Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more (up to 8) `natIpConfiguration` block as defined below.
NatIpConfigurations []LinkServiceNatIpConfiguration `pulumi:"natIpConfigurations"`
// The name of the Resource Group where the Private Link Service should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A list of Subscription UUID/GUID's that will be able to see this Private Link Service.
//
// > **Note:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service.
VisibilitySubscriptionIds []string `pulumi:"visibilitySubscriptionIds"`
}
type LinkServiceState struct {
// A globally unique DNS Name for your Private Link Service. You can use this alias to request a connection to your Private Link Service.
Alias pulumi.StringPtrInput
// A list of Subscription UUID/GUID's that will be automatically be able to use this Private Link Service.
AutoApprovalSubscriptionIds pulumi.StringArrayInput
// The destination IP address of the Private Link Service.
DestinationIpAddress pulumi.StringPtrInput
// Should the Private Link Service support the Proxy Protocol?
EnableProxyProtocol pulumi.BoolPtrInput
// List of FQDNs allowed for the Private Link Service.
Fqdns pulumi.StringArrayInput
// A list of Frontend IP Configuration IDs from a Standard Load Balancer, where traffic from the Private Link Service should be routed. You can use Load Balancer Rules to direct this traffic to appropriate backend pools where your applications are running. Changing this forces a new resource to be created.
LoadBalancerFrontendIpConfigurationIds pulumi.StringArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of this Private Link Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more (up to 8) `natIpConfiguration` block as defined below.
NatIpConfigurations LinkServiceNatIpConfigurationArrayInput
// The name of the Resource Group where the Private Link Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A list of Subscription UUID/GUID's that will be able to see this Private Link Service.
//
// > **Note:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service.
VisibilitySubscriptionIds pulumi.StringArrayInput
}
func (LinkServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*linkServiceState)(nil)).Elem()
}
type linkServiceArgs struct {
// A list of Subscription UUID/GUID's that will be automatically be able to use this Private Link Service.
AutoApprovalSubscriptionIds []string `pulumi:"autoApprovalSubscriptionIds"`
// The destination IP address of the Private Link Service.
DestinationIpAddress *string `pulumi:"destinationIpAddress"`
// Should the Private Link Service support the Proxy Protocol?
EnableProxyProtocol *bool `pulumi:"enableProxyProtocol"`
// List of FQDNs allowed for the Private Link Service.
Fqdns []string `pulumi:"fqdns"`
// A list of Frontend IP Configuration IDs from a Standard Load Balancer, where traffic from the Private Link Service should be routed. You can use Load Balancer Rules to direct this traffic to appropriate backend pools where your applications are running. Changing this forces a new resource to be created.
LoadBalancerFrontendIpConfigurationIds []string `pulumi:"loadBalancerFrontendIpConfigurationIds"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of this Private Link Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more (up to 8) `natIpConfiguration` block as defined below.
NatIpConfigurations []LinkServiceNatIpConfiguration `pulumi:"natIpConfigurations"`
// The name of the Resource Group where the Private Link Service should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A list of Subscription UUID/GUID's that will be able to see this Private Link Service.
//
// > **Note:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service.
VisibilitySubscriptionIds []string `pulumi:"visibilitySubscriptionIds"`
}
// The set of arguments for constructing a LinkService resource.
type LinkServiceArgs struct {
// A list of Subscription UUID/GUID's that will be automatically be able to use this Private Link Service.
AutoApprovalSubscriptionIds pulumi.StringArrayInput
// The destination IP address of the Private Link Service.
DestinationIpAddress pulumi.StringPtrInput
// Should the Private Link Service support the Proxy Protocol?
EnableProxyProtocol pulumi.BoolPtrInput
// List of FQDNs allowed for the Private Link Service.
Fqdns pulumi.StringArrayInput
// A list of Frontend IP Configuration IDs from a Standard Load Balancer, where traffic from the Private Link Service should be routed. You can use Load Balancer Rules to direct this traffic to appropriate backend pools where your applications are running. Changing this forces a new resource to be created.
LoadBalancerFrontendIpConfigurationIds pulumi.StringArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of this Private Link Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more (up to 8) `natIpConfiguration` block as defined below.
NatIpConfigurations LinkServiceNatIpConfigurationArrayInput
// The name of the Resource Group where the Private Link Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A list of Subscription UUID/GUID's that will be able to see this Private Link Service.
//
// > **Note:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service.
VisibilitySubscriptionIds pulumi.StringArrayInput
}
func (LinkServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*linkServiceArgs)(nil)).Elem()
}
type LinkServiceInput interface {
pulumi.Input
ToLinkServiceOutput() LinkServiceOutput
ToLinkServiceOutputWithContext(ctx context.Context) LinkServiceOutput
}
func (*LinkService) ElementType() reflect.Type {
return reflect.TypeOf((**LinkService)(nil)).Elem()
}
func (i *LinkService) ToLinkServiceOutput() LinkServiceOutput {
return i.ToLinkServiceOutputWithContext(context.Background())
}
func (i *LinkService) ToLinkServiceOutputWithContext(ctx context.Context) LinkServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkServiceOutput)
}
// LinkServiceArrayInput is an input type that accepts LinkServiceArray and LinkServiceArrayOutput values.
// You can construct a concrete instance of `LinkServiceArrayInput` via:
//
// LinkServiceArray{ LinkServiceArgs{...} }
type LinkServiceArrayInput interface {
pulumi.Input
ToLinkServiceArrayOutput() LinkServiceArrayOutput
ToLinkServiceArrayOutputWithContext(context.Context) LinkServiceArrayOutput
}
type LinkServiceArray []LinkServiceInput
func (LinkServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LinkService)(nil)).Elem()
}
func (i LinkServiceArray) ToLinkServiceArrayOutput() LinkServiceArrayOutput {
return i.ToLinkServiceArrayOutputWithContext(context.Background())
}
func (i LinkServiceArray) ToLinkServiceArrayOutputWithContext(ctx context.Context) LinkServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkServiceArrayOutput)
}
// LinkServiceMapInput is an input type that accepts LinkServiceMap and LinkServiceMapOutput values.
// You can construct a concrete instance of `LinkServiceMapInput` via:
//
// LinkServiceMap{ "key": LinkServiceArgs{...} }
type LinkServiceMapInput interface {
pulumi.Input
ToLinkServiceMapOutput() LinkServiceMapOutput
ToLinkServiceMapOutputWithContext(context.Context) LinkServiceMapOutput
}
type LinkServiceMap map[string]LinkServiceInput
func (LinkServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LinkService)(nil)).Elem()
}
func (i LinkServiceMap) ToLinkServiceMapOutput() LinkServiceMapOutput {
return i.ToLinkServiceMapOutputWithContext(context.Background())
}
func (i LinkServiceMap) ToLinkServiceMapOutputWithContext(ctx context.Context) LinkServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkServiceMapOutput)
}
type LinkServiceOutput struct{ *pulumi.OutputState }
func (LinkServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LinkService)(nil)).Elem()
}
func (o LinkServiceOutput) ToLinkServiceOutput() LinkServiceOutput {
return o
}
func (o LinkServiceOutput) ToLinkServiceOutputWithContext(ctx context.Context) LinkServiceOutput {
return o
}
// A globally unique DNS Name for your Private Link Service. You can use this alias to request a connection to your Private Link Service.
func (o LinkServiceOutput) Alias() pulumi.StringOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringOutput { return v.Alias }).(pulumi.StringOutput)
}
// A list of Subscription UUID/GUID's that will be automatically be able to use this Private Link Service.
func (o LinkServiceOutput) AutoApprovalSubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringArrayOutput { return v.AutoApprovalSubscriptionIds }).(pulumi.StringArrayOutput)
}
// The destination IP address of the Private Link Service.
func (o LinkServiceOutput) DestinationIpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringPtrOutput { return v.DestinationIpAddress }).(pulumi.StringPtrOutput)
}
// Should the Private Link Service support the Proxy Protocol?
func (o LinkServiceOutput) EnableProxyProtocol() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LinkService) pulumi.BoolPtrOutput { return v.EnableProxyProtocol }).(pulumi.BoolPtrOutput)
}
// List of FQDNs allowed for the Private Link Service.
func (o LinkServiceOutput) Fqdns() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringArrayOutput { return v.Fqdns }).(pulumi.StringArrayOutput)
}
// A list of Frontend IP Configuration IDs from a Standard Load Balancer, where traffic from the Private Link Service should be routed. You can use Load Balancer Rules to direct this traffic to appropriate backend pools where your applications are running. Changing this forces a new resource to be created.
func (o LinkServiceOutput) LoadBalancerFrontendIpConfigurationIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringArrayOutput { return v.LoadBalancerFrontendIpConfigurationIds }).(pulumi.StringArrayOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o LinkServiceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of this Private Link Service. Changing this forces a new resource to be created.
func (o LinkServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more (up to 8) `natIpConfiguration` block as defined below.
func (o LinkServiceOutput) NatIpConfigurations() LinkServiceNatIpConfigurationArrayOutput {
return o.ApplyT(func(v *LinkService) LinkServiceNatIpConfigurationArrayOutput { return v.NatIpConfigurations }).(LinkServiceNatIpConfigurationArrayOutput)
}
// The name of the Resource Group where the Private Link Service should exist. Changing this forces a new resource to be created.
func (o LinkServiceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o LinkServiceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A list of Subscription UUID/GUID's that will be able to see this Private Link Service.
//
// > **Note:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service.
func (o LinkServiceOutput) VisibilitySubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LinkService) pulumi.StringArrayOutput { return v.VisibilitySubscriptionIds }).(pulumi.StringArrayOutput)
}
type LinkServiceArrayOutput struct{ *pulumi.OutputState }
func (LinkServiceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LinkService)(nil)).Elem()
}
func (o LinkServiceArrayOutput) ToLinkServiceArrayOutput() LinkServiceArrayOutput {
return o
}
func (o LinkServiceArrayOutput) ToLinkServiceArrayOutputWithContext(ctx context.Context) LinkServiceArrayOutput {
return o
}
func (o LinkServiceArrayOutput) Index(i pulumi.IntInput) LinkServiceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LinkService {
return vs[0].([]*LinkService)[vs[1].(int)]
}).(LinkServiceOutput)
}
type LinkServiceMapOutput struct{ *pulumi.OutputState }
func (LinkServiceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LinkService)(nil)).Elem()
}
func (o LinkServiceMapOutput) ToLinkServiceMapOutput() LinkServiceMapOutput {
return o
}
func (o LinkServiceMapOutput) ToLinkServiceMapOutputWithContext(ctx context.Context) LinkServiceMapOutput {
return o
}
func (o LinkServiceMapOutput) MapIndex(k pulumi.StringInput) LinkServiceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LinkService {
return vs[0].(map[string]*LinkService)[vs[1].(string)]
}).(LinkServiceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LinkServiceInput)(nil)).Elem(), &LinkService{})
pulumi.RegisterInputType(reflect.TypeOf((*LinkServiceArrayInput)(nil)).Elem(), LinkServiceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LinkServiceMapInput)(nil)).Elem(), LinkServiceMap{})
pulumi.RegisterOutputType(LinkServiceOutput{})
pulumi.RegisterOutputType(LinkServiceArrayOutput{})
pulumi.RegisterOutputType(LinkServiceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getSoaRecord.go | sdk/go/azure/privatedns/getSoaRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azurerm/sdk/go/azurerm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := azurerm.NewPrivateDnsSoaRecord(ctx, "example", &azurerm.PrivateDnsSoaRecordArgs{
// ZoneName: "test-zone",
// ResourceGroupName: "test-rg",
// })
// if err != nil {
// return err
// }
// ctx.Export("privateDnsSoaRecordId", exampleAzurermPrivateDnsSoaRecord.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func GetSoaRecord(ctx *pulumi.Context, args *GetSoaRecordArgs, opts ...pulumi.InvokeOption) (*GetSoaRecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSoaRecordResult
err := ctx.Invoke("azure:privatedns/getSoaRecord:getSoaRecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSoaRecord.
type GetSoaRecordArgs struct {
// The name of the Private DNS SOA Record.
Name *string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getSoaRecord.
type GetSoaRecordResult struct {
// The email contact for the SOA record.
Email string `pulumi:"email"`
// The expire time for the SOA record.
ExpireTime int `pulumi:"expireTime"`
// The FQDN of the Private DNS SOA Record.
Fqdn string `pulumi:"fqdn"`
// The domain name of the authoritative name server for the SOA record.
HostName string `pulumi:"hostName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
MinimumTtl int `pulumi:"minimumTtl"`
// The name of the Private DNS SOA Record.
Name *string `pulumi:"name"`
// The refresh time for the SOA record.
RefreshTime int `pulumi:"refreshTime"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The retry time for the SOA record.
RetryTime int `pulumi:"retryTime"`
// The serial number for the SOA record.
SerialNumber int `pulumi:"serialNumber"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func GetSoaRecordOutput(ctx *pulumi.Context, args GetSoaRecordOutputArgs, opts ...pulumi.InvokeOption) GetSoaRecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetSoaRecordResultOutput, error) {
args := v.(GetSoaRecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getSoaRecord:getSoaRecord", args, GetSoaRecordResultOutput{}, options).(GetSoaRecordResultOutput), nil
}).(GetSoaRecordResultOutput)
}
// A collection of arguments for invoking getSoaRecord.
type GetSoaRecordOutputArgs struct {
// The name of the Private DNS SOA Record.
Name pulumi.StringPtrInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (GetSoaRecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoaRecordArgs)(nil)).Elem()
}
// A collection of values returned by getSoaRecord.
type GetSoaRecordResultOutput struct{ *pulumi.OutputState }
func (GetSoaRecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSoaRecordResult)(nil)).Elem()
}
func (o GetSoaRecordResultOutput) ToGetSoaRecordResultOutput() GetSoaRecordResultOutput {
return o
}
func (o GetSoaRecordResultOutput) ToGetSoaRecordResultOutputWithContext(ctx context.Context) GetSoaRecordResultOutput {
return o
}
// The email contact for the SOA record.
func (o GetSoaRecordResultOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.Email }).(pulumi.StringOutput)
}
// The expire time for the SOA record.
func (o GetSoaRecordResultOutput) ExpireTime() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.ExpireTime }).(pulumi.IntOutput)
}
// The FQDN of the Private DNS SOA Record.
func (o GetSoaRecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The domain name of the authoritative name server for the SOA record.
func (o GetSoaRecordResultOutput) HostName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.HostName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSoaRecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.Id }).(pulumi.StringOutput)
}
// The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration.
func (o GetSoaRecordResultOutput) MinimumTtl() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.MinimumTtl }).(pulumi.IntOutput)
}
// The name of the Private DNS SOA Record.
func (o GetSoaRecordResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSoaRecordResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The refresh time for the SOA record.
func (o GetSoaRecordResultOutput) RefreshTime() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.RefreshTime }).(pulumi.IntOutput)
}
func (o GetSoaRecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The retry time for the SOA record.
func (o GetSoaRecordResultOutput) RetryTime() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.RetryTime }).(pulumi.IntOutput)
}
// The serial number for the SOA record.
func (o GetSoaRecordResultOutput) SerialNumber() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.SerialNumber }).(pulumi.IntOutput)
}
// A mapping of tags assigned to the resource.
func (o GetSoaRecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetSoaRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o GetSoaRecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v GetSoaRecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o GetSoaRecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v GetSoaRecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSoaRecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/resolverForwardingRule.go | sdk/go/azure/privatedns/resolverForwardingRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private DNS Resolver Forwarding Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("west europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// 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("outbounddns"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.64/28"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("Microsoft.Network.dnsResolvers"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// Name: pulumi.String("Microsoft.Network/dnsResolvers"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleResolver, err := privatedns.NewResolver(ctx, "example", &privatedns.ResolverArgs{
// Name: pulumi.String("example-resolver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// exampleResolverOutboundEndpoint, err := privatedns.NewResolverOutboundEndpoint(ctx, "example", &privatedns.ResolverOutboundEndpointArgs{
// Name: pulumi.String("example-endpoint"),
// PrivateDnsResolverId: exampleResolver.ID(),
// Location: exampleResolver.Location,
// SubnetId: exampleSubnet.ID(),
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// exampleResolverDnsForwardingRuleset, err := privatedns.NewResolverDnsForwardingRuleset(ctx, "example", &privatedns.ResolverDnsForwardingRulesetArgs{
// Name: pulumi.String("example-drdfr"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PrivateDnsResolverOutboundEndpointIds: pulumi.StringArray{
// exampleResolverOutboundEndpoint.ID(),
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewResolverForwardingRule(ctx, "example", &privatedns.ResolverForwardingRuleArgs{
// Name: pulumi.String("example-rule"),
// DnsForwardingRulesetId: exampleResolverDnsForwardingRuleset.ID(),
// DomainName: pulumi.String("onprem.local."),
// Enabled: pulumi.Bool(true),
// TargetDnsServers: privatedns.ResolverForwardingRuleTargetDnsServerArray{
// &privatedns.ResolverForwardingRuleTargetDnsServerArgs{
// IpAddress: pulumi.String("10.10.0.1"),
// Port: pulumi.Int(53),
// },
// },
// Metadata: 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.Network` - 2022-07-01
//
// ## Import
//
// Private DNS Resolver Forwarding Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/resolverForwardingRule:ResolverForwardingRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/dnsForwardingRulesets/dnsForwardingRuleset1/forwardingRules/forwardingRule1
// ```
type ResolverForwardingRule struct {
pulumi.CustomResourceState
// Specifies the ID of the Private DNS Resolver Forwarding Ruleset. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DnsForwardingRulesetId pulumi.StringOutput `pulumi:"dnsForwardingRulesetId"`
// Specifies the domain name for the Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DomainName pulumi.StringOutput `pulumi:"domainName"`
// Specifies the state of the Private DNS Resolver Forwarding Rule. Defaults to `true`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// Metadata attached to the Private DNS Resolver Forwarding Rule.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Can be specified multiple times to define multiple target DNS servers. Each `targetDnsServers` block as defined below.
TargetDnsServers ResolverForwardingRuleTargetDnsServerArrayOutput `pulumi:"targetDnsServers"`
}
// NewResolverForwardingRule registers a new resource with the given unique name, arguments, and options.
func NewResolverForwardingRule(ctx *pulumi.Context,
name string, args *ResolverForwardingRuleArgs, opts ...pulumi.ResourceOption) (*ResolverForwardingRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DnsForwardingRulesetId == nil {
return nil, errors.New("invalid value for required argument 'DnsForwardingRulesetId'")
}
if args.DomainName == nil {
return nil, errors.New("invalid value for required argument 'DomainName'")
}
if args.TargetDnsServers == nil {
return nil, errors.New("invalid value for required argument 'TargetDnsServers'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ResolverForwardingRule
err := ctx.RegisterResource("azure:privatedns/resolverForwardingRule:ResolverForwardingRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResolverForwardingRule gets an existing ResolverForwardingRule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResolverForwardingRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResolverForwardingRuleState, opts ...pulumi.ResourceOption) (*ResolverForwardingRule, error) {
var resource ResolverForwardingRule
err := ctx.ReadResource("azure:privatedns/resolverForwardingRule:ResolverForwardingRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ResolverForwardingRule resources.
type resolverForwardingRuleState struct {
// Specifies the ID of the Private DNS Resolver Forwarding Ruleset. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DnsForwardingRulesetId *string `pulumi:"dnsForwardingRulesetId"`
// Specifies the domain name for the Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DomainName *string `pulumi:"domainName"`
// Specifies the state of the Private DNS Resolver Forwarding Rule. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// Metadata attached to the Private DNS Resolver Forwarding Rule.
Metadata map[string]string `pulumi:"metadata"`
// Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
Name *string `pulumi:"name"`
// Can be specified multiple times to define multiple target DNS servers. Each `targetDnsServers` block as defined below.
TargetDnsServers []ResolverForwardingRuleTargetDnsServer `pulumi:"targetDnsServers"`
}
type ResolverForwardingRuleState struct {
// Specifies the ID of the Private DNS Resolver Forwarding Ruleset. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DnsForwardingRulesetId pulumi.StringPtrInput
// Specifies the domain name for the Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DomainName pulumi.StringPtrInput
// Specifies the state of the Private DNS Resolver Forwarding Rule. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// Metadata attached to the Private DNS Resolver Forwarding Rule.
Metadata pulumi.StringMapInput
// Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
Name pulumi.StringPtrInput
// Can be specified multiple times to define multiple target DNS servers. Each `targetDnsServers` block as defined below.
TargetDnsServers ResolverForwardingRuleTargetDnsServerArrayInput
}
func (ResolverForwardingRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*resolverForwardingRuleState)(nil)).Elem()
}
type resolverForwardingRuleArgs struct {
// Specifies the ID of the Private DNS Resolver Forwarding Ruleset. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DnsForwardingRulesetId string `pulumi:"dnsForwardingRulesetId"`
// Specifies the domain name for the Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DomainName string `pulumi:"domainName"`
// Specifies the state of the Private DNS Resolver Forwarding Rule. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// Metadata attached to the Private DNS Resolver Forwarding Rule.
Metadata map[string]string `pulumi:"metadata"`
// Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
Name *string `pulumi:"name"`
// Can be specified multiple times to define multiple target DNS servers. Each `targetDnsServers` block as defined below.
TargetDnsServers []ResolverForwardingRuleTargetDnsServer `pulumi:"targetDnsServers"`
}
// The set of arguments for constructing a ResolverForwardingRule resource.
type ResolverForwardingRuleArgs struct {
// Specifies the ID of the Private DNS Resolver Forwarding Ruleset. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DnsForwardingRulesetId pulumi.StringInput
// Specifies the domain name for the Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
DomainName pulumi.StringInput
// Specifies the state of the Private DNS Resolver Forwarding Rule. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// Metadata attached to the Private DNS Resolver Forwarding Rule.
Metadata pulumi.StringMapInput
// Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
Name pulumi.StringPtrInput
// Can be specified multiple times to define multiple target DNS servers. Each `targetDnsServers` block as defined below.
TargetDnsServers ResolverForwardingRuleTargetDnsServerArrayInput
}
func (ResolverForwardingRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resolverForwardingRuleArgs)(nil)).Elem()
}
type ResolverForwardingRuleInput interface {
pulumi.Input
ToResolverForwardingRuleOutput() ResolverForwardingRuleOutput
ToResolverForwardingRuleOutputWithContext(ctx context.Context) ResolverForwardingRuleOutput
}
func (*ResolverForwardingRule) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverForwardingRule)(nil)).Elem()
}
func (i *ResolverForwardingRule) ToResolverForwardingRuleOutput() ResolverForwardingRuleOutput {
return i.ToResolverForwardingRuleOutputWithContext(context.Background())
}
func (i *ResolverForwardingRule) ToResolverForwardingRuleOutputWithContext(ctx context.Context) ResolverForwardingRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverForwardingRuleOutput)
}
// ResolverForwardingRuleArrayInput is an input type that accepts ResolverForwardingRuleArray and ResolverForwardingRuleArrayOutput values.
// You can construct a concrete instance of `ResolverForwardingRuleArrayInput` via:
//
// ResolverForwardingRuleArray{ ResolverForwardingRuleArgs{...} }
type ResolverForwardingRuleArrayInput interface {
pulumi.Input
ToResolverForwardingRuleArrayOutput() ResolverForwardingRuleArrayOutput
ToResolverForwardingRuleArrayOutputWithContext(context.Context) ResolverForwardingRuleArrayOutput
}
type ResolverForwardingRuleArray []ResolverForwardingRuleInput
func (ResolverForwardingRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverForwardingRule)(nil)).Elem()
}
func (i ResolverForwardingRuleArray) ToResolverForwardingRuleArrayOutput() ResolverForwardingRuleArrayOutput {
return i.ToResolverForwardingRuleArrayOutputWithContext(context.Background())
}
func (i ResolverForwardingRuleArray) ToResolverForwardingRuleArrayOutputWithContext(ctx context.Context) ResolverForwardingRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverForwardingRuleArrayOutput)
}
// ResolverForwardingRuleMapInput is an input type that accepts ResolverForwardingRuleMap and ResolverForwardingRuleMapOutput values.
// You can construct a concrete instance of `ResolverForwardingRuleMapInput` via:
//
// ResolverForwardingRuleMap{ "key": ResolverForwardingRuleArgs{...} }
type ResolverForwardingRuleMapInput interface {
pulumi.Input
ToResolverForwardingRuleMapOutput() ResolverForwardingRuleMapOutput
ToResolverForwardingRuleMapOutputWithContext(context.Context) ResolverForwardingRuleMapOutput
}
type ResolverForwardingRuleMap map[string]ResolverForwardingRuleInput
func (ResolverForwardingRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverForwardingRule)(nil)).Elem()
}
func (i ResolverForwardingRuleMap) ToResolverForwardingRuleMapOutput() ResolverForwardingRuleMapOutput {
return i.ToResolverForwardingRuleMapOutputWithContext(context.Background())
}
func (i ResolverForwardingRuleMap) ToResolverForwardingRuleMapOutputWithContext(ctx context.Context) ResolverForwardingRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverForwardingRuleMapOutput)
}
type ResolverForwardingRuleOutput struct{ *pulumi.OutputState }
func (ResolverForwardingRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverForwardingRule)(nil)).Elem()
}
func (o ResolverForwardingRuleOutput) ToResolverForwardingRuleOutput() ResolverForwardingRuleOutput {
return o
}
func (o ResolverForwardingRuleOutput) ToResolverForwardingRuleOutputWithContext(ctx context.Context) ResolverForwardingRuleOutput {
return o
}
// Specifies the ID of the Private DNS Resolver Forwarding Ruleset. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
func (o ResolverForwardingRuleOutput) DnsForwardingRulesetId() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverForwardingRule) pulumi.StringOutput { return v.DnsForwardingRulesetId }).(pulumi.StringOutput)
}
// Specifies the domain name for the Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
func (o ResolverForwardingRuleOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverForwardingRule) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
}
// Specifies the state of the Private DNS Resolver Forwarding Rule. Defaults to `true`.
func (o ResolverForwardingRuleOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ResolverForwardingRule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Metadata attached to the Private DNS Resolver Forwarding Rule.
func (o ResolverForwardingRuleOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *ResolverForwardingRule) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created.
func (o ResolverForwardingRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverForwardingRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Can be specified multiple times to define multiple target DNS servers. Each `targetDnsServers` block as defined below.
func (o ResolverForwardingRuleOutput) TargetDnsServers() ResolverForwardingRuleTargetDnsServerArrayOutput {
return o.ApplyT(func(v *ResolverForwardingRule) ResolverForwardingRuleTargetDnsServerArrayOutput {
return v.TargetDnsServers
}).(ResolverForwardingRuleTargetDnsServerArrayOutput)
}
type ResolverForwardingRuleArrayOutput struct{ *pulumi.OutputState }
func (ResolverForwardingRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverForwardingRule)(nil)).Elem()
}
func (o ResolverForwardingRuleArrayOutput) ToResolverForwardingRuleArrayOutput() ResolverForwardingRuleArrayOutput {
return o
}
func (o ResolverForwardingRuleArrayOutput) ToResolverForwardingRuleArrayOutputWithContext(ctx context.Context) ResolverForwardingRuleArrayOutput {
return o
}
func (o ResolverForwardingRuleArrayOutput) Index(i pulumi.IntInput) ResolverForwardingRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverForwardingRule {
return vs[0].([]*ResolverForwardingRule)[vs[1].(int)]
}).(ResolverForwardingRuleOutput)
}
type ResolverForwardingRuleMapOutput struct{ *pulumi.OutputState }
func (ResolverForwardingRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverForwardingRule)(nil)).Elem()
}
func (o ResolverForwardingRuleMapOutput) ToResolverForwardingRuleMapOutput() ResolverForwardingRuleMapOutput {
return o
}
func (o ResolverForwardingRuleMapOutput) ToResolverForwardingRuleMapOutputWithContext(ctx context.Context) ResolverForwardingRuleMapOutput {
return o
}
func (o ResolverForwardingRuleMapOutput) MapIndex(k pulumi.StringInput) ResolverForwardingRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverForwardingRule {
return vs[0].(map[string]*ResolverForwardingRule)[vs[1].(string)]
}).(ResolverForwardingRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResolverForwardingRuleInput)(nil)).Elem(), &ResolverForwardingRule{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverForwardingRuleArrayInput)(nil)).Elem(), ResolverForwardingRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverForwardingRuleMapInput)(nil)).Elem(), ResolverForwardingRuleMap{})
pulumi.RegisterOutputType(ResolverForwardingRuleOutput{})
pulumi.RegisterOutputType(ResolverForwardingRuleArrayOutput{})
pulumi.RegisterOutputType(ResolverForwardingRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/resolverDnsForwardingRuleset.go | sdk/go/azure/privatedns/resolverDnsForwardingRuleset.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private DNS Resolver Dns Forwarding Ruleset.
//
// ## 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/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("west europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// 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("outbounddns"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.64/28"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("Microsoft.Network.dnsResolvers"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// Name: pulumi.String("Microsoft.Network/dnsResolvers"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleResolver, err := privatedns.NewResolver(ctx, "example", &privatedns.ResolverArgs{
// Name: pulumi.String("example-resolver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// exampleResolverOutboundEndpoint, err := privatedns.NewResolverOutboundEndpoint(ctx, "example", &privatedns.ResolverOutboundEndpointArgs{
// Name: pulumi.String("example-endpoint"),
// PrivateDnsResolverId: exampleResolver.ID(),
// Location: exampleResolver.Location,
// SubnetId: exampleSubnet.ID(),
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewResolverDnsForwardingRuleset(ctx, "example", &privatedns.ResolverDnsForwardingRulesetArgs{
// Name: pulumi.String("example-ruleset"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PrivateDnsResolverOutboundEndpointIds: pulumi.StringArray{
// exampleResolverOutboundEndpoint.ID(),
// },
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2022-07-01
//
// ## Import
//
// Private DNS Resolver Dns Forwarding Ruleset can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatedns/resolverDnsForwardingRuleset:ResolverDnsForwardingRuleset example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/dnsForwardingRulesets/dnsForwardingRuleset1
// ```
type ResolverDnsForwardingRuleset struct {
pulumi.CustomResourceState
// Specifies the Azure Region where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Dns Forwarding Ruleset. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The list of IDs of the Private DNS Resolver Outbound Endpoint that is linked to the Private DNS Resolver Dns Forwarding Ruleset.
PrivateDnsResolverOutboundEndpointIds pulumi.StringArrayOutput `pulumi:"privateDnsResolverOutboundEndpointIds"`
// Specifies the name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewResolverDnsForwardingRuleset registers a new resource with the given unique name, arguments, and options.
func NewResolverDnsForwardingRuleset(ctx *pulumi.Context,
name string, args *ResolverDnsForwardingRulesetArgs, opts ...pulumi.ResourceOption) (*ResolverDnsForwardingRuleset, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrivateDnsResolverOutboundEndpointIds == nil {
return nil, errors.New("invalid value for required argument 'PrivateDnsResolverOutboundEndpointIds'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ResolverDnsForwardingRuleset
err := ctx.RegisterResource("azure:privatedns/resolverDnsForwardingRuleset:ResolverDnsForwardingRuleset", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResolverDnsForwardingRuleset gets an existing ResolverDnsForwardingRuleset resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetResolverDnsForwardingRuleset(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResolverDnsForwardingRulesetState, opts ...pulumi.ResourceOption) (*ResolverDnsForwardingRuleset, error) {
var resource ResolverDnsForwardingRuleset
err := ctx.ReadResource("azure:privatedns/resolverDnsForwardingRuleset:ResolverDnsForwardingRuleset", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ResolverDnsForwardingRuleset resources.
type resolverDnsForwardingRulesetState struct {
// Specifies the Azure Region where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Dns Forwarding Ruleset. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Name *string `pulumi:"name"`
// The list of IDs of the Private DNS Resolver Outbound Endpoint that is linked to the Private DNS Resolver Dns Forwarding Ruleset.
PrivateDnsResolverOutboundEndpointIds []string `pulumi:"privateDnsResolverOutboundEndpointIds"`
// Specifies the name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset.
Tags map[string]string `pulumi:"tags"`
}
type ResolverDnsForwardingRulesetState struct {
// Specifies the Azure Region where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver Dns Forwarding Ruleset. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Name pulumi.StringPtrInput
// The list of IDs of the Private DNS Resolver Outbound Endpoint that is linked to the Private DNS Resolver Dns Forwarding Ruleset.
PrivateDnsResolverOutboundEndpointIds pulumi.StringArrayInput
// Specifies the name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset.
Tags pulumi.StringMapInput
}
func (ResolverDnsForwardingRulesetState) ElementType() reflect.Type {
return reflect.TypeOf((*resolverDnsForwardingRulesetState)(nil)).Elem()
}
type resolverDnsForwardingRulesetArgs struct {
// Specifies the Azure Region where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Private DNS Resolver Dns Forwarding Ruleset. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Name *string `pulumi:"name"`
// The list of IDs of the Private DNS Resolver Outbound Endpoint that is linked to the Private DNS Resolver Dns Forwarding Ruleset.
PrivateDnsResolverOutboundEndpointIds []string `pulumi:"privateDnsResolverOutboundEndpointIds"`
// Specifies the name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ResolverDnsForwardingRuleset resource.
type ResolverDnsForwardingRulesetArgs struct {
// Specifies the Azure Region where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Private DNS Resolver Dns Forwarding Ruleset. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
Name pulumi.StringPtrInput
// The list of IDs of the Private DNS Resolver Outbound Endpoint that is linked to the Private DNS Resolver Dns Forwarding Ruleset.
PrivateDnsResolverOutboundEndpointIds pulumi.StringArrayInput
// Specifies the name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset.
Tags pulumi.StringMapInput
}
func (ResolverDnsForwardingRulesetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resolverDnsForwardingRulesetArgs)(nil)).Elem()
}
type ResolverDnsForwardingRulesetInput interface {
pulumi.Input
ToResolverDnsForwardingRulesetOutput() ResolverDnsForwardingRulesetOutput
ToResolverDnsForwardingRulesetOutputWithContext(ctx context.Context) ResolverDnsForwardingRulesetOutput
}
func (*ResolverDnsForwardingRuleset) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverDnsForwardingRuleset)(nil)).Elem()
}
func (i *ResolverDnsForwardingRuleset) ToResolverDnsForwardingRulesetOutput() ResolverDnsForwardingRulesetOutput {
return i.ToResolverDnsForwardingRulesetOutputWithContext(context.Background())
}
func (i *ResolverDnsForwardingRuleset) ToResolverDnsForwardingRulesetOutputWithContext(ctx context.Context) ResolverDnsForwardingRulesetOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverDnsForwardingRulesetOutput)
}
// ResolverDnsForwardingRulesetArrayInput is an input type that accepts ResolverDnsForwardingRulesetArray and ResolverDnsForwardingRulesetArrayOutput values.
// You can construct a concrete instance of `ResolverDnsForwardingRulesetArrayInput` via:
//
// ResolverDnsForwardingRulesetArray{ ResolverDnsForwardingRulesetArgs{...} }
type ResolverDnsForwardingRulesetArrayInput interface {
pulumi.Input
ToResolverDnsForwardingRulesetArrayOutput() ResolverDnsForwardingRulesetArrayOutput
ToResolverDnsForwardingRulesetArrayOutputWithContext(context.Context) ResolverDnsForwardingRulesetArrayOutput
}
type ResolverDnsForwardingRulesetArray []ResolverDnsForwardingRulesetInput
func (ResolverDnsForwardingRulesetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverDnsForwardingRuleset)(nil)).Elem()
}
func (i ResolverDnsForwardingRulesetArray) ToResolverDnsForwardingRulesetArrayOutput() ResolverDnsForwardingRulesetArrayOutput {
return i.ToResolverDnsForwardingRulesetArrayOutputWithContext(context.Background())
}
func (i ResolverDnsForwardingRulesetArray) ToResolverDnsForwardingRulesetArrayOutputWithContext(ctx context.Context) ResolverDnsForwardingRulesetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverDnsForwardingRulesetArrayOutput)
}
// ResolverDnsForwardingRulesetMapInput is an input type that accepts ResolverDnsForwardingRulesetMap and ResolverDnsForwardingRulesetMapOutput values.
// You can construct a concrete instance of `ResolverDnsForwardingRulesetMapInput` via:
//
// ResolverDnsForwardingRulesetMap{ "key": ResolverDnsForwardingRulesetArgs{...} }
type ResolverDnsForwardingRulesetMapInput interface {
pulumi.Input
ToResolverDnsForwardingRulesetMapOutput() ResolverDnsForwardingRulesetMapOutput
ToResolverDnsForwardingRulesetMapOutputWithContext(context.Context) ResolverDnsForwardingRulesetMapOutput
}
type ResolverDnsForwardingRulesetMap map[string]ResolverDnsForwardingRulesetInput
func (ResolverDnsForwardingRulesetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverDnsForwardingRuleset)(nil)).Elem()
}
func (i ResolverDnsForwardingRulesetMap) ToResolverDnsForwardingRulesetMapOutput() ResolverDnsForwardingRulesetMapOutput {
return i.ToResolverDnsForwardingRulesetMapOutputWithContext(context.Background())
}
func (i ResolverDnsForwardingRulesetMap) ToResolverDnsForwardingRulesetMapOutputWithContext(ctx context.Context) ResolverDnsForwardingRulesetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResolverDnsForwardingRulesetMapOutput)
}
type ResolverDnsForwardingRulesetOutput struct{ *pulumi.OutputState }
func (ResolverDnsForwardingRulesetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResolverDnsForwardingRuleset)(nil)).Elem()
}
func (o ResolverDnsForwardingRulesetOutput) ToResolverDnsForwardingRulesetOutput() ResolverDnsForwardingRulesetOutput {
return o
}
func (o ResolverDnsForwardingRulesetOutput) ToResolverDnsForwardingRulesetOutputWithContext(ctx context.Context) ResolverDnsForwardingRulesetOutput {
return o
}
// Specifies the Azure Region where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
func (o ResolverDnsForwardingRulesetOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverDnsForwardingRuleset) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Private DNS Resolver Dns Forwarding Ruleset. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
func (o ResolverDnsForwardingRulesetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverDnsForwardingRuleset) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The list of IDs of the Private DNS Resolver Outbound Endpoint that is linked to the Private DNS Resolver Dns Forwarding Ruleset.
func (o ResolverDnsForwardingRulesetOutput) PrivateDnsResolverOutboundEndpointIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ResolverDnsForwardingRuleset) pulumi.StringArrayOutput {
return v.PrivateDnsResolverOutboundEndpointIds
}).(pulumi.StringArrayOutput)
}
// Specifies the name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created.
func (o ResolverDnsForwardingRulesetOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ResolverDnsForwardingRuleset) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset.
func (o ResolverDnsForwardingRulesetOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ResolverDnsForwardingRuleset) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ResolverDnsForwardingRulesetArrayOutput struct{ *pulumi.OutputState }
func (ResolverDnsForwardingRulesetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResolverDnsForwardingRuleset)(nil)).Elem()
}
func (o ResolverDnsForwardingRulesetArrayOutput) ToResolverDnsForwardingRulesetArrayOutput() ResolverDnsForwardingRulesetArrayOutput {
return o
}
func (o ResolverDnsForwardingRulesetArrayOutput) ToResolverDnsForwardingRulesetArrayOutputWithContext(ctx context.Context) ResolverDnsForwardingRulesetArrayOutput {
return o
}
func (o ResolverDnsForwardingRulesetArrayOutput) Index(i pulumi.IntInput) ResolverDnsForwardingRulesetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverDnsForwardingRuleset {
return vs[0].([]*ResolverDnsForwardingRuleset)[vs[1].(int)]
}).(ResolverDnsForwardingRulesetOutput)
}
type ResolverDnsForwardingRulesetMapOutput struct{ *pulumi.OutputState }
func (ResolverDnsForwardingRulesetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResolverDnsForwardingRuleset)(nil)).Elem()
}
func (o ResolverDnsForwardingRulesetMapOutput) ToResolverDnsForwardingRulesetMapOutput() ResolverDnsForwardingRulesetMapOutput {
return o
}
func (o ResolverDnsForwardingRulesetMapOutput) ToResolverDnsForwardingRulesetMapOutputWithContext(ctx context.Context) ResolverDnsForwardingRulesetMapOutput {
return o
}
func (o ResolverDnsForwardingRulesetMapOutput) MapIndex(k pulumi.StringInput) ResolverDnsForwardingRulesetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverDnsForwardingRuleset {
return vs[0].(map[string]*ResolverDnsForwardingRuleset)[vs[1].(string)]
}).(ResolverDnsForwardingRulesetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResolverDnsForwardingRulesetInput)(nil)).Elem(), &ResolverDnsForwardingRuleset{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverDnsForwardingRulesetArrayInput)(nil)).Elem(), ResolverDnsForwardingRulesetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResolverDnsForwardingRulesetMapInput)(nil)).Elem(), ResolverDnsForwardingRulesetMap{})
pulumi.RegisterOutputType(ResolverDnsForwardingRulesetOutput{})
pulumi.RegisterOutputType(ResolverDnsForwardingRulesetArrayOutput{})
pulumi.RegisterOutputType(ResolverDnsForwardingRulesetMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getPtrRecord.go | sdk/go/azure/privatedns/getPtrRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.NewPTRRecord(ctx, "example", &privatedns.PTRRecordArgs{
// Name: pulumi.String("test"),
// ZoneName: pulumi.String("test-zone"),
// ResourceGroupName: pulumi.String("test-rg"),
// })
// if err != nil {
// return err
// }
// ctx.Export("privateDnsPtrRecordId", exampleAzurermPrivateDnsPtrRecord.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func GetPtrRecord(ctx *pulumi.Context, args *GetPtrRecordArgs, opts ...pulumi.InvokeOption) (*GetPtrRecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetPtrRecordResult
err := ctx.Invoke("azure:privatedns/getPtrRecord:getPtrRecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPtrRecord.
type GetPtrRecordArgs struct {
// The name of the Private DNS PTR Record.
Name string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getPtrRecord.
type GetPtrRecordResult struct {
// The FQDN of the Private DNS PTR Record.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// List of Fully Qualified Domain Names.
Records []string `pulumi:"records"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func GetPtrRecordOutput(ctx *pulumi.Context, args GetPtrRecordOutputArgs, opts ...pulumi.InvokeOption) GetPtrRecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetPtrRecordResultOutput, error) {
args := v.(GetPtrRecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getPtrRecord:getPtrRecord", args, GetPtrRecordResultOutput{}, options).(GetPtrRecordResultOutput), nil
}).(GetPtrRecordResultOutput)
}
// A collection of arguments for invoking getPtrRecord.
type GetPtrRecordOutputArgs struct {
// The name of the Private DNS PTR Record.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (GetPtrRecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetPtrRecordArgs)(nil)).Elem()
}
// A collection of values returned by getPtrRecord.
type GetPtrRecordResultOutput struct{ *pulumi.OutputState }
func (GetPtrRecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetPtrRecordResult)(nil)).Elem()
}
func (o GetPtrRecordResultOutput) ToGetPtrRecordResultOutput() GetPtrRecordResultOutput {
return o
}
func (o GetPtrRecordResultOutput) ToGetPtrRecordResultOutputWithContext(ctx context.Context) GetPtrRecordResultOutput {
return o
}
// The FQDN of the Private DNS PTR Record.
func (o GetPtrRecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v GetPtrRecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetPtrRecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetPtrRecordResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetPtrRecordResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetPtrRecordResult) string { return v.Name }).(pulumi.StringOutput)
}
// List of Fully Qualified Domain Names.
func (o GetPtrRecordResultOutput) Records() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetPtrRecordResult) []string { return v.Records }).(pulumi.StringArrayOutput)
}
func (o GetPtrRecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetPtrRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o GetPtrRecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetPtrRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o GetPtrRecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v GetPtrRecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o GetPtrRecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v GetPtrRecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetPtrRecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getTxtRecord.go | sdk/go/azure/privatedns/getTxtRecord.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.NewTxtRecord(ctx, "example", &privatedns.TxtRecordArgs{
// Name: pulumi.String("test"),
// ZoneName: pulumi.String("test-zone"),
// ResourceGroupName: pulumi.String("test-rg"),
// })
// if err != nil {
// return err
// }
// ctx.Export("privateDnsTxtRecordId", exampleAzurermPrivateDnsTxtRecord.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Network` - 2024-06-01
func LookupTxtRecord(ctx *pulumi.Context, args *LookupTxtRecordArgs, opts ...pulumi.InvokeOption) (*LookupTxtRecordResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTxtRecordResult
err := ctx.Invoke("azure:privatedns/getTxtRecord:getTxtRecord", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTxtRecord.
type LookupTxtRecordArgs struct {
// The name of the Private DNS TXT Record.
Name string `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName string `pulumi:"zoneName"`
}
// A collection of values returned by getTxtRecord.
type LookupTxtRecordResult struct {
// The FQDN of the Private DNS TXT Record.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// A list of values that make up the txt record. Each `record` block supports fields documented below.
Records []GetTxtRecordRecord `pulumi:"records"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The Time To Live (TTL) of the Private DNS record in seconds.
Ttl int `pulumi:"ttl"`
ZoneName string `pulumi:"zoneName"`
}
func LookupTxtRecordOutput(ctx *pulumi.Context, args LookupTxtRecordOutputArgs, opts ...pulumi.InvokeOption) LookupTxtRecordResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupTxtRecordResultOutput, error) {
args := v.(LookupTxtRecordArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getTxtRecord:getTxtRecord", args, LookupTxtRecordResultOutput{}, options).(LookupTxtRecordResultOutput), nil
}).(LookupTxtRecordResultOutput)
}
// A collection of arguments for invoking getTxtRecord.
type LookupTxtRecordOutputArgs struct {
// The name of the Private DNS TXT Record.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the resource group where the Private DNS Zone (parent resource) exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// Specifies the Private DNS Zone where the resource exists.
ZoneName pulumi.StringInput `pulumi:"zoneName"`
}
func (LookupTxtRecordOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTxtRecordArgs)(nil)).Elem()
}
// A collection of values returned by getTxtRecord.
type LookupTxtRecordResultOutput struct{ *pulumi.OutputState }
func (LookupTxtRecordResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTxtRecordResult)(nil)).Elem()
}
func (o LookupTxtRecordResultOutput) ToLookupTxtRecordResultOutput() LookupTxtRecordResultOutput {
return o
}
func (o LookupTxtRecordResultOutput) ToLookupTxtRecordResultOutputWithContext(ctx context.Context) LookupTxtRecordResultOutput {
return o
}
// The FQDN of the Private DNS TXT Record.
func (o LookupTxtRecordResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v LookupTxtRecordResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupTxtRecordResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTxtRecordResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupTxtRecordResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTxtRecordResult) string { return v.Name }).(pulumi.StringOutput)
}
// A list of values that make up the txt record. Each `record` block supports fields documented below.
func (o LookupTxtRecordResultOutput) Records() GetTxtRecordRecordArrayOutput {
return o.ApplyT(func(v LookupTxtRecordResult) []GetTxtRecordRecord { return v.Records }).(GetTxtRecordRecordArrayOutput)
}
func (o LookupTxtRecordResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupTxtRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupTxtRecordResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupTxtRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Time To Live (TTL) of the Private DNS record in seconds.
func (o LookupTxtRecordResultOutput) Ttl() pulumi.IntOutput {
return o.ApplyT(func(v LookupTxtRecordResult) int { return v.Ttl }).(pulumi.IntOutput)
}
func (o LookupTxtRecordResultOutput) ZoneName() pulumi.StringOutput {
return o.ApplyT(func(v LookupTxtRecordResult) string { return v.ZoneName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTxtRecordResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/privatedns/getResolverForwardingRule.go | sdk/go/azure/privatedns/getResolverForwardingRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package privatedns
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets information about an existing Private DNS Resolver Forwarding Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := privatedns.LookupResolverForwardingRule(ctx, &privatedns.LookupResolverForwardingRuleArgs{
// Name: "example-rule",
// DnsForwardingRulesetId: "example-forwarding-rulset-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.Network` - 2022-07-01
func LookupResolverForwardingRule(ctx *pulumi.Context, args *LookupResolverForwardingRuleArgs, opts ...pulumi.InvokeOption) (*LookupResolverForwardingRuleResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupResolverForwardingRuleResult
err := ctx.Invoke("azure:privatedns/getResolverForwardingRule:getResolverForwardingRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getResolverForwardingRule.
type LookupResolverForwardingRuleArgs struct {
// ID of the Private DNS Resolver Forwarding Ruleset.
DnsForwardingRulesetId string `pulumi:"dnsForwardingRulesetId"`
// Name of the Private DNS Resolver Forwarding Rule.
Name string `pulumi:"name"`
}
// A collection of values returned by getResolverForwardingRule.
type LookupResolverForwardingRuleResult struct {
DnsForwardingRulesetId string `pulumi:"dnsForwardingRulesetId"`
// The domain name for the Private DNS Resolver Forwarding Rule.
DomainName string `pulumi:"domainName"`
// Is the Private DNS Resolver Forwarding Rule enabled?
Enabled bool `pulumi:"enabled"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The metadata attached to the Private DNS Resolver Forwarding Rule.
Metadata map[string]string `pulumi:"metadata"`
Name string `pulumi:"name"`
// A list of `targetDnsServers` block as defined below.
TargetDnsServers []GetResolverForwardingRuleTargetDnsServer `pulumi:"targetDnsServers"`
}
func LookupResolverForwardingRuleOutput(ctx *pulumi.Context, args LookupResolverForwardingRuleOutputArgs, opts ...pulumi.InvokeOption) LookupResolverForwardingRuleResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupResolverForwardingRuleResultOutput, error) {
args := v.(LookupResolverForwardingRuleArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:privatedns/getResolverForwardingRule:getResolverForwardingRule", args, LookupResolverForwardingRuleResultOutput{}, options).(LookupResolverForwardingRuleResultOutput), nil
}).(LookupResolverForwardingRuleResultOutput)
}
// A collection of arguments for invoking getResolverForwardingRule.
type LookupResolverForwardingRuleOutputArgs struct {
// ID of the Private DNS Resolver Forwarding Ruleset.
DnsForwardingRulesetId pulumi.StringInput `pulumi:"dnsForwardingRulesetId"`
// Name of the Private DNS Resolver Forwarding Rule.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupResolverForwardingRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverForwardingRuleArgs)(nil)).Elem()
}
// A collection of values returned by getResolverForwardingRule.
type LookupResolverForwardingRuleResultOutput struct{ *pulumi.OutputState }
func (LookupResolverForwardingRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResolverForwardingRuleResult)(nil)).Elem()
}
func (o LookupResolverForwardingRuleResultOutput) ToLookupResolverForwardingRuleResultOutput() LookupResolverForwardingRuleResultOutput {
return o
}
func (o LookupResolverForwardingRuleResultOutput) ToLookupResolverForwardingRuleResultOutputWithContext(ctx context.Context) LookupResolverForwardingRuleResultOutput {
return o
}
func (o LookupResolverForwardingRuleResultOutput) DnsForwardingRulesetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverForwardingRuleResult) string { return v.DnsForwardingRulesetId }).(pulumi.StringOutput)
}
// The domain name for the Private DNS Resolver Forwarding Rule.
func (o LookupResolverForwardingRuleResultOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverForwardingRuleResult) string { return v.DomainName }).(pulumi.StringOutput)
}
// Is the Private DNS Resolver Forwarding Rule enabled?
func (o LookupResolverForwardingRuleResultOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupResolverForwardingRuleResult) bool { return v.Enabled }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupResolverForwardingRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverForwardingRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
// The metadata attached to the Private DNS Resolver Forwarding Rule.
func (o LookupResolverForwardingRuleResultOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupResolverForwardingRuleResult) map[string]string { return v.Metadata }).(pulumi.StringMapOutput)
}
func (o LookupResolverForwardingRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupResolverForwardingRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
// A list of `targetDnsServers` block as defined below.
func (o LookupResolverForwardingRuleResultOutput) TargetDnsServers() GetResolverForwardingRuleTargetDnsServerArrayOutput {
return o.ApplyT(func(v LookupResolverForwardingRuleResult) []GetResolverForwardingRuleTargetDnsServer {
return v.TargetDnsServers
}).(GetResolverForwardingRuleTargetDnsServerArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupResolverForwardingRuleResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arcmachine/init.go | sdk/go/azure/arcmachine/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 arcmachine
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:arcmachine/arcMachine:ArcMachine":
r = &ArcMachine{}
case "azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment":
r = &AutomanageConfigurationAssignment{}
case "azure:arcmachine/extension:Extension":
r = &Extension{}
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",
"arcmachine/arcMachine",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"arcmachine/automanageConfigurationAssignment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"arcmachine/extension",
&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/arcmachine/pulumiTypes.go | sdk/go/azure/arcmachine/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 arcmachine
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 ArcMachineIdentity struct {
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity assigned to this Arc Machine. At this time the only possible value is `SystemAssigned`.
Type string `pulumi:"type"`
}
// ArcMachineIdentityInput is an input type that accepts ArcMachineIdentityArgs and ArcMachineIdentityOutput values.
// You can construct a concrete instance of `ArcMachineIdentityInput` via:
//
// ArcMachineIdentityArgs{...}
type ArcMachineIdentityInput interface {
pulumi.Input
ToArcMachineIdentityOutput() ArcMachineIdentityOutput
ToArcMachineIdentityOutputWithContext(context.Context) ArcMachineIdentityOutput
}
type ArcMachineIdentityArgs struct {
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity assigned to this Arc Machine. At this time the only possible value is `SystemAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (ArcMachineIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ArcMachineIdentity)(nil)).Elem()
}
func (i ArcMachineIdentityArgs) ToArcMachineIdentityOutput() ArcMachineIdentityOutput {
return i.ToArcMachineIdentityOutputWithContext(context.Background())
}
func (i ArcMachineIdentityArgs) ToArcMachineIdentityOutputWithContext(ctx context.Context) ArcMachineIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ArcMachineIdentityOutput)
}
func (i ArcMachineIdentityArgs) ToArcMachineIdentityPtrOutput() ArcMachineIdentityPtrOutput {
return i.ToArcMachineIdentityPtrOutputWithContext(context.Background())
}
func (i ArcMachineIdentityArgs) ToArcMachineIdentityPtrOutputWithContext(ctx context.Context) ArcMachineIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ArcMachineIdentityOutput).ToArcMachineIdentityPtrOutputWithContext(ctx)
}
// ArcMachineIdentityPtrInput is an input type that accepts ArcMachineIdentityArgs, ArcMachineIdentityPtr and ArcMachineIdentityPtrOutput values.
// You can construct a concrete instance of `ArcMachineIdentityPtrInput` via:
//
// ArcMachineIdentityArgs{...}
//
// or:
//
// nil
type ArcMachineIdentityPtrInput interface {
pulumi.Input
ToArcMachineIdentityPtrOutput() ArcMachineIdentityPtrOutput
ToArcMachineIdentityPtrOutputWithContext(context.Context) ArcMachineIdentityPtrOutput
}
type arcMachineIdentityPtrType ArcMachineIdentityArgs
func ArcMachineIdentityPtr(v *ArcMachineIdentityArgs) ArcMachineIdentityPtrInput {
return (*arcMachineIdentityPtrType)(v)
}
func (*arcMachineIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ArcMachineIdentity)(nil)).Elem()
}
func (i *arcMachineIdentityPtrType) ToArcMachineIdentityPtrOutput() ArcMachineIdentityPtrOutput {
return i.ToArcMachineIdentityPtrOutputWithContext(context.Background())
}
func (i *arcMachineIdentityPtrType) ToArcMachineIdentityPtrOutputWithContext(ctx context.Context) ArcMachineIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ArcMachineIdentityPtrOutput)
}
type ArcMachineIdentityOutput struct{ *pulumi.OutputState }
func (ArcMachineIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ArcMachineIdentity)(nil)).Elem()
}
func (o ArcMachineIdentityOutput) ToArcMachineIdentityOutput() ArcMachineIdentityOutput {
return o
}
func (o ArcMachineIdentityOutput) ToArcMachineIdentityOutputWithContext(ctx context.Context) ArcMachineIdentityOutput {
return o
}
func (o ArcMachineIdentityOutput) ToArcMachineIdentityPtrOutput() ArcMachineIdentityPtrOutput {
return o.ToArcMachineIdentityPtrOutputWithContext(context.Background())
}
func (o ArcMachineIdentityOutput) ToArcMachineIdentityPtrOutputWithContext(ctx context.Context) ArcMachineIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ArcMachineIdentity) *ArcMachineIdentity {
return &v
}).(ArcMachineIdentityPtrOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ArcMachineIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ArcMachineIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ArcMachineIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ArcMachineIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity assigned to this Arc Machine. At this time the only possible value is `SystemAssigned`.
func (o ArcMachineIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ArcMachineIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ArcMachineIdentityPtrOutput struct{ *pulumi.OutputState }
func (ArcMachineIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ArcMachineIdentity)(nil)).Elem()
}
func (o ArcMachineIdentityPtrOutput) ToArcMachineIdentityPtrOutput() ArcMachineIdentityPtrOutput {
return o
}
func (o ArcMachineIdentityPtrOutput) ToArcMachineIdentityPtrOutputWithContext(ctx context.Context) ArcMachineIdentityPtrOutput {
return o
}
func (o ArcMachineIdentityPtrOutput) Elem() ArcMachineIdentityOutput {
return o.ApplyT(func(v *ArcMachineIdentity) ArcMachineIdentity {
if v != nil {
return *v
}
var ret ArcMachineIdentity
return ret
}).(ArcMachineIdentityOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ArcMachineIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ArcMachineIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ArcMachineIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ArcMachineIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity assigned to this Arc Machine. At this time the only possible value is `SystemAssigned`.
func (o ArcMachineIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ArcMachineIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type GetAgent struct {
// A `extensionsAllowList` block as defined below.
ExtensionsAllowLists []GetAgentExtensionsAllowList `pulumi:"extensionsAllowLists"`
// A `extensionsBlockList` block as defined below.
ExtensionsBlockLists []GetAgentExtensionsBlockList `pulumi:"extensionsBlockLists"`
// Specifies whether the extension service is enabled or disabled.
ExtensionsEnabled bool `pulumi:"extensionsEnabled"`
// Specified whether the guest configuration service is enabled or disabled.
GuestConfigurationEnabled bool `pulumi:"guestConfigurationEnabled"`
// Specifies the list of ports that the agent will be able to listen on.
IncomingConnectionsPorts []string `pulumi:"incomingConnectionsPorts"`
// List of service names which should not use the specified proxy server.
ProxyBypasses []string `pulumi:"proxyBypasses"`
// Specifies the URL of the proxy to be used.
ProxyUrl string `pulumi:"proxyUrl"`
}
// GetAgentInput is an input type that accepts GetAgentArgs and GetAgentOutput values.
// You can construct a concrete instance of `GetAgentInput` via:
//
// GetAgentArgs{...}
type GetAgentInput interface {
pulumi.Input
ToGetAgentOutput() GetAgentOutput
ToGetAgentOutputWithContext(context.Context) GetAgentOutput
}
type GetAgentArgs struct {
// A `extensionsAllowList` block as defined below.
ExtensionsAllowLists GetAgentExtensionsAllowListArrayInput `pulumi:"extensionsAllowLists"`
// A `extensionsBlockList` block as defined below.
ExtensionsBlockLists GetAgentExtensionsBlockListArrayInput `pulumi:"extensionsBlockLists"`
// Specifies whether the extension service is enabled or disabled.
ExtensionsEnabled pulumi.BoolInput `pulumi:"extensionsEnabled"`
// Specified whether the guest configuration service is enabled or disabled.
GuestConfigurationEnabled pulumi.BoolInput `pulumi:"guestConfigurationEnabled"`
// Specifies the list of ports that the agent will be able to listen on.
IncomingConnectionsPorts pulumi.StringArrayInput `pulumi:"incomingConnectionsPorts"`
// List of service names which should not use the specified proxy server.
ProxyBypasses pulumi.StringArrayInput `pulumi:"proxyBypasses"`
// Specifies the URL of the proxy to be used.
ProxyUrl pulumi.StringInput `pulumi:"proxyUrl"`
}
func (GetAgentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAgent)(nil)).Elem()
}
func (i GetAgentArgs) ToGetAgentOutput() GetAgentOutput {
return i.ToGetAgentOutputWithContext(context.Background())
}
func (i GetAgentArgs) ToGetAgentOutputWithContext(ctx context.Context) GetAgentOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAgentOutput)
}
// GetAgentArrayInput is an input type that accepts GetAgentArray and GetAgentArrayOutput values.
// You can construct a concrete instance of `GetAgentArrayInput` via:
//
// GetAgentArray{ GetAgentArgs{...} }
type GetAgentArrayInput interface {
pulumi.Input
ToGetAgentArrayOutput() GetAgentArrayOutput
ToGetAgentArrayOutputWithContext(context.Context) GetAgentArrayOutput
}
type GetAgentArray []GetAgentInput
func (GetAgentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAgent)(nil)).Elem()
}
func (i GetAgentArray) ToGetAgentArrayOutput() GetAgentArrayOutput {
return i.ToGetAgentArrayOutputWithContext(context.Background())
}
func (i GetAgentArray) ToGetAgentArrayOutputWithContext(ctx context.Context) GetAgentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAgentArrayOutput)
}
type GetAgentOutput struct{ *pulumi.OutputState }
func (GetAgentOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAgent)(nil)).Elem()
}
func (o GetAgentOutput) ToGetAgentOutput() GetAgentOutput {
return o
}
func (o GetAgentOutput) ToGetAgentOutputWithContext(ctx context.Context) GetAgentOutput {
return o
}
// A `extensionsAllowList` block as defined below.
func (o GetAgentOutput) ExtensionsAllowLists() GetAgentExtensionsAllowListArrayOutput {
return o.ApplyT(func(v GetAgent) []GetAgentExtensionsAllowList { return v.ExtensionsAllowLists }).(GetAgentExtensionsAllowListArrayOutput)
}
// A `extensionsBlockList` block as defined below.
func (o GetAgentOutput) ExtensionsBlockLists() GetAgentExtensionsBlockListArrayOutput {
return o.ApplyT(func(v GetAgent) []GetAgentExtensionsBlockList { return v.ExtensionsBlockLists }).(GetAgentExtensionsBlockListArrayOutput)
}
// Specifies whether the extension service is enabled or disabled.
func (o GetAgentOutput) ExtensionsEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v GetAgent) bool { return v.ExtensionsEnabled }).(pulumi.BoolOutput)
}
// Specified whether the guest configuration service is enabled or disabled.
func (o GetAgentOutput) GuestConfigurationEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v GetAgent) bool { return v.GuestConfigurationEnabled }).(pulumi.BoolOutput)
}
// Specifies the list of ports that the agent will be able to listen on.
func (o GetAgentOutput) IncomingConnectionsPorts() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetAgent) []string { return v.IncomingConnectionsPorts }).(pulumi.StringArrayOutput)
}
// List of service names which should not use the specified proxy server.
func (o GetAgentOutput) ProxyBypasses() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetAgent) []string { return v.ProxyBypasses }).(pulumi.StringArrayOutput)
}
// Specifies the URL of the proxy to be used.
func (o GetAgentOutput) ProxyUrl() pulumi.StringOutput {
return o.ApplyT(func(v GetAgent) string { return v.ProxyUrl }).(pulumi.StringOutput)
}
type GetAgentArrayOutput struct{ *pulumi.OutputState }
func (GetAgentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAgent)(nil)).Elem()
}
func (o GetAgentArrayOutput) ToGetAgentArrayOutput() GetAgentArrayOutput {
return o
}
func (o GetAgentArrayOutput) ToGetAgentArrayOutputWithContext(ctx context.Context) GetAgentArrayOutput {
return o
}
func (o GetAgentArrayOutput) Index(i pulumi.IntInput) GetAgentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetAgent {
return vs[0].([]GetAgent)[vs[1].(int)]
}).(GetAgentOutput)
}
type GetAgentExtensionsAllowList struct {
// Publisher of the extension.
Publisher string `pulumi:"publisher"`
// The identity type.
Type string `pulumi:"type"`
}
// GetAgentExtensionsAllowListInput is an input type that accepts GetAgentExtensionsAllowListArgs and GetAgentExtensionsAllowListOutput values.
// You can construct a concrete instance of `GetAgentExtensionsAllowListInput` via:
//
// GetAgentExtensionsAllowListArgs{...}
type GetAgentExtensionsAllowListInput interface {
pulumi.Input
ToGetAgentExtensionsAllowListOutput() GetAgentExtensionsAllowListOutput
ToGetAgentExtensionsAllowListOutputWithContext(context.Context) GetAgentExtensionsAllowListOutput
}
type GetAgentExtensionsAllowListArgs struct {
// Publisher of the extension.
Publisher pulumi.StringInput `pulumi:"publisher"`
// The identity type.
Type pulumi.StringInput `pulumi:"type"`
}
func (GetAgentExtensionsAllowListArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAgentExtensionsAllowList)(nil)).Elem()
}
func (i GetAgentExtensionsAllowListArgs) ToGetAgentExtensionsAllowListOutput() GetAgentExtensionsAllowListOutput {
return i.ToGetAgentExtensionsAllowListOutputWithContext(context.Background())
}
func (i GetAgentExtensionsAllowListArgs) ToGetAgentExtensionsAllowListOutputWithContext(ctx context.Context) GetAgentExtensionsAllowListOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAgentExtensionsAllowListOutput)
}
// GetAgentExtensionsAllowListArrayInput is an input type that accepts GetAgentExtensionsAllowListArray and GetAgentExtensionsAllowListArrayOutput values.
// You can construct a concrete instance of `GetAgentExtensionsAllowListArrayInput` via:
//
// GetAgentExtensionsAllowListArray{ GetAgentExtensionsAllowListArgs{...} }
type GetAgentExtensionsAllowListArrayInput interface {
pulumi.Input
ToGetAgentExtensionsAllowListArrayOutput() GetAgentExtensionsAllowListArrayOutput
ToGetAgentExtensionsAllowListArrayOutputWithContext(context.Context) GetAgentExtensionsAllowListArrayOutput
}
type GetAgentExtensionsAllowListArray []GetAgentExtensionsAllowListInput
func (GetAgentExtensionsAllowListArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAgentExtensionsAllowList)(nil)).Elem()
}
func (i GetAgentExtensionsAllowListArray) ToGetAgentExtensionsAllowListArrayOutput() GetAgentExtensionsAllowListArrayOutput {
return i.ToGetAgentExtensionsAllowListArrayOutputWithContext(context.Background())
}
func (i GetAgentExtensionsAllowListArray) ToGetAgentExtensionsAllowListArrayOutputWithContext(ctx context.Context) GetAgentExtensionsAllowListArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAgentExtensionsAllowListArrayOutput)
}
type GetAgentExtensionsAllowListOutput struct{ *pulumi.OutputState }
func (GetAgentExtensionsAllowListOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAgentExtensionsAllowList)(nil)).Elem()
}
func (o GetAgentExtensionsAllowListOutput) ToGetAgentExtensionsAllowListOutput() GetAgentExtensionsAllowListOutput {
return o
}
func (o GetAgentExtensionsAllowListOutput) ToGetAgentExtensionsAllowListOutputWithContext(ctx context.Context) GetAgentExtensionsAllowListOutput {
return o
}
// Publisher of the extension.
func (o GetAgentExtensionsAllowListOutput) Publisher() pulumi.StringOutput {
return o.ApplyT(func(v GetAgentExtensionsAllowList) string { return v.Publisher }).(pulumi.StringOutput)
}
// The identity type.
func (o GetAgentExtensionsAllowListOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetAgentExtensionsAllowList) string { return v.Type }).(pulumi.StringOutput)
}
type GetAgentExtensionsAllowListArrayOutput struct{ *pulumi.OutputState }
func (GetAgentExtensionsAllowListArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAgentExtensionsAllowList)(nil)).Elem()
}
func (o GetAgentExtensionsAllowListArrayOutput) ToGetAgentExtensionsAllowListArrayOutput() GetAgentExtensionsAllowListArrayOutput {
return o
}
func (o GetAgentExtensionsAllowListArrayOutput) ToGetAgentExtensionsAllowListArrayOutputWithContext(ctx context.Context) GetAgentExtensionsAllowListArrayOutput {
return o
}
func (o GetAgentExtensionsAllowListArrayOutput) Index(i pulumi.IntInput) GetAgentExtensionsAllowListOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetAgentExtensionsAllowList {
return vs[0].([]GetAgentExtensionsAllowList)[vs[1].(int)]
}).(GetAgentExtensionsAllowListOutput)
}
type GetAgentExtensionsBlockList struct {
// Publisher of the extension.
Publisher string `pulumi:"publisher"`
// The identity type.
Type string `pulumi:"type"`
}
// GetAgentExtensionsBlockListInput is an input type that accepts GetAgentExtensionsBlockListArgs and GetAgentExtensionsBlockListOutput values.
// You can construct a concrete instance of `GetAgentExtensionsBlockListInput` via:
//
// GetAgentExtensionsBlockListArgs{...}
type GetAgentExtensionsBlockListInput interface {
pulumi.Input
ToGetAgentExtensionsBlockListOutput() GetAgentExtensionsBlockListOutput
ToGetAgentExtensionsBlockListOutputWithContext(context.Context) GetAgentExtensionsBlockListOutput
}
type GetAgentExtensionsBlockListArgs struct {
// Publisher of the extension.
Publisher pulumi.StringInput `pulumi:"publisher"`
// The identity type.
Type pulumi.StringInput `pulumi:"type"`
}
func (GetAgentExtensionsBlockListArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAgentExtensionsBlockList)(nil)).Elem()
}
func (i GetAgentExtensionsBlockListArgs) ToGetAgentExtensionsBlockListOutput() GetAgentExtensionsBlockListOutput {
return i.ToGetAgentExtensionsBlockListOutputWithContext(context.Background())
}
func (i GetAgentExtensionsBlockListArgs) ToGetAgentExtensionsBlockListOutputWithContext(ctx context.Context) GetAgentExtensionsBlockListOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAgentExtensionsBlockListOutput)
}
// GetAgentExtensionsBlockListArrayInput is an input type that accepts GetAgentExtensionsBlockListArray and GetAgentExtensionsBlockListArrayOutput values.
// You can construct a concrete instance of `GetAgentExtensionsBlockListArrayInput` via:
//
// GetAgentExtensionsBlockListArray{ GetAgentExtensionsBlockListArgs{...} }
type GetAgentExtensionsBlockListArrayInput interface {
pulumi.Input
ToGetAgentExtensionsBlockListArrayOutput() GetAgentExtensionsBlockListArrayOutput
ToGetAgentExtensionsBlockListArrayOutputWithContext(context.Context) GetAgentExtensionsBlockListArrayOutput
}
type GetAgentExtensionsBlockListArray []GetAgentExtensionsBlockListInput
func (GetAgentExtensionsBlockListArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAgentExtensionsBlockList)(nil)).Elem()
}
func (i GetAgentExtensionsBlockListArray) ToGetAgentExtensionsBlockListArrayOutput() GetAgentExtensionsBlockListArrayOutput {
return i.ToGetAgentExtensionsBlockListArrayOutputWithContext(context.Background())
}
func (i GetAgentExtensionsBlockListArray) ToGetAgentExtensionsBlockListArrayOutputWithContext(ctx context.Context) GetAgentExtensionsBlockListArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetAgentExtensionsBlockListArrayOutput)
}
type GetAgentExtensionsBlockListOutput struct{ *pulumi.OutputState }
func (GetAgentExtensionsBlockListOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAgentExtensionsBlockList)(nil)).Elem()
}
func (o GetAgentExtensionsBlockListOutput) ToGetAgentExtensionsBlockListOutput() GetAgentExtensionsBlockListOutput {
return o
}
func (o GetAgentExtensionsBlockListOutput) ToGetAgentExtensionsBlockListOutputWithContext(ctx context.Context) GetAgentExtensionsBlockListOutput {
return o
}
// Publisher of the extension.
func (o GetAgentExtensionsBlockListOutput) Publisher() pulumi.StringOutput {
return o.ApplyT(func(v GetAgentExtensionsBlockList) string { return v.Publisher }).(pulumi.StringOutput)
}
// The identity type.
func (o GetAgentExtensionsBlockListOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetAgentExtensionsBlockList) string { return v.Type }).(pulumi.StringOutput)
}
type GetAgentExtensionsBlockListArrayOutput struct{ *pulumi.OutputState }
func (GetAgentExtensionsBlockListArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetAgentExtensionsBlockList)(nil)).Elem()
}
func (o GetAgentExtensionsBlockListArrayOutput) ToGetAgentExtensionsBlockListArrayOutput() GetAgentExtensionsBlockListArrayOutput {
return o
}
func (o GetAgentExtensionsBlockListArrayOutput) ToGetAgentExtensionsBlockListArrayOutputWithContext(ctx context.Context) GetAgentExtensionsBlockListArrayOutput {
return o
}
func (o GetAgentExtensionsBlockListArrayOutput) Index(i pulumi.IntInput) GetAgentExtensionsBlockListOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetAgentExtensionsBlockList {
return vs[0].([]GetAgentExtensionsBlockList)[vs[1].(int)]
}).(GetAgentExtensionsBlockListOutput)
}
type GetCloudMetadata struct {
// Specifies the cloud provider. For example `Azure`, `AWS` and `GCP`.
Provider string `pulumi:"provider"`
}
// GetCloudMetadataInput is an input type that accepts GetCloudMetadataArgs and GetCloudMetadataOutput values.
// You can construct a concrete instance of `GetCloudMetadataInput` via:
//
// GetCloudMetadataArgs{...}
type GetCloudMetadataInput interface {
pulumi.Input
ToGetCloudMetadataOutput() GetCloudMetadataOutput
ToGetCloudMetadataOutputWithContext(context.Context) GetCloudMetadataOutput
}
type GetCloudMetadataArgs struct {
// Specifies the cloud provider. For example `Azure`, `AWS` and `GCP`.
Provider pulumi.StringInput `pulumi:"provider"`
}
func (GetCloudMetadataArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetCloudMetadata)(nil)).Elem()
}
func (i GetCloudMetadataArgs) ToGetCloudMetadataOutput() GetCloudMetadataOutput {
return i.ToGetCloudMetadataOutputWithContext(context.Background())
}
func (i GetCloudMetadataArgs) ToGetCloudMetadataOutputWithContext(ctx context.Context) GetCloudMetadataOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetCloudMetadataOutput)
}
// GetCloudMetadataArrayInput is an input type that accepts GetCloudMetadataArray and GetCloudMetadataArrayOutput values.
// You can construct a concrete instance of `GetCloudMetadataArrayInput` via:
//
// GetCloudMetadataArray{ GetCloudMetadataArgs{...} }
type GetCloudMetadataArrayInput interface {
pulumi.Input
ToGetCloudMetadataArrayOutput() GetCloudMetadataArrayOutput
ToGetCloudMetadataArrayOutputWithContext(context.Context) GetCloudMetadataArrayOutput
}
type GetCloudMetadataArray []GetCloudMetadataInput
func (GetCloudMetadataArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetCloudMetadata)(nil)).Elem()
}
func (i GetCloudMetadataArray) ToGetCloudMetadataArrayOutput() GetCloudMetadataArrayOutput {
return i.ToGetCloudMetadataArrayOutputWithContext(context.Background())
}
func (i GetCloudMetadataArray) ToGetCloudMetadataArrayOutputWithContext(ctx context.Context) GetCloudMetadataArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetCloudMetadataArrayOutput)
}
type GetCloudMetadataOutput struct{ *pulumi.OutputState }
func (GetCloudMetadataOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetCloudMetadata)(nil)).Elem()
}
func (o GetCloudMetadataOutput) ToGetCloudMetadataOutput() GetCloudMetadataOutput {
return o
}
func (o GetCloudMetadataOutput) ToGetCloudMetadataOutputWithContext(ctx context.Context) GetCloudMetadataOutput {
return o
}
// Specifies the cloud provider. For example `Azure`, `AWS` and `GCP`.
func (o GetCloudMetadataOutput) Provider() pulumi.StringOutput {
return o.ApplyT(func(v GetCloudMetadata) string { return v.Provider }).(pulumi.StringOutput)
}
type GetCloudMetadataArrayOutput struct{ *pulumi.OutputState }
func (GetCloudMetadataArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetCloudMetadata)(nil)).Elem()
}
func (o GetCloudMetadataArrayOutput) ToGetCloudMetadataArrayOutput() GetCloudMetadataArrayOutput {
return o
}
func (o GetCloudMetadataArrayOutput) ToGetCloudMetadataArrayOutputWithContext(ctx context.Context) GetCloudMetadataArrayOutput {
return o
}
func (o GetCloudMetadataArrayOutput) Index(i pulumi.IntInput) GetCloudMetadataOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetCloudMetadata {
return vs[0].([]GetCloudMetadata)[vs[1].(int)]
}).(GetCloudMetadataOutput)
}
type GetIdentity struct {
// The principal ID of resource identity.
PrincipalId string `pulumi:"principalId"`
// The tenant ID of resource.
TenantId string `pulumi:"tenantId"`
// The identity type.
Type string `pulumi:"type"`
}
// GetIdentityInput is an input type that accepts GetIdentityArgs and GetIdentityOutput values.
// You can construct a concrete instance of `GetIdentityInput` via:
//
// GetIdentityArgs{...}
type GetIdentityInput interface {
pulumi.Input
ToGetIdentityOutput() GetIdentityOutput
ToGetIdentityOutputWithContext(context.Context) GetIdentityOutput
}
type GetIdentityArgs struct {
// The principal ID of resource identity.
PrincipalId pulumi.StringInput `pulumi:"principalId"`
// The tenant ID of resource.
TenantId pulumi.StringInput `pulumi:"tenantId"`
// The identity type.
Type pulumi.StringInput `pulumi:"type"`
}
func (GetIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetIdentity)(nil)).Elem()
}
func (i GetIdentityArgs) ToGetIdentityOutput() GetIdentityOutput {
return i.ToGetIdentityOutputWithContext(context.Background())
}
func (i GetIdentityArgs) ToGetIdentityOutputWithContext(ctx context.Context) GetIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetIdentityOutput)
}
// GetIdentityArrayInput is an input type that accepts GetIdentityArray and GetIdentityArrayOutput values.
// You can construct a concrete instance of `GetIdentityArrayInput` via:
//
// GetIdentityArray{ GetIdentityArgs{...} }
type GetIdentityArrayInput interface {
pulumi.Input
ToGetIdentityArrayOutput() GetIdentityArrayOutput
ToGetIdentityArrayOutputWithContext(context.Context) GetIdentityArrayOutput
}
type GetIdentityArray []GetIdentityInput
func (GetIdentityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetIdentity)(nil)).Elem()
}
func (i GetIdentityArray) ToGetIdentityArrayOutput() GetIdentityArrayOutput {
return i.ToGetIdentityArrayOutputWithContext(context.Background())
}
func (i GetIdentityArray) ToGetIdentityArrayOutputWithContext(ctx context.Context) GetIdentityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetIdentityArrayOutput)
}
type GetIdentityOutput struct{ *pulumi.OutputState }
func (GetIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetIdentity)(nil)).Elem()
}
func (o GetIdentityOutput) ToGetIdentityOutput() GetIdentityOutput {
return o
}
func (o GetIdentityOutput) ToGetIdentityOutputWithContext(ctx context.Context) GetIdentityOutput {
return o
}
// The principal ID of resource identity.
func (o GetIdentityOutput) PrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v GetIdentity) string { return v.PrincipalId }).(pulumi.StringOutput)
}
// The tenant ID of resource.
func (o GetIdentityOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v GetIdentity) string { return v.TenantId }).(pulumi.StringOutput)
}
// The identity type.
func (o GetIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type GetIdentityArrayOutput struct{ *pulumi.OutputState }
func (GetIdentityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetIdentity)(nil)).Elem()
}
func (o GetIdentityArrayOutput) ToGetIdentityArrayOutput() GetIdentityArrayOutput {
return o
}
func (o GetIdentityArrayOutput) ToGetIdentityArrayOutputWithContext(ctx context.Context) GetIdentityArrayOutput {
return o
}
func (o GetIdentityArrayOutput) Index(i pulumi.IntInput) GetIdentityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetIdentity {
return vs[0].([]GetIdentity)[vs[1].(int)]
}).(GetIdentityOutput)
}
type GetLocationData struct {
// The city or locality where the resource is located.
City string `pulumi:"city"`
// The country or region where the resource is located.
CountryOrRegion string `pulumi:"countryOrRegion"`
// The district, state, or province where the resource is located.
District string `pulumi:"district"`
// The name of this Azure Arc machine.
Name string `pulumi:"name"`
}
// GetLocationDataInput is an input type that accepts GetLocationDataArgs and GetLocationDataOutput values.
// You can construct a concrete instance of `GetLocationDataInput` via:
//
// GetLocationDataArgs{...}
type GetLocationDataInput interface {
pulumi.Input
ToGetLocationDataOutput() GetLocationDataOutput
ToGetLocationDataOutputWithContext(context.Context) GetLocationDataOutput
}
type GetLocationDataArgs struct {
// The city or locality where the resource is located.
City pulumi.StringInput `pulumi:"city"`
// The country or region where the resource is located.
CountryOrRegion pulumi.StringInput `pulumi:"countryOrRegion"`
// The district, state, or province where the resource is located.
District pulumi.StringInput `pulumi:"district"`
// The name of this Azure Arc machine.
Name pulumi.StringInput `pulumi:"name"`
}
func (GetLocationDataArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetLocationData)(nil)).Elem()
}
func (i GetLocationDataArgs) ToGetLocationDataOutput() GetLocationDataOutput {
return i.ToGetLocationDataOutputWithContext(context.Background())
}
func (i GetLocationDataArgs) ToGetLocationDataOutputWithContext(ctx context.Context) GetLocationDataOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetLocationDataOutput)
}
// GetLocationDataArrayInput is an input type that accepts GetLocationDataArray and GetLocationDataArrayOutput values.
// You can construct a concrete instance of `GetLocationDataArrayInput` via:
//
// GetLocationDataArray{ GetLocationDataArgs{...} }
type GetLocationDataArrayInput interface {
pulumi.Input
ToGetLocationDataArrayOutput() GetLocationDataArrayOutput
ToGetLocationDataArrayOutputWithContext(context.Context) GetLocationDataArrayOutput
}
type GetLocationDataArray []GetLocationDataInput
func (GetLocationDataArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetLocationData)(nil)).Elem()
}
func (i GetLocationDataArray) ToGetLocationDataArrayOutput() GetLocationDataArrayOutput {
return i.ToGetLocationDataArrayOutputWithContext(context.Background())
}
func (i GetLocationDataArray) ToGetLocationDataArrayOutputWithContext(ctx context.Context) GetLocationDataArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetLocationDataArrayOutput)
}
type GetLocationDataOutput struct{ *pulumi.OutputState }
func (GetLocationDataOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetLocationData)(nil)).Elem()
}
func (o GetLocationDataOutput) ToGetLocationDataOutput() GetLocationDataOutput {
return o
}
func (o GetLocationDataOutput) ToGetLocationDataOutputWithContext(ctx context.Context) GetLocationDataOutput {
return o
}
// The city or locality where the resource is located.
func (o GetLocationDataOutput) City() pulumi.StringOutput {
return o.ApplyT(func(v GetLocationData) string { return v.City }).(pulumi.StringOutput)
}
// The country or region where the resource is located.
func (o GetLocationDataOutput) CountryOrRegion() pulumi.StringOutput {
return o.ApplyT(func(v GetLocationData) string { return v.CountryOrRegion }).(pulumi.StringOutput)
}
// The district, state, or province where the resource is located.
func (o GetLocationDataOutput) District() 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/arcmachine/arcMachine.go | sdk/go/azure/arcmachine/arcMachine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package arcmachine
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Hybrid Compute Machine.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arcmachine"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/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 = arcmachine.NewArcMachine(ctx, "example", &arcmachine.ArcMachineArgs{
// Name: pulumi.String("example-arcmachine"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Kind: pulumi.String("SCVMM"),
// Identity: &arcmachine.ArcMachineIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.HybridCompute` - 2024-07-10
//
// ## Import
//
// Arc Machines can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:arcmachine/arcMachine:ArcMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.HybridCompute/machines/machine1
// ```
type ArcMachine struct {
pulumi.CustomResourceState
// An `identity` block as defined below.
Identity ArcMachineIdentityPtrOutput `pulumi:"identity"`
// The kind of the Arc Machine. Possible values are `AVS`, `AWS`, `EPS`, `GCP`, `HCI`, `SCVMM` and `VMware`. Changing this forces a new resource to be created.
Kind pulumi.StringOutput `pulumi:"kind"`
// The Azure Region where the Arc Machine should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Arc machine. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Arc Machine should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the Arc Machine.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewArcMachine registers a new resource with the given unique name, arguments, and options.
func NewArcMachine(ctx *pulumi.Context,
name string, args *ArcMachineArgs, opts ...pulumi.ResourceOption) (*ArcMachine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Kind == nil {
return nil, errors.New("invalid value for required argument 'Kind'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ArcMachine
err := ctx.RegisterResource("azure:arcmachine/arcMachine:ArcMachine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetArcMachine gets an existing ArcMachine resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetArcMachine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ArcMachineState, opts ...pulumi.ResourceOption) (*ArcMachine, error) {
var resource ArcMachine
err := ctx.ReadResource("azure:arcmachine/arcMachine:ArcMachine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ArcMachine resources.
type arcMachineState struct {
// An `identity` block as defined below.
Identity *ArcMachineIdentity `pulumi:"identity"`
// The kind of the Arc Machine. Possible values are `AVS`, `AWS`, `EPS`, `GCP`, `HCI`, `SCVMM` and `VMware`. Changing this forces a new resource to be created.
Kind *string `pulumi:"kind"`
// The Azure Region where the Arc Machine should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Arc machine. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Arc Machine should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the Arc Machine.
Tags map[string]string `pulumi:"tags"`
}
type ArcMachineState struct {
// An `identity` block as defined below.
Identity ArcMachineIdentityPtrInput
// The kind of the Arc Machine. Possible values are `AVS`, `AWS`, `EPS`, `GCP`, `HCI`, `SCVMM` and `VMware`. Changing this forces a new resource to be created.
Kind pulumi.StringPtrInput
// The Azure Region where the Arc Machine should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Arc machine. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Arc Machine should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the Arc Machine.
Tags pulumi.StringMapInput
}
func (ArcMachineState) ElementType() reflect.Type {
return reflect.TypeOf((*arcMachineState)(nil)).Elem()
}
type arcMachineArgs struct {
// An `identity` block as defined below.
Identity *ArcMachineIdentity `pulumi:"identity"`
// The kind of the Arc Machine. Possible values are `AVS`, `AWS`, `EPS`, `GCP`, `HCI`, `SCVMM` and `VMware`. Changing this forces a new resource to be created.
Kind string `pulumi:"kind"`
// The Azure Region where the Arc Machine should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Arc machine. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Arc Machine should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the Arc Machine.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ArcMachine resource.
type ArcMachineArgs struct {
// An `identity` block as defined below.
Identity ArcMachineIdentityPtrInput
// The kind of the Arc Machine. Possible values are `AVS`, `AWS`, `EPS`, `GCP`, `HCI`, `SCVMM` and `VMware`. Changing this forces a new resource to be created.
Kind pulumi.StringInput
// The Azure Region where the Arc Machine should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Arc machine. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Arc Machine should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the Arc Machine.
Tags pulumi.StringMapInput
}
func (ArcMachineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*arcMachineArgs)(nil)).Elem()
}
type ArcMachineInput interface {
pulumi.Input
ToArcMachineOutput() ArcMachineOutput
ToArcMachineOutputWithContext(ctx context.Context) ArcMachineOutput
}
func (*ArcMachine) ElementType() reflect.Type {
return reflect.TypeOf((**ArcMachine)(nil)).Elem()
}
func (i *ArcMachine) ToArcMachineOutput() ArcMachineOutput {
return i.ToArcMachineOutputWithContext(context.Background())
}
func (i *ArcMachine) ToArcMachineOutputWithContext(ctx context.Context) ArcMachineOutput {
return pulumi.ToOutputWithContext(ctx, i).(ArcMachineOutput)
}
// ArcMachineArrayInput is an input type that accepts ArcMachineArray and ArcMachineArrayOutput values.
// You can construct a concrete instance of `ArcMachineArrayInput` via:
//
// ArcMachineArray{ ArcMachineArgs{...} }
type ArcMachineArrayInput interface {
pulumi.Input
ToArcMachineArrayOutput() ArcMachineArrayOutput
ToArcMachineArrayOutputWithContext(context.Context) ArcMachineArrayOutput
}
type ArcMachineArray []ArcMachineInput
func (ArcMachineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ArcMachine)(nil)).Elem()
}
func (i ArcMachineArray) ToArcMachineArrayOutput() ArcMachineArrayOutput {
return i.ToArcMachineArrayOutputWithContext(context.Background())
}
func (i ArcMachineArray) ToArcMachineArrayOutputWithContext(ctx context.Context) ArcMachineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ArcMachineArrayOutput)
}
// ArcMachineMapInput is an input type that accepts ArcMachineMap and ArcMachineMapOutput values.
// You can construct a concrete instance of `ArcMachineMapInput` via:
//
// ArcMachineMap{ "key": ArcMachineArgs{...} }
type ArcMachineMapInput interface {
pulumi.Input
ToArcMachineMapOutput() ArcMachineMapOutput
ToArcMachineMapOutputWithContext(context.Context) ArcMachineMapOutput
}
type ArcMachineMap map[string]ArcMachineInput
func (ArcMachineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ArcMachine)(nil)).Elem()
}
func (i ArcMachineMap) ToArcMachineMapOutput() ArcMachineMapOutput {
return i.ToArcMachineMapOutputWithContext(context.Background())
}
func (i ArcMachineMap) ToArcMachineMapOutputWithContext(ctx context.Context) ArcMachineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ArcMachineMapOutput)
}
type ArcMachineOutput struct{ *pulumi.OutputState }
func (ArcMachineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ArcMachine)(nil)).Elem()
}
func (o ArcMachineOutput) ToArcMachineOutput() ArcMachineOutput {
return o
}
func (o ArcMachineOutput) ToArcMachineOutputWithContext(ctx context.Context) ArcMachineOutput {
return o
}
// An `identity` block as defined below.
func (o ArcMachineOutput) Identity() ArcMachineIdentityPtrOutput {
return o.ApplyT(func(v *ArcMachine) ArcMachineIdentityPtrOutput { return v.Identity }).(ArcMachineIdentityPtrOutput)
}
// The kind of the Arc Machine. Possible values are `AVS`, `AWS`, `EPS`, `GCP`, `HCI`, `SCVMM` and `VMware`. Changing this forces a new resource to be created.
func (o ArcMachineOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v *ArcMachine) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput)
}
// The Azure Region where the Arc Machine should exist. Changing this forces a new resource to be created.
func (o ArcMachineOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ArcMachine) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Arc machine. Changing this forces a new resource to be created.
func (o ArcMachineOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ArcMachine) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Arc Machine should exist. Changing this forces a new resource to be created.
func (o ArcMachineOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ArcMachine) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the Arc Machine.
func (o ArcMachineOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ArcMachine) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ArcMachineArrayOutput struct{ *pulumi.OutputState }
func (ArcMachineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ArcMachine)(nil)).Elem()
}
func (o ArcMachineArrayOutput) ToArcMachineArrayOutput() ArcMachineArrayOutput {
return o
}
func (o ArcMachineArrayOutput) ToArcMachineArrayOutputWithContext(ctx context.Context) ArcMachineArrayOutput {
return o
}
func (o ArcMachineArrayOutput) Index(i pulumi.IntInput) ArcMachineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ArcMachine {
return vs[0].([]*ArcMachine)[vs[1].(int)]
}).(ArcMachineOutput)
}
type ArcMachineMapOutput struct{ *pulumi.OutputState }
func (ArcMachineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ArcMachine)(nil)).Elem()
}
func (o ArcMachineMapOutput) ToArcMachineMapOutput() ArcMachineMapOutput {
return o
}
func (o ArcMachineMapOutput) ToArcMachineMapOutputWithContext(ctx context.Context) ArcMachineMapOutput {
return o
}
func (o ArcMachineMapOutput) MapIndex(k pulumi.StringInput) ArcMachineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ArcMachine {
return vs[0].(map[string]*ArcMachine)[vs[1].(string)]
}).(ArcMachineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ArcMachineInput)(nil)).Elem(), &ArcMachine{})
pulumi.RegisterInputType(reflect.TypeOf((*ArcMachineArrayInput)(nil)).Elem(), ArcMachineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ArcMachineMapInput)(nil)).Elem(), ArcMachineMap{})
pulumi.RegisterOutputType(ArcMachineOutput{})
pulumi.RegisterOutputType(ArcMachineArrayOutput{})
pulumi.RegisterOutputType(ArcMachineMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arcmachine/automanageConfigurationAssignment.go | sdk/go/azure/arcmachine/automanageConfigurationAssignment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package arcmachine
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Arc Machine Automanage Configuration Profile Assignment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arcmachine"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automanage"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// // The name of the Arc Machine.
// arcMachineName := cfg.RequireObject("arcMachineName")
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example := exampleResourceGroup.Name.ApplyT(func(name string) (arcmachine.GetResult, error) {
// return arcmachine.GetResult(interface{}(arcmachine.Get(ctx, &arcmachine.GetArgs{
// Name: arcMachineName,
// ResourceGroupName: name,
// }, nil))), nil
// }).(arcmachine.GetResultOutput)
// exampleConfiguration, err := automanage.NewConfiguration(ctx, "example", &automanage.ConfigurationArgs{
// Name: pulumi.String("example-configuration"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// })
// if err != nil {
// return err
// }
// _, err = arcmachine.NewAutomanageConfigurationAssignment(ctx, "example", &arcmachine.AutomanageConfigurationAssignmentArgs{
// ArcMachineId: pulumi.String(example.ApplyT(func(example arcmachine.GetResult) (*string, error) {
// return &example.Id, nil
// }).(pulumi.StringPtrOutput)),
// ConfigurationId: exampleConfiguration.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.HybridCompute` - 2022-05-04
//
// ## Import
//
// Virtual Machine Automanage Configuration Profile Assignment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.AutoManage/configurationProfileAssignments/default
// ```
type AutomanageConfigurationAssignment struct {
pulumi.CustomResourceState
// The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ArcMachineId pulumi.StringOutput `pulumi:"arcMachineId"`
// The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
ConfigurationId pulumi.StringOutput `pulumi:"configurationId"`
}
// NewAutomanageConfigurationAssignment registers a new resource with the given unique name, arguments, and options.
func NewAutomanageConfigurationAssignment(ctx *pulumi.Context,
name string, args *AutomanageConfigurationAssignmentArgs, opts ...pulumi.ResourceOption) (*AutomanageConfigurationAssignment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ArcMachineId == nil {
return nil, errors.New("invalid value for required argument 'ArcMachineId'")
}
if args.ConfigurationId == nil {
return nil, errors.New("invalid value for required argument 'ConfigurationId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AutomanageConfigurationAssignment
err := ctx.RegisterResource("azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAutomanageConfigurationAssignment gets an existing AutomanageConfigurationAssignment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAutomanageConfigurationAssignment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AutomanageConfigurationAssignmentState, opts ...pulumi.ResourceOption) (*AutomanageConfigurationAssignment, error) {
var resource AutomanageConfigurationAssignment
err := ctx.ReadResource("azure:arcmachine/automanageConfigurationAssignment:AutomanageConfigurationAssignment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AutomanageConfigurationAssignment resources.
type automanageConfigurationAssignmentState struct {
// The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ArcMachineId *string `pulumi:"arcMachineId"`
// The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
ConfigurationId *string `pulumi:"configurationId"`
}
type AutomanageConfigurationAssignmentState struct {
// The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ArcMachineId pulumi.StringPtrInput
// The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
ConfigurationId pulumi.StringPtrInput
}
func (AutomanageConfigurationAssignmentState) ElementType() reflect.Type {
return reflect.TypeOf((*automanageConfigurationAssignmentState)(nil)).Elem()
}
type automanageConfigurationAssignmentArgs struct {
// The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ArcMachineId string `pulumi:"arcMachineId"`
// The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
ConfigurationId string `pulumi:"configurationId"`
}
// The set of arguments for constructing a AutomanageConfigurationAssignment resource.
type AutomanageConfigurationAssignmentArgs struct {
// The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
ArcMachineId pulumi.StringInput
// The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
ConfigurationId pulumi.StringInput
}
func (AutomanageConfigurationAssignmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*automanageConfigurationAssignmentArgs)(nil)).Elem()
}
type AutomanageConfigurationAssignmentInput interface {
pulumi.Input
ToAutomanageConfigurationAssignmentOutput() AutomanageConfigurationAssignmentOutput
ToAutomanageConfigurationAssignmentOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentOutput
}
func (*AutomanageConfigurationAssignment) ElementType() reflect.Type {
return reflect.TypeOf((**AutomanageConfigurationAssignment)(nil)).Elem()
}
func (i *AutomanageConfigurationAssignment) ToAutomanageConfigurationAssignmentOutput() AutomanageConfigurationAssignmentOutput {
return i.ToAutomanageConfigurationAssignmentOutputWithContext(context.Background())
}
func (i *AutomanageConfigurationAssignment) ToAutomanageConfigurationAssignmentOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomanageConfigurationAssignmentOutput)
}
// AutomanageConfigurationAssignmentArrayInput is an input type that accepts AutomanageConfigurationAssignmentArray and AutomanageConfigurationAssignmentArrayOutput values.
// You can construct a concrete instance of `AutomanageConfigurationAssignmentArrayInput` via:
//
// AutomanageConfigurationAssignmentArray{ AutomanageConfigurationAssignmentArgs{...} }
type AutomanageConfigurationAssignmentArrayInput interface {
pulumi.Input
ToAutomanageConfigurationAssignmentArrayOutput() AutomanageConfigurationAssignmentArrayOutput
ToAutomanageConfigurationAssignmentArrayOutputWithContext(context.Context) AutomanageConfigurationAssignmentArrayOutput
}
type AutomanageConfigurationAssignmentArray []AutomanageConfigurationAssignmentInput
func (AutomanageConfigurationAssignmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AutomanageConfigurationAssignment)(nil)).Elem()
}
func (i AutomanageConfigurationAssignmentArray) ToAutomanageConfigurationAssignmentArrayOutput() AutomanageConfigurationAssignmentArrayOutput {
return i.ToAutomanageConfigurationAssignmentArrayOutputWithContext(context.Background())
}
func (i AutomanageConfigurationAssignmentArray) ToAutomanageConfigurationAssignmentArrayOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomanageConfigurationAssignmentArrayOutput)
}
// AutomanageConfigurationAssignmentMapInput is an input type that accepts AutomanageConfigurationAssignmentMap and AutomanageConfigurationAssignmentMapOutput values.
// You can construct a concrete instance of `AutomanageConfigurationAssignmentMapInput` via:
//
// AutomanageConfigurationAssignmentMap{ "key": AutomanageConfigurationAssignmentArgs{...} }
type AutomanageConfigurationAssignmentMapInput interface {
pulumi.Input
ToAutomanageConfigurationAssignmentMapOutput() AutomanageConfigurationAssignmentMapOutput
ToAutomanageConfigurationAssignmentMapOutputWithContext(context.Context) AutomanageConfigurationAssignmentMapOutput
}
type AutomanageConfigurationAssignmentMap map[string]AutomanageConfigurationAssignmentInput
func (AutomanageConfigurationAssignmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AutomanageConfigurationAssignment)(nil)).Elem()
}
func (i AutomanageConfigurationAssignmentMap) ToAutomanageConfigurationAssignmentMapOutput() AutomanageConfigurationAssignmentMapOutput {
return i.ToAutomanageConfigurationAssignmentMapOutputWithContext(context.Background())
}
func (i AutomanageConfigurationAssignmentMap) ToAutomanageConfigurationAssignmentMapOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomanageConfigurationAssignmentMapOutput)
}
type AutomanageConfigurationAssignmentOutput struct{ *pulumi.OutputState }
func (AutomanageConfigurationAssignmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AutomanageConfigurationAssignment)(nil)).Elem()
}
func (o AutomanageConfigurationAssignmentOutput) ToAutomanageConfigurationAssignmentOutput() AutomanageConfigurationAssignmentOutput {
return o
}
func (o AutomanageConfigurationAssignmentOutput) ToAutomanageConfigurationAssignmentOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentOutput {
return o
}
// The ARM resource ID of the Arc Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created.
func (o AutomanageConfigurationAssignmentOutput) ArcMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *AutomanageConfigurationAssignment) pulumi.StringOutput { return v.ArcMachineId }).(pulumi.StringOutput)
}
// The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created.
//
// > **Note:** For a successful creation of this resource, locate "Automanage API Access" app within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.
func (o AutomanageConfigurationAssignmentOutput) ConfigurationId() pulumi.StringOutput {
return o.ApplyT(func(v *AutomanageConfigurationAssignment) pulumi.StringOutput { return v.ConfigurationId }).(pulumi.StringOutput)
}
type AutomanageConfigurationAssignmentArrayOutput struct{ *pulumi.OutputState }
func (AutomanageConfigurationAssignmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AutomanageConfigurationAssignment)(nil)).Elem()
}
func (o AutomanageConfigurationAssignmentArrayOutput) ToAutomanageConfigurationAssignmentArrayOutput() AutomanageConfigurationAssignmentArrayOutput {
return o
}
func (o AutomanageConfigurationAssignmentArrayOutput) ToAutomanageConfigurationAssignmentArrayOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentArrayOutput {
return o
}
func (o AutomanageConfigurationAssignmentArrayOutput) Index(i pulumi.IntInput) AutomanageConfigurationAssignmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AutomanageConfigurationAssignment {
return vs[0].([]*AutomanageConfigurationAssignment)[vs[1].(int)]
}).(AutomanageConfigurationAssignmentOutput)
}
type AutomanageConfigurationAssignmentMapOutput struct{ *pulumi.OutputState }
func (AutomanageConfigurationAssignmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AutomanageConfigurationAssignment)(nil)).Elem()
}
func (o AutomanageConfigurationAssignmentMapOutput) ToAutomanageConfigurationAssignmentMapOutput() AutomanageConfigurationAssignmentMapOutput {
return o
}
func (o AutomanageConfigurationAssignmentMapOutput) ToAutomanageConfigurationAssignmentMapOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentMapOutput {
return o
}
func (o AutomanageConfigurationAssignmentMapOutput) MapIndex(k pulumi.StringInput) AutomanageConfigurationAssignmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AutomanageConfigurationAssignment {
return vs[0].(map[string]*AutomanageConfigurationAssignment)[vs[1].(string)]
}).(AutomanageConfigurationAssignmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AutomanageConfigurationAssignmentInput)(nil)).Elem(), &AutomanageConfigurationAssignment{})
pulumi.RegisterInputType(reflect.TypeOf((*AutomanageConfigurationAssignmentArrayInput)(nil)).Elem(), AutomanageConfigurationAssignmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AutomanageConfigurationAssignmentMapInput)(nil)).Elem(), AutomanageConfigurationAssignmentMap{})
pulumi.RegisterOutputType(AutomanageConfigurationAssignmentOutput{})
pulumi.RegisterOutputType(AutomanageConfigurationAssignmentArrayOutput{})
pulumi.RegisterOutputType(AutomanageConfigurationAssignmentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arcmachine/extension.go | sdk/go/azure/arcmachine/extension.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package arcmachine
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Hybrid Compute Machine Extension.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arcmachine"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example := arcmachine.GetOutput(ctx, arcmachine.GetOutputArgs{
// Name: pulumi.String("existing-hcmachine"),
// ResourceGroupName: exampleResourceGroup.Name,
// }, nil)
// _, err = arcmachine.NewExtension(ctx, "example", &arcmachine.ExtensionArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// ArcMachineId: pulumi.String(example.ApplyT(func(example arcmachine.GetResult) (*string, error) {
// return &example.Id, nil
// }).(pulumi.StringPtrOutput)),
// Publisher: pulumi.String("Microsoft.Azure.Monitor"),
// Type: pulumi.String("AzureMonitorLinuxAgent"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.HybridCompute` - 2022-11-10
//
// ## Import
//
// Hybrid Compute Machine Extensions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:arcmachine/extension:Extension example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HybridCompute/machines/hcmachine1/extensions/ext1
// ```
type Extension struct {
pulumi.CustomResourceState
// The ID of the Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
ArcMachineId pulumi.StringOutput `pulumi:"arcMachineId"`
// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. Supported values are `true` and `false`. Defaults to `true`.
//
// > **Note:** When `automaticUpgradeEnabled` can only be set during creation. Any later change will be ignored.
//
// > **Note:** When `automaticUpgradeEnabled` is set to `true`, the `typeHandlerVersion` is automatically updated by the Azure platform when a new version is available and any change in `typeHandlerVersion` will be automatically ignored.
AutomaticUpgradeEnabled pulumi.BoolPtrOutput `pulumi:"automaticUpgradeEnabled"`
// How the extension handler should be forced to update even if the extension configuration has not changed.
ForceUpdateTag pulumi.StringPtrOutput `pulumi:"forceUpdateTag"`
// The Azure Region where the Hybrid Compute Machine Extension should exist. Changing this forces a new Hybrid Compute Machine Extension to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Json formatted protected settings for the extension.
ProtectedSettings pulumi.StringPtrOutput `pulumi:"protectedSettings"`
// The name of the extension handler publisher, such as `Microsoft.Azure.Monitor`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Publisher pulumi.StringOutput `pulumi:"publisher"`
// Json formatted public settings for the extension.
Settings pulumi.StringPtrOutput `pulumi:"settings"`
// A mapping of tags which should be assigned to the Hybrid Compute Machine Extension.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies the type of the extension. For example `CustomScriptExtension` or `AzureMonitorLinuxAgent`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Type pulumi.StringOutput `pulumi:"type"`
// Specifies the version of the script handler.
//
// > **Note:** 1. When `automaticUpgradeEnabled` is set to `false` and no `typeHandlerVersion` is specified, the `typeHandlerVersion` change should be manually ignored by `ignoreChanges` lifecycle block. This is because the `typeHandlerVersion` is set by the Azure platform when the extension is created. 2. When `automaticUpgradeEnabled` is set to `false` and `typeHandlerVersion` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `typeHandlerVersion`, `1.24.1` will be considered as no diff.
TypeHandlerVersion pulumi.StringPtrOutput `pulumi:"typeHandlerVersion"`
}
// NewExtension registers a new resource with the given unique name, arguments, and options.
func NewExtension(ctx *pulumi.Context,
name string, args *ExtensionArgs, opts ...pulumi.ResourceOption) (*Extension, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ArcMachineId == nil {
return nil, errors.New("invalid value for required argument 'ArcMachineId'")
}
if args.Publisher == nil {
return nil, errors.New("invalid value for required argument 'Publisher'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
if args.ProtectedSettings != nil {
args.ProtectedSettings = pulumi.ToSecret(args.ProtectedSettings).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"protectedSettings",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Extension
err := ctx.RegisterResource("azure:arcmachine/extension:Extension", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetExtension gets an existing Extension resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetExtension(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ExtensionState, opts ...pulumi.ResourceOption) (*Extension, error) {
var resource Extension
err := ctx.ReadResource("azure:arcmachine/extension:Extension", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Extension resources.
type extensionState struct {
// The ID of the Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
ArcMachineId *string `pulumi:"arcMachineId"`
// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. Supported values are `true` and `false`. Defaults to `true`.
//
// > **Note:** When `automaticUpgradeEnabled` can only be set during creation. Any later change will be ignored.
//
// > **Note:** When `automaticUpgradeEnabled` is set to `true`, the `typeHandlerVersion` is automatically updated by the Azure platform when a new version is available and any change in `typeHandlerVersion` will be automatically ignored.
AutomaticUpgradeEnabled *bool `pulumi:"automaticUpgradeEnabled"`
// How the extension handler should be forced to update even if the extension configuration has not changed.
ForceUpdateTag *string `pulumi:"forceUpdateTag"`
// The Azure Region where the Hybrid Compute Machine Extension should exist. Changing this forces a new Hybrid Compute Machine Extension to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
Name *string `pulumi:"name"`
// Json formatted protected settings for the extension.
ProtectedSettings *string `pulumi:"protectedSettings"`
// The name of the extension handler publisher, such as `Microsoft.Azure.Monitor`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Publisher *string `pulumi:"publisher"`
// Json formatted public settings for the extension.
Settings *string `pulumi:"settings"`
// A mapping of tags which should be assigned to the Hybrid Compute Machine Extension.
Tags map[string]string `pulumi:"tags"`
// Specifies the type of the extension. For example `CustomScriptExtension` or `AzureMonitorLinuxAgent`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Type *string `pulumi:"type"`
// Specifies the version of the script handler.
//
// > **Note:** 1. When `automaticUpgradeEnabled` is set to `false` and no `typeHandlerVersion` is specified, the `typeHandlerVersion` change should be manually ignored by `ignoreChanges` lifecycle block. This is because the `typeHandlerVersion` is set by the Azure platform when the extension is created. 2. When `automaticUpgradeEnabled` is set to `false` and `typeHandlerVersion` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `typeHandlerVersion`, `1.24.1` will be considered as no diff.
TypeHandlerVersion *string `pulumi:"typeHandlerVersion"`
}
type ExtensionState struct {
// The ID of the Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
ArcMachineId pulumi.StringPtrInput
// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. Supported values are `true` and `false`. Defaults to `true`.
//
// > **Note:** When `automaticUpgradeEnabled` can only be set during creation. Any later change will be ignored.
//
// > **Note:** When `automaticUpgradeEnabled` is set to `true`, the `typeHandlerVersion` is automatically updated by the Azure platform when a new version is available and any change in `typeHandlerVersion` will be automatically ignored.
AutomaticUpgradeEnabled pulumi.BoolPtrInput
// How the extension handler should be forced to update even if the extension configuration has not changed.
ForceUpdateTag pulumi.StringPtrInput
// The Azure Region where the Hybrid Compute Machine Extension should exist. Changing this forces a new Hybrid Compute Machine Extension to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
Name pulumi.StringPtrInput
// Json formatted protected settings for the extension.
ProtectedSettings pulumi.StringPtrInput
// The name of the extension handler publisher, such as `Microsoft.Azure.Monitor`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Publisher pulumi.StringPtrInput
// Json formatted public settings for the extension.
Settings pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Hybrid Compute Machine Extension.
Tags pulumi.StringMapInput
// Specifies the type of the extension. For example `CustomScriptExtension` or `AzureMonitorLinuxAgent`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Type pulumi.StringPtrInput
// Specifies the version of the script handler.
//
// > **Note:** 1. When `automaticUpgradeEnabled` is set to `false` and no `typeHandlerVersion` is specified, the `typeHandlerVersion` change should be manually ignored by `ignoreChanges` lifecycle block. This is because the `typeHandlerVersion` is set by the Azure platform when the extension is created. 2. When `automaticUpgradeEnabled` is set to `false` and `typeHandlerVersion` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `typeHandlerVersion`, `1.24.1` will be considered as no diff.
TypeHandlerVersion pulumi.StringPtrInput
}
func (ExtensionState) ElementType() reflect.Type {
return reflect.TypeOf((*extensionState)(nil)).Elem()
}
type extensionArgs struct {
// The ID of the Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
ArcMachineId string `pulumi:"arcMachineId"`
// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. Supported values are `true` and `false`. Defaults to `true`.
//
// > **Note:** When `automaticUpgradeEnabled` can only be set during creation. Any later change will be ignored.
//
// > **Note:** When `automaticUpgradeEnabled` is set to `true`, the `typeHandlerVersion` is automatically updated by the Azure platform when a new version is available and any change in `typeHandlerVersion` will be automatically ignored.
AutomaticUpgradeEnabled *bool `pulumi:"automaticUpgradeEnabled"`
// How the extension handler should be forced to update even if the extension configuration has not changed.
ForceUpdateTag *string `pulumi:"forceUpdateTag"`
// The Azure Region where the Hybrid Compute Machine Extension should exist. Changing this forces a new Hybrid Compute Machine Extension to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
Name *string `pulumi:"name"`
// Json formatted protected settings for the extension.
ProtectedSettings *string `pulumi:"protectedSettings"`
// The name of the extension handler publisher, such as `Microsoft.Azure.Monitor`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Publisher string `pulumi:"publisher"`
// Json formatted public settings for the extension.
Settings *string `pulumi:"settings"`
// A mapping of tags which should be assigned to the Hybrid Compute Machine Extension.
Tags map[string]string `pulumi:"tags"`
// Specifies the type of the extension. For example `CustomScriptExtension` or `AzureMonitorLinuxAgent`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Type string `pulumi:"type"`
// Specifies the version of the script handler.
//
// > **Note:** 1. When `automaticUpgradeEnabled` is set to `false` and no `typeHandlerVersion` is specified, the `typeHandlerVersion` change should be manually ignored by `ignoreChanges` lifecycle block. This is because the `typeHandlerVersion` is set by the Azure platform when the extension is created. 2. When `automaticUpgradeEnabled` is set to `false` and `typeHandlerVersion` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `typeHandlerVersion`, `1.24.1` will be considered as no diff.
TypeHandlerVersion *string `pulumi:"typeHandlerVersion"`
}
// The set of arguments for constructing a Extension resource.
type ExtensionArgs struct {
// The ID of the Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
ArcMachineId pulumi.StringInput
// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. Supported values are `true` and `false`. Defaults to `true`.
//
// > **Note:** When `automaticUpgradeEnabled` can only be set during creation. Any later change will be ignored.
//
// > **Note:** When `automaticUpgradeEnabled` is set to `true`, the `typeHandlerVersion` is automatically updated by the Azure platform when a new version is available and any change in `typeHandlerVersion` will be automatically ignored.
AutomaticUpgradeEnabled pulumi.BoolPtrInput
// How the extension handler should be forced to update even if the extension configuration has not changed.
ForceUpdateTag pulumi.StringPtrInput
// The Azure Region where the Hybrid Compute Machine Extension should exist. Changing this forces a new Hybrid Compute Machine Extension to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
Name pulumi.StringPtrInput
// Json formatted protected settings for the extension.
ProtectedSettings pulumi.StringPtrInput
// The name of the extension handler publisher, such as `Microsoft.Azure.Monitor`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Publisher pulumi.StringInput
// Json formatted public settings for the extension.
Settings pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Hybrid Compute Machine Extension.
Tags pulumi.StringMapInput
// Specifies the type of the extension. For example `CustomScriptExtension` or `AzureMonitorLinuxAgent`. Changing this forces a new Hybrid Compute Machine Extension to be created.
Type pulumi.StringInput
// Specifies the version of the script handler.
//
// > **Note:** 1. When `automaticUpgradeEnabled` is set to `false` and no `typeHandlerVersion` is specified, the `typeHandlerVersion` change should be manually ignored by `ignoreChanges` lifecycle block. This is because the `typeHandlerVersion` is set by the Azure platform when the extension is created. 2. When `automaticUpgradeEnabled` is set to `false` and `typeHandlerVersion` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `typeHandlerVersion`, `1.24.1` will be considered as no diff.
TypeHandlerVersion pulumi.StringPtrInput
}
func (ExtensionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*extensionArgs)(nil)).Elem()
}
type ExtensionInput interface {
pulumi.Input
ToExtensionOutput() ExtensionOutput
ToExtensionOutputWithContext(ctx context.Context) ExtensionOutput
}
func (*Extension) ElementType() reflect.Type {
return reflect.TypeOf((**Extension)(nil)).Elem()
}
func (i *Extension) ToExtensionOutput() ExtensionOutput {
return i.ToExtensionOutputWithContext(context.Background())
}
func (i *Extension) ToExtensionOutputWithContext(ctx context.Context) ExtensionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExtensionOutput)
}
// ExtensionArrayInput is an input type that accepts ExtensionArray and ExtensionArrayOutput values.
// You can construct a concrete instance of `ExtensionArrayInput` via:
//
// ExtensionArray{ ExtensionArgs{...} }
type ExtensionArrayInput interface {
pulumi.Input
ToExtensionArrayOutput() ExtensionArrayOutput
ToExtensionArrayOutputWithContext(context.Context) ExtensionArrayOutput
}
type ExtensionArray []ExtensionInput
func (ExtensionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Extension)(nil)).Elem()
}
func (i ExtensionArray) ToExtensionArrayOutput() ExtensionArrayOutput {
return i.ToExtensionArrayOutputWithContext(context.Background())
}
func (i ExtensionArray) ToExtensionArrayOutputWithContext(ctx context.Context) ExtensionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExtensionArrayOutput)
}
// ExtensionMapInput is an input type that accepts ExtensionMap and ExtensionMapOutput values.
// You can construct a concrete instance of `ExtensionMapInput` via:
//
// ExtensionMap{ "key": ExtensionArgs{...} }
type ExtensionMapInput interface {
pulumi.Input
ToExtensionMapOutput() ExtensionMapOutput
ToExtensionMapOutputWithContext(context.Context) ExtensionMapOutput
}
type ExtensionMap map[string]ExtensionInput
func (ExtensionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Extension)(nil)).Elem()
}
func (i ExtensionMap) ToExtensionMapOutput() ExtensionMapOutput {
return i.ToExtensionMapOutputWithContext(context.Background())
}
func (i ExtensionMap) ToExtensionMapOutputWithContext(ctx context.Context) ExtensionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExtensionMapOutput)
}
type ExtensionOutput struct{ *pulumi.OutputState }
func (ExtensionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Extension)(nil)).Elem()
}
func (o ExtensionOutput) ToExtensionOutput() ExtensionOutput {
return o
}
func (o ExtensionOutput) ToExtensionOutputWithContext(ctx context.Context) ExtensionOutput {
return o
}
// The ID of the Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
func (o ExtensionOutput) ArcMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.ArcMachineId }).(pulumi.StringOutput)
}
// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. Supported values are `true` and `false`. Defaults to `true`.
//
// > **Note:** When `automaticUpgradeEnabled` can only be set during creation. Any later change will be ignored.
//
// > **Note:** When `automaticUpgradeEnabled` is set to `true`, the `typeHandlerVersion` is automatically updated by the Azure platform when a new version is available and any change in `typeHandlerVersion` will be automatically ignored.
func (o ExtensionOutput) AutomaticUpgradeEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Extension) pulumi.BoolPtrOutput { return v.AutomaticUpgradeEnabled }).(pulumi.BoolPtrOutput)
}
// How the extension handler should be forced to update even if the extension configuration has not changed.
func (o ExtensionOutput) ForceUpdateTag() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Extension) pulumi.StringPtrOutput { return v.ForceUpdateTag }).(pulumi.StringPtrOutput)
}
// The Azure Region where the Hybrid Compute Machine Extension should exist. Changing this forces a new Hybrid Compute Machine Extension to be created.
func (o ExtensionOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Hybrid Compute Machine Extension. Changing this forces a new Hybrid Compute Machine Extension to be created.
func (o ExtensionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Json formatted protected settings for the extension.
func (o ExtensionOutput) ProtectedSettings() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Extension) pulumi.StringPtrOutput { return v.ProtectedSettings }).(pulumi.StringPtrOutput)
}
// The name of the extension handler publisher, such as `Microsoft.Azure.Monitor`. Changing this forces a new Hybrid Compute Machine Extension to be created.
func (o ExtensionOutput) Publisher() pulumi.StringOutput {
return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Publisher }).(pulumi.StringOutput)
}
// Json formatted public settings for the extension.
func (o ExtensionOutput) Settings() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Extension) pulumi.StringPtrOutput { return v.Settings }).(pulumi.StringPtrOutput)
}
// A mapping of tags which should be assigned to the Hybrid Compute Machine Extension.
func (o ExtensionOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Extension) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Specifies the type of the extension. For example `CustomScriptExtension` or `AzureMonitorLinuxAgent`. Changing this forces a new Hybrid Compute Machine Extension to be created.
func (o ExtensionOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// Specifies the version of the script handler.
//
// > **Note:** 1. When `automaticUpgradeEnabled` is set to `false` and no `typeHandlerVersion` is specified, the `typeHandlerVersion` change should be manually ignored by `ignoreChanges` lifecycle block. This is because the `typeHandlerVersion` is set by the Azure platform when the extension is created. 2. When `automaticUpgradeEnabled` is set to `false` and `typeHandlerVersion` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `typeHandlerVersion`, `1.24.1` will be considered as no diff.
func (o ExtensionOutput) TypeHandlerVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Extension) pulumi.StringPtrOutput { return v.TypeHandlerVersion }).(pulumi.StringPtrOutput)
}
type ExtensionArrayOutput struct{ *pulumi.OutputState }
func (ExtensionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Extension)(nil)).Elem()
}
func (o ExtensionArrayOutput) ToExtensionArrayOutput() ExtensionArrayOutput {
return o
}
func (o ExtensionArrayOutput) ToExtensionArrayOutputWithContext(ctx context.Context) ExtensionArrayOutput {
return o
}
func (o ExtensionArrayOutput) Index(i pulumi.IntInput) ExtensionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Extension {
return vs[0].([]*Extension)[vs[1].(int)]
}).(ExtensionOutput)
}
type ExtensionMapOutput struct{ *pulumi.OutputState }
func (ExtensionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Extension)(nil)).Elem()
}
func (o ExtensionMapOutput) ToExtensionMapOutput() ExtensionMapOutput {
return o
}
func (o ExtensionMapOutput) ToExtensionMapOutputWithContext(ctx context.Context) ExtensionMapOutput {
return o
}
func (o ExtensionMapOutput) MapIndex(k pulumi.StringInput) ExtensionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Extension {
return vs[0].(map[string]*Extension)[vs[1].(string)]
}).(ExtensionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ExtensionInput)(nil)).Elem(), &Extension{})
pulumi.RegisterInputType(reflect.TypeOf((*ExtensionArrayInput)(nil)).Elem(), ExtensionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ExtensionMapInput)(nil)).Elem(), ExtensionMap{})
pulumi.RegisterOutputType(ExtensionOutput{})
pulumi.RegisterOutputType(ExtensionArrayOutput{})
pulumi.RegisterOutputType(ExtensionMapOutput{})
}
| 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.