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/lb/getLBRule.go
sdk/go/azure/lb/getLBRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb 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 Load Balancer Rule. // // ## Example Usage // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2023-09-01 func GetLBRule(ctx *pulumi.Context, args *GetLBRuleArgs, opts ...pulumi.InvokeOption) (*GetLBRuleResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetLBRuleResult err := ctx.Invoke("azure:lb/getLBRule:getLBRule", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getLBRule. type GetLBRuleArgs struct { // The ID of the Load Balancer Rule. LoadbalancerId string `pulumi:"loadbalancerId"` // The name of this Load Balancer Rule. Name string `pulumi:"name"` } // A collection of values returned by getLBRule. type GetLBRuleResult struct { // A reference to a Backend Address Pool over which this Load Balancing Rule operates. BackendAddressPoolId string `pulumi:"backendAddressPoolId"` // The port used for internal connections on the endpoint. BackendPort int `pulumi:"backendPort"` // If outbound SNAT is enabled for this Load Balancer Rule. DisableOutboundSnat bool `pulumi:"disableOutboundSnat"` // If Floating IPs are enabled for this Load Balancer Rule // // Deprecated: The property `enableFloatingIp` has been deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider EnableFloatingIp bool `pulumi:"enableFloatingIp"` // If TCP Reset is enabled for this Load Balancer Rule. // // Deprecated: The property `enableTcpReset` has been deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider EnableTcpReset bool `pulumi:"enableTcpReset"` FloatingIpEnabled bool `pulumi:"floatingIpEnabled"` // The name of the frontend IP configuration to which the rule is associated. FrontendIpConfigurationName string `pulumi:"frontendIpConfigurationName"` // The port for the external endpoint. FrontendPort int `pulumi:"frontendPort"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Specifies the idle timeout in minutes for TCP connections. IdleTimeoutInMinutes int `pulumi:"idleTimeoutInMinutes"` // Specifies the load balancing distribution type used by the Load Balancer. LoadDistribution string `pulumi:"loadDistribution"` LoadbalancerId string `pulumi:"loadbalancerId"` Name string `pulumi:"name"` // A reference to a Probe used by this Load Balancing Rule. ProbeId string `pulumi:"probeId"` // The transport protocol for the external endpoint. Protocol string `pulumi:"protocol"` TcpResetEnabled bool `pulumi:"tcpResetEnabled"` } func GetLBRuleOutput(ctx *pulumi.Context, args GetLBRuleOutputArgs, opts ...pulumi.InvokeOption) GetLBRuleResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetLBRuleResultOutput, error) { args := v.(GetLBRuleArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:lb/getLBRule:getLBRule", args, GetLBRuleResultOutput{}, options).(GetLBRuleResultOutput), nil }).(GetLBRuleResultOutput) } // A collection of arguments for invoking getLBRule. type GetLBRuleOutputArgs struct { // The ID of the Load Balancer Rule. LoadbalancerId pulumi.StringInput `pulumi:"loadbalancerId"` // The name of this Load Balancer Rule. Name pulumi.StringInput `pulumi:"name"` } func (GetLBRuleOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetLBRuleArgs)(nil)).Elem() } // A collection of values returned by getLBRule. type GetLBRuleResultOutput struct{ *pulumi.OutputState } func (GetLBRuleResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetLBRuleResult)(nil)).Elem() } func (o GetLBRuleResultOutput) ToGetLBRuleResultOutput() GetLBRuleResultOutput { return o } func (o GetLBRuleResultOutput) ToGetLBRuleResultOutputWithContext(ctx context.Context) GetLBRuleResultOutput { return o } // A reference to a Backend Address Pool over which this Load Balancing Rule operates. func (o GetLBRuleResultOutput) BackendAddressPoolId() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.BackendAddressPoolId }).(pulumi.StringOutput) } // The port used for internal connections on the endpoint. func (o GetLBRuleResultOutput) BackendPort() pulumi.IntOutput { return o.ApplyT(func(v GetLBRuleResult) int { return v.BackendPort }).(pulumi.IntOutput) } // If outbound SNAT is enabled for this Load Balancer Rule. func (o GetLBRuleResultOutput) DisableOutboundSnat() pulumi.BoolOutput { return o.ApplyT(func(v GetLBRuleResult) bool { return v.DisableOutboundSnat }).(pulumi.BoolOutput) } // If Floating IPs are enabled for this Load Balancer Rule // // Deprecated: The property `enableFloatingIp` has been deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider func (o GetLBRuleResultOutput) EnableFloatingIp() pulumi.BoolOutput { return o.ApplyT(func(v GetLBRuleResult) bool { return v.EnableFloatingIp }).(pulumi.BoolOutput) } // If TCP Reset is enabled for this Load Balancer Rule. // // Deprecated: The property `enableTcpReset` has been deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider func (o GetLBRuleResultOutput) EnableTcpReset() pulumi.BoolOutput { return o.ApplyT(func(v GetLBRuleResult) bool { return v.EnableTcpReset }).(pulumi.BoolOutput) } func (o GetLBRuleResultOutput) FloatingIpEnabled() pulumi.BoolOutput { return o.ApplyT(func(v GetLBRuleResult) bool { return v.FloatingIpEnabled }).(pulumi.BoolOutput) } // The name of the frontend IP configuration to which the rule is associated. func (o GetLBRuleResultOutput) FrontendIpConfigurationName() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.FrontendIpConfigurationName }).(pulumi.StringOutput) } // The port for the external endpoint. func (o GetLBRuleResultOutput) FrontendPort() pulumi.IntOutput { return o.ApplyT(func(v GetLBRuleResult) int { return v.FrontendPort }).(pulumi.IntOutput) } // The provider-assigned unique ID for this managed resource. func (o GetLBRuleResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.Id }).(pulumi.StringOutput) } // Specifies the idle timeout in minutes for TCP connections. func (o GetLBRuleResultOutput) IdleTimeoutInMinutes() pulumi.IntOutput { return o.ApplyT(func(v GetLBRuleResult) int { return v.IdleTimeoutInMinutes }).(pulumi.IntOutput) } // Specifies the load balancing distribution type used by the Load Balancer. func (o GetLBRuleResultOutput) LoadDistribution() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.LoadDistribution }).(pulumi.StringOutput) } func (o GetLBRuleResultOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.LoadbalancerId }).(pulumi.StringOutput) } func (o GetLBRuleResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.Name }).(pulumi.StringOutput) } // A reference to a Probe used by this Load Balancing Rule. func (o GetLBRuleResultOutput) ProbeId() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.ProbeId }).(pulumi.StringOutput) } // The transport protocol for the external endpoint. func (o GetLBRuleResultOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v GetLBRuleResult) string { return v.Protocol }).(pulumi.StringOutput) } func (o GetLBRuleResultOutput) TcpResetEnabled() pulumi.BoolOutput { return o.ApplyT(func(v GetLBRuleResult) bool { return v.TcpResetEnabled }).(pulumi.BoolOutput) } func init() { pulumi.RegisterOutputType(GetLBRuleResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/getLBOutboundRule.go
sdk/go/azure/lb/getLBOutboundRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb 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 Load Balancer Outbound Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := lb.GetLBOutboundRule(ctx, &lb.GetLBOutboundRuleArgs{ // Name: "existing_lb_outbound_rule", // LoadbalancerId: "existing_load_balancer_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.Network` - 2023-09-01 func GetLBOutboundRule(ctx *pulumi.Context, args *GetLBOutboundRuleArgs, opts ...pulumi.InvokeOption) (*GetLBOutboundRuleResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetLBOutboundRuleResult err := ctx.Invoke("azure:lb/getLBOutboundRule:getLBOutboundRule", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getLBOutboundRule. type GetLBOutboundRuleArgs struct { // The ID of the Load Balancer in which the Outbound Rule exists. LoadbalancerId string `pulumi:"loadbalancerId"` // The name of this Load Balancer Outbound Rule. Name string `pulumi:"name"` } // A collection of values returned by getLBOutboundRule. type GetLBOutboundRuleResult struct { // The number of outbound ports used for NAT. AllocatedOutboundPorts int `pulumi:"allocatedOutboundPorts"` // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPoolId string `pulumi:"backendAddressPoolId"` EnableTcpReset bool `pulumi:"enableTcpReset"` // A `frontendIpConfiguration` block as defined below. FrontendIpConfigurations []GetLBOutboundRuleFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The timeout for the TCP idle connection. IdleTimeoutInMinutes int `pulumi:"idleTimeoutInMinutes"` LoadbalancerId string `pulumi:"loadbalancerId"` // The name of the Frontend IP Configuration. Name string `pulumi:"name"` // The transport protocol for the external endpoint. Protocol string `pulumi:"protocol"` // Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP. TcpResetEnabled bool `pulumi:"tcpResetEnabled"` } func GetLBOutboundRuleOutput(ctx *pulumi.Context, args GetLBOutboundRuleOutputArgs, opts ...pulumi.InvokeOption) GetLBOutboundRuleResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetLBOutboundRuleResultOutput, error) { args := v.(GetLBOutboundRuleArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:lb/getLBOutboundRule:getLBOutboundRule", args, GetLBOutboundRuleResultOutput{}, options).(GetLBOutboundRuleResultOutput), nil }).(GetLBOutboundRuleResultOutput) } // A collection of arguments for invoking getLBOutboundRule. type GetLBOutboundRuleOutputArgs struct { // The ID of the Load Balancer in which the Outbound Rule exists. LoadbalancerId pulumi.StringInput `pulumi:"loadbalancerId"` // The name of this Load Balancer Outbound Rule. Name pulumi.StringInput `pulumi:"name"` } func (GetLBOutboundRuleOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetLBOutboundRuleArgs)(nil)).Elem() } // A collection of values returned by getLBOutboundRule. type GetLBOutboundRuleResultOutput struct{ *pulumi.OutputState } func (GetLBOutboundRuleResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetLBOutboundRuleResult)(nil)).Elem() } func (o GetLBOutboundRuleResultOutput) ToGetLBOutboundRuleResultOutput() GetLBOutboundRuleResultOutput { return o } func (o GetLBOutboundRuleResultOutput) ToGetLBOutboundRuleResultOutputWithContext(ctx context.Context) GetLBOutboundRuleResultOutput { return o } // The number of outbound ports used for NAT. func (o GetLBOutboundRuleResultOutput) AllocatedOutboundPorts() pulumi.IntOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) int { return v.AllocatedOutboundPorts }).(pulumi.IntOutput) } // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. func (o GetLBOutboundRuleResultOutput) BackendAddressPoolId() pulumi.StringOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) string { return v.BackendAddressPoolId }).(pulumi.StringOutput) } func (o GetLBOutboundRuleResultOutput) EnableTcpReset() pulumi.BoolOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) bool { return v.EnableTcpReset }).(pulumi.BoolOutput) } // A `frontendIpConfiguration` block as defined below. func (o GetLBOutboundRuleResultOutput) FrontendIpConfigurations() GetLBOutboundRuleFrontendIpConfigurationArrayOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) []GetLBOutboundRuleFrontendIpConfiguration { return v.FrontendIpConfigurations }).(GetLBOutboundRuleFrontendIpConfigurationArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetLBOutboundRuleResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) string { return v.Id }).(pulumi.StringOutput) } // The timeout for the TCP idle connection. func (o GetLBOutboundRuleResultOutput) IdleTimeoutInMinutes() pulumi.IntOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) int { return v.IdleTimeoutInMinutes }).(pulumi.IntOutput) } func (o GetLBOutboundRuleResultOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) string { return v.LoadbalancerId }).(pulumi.StringOutput) } // The name of the Frontend IP Configuration. func (o GetLBOutboundRuleResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) string { return v.Name }).(pulumi.StringOutput) } // The transport protocol for the external endpoint. func (o GetLBOutboundRuleResultOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) string { return v.Protocol }).(pulumi.StringOutput) } // Is the bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination enabled? This value is useful when the protocol is set to TCP. func (o GetLBOutboundRuleResultOutput) TcpResetEnabled() pulumi.BoolOutput { return o.ApplyT(func(v GetLBOutboundRuleResult) bool { return v.TcpResetEnabled }).(pulumi.BoolOutput) } func init() { pulumi.RegisterOutputType(GetLBOutboundRuleResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/probe.go
sdk/go/azure/lb/probe.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a LoadBalancer Probe Resource. // // > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("LoadBalancerRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("PublicIPForLB"), // 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("TestLoadBalancer"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = lb.NewProbe(ctx, "example", &lb.ProbeArgs{ // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("ssh-running-probe"), // Port: pulumi.Int(22), // }) // if err != 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` - 2023-09-01 // // ## Import // // Load Balancer Probes can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/probe:Probe example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/probes/probe1 // ``` type Probe struct { pulumi.CustomResourceState // The interval, in seconds between probes to the backend endpoint for health status. The default value is 15, the minimum value is 5. IntervalInSeconds pulumi.IntPtrOutput `pulumi:"intervalInSeconds"` LoadBalancerRules pulumi.StringArrayOutput `pulumi:"loadBalancerRules"` // The ID of the LoadBalancer in which to create the Probe. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringOutput `pulumi:"loadbalancerId"` // Specifies the name of the Probe. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The number of failed probe attempts after which the backend endpoint is removed from rotation. Default to `2`. NumberOfProbes multiplied by intervalInSeconds value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful. NumberOfProbes pulumi.IntPtrOutput `pulumi:"numberOfProbes"` // Port on which the Probe queries the backend endpoint. Possible values range from 1 to 65535, inclusive. Port pulumi.IntOutput `pulumi:"port"` // The number of consecutive successful or failed probes that allow or deny traffic to this endpoint. Possible values range from `1` to `100`. The default value is `1`. ProbeThreshold pulumi.IntPtrOutput `pulumi:"probeThreshold"` // Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. Defaults to `Tcp`. Protocol pulumi.StringPtrOutput `pulumi:"protocol"` // The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. RequestPath pulumi.StringPtrOutput `pulumi:"requestPath"` } // NewProbe registers a new resource with the given unique name, arguments, and options. func NewProbe(ctx *pulumi.Context, name string, args *ProbeArgs, opts ...pulumi.ResourceOption) (*Probe, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LoadbalancerId == nil { return nil, errors.New("invalid value for required argument 'LoadbalancerId'") } if args.Port == nil { return nil, errors.New("invalid value for required argument 'Port'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Probe err := ctx.RegisterResource("azure:lb/probe:Probe", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProbe gets an existing Probe resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetProbe(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProbeState, opts ...pulumi.ResourceOption) (*Probe, error) { var resource Probe err := ctx.ReadResource("azure:lb/probe:Probe", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Probe resources. type probeState struct { // The interval, in seconds between probes to the backend endpoint for health status. The default value is 15, the minimum value is 5. IntervalInSeconds *int `pulumi:"intervalInSeconds"` LoadBalancerRules []string `pulumi:"loadBalancerRules"` // The ID of the LoadBalancer in which to create the Probe. Changing this forces a new resource to be created. LoadbalancerId *string `pulumi:"loadbalancerId"` // Specifies the name of the Probe. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The number of failed probe attempts after which the backend endpoint is removed from rotation. Default to `2`. NumberOfProbes multiplied by intervalInSeconds value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful. NumberOfProbes *int `pulumi:"numberOfProbes"` // Port on which the Probe queries the backend endpoint. Possible values range from 1 to 65535, inclusive. Port *int `pulumi:"port"` // The number of consecutive successful or failed probes that allow or deny traffic to this endpoint. Possible values range from `1` to `100`. The default value is `1`. ProbeThreshold *int `pulumi:"probeThreshold"` // Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. Defaults to `Tcp`. Protocol *string `pulumi:"protocol"` // The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. RequestPath *string `pulumi:"requestPath"` } type ProbeState struct { // The interval, in seconds between probes to the backend endpoint for health status. The default value is 15, the minimum value is 5. IntervalInSeconds pulumi.IntPtrInput LoadBalancerRules pulumi.StringArrayInput // The ID of the LoadBalancer in which to create the Probe. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringPtrInput // Specifies the name of the Probe. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The number of failed probe attempts after which the backend endpoint is removed from rotation. Default to `2`. NumberOfProbes multiplied by intervalInSeconds value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful. NumberOfProbes pulumi.IntPtrInput // Port on which the Probe queries the backend endpoint. Possible values range from 1 to 65535, inclusive. Port pulumi.IntPtrInput // The number of consecutive successful or failed probes that allow or deny traffic to this endpoint. Possible values range from `1` to `100`. The default value is `1`. ProbeThreshold pulumi.IntPtrInput // Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. Defaults to `Tcp`. Protocol pulumi.StringPtrInput // The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. RequestPath pulumi.StringPtrInput } func (ProbeState) ElementType() reflect.Type { return reflect.TypeOf((*probeState)(nil)).Elem() } type probeArgs struct { // The interval, in seconds between probes to the backend endpoint for health status. The default value is 15, the minimum value is 5. IntervalInSeconds *int `pulumi:"intervalInSeconds"` // The ID of the LoadBalancer in which to create the Probe. Changing this forces a new resource to be created. LoadbalancerId string `pulumi:"loadbalancerId"` // Specifies the name of the Probe. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The number of failed probe attempts after which the backend endpoint is removed from rotation. Default to `2`. NumberOfProbes multiplied by intervalInSeconds value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful. NumberOfProbes *int `pulumi:"numberOfProbes"` // Port on which the Probe queries the backend endpoint. Possible values range from 1 to 65535, inclusive. Port int `pulumi:"port"` // The number of consecutive successful or failed probes that allow or deny traffic to this endpoint. Possible values range from `1` to `100`. The default value is `1`. ProbeThreshold *int `pulumi:"probeThreshold"` // Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. Defaults to `Tcp`. Protocol *string `pulumi:"protocol"` // The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. RequestPath *string `pulumi:"requestPath"` } // The set of arguments for constructing a Probe resource. type ProbeArgs struct { // The interval, in seconds between probes to the backend endpoint for health status. The default value is 15, the minimum value is 5. IntervalInSeconds pulumi.IntPtrInput // The ID of the LoadBalancer in which to create the Probe. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringInput // Specifies the name of the Probe. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The number of failed probe attempts after which the backend endpoint is removed from rotation. Default to `2`. NumberOfProbes multiplied by intervalInSeconds value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful. NumberOfProbes pulumi.IntPtrInput // Port on which the Probe queries the backend endpoint. Possible values range from 1 to 65535, inclusive. Port pulumi.IntInput // The number of consecutive successful or failed probes that allow or deny traffic to this endpoint. Possible values range from `1` to `100`. The default value is `1`. ProbeThreshold pulumi.IntPtrInput // Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. Defaults to `Tcp`. Protocol pulumi.StringPtrInput // The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. RequestPath pulumi.StringPtrInput } func (ProbeArgs) ElementType() reflect.Type { return reflect.TypeOf((*probeArgs)(nil)).Elem() } type ProbeInput interface { pulumi.Input ToProbeOutput() ProbeOutput ToProbeOutputWithContext(ctx context.Context) ProbeOutput } func (*Probe) ElementType() reflect.Type { return reflect.TypeOf((**Probe)(nil)).Elem() } func (i *Probe) ToProbeOutput() ProbeOutput { return i.ToProbeOutputWithContext(context.Background()) } func (i *Probe) ToProbeOutputWithContext(ctx context.Context) ProbeOutput { return pulumi.ToOutputWithContext(ctx, i).(ProbeOutput) } // ProbeArrayInput is an input type that accepts ProbeArray and ProbeArrayOutput values. // You can construct a concrete instance of `ProbeArrayInput` via: // // ProbeArray{ ProbeArgs{...} } type ProbeArrayInput interface { pulumi.Input ToProbeArrayOutput() ProbeArrayOutput ToProbeArrayOutputWithContext(context.Context) ProbeArrayOutput } type ProbeArray []ProbeInput func (ProbeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Probe)(nil)).Elem() } func (i ProbeArray) ToProbeArrayOutput() ProbeArrayOutput { return i.ToProbeArrayOutputWithContext(context.Background()) } func (i ProbeArray) ToProbeArrayOutputWithContext(ctx context.Context) ProbeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProbeArrayOutput) } // ProbeMapInput is an input type that accepts ProbeMap and ProbeMapOutput values. // You can construct a concrete instance of `ProbeMapInput` via: // // ProbeMap{ "key": ProbeArgs{...} } type ProbeMapInput interface { pulumi.Input ToProbeMapOutput() ProbeMapOutput ToProbeMapOutputWithContext(context.Context) ProbeMapOutput } type ProbeMap map[string]ProbeInput func (ProbeMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Probe)(nil)).Elem() } func (i ProbeMap) ToProbeMapOutput() ProbeMapOutput { return i.ToProbeMapOutputWithContext(context.Background()) } func (i ProbeMap) ToProbeMapOutputWithContext(ctx context.Context) ProbeMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProbeMapOutput) } type ProbeOutput struct{ *pulumi.OutputState } func (ProbeOutput) ElementType() reflect.Type { return reflect.TypeOf((**Probe)(nil)).Elem() } func (o ProbeOutput) ToProbeOutput() ProbeOutput { return o } func (o ProbeOutput) ToProbeOutputWithContext(ctx context.Context) ProbeOutput { return o } // The interval, in seconds between probes to the backend endpoint for health status. The default value is 15, the minimum value is 5. func (o ProbeOutput) IntervalInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *Probe) pulumi.IntPtrOutput { return v.IntervalInSeconds }).(pulumi.IntPtrOutput) } func (o ProbeOutput) LoadBalancerRules() pulumi.StringArrayOutput { return o.ApplyT(func(v *Probe) pulumi.StringArrayOutput { return v.LoadBalancerRules }).(pulumi.StringArrayOutput) } // The ID of the LoadBalancer in which to create the Probe. Changing this forces a new resource to be created. func (o ProbeOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v *Probe) pulumi.StringOutput { return v.LoadbalancerId }).(pulumi.StringOutput) } // Specifies the name of the Probe. Changing this forces a new resource to be created. func (o ProbeOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Probe) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The number of failed probe attempts after which the backend endpoint is removed from rotation. Default to `2`. NumberOfProbes multiplied by intervalInSeconds value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful. func (o ProbeOutput) NumberOfProbes() pulumi.IntPtrOutput { return o.ApplyT(func(v *Probe) pulumi.IntPtrOutput { return v.NumberOfProbes }).(pulumi.IntPtrOutput) } // Port on which the Probe queries the backend endpoint. Possible values range from 1 to 65535, inclusive. func (o ProbeOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v *Probe) pulumi.IntOutput { return v.Port }).(pulumi.IntOutput) } // The number of consecutive successful or failed probes that allow or deny traffic to this endpoint. Possible values range from `1` to `100`. The default value is `1`. func (o ProbeOutput) ProbeThreshold() pulumi.IntPtrOutput { return o.ApplyT(func(v *Probe) pulumi.IntPtrOutput { return v.ProbeThreshold }).(pulumi.IntPtrOutput) } // Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. Defaults to `Tcp`. func (o ProbeOutput) Protocol() pulumi.StringPtrOutput { return o.ApplyT(func(v *Probe) pulumi.StringPtrOutput { return v.Protocol }).(pulumi.StringPtrOutput) } // The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. func (o ProbeOutput) RequestPath() pulumi.StringPtrOutput { return o.ApplyT(func(v *Probe) pulumi.StringPtrOutput { return v.RequestPath }).(pulumi.StringPtrOutput) } type ProbeArrayOutput struct{ *pulumi.OutputState } func (ProbeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Probe)(nil)).Elem() } func (o ProbeArrayOutput) ToProbeArrayOutput() ProbeArrayOutput { return o } func (o ProbeArrayOutput) ToProbeArrayOutputWithContext(ctx context.Context) ProbeArrayOutput { return o } func (o ProbeArrayOutput) Index(i pulumi.IntInput) ProbeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Probe { return vs[0].([]*Probe)[vs[1].(int)] }).(ProbeOutput) } type ProbeMapOutput struct{ *pulumi.OutputState } func (ProbeMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Probe)(nil)).Elem() } func (o ProbeMapOutput) ToProbeMapOutput() ProbeMapOutput { return o } func (o ProbeMapOutput) ToProbeMapOutputWithContext(ctx context.Context) ProbeMapOutput { return o } func (o ProbeMapOutput) MapIndex(k pulumi.StringInput) ProbeOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Probe { return vs[0].(map[string]*Probe)[vs[1].(string)] }).(ProbeOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProbeInput)(nil)).Elem(), &Probe{}) pulumi.RegisterInputType(reflect.TypeOf((*ProbeArrayInput)(nil)).Elem(), ProbeArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProbeMapInput)(nil)).Elem(), ProbeMap{}) pulumi.RegisterOutputType(ProbeOutput{}) pulumi.RegisterOutputType(ProbeArrayOutput{}) pulumi.RegisterOutputType(ProbeMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/natPool.go
sdk/go/azure/lb/natPool.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Load Balancer NAT pool. // // > **Note:** This resource cannot be used with with virtual machines, instead use the `lb.NatRule` resource. // // > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("LoadBalancerRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("PublicIPForLB"), // 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("TestLoadBalancer"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = lb.NewNatPool(ctx, "example", &lb.NatPoolArgs{ // ResourceGroupName: example.Name, // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("SampleApplicationPool"), // Protocol: pulumi.String("Tcp"), // FrontendPortStart: pulumi.Int(80), // FrontendPortEnd: pulumi.Int(81), // BackendPort: pulumi.Int(8080), // FrontendIpConfigurationName: pulumi.String("PublicIPAddress"), // }) // if err != 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` - 2023-09-01 // // ## Import // // Load Balancer NAT Pools can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/natPool:NatPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatPools/pool1 // ``` type NatPool struct { pulumi.CustomResourceState // The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive. BackendPort pulumi.IntOutput `pulumi:"backendPort"` // Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. FloatingIpEnabled pulumi.BoolPtrOutput `pulumi:"floatingIpEnabled"` FrontendIpConfigurationId pulumi.StringOutput `pulumi:"frontendIpConfigurationId"` // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName pulumi.StringOutput `pulumi:"frontendIpConfigurationName"` // The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortEnd pulumi.IntOutput `pulumi:"frontendPortEnd"` // The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortStart pulumi.IntOutput `pulumi:"frontendPortStart"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30`. Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the NAT pool. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringOutput `pulumi:"loadbalancerId"` // Specifies the name of the NAT pool. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `All`, `Tcp` and `Udp`. Protocol pulumi.StringOutput `pulumi:"protocol"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolPtrOutput `pulumi:"tcpResetEnabled"` } // NewNatPool registers a new resource with the given unique name, arguments, and options. func NewNatPool(ctx *pulumi.Context, name string, args *NatPoolArgs, opts ...pulumi.ResourceOption) (*NatPool, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendPort == nil { return nil, errors.New("invalid value for required argument 'BackendPort'") } if args.FrontendIpConfigurationName == nil { return nil, errors.New("invalid value for required argument 'FrontendIpConfigurationName'") } if args.FrontendPortEnd == nil { return nil, errors.New("invalid value for required argument 'FrontendPortEnd'") } if args.FrontendPortStart == nil { return nil, errors.New("invalid value for required argument 'FrontendPortStart'") } if args.LoadbalancerId == nil { return nil, errors.New("invalid value for required argument 'LoadbalancerId'") } if args.Protocol == nil { return nil, errors.New("invalid value for required argument 'Protocol'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NatPool err := ctx.RegisterResource("azure:lb/natPool:NatPool", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNatPool gets an existing NatPool resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNatPool(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NatPoolState, opts ...pulumi.ResourceOption) (*NatPool, error) { var resource NatPool err := ctx.ReadResource("azure:lb/natPool:NatPool", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NatPool resources. type natPoolState struct { // The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive. BackendPort *int `pulumi:"backendPort"` // Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. FloatingIpEnabled *bool `pulumi:"floatingIpEnabled"` FrontendIpConfigurationId *string `pulumi:"frontendIpConfigurationId"` // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName *string `pulumi:"frontendIpConfigurationName"` // The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortEnd *int `pulumi:"frontendPortEnd"` // The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortStart *int `pulumi:"frontendPortStart"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30`. Defaults to `4`. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the NAT pool. Changing this forces a new resource to be created. LoadbalancerId *string `pulumi:"loadbalancerId"` // Specifies the name of the NAT pool. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `All`, `Tcp` and `Udp`. Protocol *string `pulumi:"protocol"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } type NatPoolState struct { // The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive. BackendPort pulumi.IntPtrInput // Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. FloatingIpEnabled pulumi.BoolPtrInput FrontendIpConfigurationId pulumi.StringPtrInput // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName pulumi.StringPtrInput // The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortEnd pulumi.IntPtrInput // The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortStart pulumi.IntPtrInput // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30`. Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrInput // The ID of the Load Balancer in which to create the NAT pool. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringPtrInput // Specifies the name of the NAT pool. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `All`, `Tcp` and `Udp`. Protocol pulumi.StringPtrInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolPtrInput } func (NatPoolState) ElementType() reflect.Type { return reflect.TypeOf((*natPoolState)(nil)).Elem() } type natPoolArgs struct { // The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive. BackendPort int `pulumi:"backendPort"` // Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. FloatingIpEnabled *bool `pulumi:"floatingIpEnabled"` // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName string `pulumi:"frontendIpConfigurationName"` // The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortEnd int `pulumi:"frontendPortEnd"` // The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortStart int `pulumi:"frontendPortStart"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30`. Defaults to `4`. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the NAT pool. Changing this forces a new resource to be created. LoadbalancerId string `pulumi:"loadbalancerId"` // Specifies the name of the NAT pool. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `All`, `Tcp` and `Udp`. Protocol string `pulumi:"protocol"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } // The set of arguments for constructing a NatPool resource. type NatPoolArgs struct { // The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive. BackendPort pulumi.IntInput // Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. FloatingIpEnabled pulumi.BoolPtrInput // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName pulumi.StringInput // The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortEnd pulumi.IntInput // The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPortStart pulumi.IntInput // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30`. Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrInput // The ID of the Load Balancer in which to create the NAT pool. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringInput // Specifies the name of the NAT pool. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `All`, `Tcp` and `Udp`. Protocol pulumi.StringInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolPtrInput } func (NatPoolArgs) ElementType() reflect.Type { return reflect.TypeOf((*natPoolArgs)(nil)).Elem() } type NatPoolInput interface { pulumi.Input ToNatPoolOutput() NatPoolOutput ToNatPoolOutputWithContext(ctx context.Context) NatPoolOutput } func (*NatPool) ElementType() reflect.Type { return reflect.TypeOf((**NatPool)(nil)).Elem() } func (i *NatPool) ToNatPoolOutput() NatPoolOutput { return i.ToNatPoolOutputWithContext(context.Background()) } func (i *NatPool) ToNatPoolOutputWithContext(ctx context.Context) NatPoolOutput { return pulumi.ToOutputWithContext(ctx, i).(NatPoolOutput) } // NatPoolArrayInput is an input type that accepts NatPoolArray and NatPoolArrayOutput values. // You can construct a concrete instance of `NatPoolArrayInput` via: // // NatPoolArray{ NatPoolArgs{...} } type NatPoolArrayInput interface { pulumi.Input ToNatPoolArrayOutput() NatPoolArrayOutput ToNatPoolArrayOutputWithContext(context.Context) NatPoolArrayOutput } type NatPoolArray []NatPoolInput func (NatPoolArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatPool)(nil)).Elem() } func (i NatPoolArray) ToNatPoolArrayOutput() NatPoolArrayOutput { return i.ToNatPoolArrayOutputWithContext(context.Background()) } func (i NatPoolArray) ToNatPoolArrayOutputWithContext(ctx context.Context) NatPoolArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NatPoolArrayOutput) } // NatPoolMapInput is an input type that accepts NatPoolMap and NatPoolMapOutput values. // You can construct a concrete instance of `NatPoolMapInput` via: // // NatPoolMap{ "key": NatPoolArgs{...} } type NatPoolMapInput interface { pulumi.Input ToNatPoolMapOutput() NatPoolMapOutput ToNatPoolMapOutputWithContext(context.Context) NatPoolMapOutput } type NatPoolMap map[string]NatPoolInput func (NatPoolMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatPool)(nil)).Elem() } func (i NatPoolMap) ToNatPoolMapOutput() NatPoolMapOutput { return i.ToNatPoolMapOutputWithContext(context.Background()) } func (i NatPoolMap) ToNatPoolMapOutputWithContext(ctx context.Context) NatPoolMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NatPoolMapOutput) } type NatPoolOutput struct{ *pulumi.OutputState } func (NatPoolOutput) ElementType() reflect.Type { return reflect.TypeOf((**NatPool)(nil)).Elem() } func (o NatPoolOutput) ToNatPoolOutput() NatPoolOutput { return o } func (o NatPoolOutput) ToNatPoolOutputWithContext(ctx context.Context) NatPoolOutput { return o } // The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive. func (o NatPoolOutput) BackendPort() pulumi.IntOutput { return o.ApplyT(func(v *NatPool) pulumi.IntOutput { return v.BackendPort }).(pulumi.IntOutput) } // Are the floating IPs enabled for this Load Balancer Rule? A floating IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. func (o NatPoolOutput) FloatingIpEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *NatPool) pulumi.BoolPtrOutput { return v.FloatingIpEnabled }).(pulumi.BoolPtrOutput) } func (o NatPoolOutput) FrontendIpConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *NatPool) pulumi.StringOutput { return v.FrontendIpConfigurationId }).(pulumi.StringOutput) } // The name of the frontend IP configuration exposing this rule. func (o NatPoolOutput) FrontendIpConfigurationName() pulumi.StringOutput { return o.ApplyT(func(v *NatPool) pulumi.StringOutput { return v.FrontendIpConfigurationName }).(pulumi.StringOutput) } // The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. func (o NatPoolOutput) FrontendPortEnd() pulumi.IntOutput { return o.ApplyT(func(v *NatPool) pulumi.IntOutput { return v.FrontendPortEnd }).(pulumi.IntOutput) } // The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. func (o NatPoolOutput) FrontendPortStart() pulumi.IntOutput { return o.ApplyT(func(v *NatPool) pulumi.IntOutput { return v.FrontendPortStart }).(pulumi.IntOutput) } // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30`. Defaults to `4`. func (o NatPoolOutput) IdleTimeoutInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *NatPool) pulumi.IntPtrOutput { return v.IdleTimeoutInMinutes }).(pulumi.IntPtrOutput) } // The ID of the Load Balancer in which to create the NAT pool. Changing this forces a new resource to be created. func (o NatPoolOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v *NatPool) pulumi.StringOutput { return v.LoadbalancerId }).(pulumi.StringOutput) } // Specifies the name of the NAT pool. Changing this forces a new resource to be created. func (o NatPoolOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NatPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The transport protocol for the external endpoint. Possible values are `All`, `Tcp` and `Udp`. func (o NatPoolOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v *NatPool) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput) } // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. func (o NatPoolOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NatPool) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Is TCP Reset enabled for this Load Balancer Rule? func (o NatPoolOutput) TcpResetEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *NatPool) pulumi.BoolPtrOutput { return v.TcpResetEnabled }).(pulumi.BoolPtrOutput) } type NatPoolArrayOutput struct{ *pulumi.OutputState } func (NatPoolArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatPool)(nil)).Elem() } func (o NatPoolArrayOutput) ToNatPoolArrayOutput() NatPoolArrayOutput { return o } func (o NatPoolArrayOutput) ToNatPoolArrayOutputWithContext(ctx context.Context) NatPoolArrayOutput { return o } func (o NatPoolArrayOutput) Index(i pulumi.IntInput) NatPoolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NatPool { return vs[0].([]*NatPool)[vs[1].(int)] }).(NatPoolOutput) } type NatPoolMapOutput struct{ *pulumi.OutputState } func (NatPoolMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatPool)(nil)).Elem() } func (o NatPoolMapOutput) ToNatPoolMapOutput() NatPoolMapOutput { return o } func (o NatPoolMapOutput) ToNatPoolMapOutputWithContext(ctx context.Context) NatPoolMapOutput { return o } func (o NatPoolMapOutput) MapIndex(k pulumi.StringInput) NatPoolOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NatPool { return vs[0].(map[string]*NatPool)[vs[1].(string)] }).(NatPoolOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NatPoolInput)(nil)).Elem(), &NatPool{}) pulumi.RegisterInputType(reflect.TypeOf((*NatPoolArrayInput)(nil)).Elem(), NatPoolArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NatPoolMapInput)(nil)).Elem(), NatPoolMap{}) pulumi.RegisterOutputType(NatPoolOutput{}) pulumi.RegisterOutputType(NatPoolArrayOutput{}) pulumi.RegisterOutputType(NatPoolMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/backendAddressPoolAddress.go
sdk/go/azure/lb/backendAddressPoolAddress.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Backend Address within a Backend Address Pool. // // > **Note:** Backend Addresses can only be added to a `Standard` SKU Load Balancer. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualNetwork(ctx, &network.LookupVirtualNetworkArgs{ // Name: "example-network", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // exampleGetLB, err := lb.GetLB(ctx, &lb.GetLBArgs{ // Name: "example-lb", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // exampleGetBackendAddressPool, err := lb.LookupBackendAddressPool(ctx, &lb.LookupBackendAddressPoolArgs{ // Name: "first", // LoadbalancerId: exampleGetLB.Id, // }, nil) // if err != nil { // return err // } // _, err = lb.NewBackendAddressPoolAddress(ctx, "example", &lb.BackendAddressPoolAddressArgs{ // Name: pulumi.String("example"), // BackendAddressPoolId: pulumi.String(exampleGetBackendAddressPool.Id), // VirtualNetworkId: pulumi.String(example.Id), // IpAddress: pulumi.String("10.0.0.1"), // }) // if err != nil { // return err // } // backend_pool_cr, err := lb.LookupBackendAddressPool(ctx, &lb.LookupBackendAddressPoolArgs{ // Name: "globalLBBackendPool", // LoadbalancerId: exampleGetLB.Id, // }, nil) // if err != nil { // return err // } // _, err = lb.NewBackendAddressPoolAddress(ctx, "example-1", &lb.BackendAddressPoolAddressArgs{ // Name: pulumi.String("address1"), // BackendAddressPoolId: pulumi.String(backend_pool_cr.Id), // BackendAddressIpConfigurationId: pulumi.Any(backend_lb_R1.FrontendIpConfiguration[0].Id), // }) // if err != nil { // return err // } // _, err = lb.NewBackendAddressPoolAddress(ctx, "example-2", &lb.BackendAddressPoolAddressArgs{ // Name: pulumi.String("address2"), // BackendAddressPoolId: pulumi.String(backend_pool_cr.Id), // BackendAddressIpConfigurationId: pulumi.Any(backend_lb_R2.FrontendIpConfiguration[0].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` - 2023-09-01 // // ## Import // // Backend Address Pool Addresses can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/backendAddressPoolAddress:BackendAddressPoolAddress example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/loadBalancer1/backendAddressPools/backendAddressPool1/addresses/address1 // ``` type BackendAddressPoolAddress struct { pulumi.CustomResourceState // The ip config ID of the regional load balancer that's added to the global load balancer's backend address pool. // // > **Note:** For cross-region load balancer, please append the name of the load balancers, virtual machines, and other resources in each region with a -R1 and -R2. BackendAddressIpConfigurationId pulumi.StringPtrOutput `pulumi:"backendAddressIpConfigurationId"` // The ID of the Backend Address Pool. Changing this forces a new Backend Address Pool Address to be created. BackendAddressPoolId pulumi.StringOutput `pulumi:"backendAddressPoolId"` // A list of `inboundNatRulePortMapping` block as defined below. InboundNatRulePortMappings BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput `pulumi:"inboundNatRulePortMappings"` // The Static IP Address which should be allocated to this Backend Address Pool. IpAddress pulumi.StringPtrOutput `pulumi:"ipAddress"` // The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId pulumi.StringPtrOutput `pulumi:"virtualNetworkId"` } // NewBackendAddressPoolAddress registers a new resource with the given unique name, arguments, and options. func NewBackendAddressPoolAddress(ctx *pulumi.Context, name string, args *BackendAddressPoolAddressArgs, opts ...pulumi.ResourceOption) (*BackendAddressPoolAddress, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendAddressPoolId == nil { return nil, errors.New("invalid value for required argument 'BackendAddressPoolId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource BackendAddressPoolAddress err := ctx.RegisterResource("azure:lb/backendAddressPoolAddress:BackendAddressPoolAddress", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetBackendAddressPoolAddress gets an existing BackendAddressPoolAddress resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetBackendAddressPoolAddress(ctx *pulumi.Context, name string, id pulumi.IDInput, state *BackendAddressPoolAddressState, opts ...pulumi.ResourceOption) (*BackendAddressPoolAddress, error) { var resource BackendAddressPoolAddress err := ctx.ReadResource("azure:lb/backendAddressPoolAddress:BackendAddressPoolAddress", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering BackendAddressPoolAddress resources. type backendAddressPoolAddressState struct { // The ip config ID of the regional load balancer that's added to the global load balancer's backend address pool. // // > **Note:** For cross-region load balancer, please append the name of the load balancers, virtual machines, and other resources in each region with a -R1 and -R2. BackendAddressIpConfigurationId *string `pulumi:"backendAddressIpConfigurationId"` // The ID of the Backend Address Pool. Changing this forces a new Backend Address Pool Address to be created. BackendAddressPoolId *string `pulumi:"backendAddressPoolId"` // A list of `inboundNatRulePortMapping` block as defined below. InboundNatRulePortMappings []BackendAddressPoolAddressInboundNatRulePortMapping `pulumi:"inboundNatRulePortMappings"` // The Static IP Address which should be allocated to this Backend Address Pool. IpAddress *string `pulumi:"ipAddress"` // The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. Name *string `pulumi:"name"` // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId *string `pulumi:"virtualNetworkId"` } type BackendAddressPoolAddressState struct { // The ip config ID of the regional load balancer that's added to the global load balancer's backend address pool. // // > **Note:** For cross-region load balancer, please append the name of the load balancers, virtual machines, and other resources in each region with a -R1 and -R2. BackendAddressIpConfigurationId pulumi.StringPtrInput // The ID of the Backend Address Pool. Changing this forces a new Backend Address Pool Address to be created. BackendAddressPoolId pulumi.StringPtrInput // A list of `inboundNatRulePortMapping` block as defined below. InboundNatRulePortMappings BackendAddressPoolAddressInboundNatRulePortMappingArrayInput // The Static IP Address which should be allocated to this Backend Address Pool. IpAddress pulumi.StringPtrInput // The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. Name pulumi.StringPtrInput // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId pulumi.StringPtrInput } func (BackendAddressPoolAddressState) ElementType() reflect.Type { return reflect.TypeOf((*backendAddressPoolAddressState)(nil)).Elem() } type backendAddressPoolAddressArgs struct { // The ip config ID of the regional load balancer that's added to the global load balancer's backend address pool. // // > **Note:** For cross-region load balancer, please append the name of the load balancers, virtual machines, and other resources in each region with a -R1 and -R2. BackendAddressIpConfigurationId *string `pulumi:"backendAddressIpConfigurationId"` // The ID of the Backend Address Pool. Changing this forces a new Backend Address Pool Address to be created. BackendAddressPoolId string `pulumi:"backendAddressPoolId"` // The Static IP Address which should be allocated to this Backend Address Pool. IpAddress *string `pulumi:"ipAddress"` // The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. Name *string `pulumi:"name"` // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId *string `pulumi:"virtualNetworkId"` } // The set of arguments for constructing a BackendAddressPoolAddress resource. type BackendAddressPoolAddressArgs struct { // The ip config ID of the regional load balancer that's added to the global load balancer's backend address pool. // // > **Note:** For cross-region load balancer, please append the name of the load balancers, virtual machines, and other resources in each region with a -R1 and -R2. BackendAddressIpConfigurationId pulumi.StringPtrInput // The ID of the Backend Address Pool. Changing this forces a new Backend Address Pool Address to be created. BackendAddressPoolId pulumi.StringInput // The Static IP Address which should be allocated to this Backend Address Pool. IpAddress pulumi.StringPtrInput // The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. Name pulumi.StringPtrInput // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId pulumi.StringPtrInput } func (BackendAddressPoolAddressArgs) ElementType() reflect.Type { return reflect.TypeOf((*backendAddressPoolAddressArgs)(nil)).Elem() } type BackendAddressPoolAddressInput interface { pulumi.Input ToBackendAddressPoolAddressOutput() BackendAddressPoolAddressOutput ToBackendAddressPoolAddressOutputWithContext(ctx context.Context) BackendAddressPoolAddressOutput } func (*BackendAddressPoolAddress) ElementType() reflect.Type { return reflect.TypeOf((**BackendAddressPoolAddress)(nil)).Elem() } func (i *BackendAddressPoolAddress) ToBackendAddressPoolAddressOutput() BackendAddressPoolAddressOutput { return i.ToBackendAddressPoolAddressOutputWithContext(context.Background()) } func (i *BackendAddressPoolAddress) ToBackendAddressPoolAddressOutputWithContext(ctx context.Context) BackendAddressPoolAddressOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolAddressOutput) } // BackendAddressPoolAddressArrayInput is an input type that accepts BackendAddressPoolAddressArray and BackendAddressPoolAddressArrayOutput values. // You can construct a concrete instance of `BackendAddressPoolAddressArrayInput` via: // // BackendAddressPoolAddressArray{ BackendAddressPoolAddressArgs{...} } type BackendAddressPoolAddressArrayInput interface { pulumi.Input ToBackendAddressPoolAddressArrayOutput() BackendAddressPoolAddressArrayOutput ToBackendAddressPoolAddressArrayOutputWithContext(context.Context) BackendAddressPoolAddressArrayOutput } type BackendAddressPoolAddressArray []BackendAddressPoolAddressInput func (BackendAddressPoolAddressArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*BackendAddressPoolAddress)(nil)).Elem() } func (i BackendAddressPoolAddressArray) ToBackendAddressPoolAddressArrayOutput() BackendAddressPoolAddressArrayOutput { return i.ToBackendAddressPoolAddressArrayOutputWithContext(context.Background()) } func (i BackendAddressPoolAddressArray) ToBackendAddressPoolAddressArrayOutputWithContext(ctx context.Context) BackendAddressPoolAddressArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolAddressArrayOutput) } // BackendAddressPoolAddressMapInput is an input type that accepts BackendAddressPoolAddressMap and BackendAddressPoolAddressMapOutput values. // You can construct a concrete instance of `BackendAddressPoolAddressMapInput` via: // // BackendAddressPoolAddressMap{ "key": BackendAddressPoolAddressArgs{...} } type BackendAddressPoolAddressMapInput interface { pulumi.Input ToBackendAddressPoolAddressMapOutput() BackendAddressPoolAddressMapOutput ToBackendAddressPoolAddressMapOutputWithContext(context.Context) BackendAddressPoolAddressMapOutput } type BackendAddressPoolAddressMap map[string]BackendAddressPoolAddressInput func (BackendAddressPoolAddressMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BackendAddressPoolAddress)(nil)).Elem() } func (i BackendAddressPoolAddressMap) ToBackendAddressPoolAddressMapOutput() BackendAddressPoolAddressMapOutput { return i.ToBackendAddressPoolAddressMapOutputWithContext(context.Background()) } func (i BackendAddressPoolAddressMap) ToBackendAddressPoolAddressMapOutputWithContext(ctx context.Context) BackendAddressPoolAddressMapOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolAddressMapOutput) } type BackendAddressPoolAddressOutput struct{ *pulumi.OutputState } func (BackendAddressPoolAddressOutput) ElementType() reflect.Type { return reflect.TypeOf((**BackendAddressPoolAddress)(nil)).Elem() } func (o BackendAddressPoolAddressOutput) ToBackendAddressPoolAddressOutput() BackendAddressPoolAddressOutput { return o } func (o BackendAddressPoolAddressOutput) ToBackendAddressPoolAddressOutputWithContext(ctx context.Context) BackendAddressPoolAddressOutput { return o } // The ip config ID of the regional load balancer that's added to the global load balancer's backend address pool. // // > **Note:** For cross-region load balancer, please append the name of the load balancers, virtual machines, and other resources in each region with a -R1 and -R2. func (o BackendAddressPoolAddressOutput) BackendAddressIpConfigurationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *BackendAddressPoolAddress) pulumi.StringPtrOutput { return v.BackendAddressIpConfigurationId }).(pulumi.StringPtrOutput) } // The ID of the Backend Address Pool. Changing this forces a new Backend Address Pool Address to be created. func (o BackendAddressPoolAddressOutput) BackendAddressPoolId() pulumi.StringOutput { return o.ApplyT(func(v *BackendAddressPoolAddress) pulumi.StringOutput { return v.BackendAddressPoolId }).(pulumi.StringOutput) } // A list of `inboundNatRulePortMapping` block as defined below. func (o BackendAddressPoolAddressOutput) InboundNatRulePortMappings() BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput { return o.ApplyT(func(v *BackendAddressPoolAddress) BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput { return v.InboundNatRulePortMappings }).(BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput) } // The Static IP Address which should be allocated to this Backend Address Pool. func (o BackendAddressPoolAddressOutput) IpAddress() pulumi.StringPtrOutput { return o.ApplyT(func(v *BackendAddressPoolAddress) pulumi.StringPtrOutput { return v.IpAddress }).(pulumi.StringPtrOutput) } // The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. func (o BackendAddressPoolAddressOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *BackendAddressPoolAddress) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Virtual Network within which the Backend Address Pool should exist. func (o BackendAddressPoolAddressOutput) VirtualNetworkId() pulumi.StringPtrOutput { return o.ApplyT(func(v *BackendAddressPoolAddress) pulumi.StringPtrOutput { return v.VirtualNetworkId }).(pulumi.StringPtrOutput) } type BackendAddressPoolAddressArrayOutput struct{ *pulumi.OutputState } func (BackendAddressPoolAddressArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*BackendAddressPoolAddress)(nil)).Elem() } func (o BackendAddressPoolAddressArrayOutput) ToBackendAddressPoolAddressArrayOutput() BackendAddressPoolAddressArrayOutput { return o } func (o BackendAddressPoolAddressArrayOutput) ToBackendAddressPoolAddressArrayOutputWithContext(ctx context.Context) BackendAddressPoolAddressArrayOutput { return o } func (o BackendAddressPoolAddressArrayOutput) Index(i pulumi.IntInput) BackendAddressPoolAddressOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackendAddressPoolAddress { return vs[0].([]*BackendAddressPoolAddress)[vs[1].(int)] }).(BackendAddressPoolAddressOutput) } type BackendAddressPoolAddressMapOutput struct{ *pulumi.OutputState } func (BackendAddressPoolAddressMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BackendAddressPoolAddress)(nil)).Elem() } func (o BackendAddressPoolAddressMapOutput) ToBackendAddressPoolAddressMapOutput() BackendAddressPoolAddressMapOutput { return o } func (o BackendAddressPoolAddressMapOutput) ToBackendAddressPoolAddressMapOutputWithContext(ctx context.Context) BackendAddressPoolAddressMapOutput { return o } func (o BackendAddressPoolAddressMapOutput) MapIndex(k pulumi.StringInput) BackendAddressPoolAddressOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackendAddressPoolAddress { return vs[0].(map[string]*BackendAddressPoolAddress)[vs[1].(string)] }).(BackendAddressPoolAddressOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*BackendAddressPoolAddressInput)(nil)).Elem(), &BackendAddressPoolAddress{}) pulumi.RegisterInputType(reflect.TypeOf((*BackendAddressPoolAddressArrayInput)(nil)).Elem(), BackendAddressPoolAddressArray{}) pulumi.RegisterInputType(reflect.TypeOf((*BackendAddressPoolAddressMapInput)(nil)).Elem(), BackendAddressPoolAddressMap{}) pulumi.RegisterOutputType(BackendAddressPoolAddressOutput{}) pulumi.RegisterOutputType(BackendAddressPoolAddressArrayOutput{}) pulumi.RegisterOutputType(BackendAddressPoolAddressMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/getLB.go
sdk/go/azure/lb/getLB.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb 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 Load Balancer // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := lb.GetLB(ctx, &lb.GetLBArgs{ // Name: "example-lb", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("loadbalancerId", 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` - 2023-09-01 func GetLB(ctx *pulumi.Context, args *GetLBArgs, opts ...pulumi.InvokeOption) (*GetLBResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetLBResult err := ctx.Invoke("azure:lb/getLB:getLB", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getLB. type GetLBArgs struct { // Specifies the name of the Load Balancer. Name string `pulumi:"name"` // The name of the Resource Group in which the Load Balancer exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getLB. type GetLBResult struct { // A `frontendIpConfiguration` block as documented below. FrontendIpConfigurations []GetLBFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure location where the Load Balancer exists. Location string `pulumi:"location"` // The name of the Frontend IP Configuration. Name string `pulumi:"name"` // Private IP Address to assign to the Load Balancer. PrivateIpAddress string `pulumi:"privateIpAddress"` // The list of private IP address assigned to the load balancer in `frontendIpConfiguration` blocks, if any. PrivateIpAddresses []string `pulumi:"privateIpAddresses"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU of the Load Balancer. Sku string `pulumi:"sku"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } func GetLBOutput(ctx *pulumi.Context, args GetLBOutputArgs, opts ...pulumi.InvokeOption) GetLBResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetLBResultOutput, error) { args := v.(GetLBArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:lb/getLB:getLB", args, GetLBResultOutput{}, options).(GetLBResultOutput), nil }).(GetLBResultOutput) } // A collection of arguments for invoking getLB. type GetLBOutputArgs struct { // Specifies the name of the Load Balancer. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the Load Balancer exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetLBOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetLBArgs)(nil)).Elem() } // A collection of values returned by getLB. type GetLBResultOutput struct{ *pulumi.OutputState } func (GetLBResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetLBResult)(nil)).Elem() } func (o GetLBResultOutput) ToGetLBResultOutput() GetLBResultOutput { return o } func (o GetLBResultOutput) ToGetLBResultOutputWithContext(ctx context.Context) GetLBResultOutput { return o } // A `frontendIpConfiguration` block as documented below. func (o GetLBResultOutput) FrontendIpConfigurations() GetLBFrontendIpConfigurationArrayOutput { return o.ApplyT(func(v GetLBResult) []GetLBFrontendIpConfiguration { return v.FrontendIpConfigurations }).(GetLBFrontendIpConfigurationArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetLBResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetLBResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure location where the Load Balancer exists. func (o GetLBResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetLBResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the Frontend IP Configuration. func (o GetLBResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetLBResult) string { return v.Name }).(pulumi.StringOutput) } // Private IP Address to assign to the Load Balancer. func (o GetLBResultOutput) PrivateIpAddress() pulumi.StringOutput { return o.ApplyT(func(v GetLBResult) string { return v.PrivateIpAddress }).(pulumi.StringOutput) } // The list of private IP address assigned to the load balancer in `frontendIpConfiguration` blocks, if any. func (o GetLBResultOutput) PrivateIpAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v GetLBResult) []string { return v.PrivateIpAddresses }).(pulumi.StringArrayOutput) } func (o GetLBResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetLBResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU of the Load Balancer. func (o GetLBResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v GetLBResult) string { return v.Sku }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o GetLBResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetLBResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetLBResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/loadBalancer.go
sdk/go/azure/lb/loadBalancer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Load Balancer Resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "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("LoadBalancerRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("PublicIPForLB"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // }) // if err != nil { // return err // } // _, err = lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ // Name: pulumi.String("TestLoadBalancer"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2023-09-01 // // ## Import // // Load Balancers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/loadBalancer:LoadBalancer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1 // ``` type LoadBalancer struct { pulumi.CustomResourceState // Specifies the Edge Zone within the Azure Region where this Load Balancer should exist. Changing this forces a new Load Balancer to be created. EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"` // One or more `frontendIpConfiguration` blocks as documented below. // // > **Note:** Azure Load Balancer does not allow the complete removal of all previously attached frontend configurations. If you have previously applied with one or more `frontendIpConfiguration` arguments, the removal of them all will result in a replacement (destroy/create) of the Load Balancer. FrontendIpConfigurations LoadBalancerFrontendIpConfigurationArrayOutput `pulumi:"frontendIpConfigurations"` // Specifies the supported Azure Region where the Load Balancer should be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Load Balancer. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Private IP Address to assign to the Load Balancer. PrivateIpAddress pulumi.StringOutput `pulumi:"privateIpAddress"` // The list of private IP address assigned to the load balancer in `frontendIpConfiguration` blocks, if any. PrivateIpAddresses pulumi.StringArrayOutput `pulumi:"privateIpAddresses"` // The ID of a Public IP Address which is associated with this Load Balancer. PublicIpAddressId pulumi.StringOutput `pulumi:"publicIpAddressId"` // The name of the Resource Group in which to create the Load Balancer. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** The `Microsoft.Network/AllowGatewayLoadBalancer` feature is required to be registered in order to use the `Gateway` SKU. The feature can only be registered by the Azure service team, please submit an [Azure support ticket](https://azure.microsoft.com/en-us/support/create-ticket/) for that. Sku pulumi.StringPtrOutput `pulumi:"sku"` // `skuTier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier pulumi.StringPtrOutput `pulumi:"skuTier"` // The ID of the Subnet which is associated with the IP Configuration. SubnetId pulumi.StringOutput `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewLoadBalancer registers a new resource with the given unique name, arguments, and options. func NewLoadBalancer(ctx *pulumi.Context, name string, args *LoadBalancerArgs, opts ...pulumi.ResourceOption) (*LoadBalancer, 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 LoadBalancer err := ctx.RegisterResource("azure:lb/loadBalancer:LoadBalancer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLoadBalancer gets an existing LoadBalancer resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetLoadBalancer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LoadBalancerState, opts ...pulumi.ResourceOption) (*LoadBalancer, error) { var resource LoadBalancer err := ctx.ReadResource("azure:lb/loadBalancer:LoadBalancer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LoadBalancer resources. type loadBalancerState struct { // Specifies the Edge Zone within the Azure Region where this Load Balancer should exist. Changing this forces a new Load Balancer to be created. EdgeZone *string `pulumi:"edgeZone"` // One or more `frontendIpConfiguration` blocks as documented below. // // > **Note:** Azure Load Balancer does not allow the complete removal of all previously attached frontend configurations. If you have previously applied with one or more `frontendIpConfiguration` arguments, the removal of them all will result in a replacement (destroy/create) of the Load Balancer. FrontendIpConfigurations []LoadBalancerFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // Specifies the supported Azure Region where the Load Balancer should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Load Balancer. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Private IP Address to assign to the Load Balancer. PrivateIpAddress *string `pulumi:"privateIpAddress"` // The list of private IP address assigned to the load balancer in `frontendIpConfiguration` blocks, if any. PrivateIpAddresses []string `pulumi:"privateIpAddresses"` // The ID of a Public IP Address which is associated with this Load Balancer. PublicIpAddressId *string `pulumi:"publicIpAddressId"` // The name of the Resource Group in which to create the Load Balancer. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** The `Microsoft.Network/AllowGatewayLoadBalancer` feature is required to be registered in order to use the `Gateway` SKU. The feature can only be registered by the Azure service team, please submit an [Azure support ticket](https://azure.microsoft.com/en-us/support/create-ticket/) for that. Sku *string `pulumi:"sku"` // `skuTier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier *string `pulumi:"skuTier"` // The ID of the Subnet which is associated with the IP Configuration. SubnetId *string `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type LoadBalancerState struct { // Specifies the Edge Zone within the Azure Region where this Load Balancer should exist. Changing this forces a new Load Balancer to be created. EdgeZone pulumi.StringPtrInput // One or more `frontendIpConfiguration` blocks as documented below. // // > **Note:** Azure Load Balancer does not allow the complete removal of all previously attached frontend configurations. If you have previously applied with one or more `frontendIpConfiguration` arguments, the removal of them all will result in a replacement (destroy/create) of the Load Balancer. FrontendIpConfigurations LoadBalancerFrontendIpConfigurationArrayInput // Specifies the supported Azure Region where the Load Balancer should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Load Balancer. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Private IP Address to assign to the Load Balancer. PrivateIpAddress pulumi.StringPtrInput // The list of private IP address assigned to the load balancer in `frontendIpConfiguration` blocks, if any. PrivateIpAddresses pulumi.StringArrayInput // The ID of a Public IP Address which is associated with this Load Balancer. PublicIpAddressId pulumi.StringPtrInput // The name of the Resource Group in which to create the Load Balancer. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** The `Microsoft.Network/AllowGatewayLoadBalancer` feature is required to be registered in order to use the `Gateway` SKU. The feature can only be registered by the Azure service team, please submit an [Azure support ticket](https://azure.microsoft.com/en-us/support/create-ticket/) for that. Sku pulumi.StringPtrInput // `skuTier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier pulumi.StringPtrInput // The ID of the Subnet which is associated with the IP Configuration. SubnetId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (LoadBalancerState) ElementType() reflect.Type { return reflect.TypeOf((*loadBalancerState)(nil)).Elem() } type loadBalancerArgs struct { // Specifies the Edge Zone within the Azure Region where this Load Balancer should exist. Changing this forces a new Load Balancer to be created. EdgeZone *string `pulumi:"edgeZone"` // One or more `frontendIpConfiguration` blocks as documented below. // // > **Note:** Azure Load Balancer does not allow the complete removal of all previously attached frontend configurations. If you have previously applied with one or more `frontendIpConfiguration` arguments, the removal of them all will result in a replacement (destroy/create) of the Load Balancer. FrontendIpConfigurations []LoadBalancerFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // Specifies the supported Azure Region where the Load Balancer should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Load Balancer. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of a Public IP Address which is associated with this Load Balancer. PublicIpAddressId *string `pulumi:"publicIpAddressId"` // The name of the Resource Group in which to create the Load Balancer. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** The `Microsoft.Network/AllowGatewayLoadBalancer` feature is required to be registered in order to use the `Gateway` SKU. The feature can only be registered by the Azure service team, please submit an [Azure support ticket](https://azure.microsoft.com/en-us/support/create-ticket/) for that. Sku *string `pulumi:"sku"` // `skuTier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier *string `pulumi:"skuTier"` // The ID of the Subnet which is associated with the IP Configuration. 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 LoadBalancer resource. type LoadBalancerArgs struct { // Specifies the Edge Zone within the Azure Region where this Load Balancer should exist. Changing this forces a new Load Balancer to be created. EdgeZone pulumi.StringPtrInput // One or more `frontendIpConfiguration` blocks as documented below. // // > **Note:** Azure Load Balancer does not allow the complete removal of all previously attached frontend configurations. If you have previously applied with one or more `frontendIpConfiguration` arguments, the removal of them all will result in a replacement (destroy/create) of the Load Balancer. FrontendIpConfigurations LoadBalancerFrontendIpConfigurationArrayInput // Specifies the supported Azure Region where the Load Balancer should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Load Balancer. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of a Public IP Address which is associated with this Load Balancer. PublicIpAddressId pulumi.StringPtrInput // The name of the Resource Group in which to create the Load Balancer. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** The `Microsoft.Network/AllowGatewayLoadBalancer` feature is required to be registered in order to use the `Gateway` SKU. The feature can only be registered by the Azure service team, please submit an [Azure support ticket](https://azure.microsoft.com/en-us/support/create-ticket/) for that. Sku pulumi.StringPtrInput // `skuTier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier pulumi.StringPtrInput // The ID of the Subnet which is associated with the IP Configuration. SubnetId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (LoadBalancerArgs) ElementType() reflect.Type { return reflect.TypeOf((*loadBalancerArgs)(nil)).Elem() } type LoadBalancerInput interface { pulumi.Input ToLoadBalancerOutput() LoadBalancerOutput ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput } func (*LoadBalancer) ElementType() reflect.Type { return reflect.TypeOf((**LoadBalancer)(nil)).Elem() } func (i *LoadBalancer) ToLoadBalancerOutput() LoadBalancerOutput { return i.ToLoadBalancerOutputWithContext(context.Background()) } func (i *LoadBalancer) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerOutput) } // LoadBalancerArrayInput is an input type that accepts LoadBalancerArray and LoadBalancerArrayOutput values. // You can construct a concrete instance of `LoadBalancerArrayInput` via: // // LoadBalancerArray{ LoadBalancerArgs{...} } type LoadBalancerArrayInput interface { pulumi.Input ToLoadBalancerArrayOutput() LoadBalancerArrayOutput ToLoadBalancerArrayOutputWithContext(context.Context) LoadBalancerArrayOutput } type LoadBalancerArray []LoadBalancerInput func (LoadBalancerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem() } func (i LoadBalancerArray) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput { return i.ToLoadBalancerArrayOutputWithContext(context.Background()) } func (i LoadBalancerArray) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerArrayOutput) } // LoadBalancerMapInput is an input type that accepts LoadBalancerMap and LoadBalancerMapOutput values. // You can construct a concrete instance of `LoadBalancerMapInput` via: // // LoadBalancerMap{ "key": LoadBalancerArgs{...} } type LoadBalancerMapInput interface { pulumi.Input ToLoadBalancerMapOutput() LoadBalancerMapOutput ToLoadBalancerMapOutputWithContext(context.Context) LoadBalancerMapOutput } type LoadBalancerMap map[string]LoadBalancerInput func (LoadBalancerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem() } func (i LoadBalancerMap) ToLoadBalancerMapOutput() LoadBalancerMapOutput { return i.ToLoadBalancerMapOutputWithContext(context.Background()) } func (i LoadBalancerMap) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerMapOutput) } type LoadBalancerOutput struct{ *pulumi.OutputState } func (LoadBalancerOutput) ElementType() reflect.Type { return reflect.TypeOf((**LoadBalancer)(nil)).Elem() } func (o LoadBalancerOutput) ToLoadBalancerOutput() LoadBalancerOutput { return o } func (o LoadBalancerOutput) ToLoadBalancerOutputWithContext(ctx context.Context) LoadBalancerOutput { return o } // Specifies the Edge Zone within the Azure Region where this Load Balancer should exist. Changing this forces a new Load Balancer to be created. func (o LoadBalancerOutput) EdgeZone() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.EdgeZone }).(pulumi.StringPtrOutput) } // One or more `frontendIpConfiguration` blocks as documented below. // // > **Note:** Azure Load Balancer does not allow the complete removal of all previously attached frontend configurations. If you have previously applied with one or more `frontendIpConfiguration` arguments, the removal of them all will result in a replacement (destroy/create) of the Load Balancer. func (o LoadBalancerOutput) FrontendIpConfigurations() LoadBalancerFrontendIpConfigurationArrayOutput { return o.ApplyT(func(v *LoadBalancer) LoadBalancerFrontendIpConfigurationArrayOutput { return v.FrontendIpConfigurations }).(LoadBalancerFrontendIpConfigurationArrayOutput) } // Specifies the supported Azure Region where the Load Balancer should be created. Changing this forces a new resource to be created. func (o LoadBalancerOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Load Balancer. Changing this forces a new resource to be created. func (o LoadBalancerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Private IP Address to assign to the Load Balancer. func (o LoadBalancerOutput) PrivateIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.PrivateIpAddress }).(pulumi.StringOutput) } // The list of private IP address assigned to the load balancer in `frontendIpConfiguration` blocks, if any. func (o LoadBalancerOutput) PrivateIpAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringArrayOutput { return v.PrivateIpAddresses }).(pulumi.StringArrayOutput) } // The ID of a Public IP Address which is associated with this Load Balancer. func (o LoadBalancerOutput) PublicIpAddressId() pulumi.StringOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.PublicIpAddressId }).(pulumi.StringOutput) } // The name of the Resource Group in which to create the Load Balancer. Changing this forces a new resource to be created. func (o LoadBalancerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU of the Azure Load Balancer. Accepted values are `Basic`, `Standard` and `Gateway`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** The `Microsoft.Network/AllowGatewayLoadBalancer` feature is required to be registered in order to use the `Gateway` SKU. The feature can only be registered by the Azure service team, please submit an [Azure support ticket](https://azure.microsoft.com/en-us/support/create-ticket/) for that. func (o LoadBalancerOutput) Sku() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput) } // `skuTier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. func (o LoadBalancerOutput) SkuTier() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringPtrOutput { return v.SkuTier }).(pulumi.StringPtrOutput) } // The ID of the Subnet which is associated with the IP Configuration. func (o LoadBalancerOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o LoadBalancerOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *LoadBalancer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type LoadBalancerArrayOutput struct{ *pulumi.OutputState } func (LoadBalancerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LoadBalancer)(nil)).Elem() } func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutput() LoadBalancerArrayOutput { return o } func (o LoadBalancerArrayOutput) ToLoadBalancerArrayOutputWithContext(ctx context.Context) LoadBalancerArrayOutput { return o } func (o LoadBalancerArrayOutput) Index(i pulumi.IntInput) LoadBalancerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoadBalancer { return vs[0].([]*LoadBalancer)[vs[1].(int)] }).(LoadBalancerOutput) } type LoadBalancerMapOutput struct{ *pulumi.OutputState } func (LoadBalancerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LoadBalancer)(nil)).Elem() } func (o LoadBalancerMapOutput) ToLoadBalancerMapOutput() LoadBalancerMapOutput { return o } func (o LoadBalancerMapOutput) ToLoadBalancerMapOutputWithContext(ctx context.Context) LoadBalancerMapOutput { return o } func (o LoadBalancerMapOutput) MapIndex(k pulumi.StringInput) LoadBalancerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoadBalancer { return vs[0].(map[string]*LoadBalancer)[vs[1].(string)] }).(LoadBalancerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerInput)(nil)).Elem(), &LoadBalancer{}) pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerArrayInput)(nil)).Elem(), LoadBalancerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LoadBalancerMapInput)(nil)).Elem(), LoadBalancerMap{}) pulumi.RegisterOutputType(LoadBalancerOutput{}) pulumi.RegisterOutputType(LoadBalancerArrayOutput{}) pulumi.RegisterOutputType(LoadBalancerMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/backendAddressPool.go
sdk/go/azure/lb/backendAddressPool.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Load Balancer Backend Address Pool. // // > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("LoadBalancerRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("PublicIPForLB"), // 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("TestLoadBalancer"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = lb.NewBackendAddressPool(ctx, "example", &lb.BackendAddressPoolArgs{ // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("BackEndAddressPool"), // }) // if err != 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` - 2023-09-01 // // ## Import // // Load Balancer Backend Address Pools can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/backendAddressPool:BackendAddressPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/pool1 // ``` type BackendAddressPool struct { pulumi.CustomResourceState // The Backend IP Configurations associated with this Backend Address Pool. BackendIpConfigurations pulumi.StringArrayOutput `pulumi:"backendIpConfigurations"` // An array of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool. InboundNatRules pulumi.StringArrayOutput `pulumi:"inboundNatRules"` // The Load Balancing Rules associated with this Backend Address Pool. LoadBalancingRules pulumi.StringArrayOutput `pulumi:"loadBalancingRules"` // The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringOutput `pulumi:"loadbalancerId"` // Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // An array of the Load Balancing Outbound Rules associated with this Backend Address Pool. OutboundRules pulumi.StringArrayOutput `pulumi:"outboundRules"` // The backend address synchronous mode for the Backend Address Pool. Possible values are `Automatic` and `Manual`. This is required with `virtualNetworkId`. Changing this forces a new resource to be created. // // > **Note:** The `synchronousMode` can set only for Load Balancer with `Standard` SKU. SynchronousMode pulumi.StringPtrOutput `pulumi:"synchronousMode"` // One or more `tunnelInterface` blocks as defined below. TunnelInterfaces BackendAddressPoolTunnelInterfaceArrayOutput `pulumi:"tunnelInterfaces"` // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId pulumi.StringPtrOutput `pulumi:"virtualNetworkId"` } // NewBackendAddressPool registers a new resource with the given unique name, arguments, and options. func NewBackendAddressPool(ctx *pulumi.Context, name string, args *BackendAddressPoolArgs, opts ...pulumi.ResourceOption) (*BackendAddressPool, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LoadbalancerId == nil { return nil, errors.New("invalid value for required argument 'LoadbalancerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource BackendAddressPool err := ctx.RegisterResource("azure:lb/backendAddressPool:BackendAddressPool", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetBackendAddressPool gets an existing BackendAddressPool resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetBackendAddressPool(ctx *pulumi.Context, name string, id pulumi.IDInput, state *BackendAddressPoolState, opts ...pulumi.ResourceOption) (*BackendAddressPool, error) { var resource BackendAddressPool err := ctx.ReadResource("azure:lb/backendAddressPool:BackendAddressPool", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering BackendAddressPool resources. type backendAddressPoolState struct { // The Backend IP Configurations associated with this Backend Address Pool. BackendIpConfigurations []string `pulumi:"backendIpConfigurations"` // An array of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool. InboundNatRules []string `pulumi:"inboundNatRules"` // The Load Balancing Rules associated with this Backend Address Pool. LoadBalancingRules []string `pulumi:"loadBalancingRules"` // The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created. LoadbalancerId *string `pulumi:"loadbalancerId"` // Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // An array of the Load Balancing Outbound Rules associated with this Backend Address Pool. OutboundRules []string `pulumi:"outboundRules"` // The backend address synchronous mode for the Backend Address Pool. Possible values are `Automatic` and `Manual`. This is required with `virtualNetworkId`. Changing this forces a new resource to be created. // // > **Note:** The `synchronousMode` can set only for Load Balancer with `Standard` SKU. SynchronousMode *string `pulumi:"synchronousMode"` // One or more `tunnelInterface` blocks as defined below. TunnelInterfaces []BackendAddressPoolTunnelInterface `pulumi:"tunnelInterfaces"` // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId *string `pulumi:"virtualNetworkId"` } type BackendAddressPoolState struct { // The Backend IP Configurations associated with this Backend Address Pool. BackendIpConfigurations pulumi.StringArrayInput // An array of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool. InboundNatRules pulumi.StringArrayInput // The Load Balancing Rules associated with this Backend Address Pool. LoadBalancingRules pulumi.StringArrayInput // The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringPtrInput // Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // An array of the Load Balancing Outbound Rules associated with this Backend Address Pool. OutboundRules pulumi.StringArrayInput // The backend address synchronous mode for the Backend Address Pool. Possible values are `Automatic` and `Manual`. This is required with `virtualNetworkId`. Changing this forces a new resource to be created. // // > **Note:** The `synchronousMode` can set only for Load Balancer with `Standard` SKU. SynchronousMode pulumi.StringPtrInput // One or more `tunnelInterface` blocks as defined below. TunnelInterfaces BackendAddressPoolTunnelInterfaceArrayInput // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId pulumi.StringPtrInput } func (BackendAddressPoolState) ElementType() reflect.Type { return reflect.TypeOf((*backendAddressPoolState)(nil)).Elem() } type backendAddressPoolArgs struct { // The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created. LoadbalancerId string `pulumi:"loadbalancerId"` // Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The backend address synchronous mode for the Backend Address Pool. Possible values are `Automatic` and `Manual`. This is required with `virtualNetworkId`. Changing this forces a new resource to be created. // // > **Note:** The `synchronousMode` can set only for Load Balancer with `Standard` SKU. SynchronousMode *string `pulumi:"synchronousMode"` // One or more `tunnelInterface` blocks as defined below. TunnelInterfaces []BackendAddressPoolTunnelInterface `pulumi:"tunnelInterfaces"` // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId *string `pulumi:"virtualNetworkId"` } // The set of arguments for constructing a BackendAddressPool resource. type BackendAddressPoolArgs struct { // The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringInput // Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The backend address synchronous mode for the Backend Address Pool. Possible values are `Automatic` and `Manual`. This is required with `virtualNetworkId`. Changing this forces a new resource to be created. // // > **Note:** The `synchronousMode` can set only for Load Balancer with `Standard` SKU. SynchronousMode pulumi.StringPtrInput // One or more `tunnelInterface` blocks as defined below. TunnelInterfaces BackendAddressPoolTunnelInterfaceArrayInput // The ID of the Virtual Network within which the Backend Address Pool should exist. VirtualNetworkId pulumi.StringPtrInput } func (BackendAddressPoolArgs) ElementType() reflect.Type { return reflect.TypeOf((*backendAddressPoolArgs)(nil)).Elem() } type BackendAddressPoolInput interface { pulumi.Input ToBackendAddressPoolOutput() BackendAddressPoolOutput ToBackendAddressPoolOutputWithContext(ctx context.Context) BackendAddressPoolOutput } func (*BackendAddressPool) ElementType() reflect.Type { return reflect.TypeOf((**BackendAddressPool)(nil)).Elem() } func (i *BackendAddressPool) ToBackendAddressPoolOutput() BackendAddressPoolOutput { return i.ToBackendAddressPoolOutputWithContext(context.Background()) } func (i *BackendAddressPool) ToBackendAddressPoolOutputWithContext(ctx context.Context) BackendAddressPoolOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolOutput) } // BackendAddressPoolArrayInput is an input type that accepts BackendAddressPoolArray and BackendAddressPoolArrayOutput values. // You can construct a concrete instance of `BackendAddressPoolArrayInput` via: // // BackendAddressPoolArray{ BackendAddressPoolArgs{...} } type BackendAddressPoolArrayInput interface { pulumi.Input ToBackendAddressPoolArrayOutput() BackendAddressPoolArrayOutput ToBackendAddressPoolArrayOutputWithContext(context.Context) BackendAddressPoolArrayOutput } type BackendAddressPoolArray []BackendAddressPoolInput func (BackendAddressPoolArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*BackendAddressPool)(nil)).Elem() } func (i BackendAddressPoolArray) ToBackendAddressPoolArrayOutput() BackendAddressPoolArrayOutput { return i.ToBackendAddressPoolArrayOutputWithContext(context.Background()) } func (i BackendAddressPoolArray) ToBackendAddressPoolArrayOutputWithContext(ctx context.Context) BackendAddressPoolArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolArrayOutput) } // BackendAddressPoolMapInput is an input type that accepts BackendAddressPoolMap and BackendAddressPoolMapOutput values. // You can construct a concrete instance of `BackendAddressPoolMapInput` via: // // BackendAddressPoolMap{ "key": BackendAddressPoolArgs{...} } type BackendAddressPoolMapInput interface { pulumi.Input ToBackendAddressPoolMapOutput() BackendAddressPoolMapOutput ToBackendAddressPoolMapOutputWithContext(context.Context) BackendAddressPoolMapOutput } type BackendAddressPoolMap map[string]BackendAddressPoolInput func (BackendAddressPoolMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BackendAddressPool)(nil)).Elem() } func (i BackendAddressPoolMap) ToBackendAddressPoolMapOutput() BackendAddressPoolMapOutput { return i.ToBackendAddressPoolMapOutputWithContext(context.Background()) } func (i BackendAddressPoolMap) ToBackendAddressPoolMapOutputWithContext(ctx context.Context) BackendAddressPoolMapOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolMapOutput) } type BackendAddressPoolOutput struct{ *pulumi.OutputState } func (BackendAddressPoolOutput) ElementType() reflect.Type { return reflect.TypeOf((**BackendAddressPool)(nil)).Elem() } func (o BackendAddressPoolOutput) ToBackendAddressPoolOutput() BackendAddressPoolOutput { return o } func (o BackendAddressPoolOutput) ToBackendAddressPoolOutputWithContext(ctx context.Context) BackendAddressPoolOutput { return o } // The Backend IP Configurations associated with this Backend Address Pool. func (o BackendAddressPoolOutput) BackendIpConfigurations() pulumi.StringArrayOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringArrayOutput { return v.BackendIpConfigurations }).(pulumi.StringArrayOutput) } // An array of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool. func (o BackendAddressPoolOutput) InboundNatRules() pulumi.StringArrayOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringArrayOutput { return v.InboundNatRules }).(pulumi.StringArrayOutput) } // The Load Balancing Rules associated with this Backend Address Pool. func (o BackendAddressPoolOutput) LoadBalancingRules() pulumi.StringArrayOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringArrayOutput { return v.LoadBalancingRules }).(pulumi.StringArrayOutput) } // The ID of the Load Balancer in which to create the Backend Address Pool. Changing this forces a new resource to be created. func (o BackendAddressPoolOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringOutput { return v.LoadbalancerId }).(pulumi.StringOutput) } // Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created. func (o BackendAddressPoolOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // An array of the Load Balancing Outbound Rules associated with this Backend Address Pool. func (o BackendAddressPoolOutput) OutboundRules() pulumi.StringArrayOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringArrayOutput { return v.OutboundRules }).(pulumi.StringArrayOutput) } // The backend address synchronous mode for the Backend Address Pool. Possible values are `Automatic` and `Manual`. This is required with `virtualNetworkId`. Changing this forces a new resource to be created. // // > **Note:** The `synchronousMode` can set only for Load Balancer with `Standard` SKU. func (o BackendAddressPoolOutput) SynchronousMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringPtrOutput { return v.SynchronousMode }).(pulumi.StringPtrOutput) } // One or more `tunnelInterface` blocks as defined below. func (o BackendAddressPoolOutput) TunnelInterfaces() BackendAddressPoolTunnelInterfaceArrayOutput { return o.ApplyT(func(v *BackendAddressPool) BackendAddressPoolTunnelInterfaceArrayOutput { return v.TunnelInterfaces }).(BackendAddressPoolTunnelInterfaceArrayOutput) } // The ID of the Virtual Network within which the Backend Address Pool should exist. func (o BackendAddressPoolOutput) VirtualNetworkId() pulumi.StringPtrOutput { return o.ApplyT(func(v *BackendAddressPool) pulumi.StringPtrOutput { return v.VirtualNetworkId }).(pulumi.StringPtrOutput) } type BackendAddressPoolArrayOutput struct{ *pulumi.OutputState } func (BackendAddressPoolArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*BackendAddressPool)(nil)).Elem() } func (o BackendAddressPoolArrayOutput) ToBackendAddressPoolArrayOutput() BackendAddressPoolArrayOutput { return o } func (o BackendAddressPoolArrayOutput) ToBackendAddressPoolArrayOutputWithContext(ctx context.Context) BackendAddressPoolArrayOutput { return o } func (o BackendAddressPoolArrayOutput) Index(i pulumi.IntInput) BackendAddressPoolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BackendAddressPool { return vs[0].([]*BackendAddressPool)[vs[1].(int)] }).(BackendAddressPoolOutput) } type BackendAddressPoolMapOutput struct{ *pulumi.OutputState } func (BackendAddressPoolMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BackendAddressPool)(nil)).Elem() } func (o BackendAddressPoolMapOutput) ToBackendAddressPoolMapOutput() BackendAddressPoolMapOutput { return o } func (o BackendAddressPoolMapOutput) ToBackendAddressPoolMapOutputWithContext(ctx context.Context) BackendAddressPoolMapOutput { return o } func (o BackendAddressPoolMapOutput) MapIndex(k pulumi.StringInput) BackendAddressPoolOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BackendAddressPool { return vs[0].(map[string]*BackendAddressPool)[vs[1].(string)] }).(BackendAddressPoolOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*BackendAddressPoolInput)(nil)).Elem(), &BackendAddressPool{}) pulumi.RegisterInputType(reflect.TypeOf((*BackendAddressPoolArrayInput)(nil)).Elem(), BackendAddressPoolArray{}) pulumi.RegisterInputType(reflect.TypeOf((*BackendAddressPoolMapInput)(nil)).Elem(), BackendAddressPoolMap{}) pulumi.RegisterOutputType(BackendAddressPoolOutput{}) pulumi.RegisterOutputType(BackendAddressPoolArrayOutput{}) pulumi.RegisterOutputType(BackendAddressPoolMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/natRule.go
sdk/go/azure/lb/natRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Load Balancer NAT Rule. // // > **Note:** This resource cannot be used with with virtual machine scale sets, instead use the `lb.NatPool` resource. // // > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("LoadBalancerRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("PublicIPForLB"), // Location: pulumi.String("West US"), // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // }) // if err != nil { // return err // } // exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ // Name: pulumi.String("TestLoadBalancer"), // Location: pulumi.String("West US"), // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // exampleBackendAddressPool, err := lb.NewBackendAddressPool(ctx, "example", &lb.BackendAddressPoolArgs{ // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("be"), // }) // if err != nil { // return err // } // _, err = lb.NewNatRule(ctx, "example", &lb.NatRuleArgs{ // ResourceGroupName: example.Name, // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("RDPAccess"), // Protocol: pulumi.String("Tcp"), // FrontendPort: pulumi.Int(3389), // BackendPort: pulumi.Int(3389), // FrontendIpConfigurationName: pulumi.String("PublicIPAddress"), // }) // if err != nil { // return err // } // _, err = lb.NewNatRule(ctx, "example1", &lb.NatRuleArgs{ // ResourceGroupName: example.Name, // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("RDPAccess"), // Protocol: pulumi.String("Tcp"), // FrontendPortStart: pulumi.Int(3000), // FrontendPortEnd: pulumi.Int(3389), // BackendPort: pulumi.Int(3389), // BackendAddressPoolId: exampleBackendAddressPool.ID(), // FrontendIpConfigurationName: pulumi.String("PublicIPAddress"), // }) // if err != 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` - 2023-09-01 // // ## Import // // Load Balancer NAT Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/natRule:NatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule1 // ``` type NatRule struct { pulumi.CustomResourceState // Specifies a reference to backendAddressPool resource. BackendAddressPoolId pulumi.StringPtrOutput `pulumi:"backendAddressPoolId"` BackendIpConfigurationId pulumi.StringOutput `pulumi:"backendIpConfigurationId"` // The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive. BackendPort pulumi.IntOutput `pulumi:"backendPort"` // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp pulumi.BoolOutput `pulumi:"enableFloatingIp"` // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolOutput `pulumi:"enableTcpReset"` // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled pulumi.BoolOutput `pulumi:"floatingIpEnabled"` FrontendIpConfigurationId pulumi.StringOutput `pulumi:"frontendIpConfigurationId"` // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName pulumi.StringOutput `pulumi:"frontendIpConfigurationName"` // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPort pulumi.IntPtrOutput `pulumi:"frontendPort"` // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortEnd pulumi.IntPtrOutput `pulumi:"frontendPortEnd"` // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortStart pulumi.IntPtrOutput `pulumi:"frontendPortStart"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringOutput `pulumi:"loadbalancerId"` // Specifies the name of the NAT Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol pulumi.StringOutput `pulumi:"protocol"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolOutput `pulumi:"tcpResetEnabled"` } // NewNatRule registers a new resource with the given unique name, arguments, and options. func NewNatRule(ctx *pulumi.Context, name string, args *NatRuleArgs, opts ...pulumi.ResourceOption) (*NatRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendPort == nil { return nil, errors.New("invalid value for required argument 'BackendPort'") } if args.FrontendIpConfigurationName == nil { return nil, errors.New("invalid value for required argument 'FrontendIpConfigurationName'") } if args.LoadbalancerId == nil { return nil, errors.New("invalid value for required argument 'LoadbalancerId'") } if args.Protocol == nil { return nil, errors.New("invalid value for required argument 'Protocol'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NatRule err := ctx.RegisterResource("azure:lb/natRule:NatRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNatRule gets an existing NatRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNatRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NatRuleState, opts ...pulumi.ResourceOption) (*NatRule, error) { var resource NatRule err := ctx.ReadResource("azure:lb/natRule:NatRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NatRule resources. type natRuleState struct { // Specifies a reference to backendAddressPool resource. BackendAddressPoolId *string `pulumi:"backendAddressPoolId"` BackendIpConfigurationId *string `pulumi:"backendIpConfigurationId"` // The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive. BackendPort *int `pulumi:"backendPort"` // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp *bool `pulumi:"enableFloatingIp"` // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset *bool `pulumi:"enableTcpReset"` // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled *bool `pulumi:"floatingIpEnabled"` FrontendIpConfigurationId *string `pulumi:"frontendIpConfigurationId"` // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName *string `pulumi:"frontendIpConfigurationName"` // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPort *int `pulumi:"frontendPort"` // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortEnd *int `pulumi:"frontendPortEnd"` // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortStart *int `pulumi:"frontendPortStart"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created. LoadbalancerId *string `pulumi:"loadbalancerId"` // Specifies the name of the NAT Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol *string `pulumi:"protocol"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } type NatRuleState struct { // Specifies a reference to backendAddressPool resource. BackendAddressPoolId pulumi.StringPtrInput BackendIpConfigurationId pulumi.StringPtrInput // The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive. BackendPort pulumi.IntPtrInput // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp pulumi.BoolPtrInput // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolPtrInput // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled pulumi.BoolPtrInput FrontendIpConfigurationId pulumi.StringPtrInput // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName pulumi.StringPtrInput // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPort pulumi.IntPtrInput // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortEnd pulumi.IntPtrInput // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortStart pulumi.IntPtrInput // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes pulumi.IntPtrInput // The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringPtrInput // Specifies the name of the NAT Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol pulumi.StringPtrInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolPtrInput } func (NatRuleState) ElementType() reflect.Type { return reflect.TypeOf((*natRuleState)(nil)).Elem() } type natRuleArgs struct { // Specifies a reference to backendAddressPool resource. BackendAddressPoolId *string `pulumi:"backendAddressPoolId"` // The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive. BackendPort int `pulumi:"backendPort"` // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp *bool `pulumi:"enableFloatingIp"` // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset *bool `pulumi:"enableTcpReset"` // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled *bool `pulumi:"floatingIpEnabled"` // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName string `pulumi:"frontendIpConfigurationName"` // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPort *int `pulumi:"frontendPort"` // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortEnd *int `pulumi:"frontendPortEnd"` // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortStart *int `pulumi:"frontendPortStart"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created. LoadbalancerId string `pulumi:"loadbalancerId"` // Specifies the name of the NAT Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol string `pulumi:"protocol"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } // The set of arguments for constructing a NatRule resource. type NatRuleArgs struct { // Specifies a reference to backendAddressPool resource. BackendAddressPoolId pulumi.StringPtrInput // The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive. BackendPort pulumi.IntInput // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp pulumi.BoolPtrInput // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolPtrInput // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled pulumi.BoolPtrInput // The name of the frontend IP configuration exposing this rule. FrontendIpConfigurationName pulumi.StringInput // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive. FrontendPort pulumi.IntPtrInput // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortEnd pulumi.IntPtrInput // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. FrontendPortStart pulumi.IntPtrInput // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes pulumi.IntPtrInput // The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringInput // Specifies the name of the NAT Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol pulumi.StringInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolPtrInput } func (NatRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*natRuleArgs)(nil)).Elem() } type NatRuleInput interface { pulumi.Input ToNatRuleOutput() NatRuleOutput ToNatRuleOutputWithContext(ctx context.Context) NatRuleOutput } func (*NatRule) ElementType() reflect.Type { return reflect.TypeOf((**NatRule)(nil)).Elem() } func (i *NatRule) ToNatRuleOutput() NatRuleOutput { return i.ToNatRuleOutputWithContext(context.Background()) } func (i *NatRule) ToNatRuleOutputWithContext(ctx context.Context) NatRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(NatRuleOutput) } // NatRuleArrayInput is an input type that accepts NatRuleArray and NatRuleArrayOutput values. // You can construct a concrete instance of `NatRuleArrayInput` via: // // NatRuleArray{ NatRuleArgs{...} } type NatRuleArrayInput interface { pulumi.Input ToNatRuleArrayOutput() NatRuleArrayOutput ToNatRuleArrayOutputWithContext(context.Context) NatRuleArrayOutput } type NatRuleArray []NatRuleInput func (NatRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatRule)(nil)).Elem() } func (i NatRuleArray) ToNatRuleArrayOutput() NatRuleArrayOutput { return i.ToNatRuleArrayOutputWithContext(context.Background()) } func (i NatRuleArray) ToNatRuleArrayOutputWithContext(ctx context.Context) NatRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NatRuleArrayOutput) } // NatRuleMapInput is an input type that accepts NatRuleMap and NatRuleMapOutput values. // You can construct a concrete instance of `NatRuleMapInput` via: // // NatRuleMap{ "key": NatRuleArgs{...} } type NatRuleMapInput interface { pulumi.Input ToNatRuleMapOutput() NatRuleMapOutput ToNatRuleMapOutputWithContext(context.Context) NatRuleMapOutput } type NatRuleMap map[string]NatRuleInput func (NatRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatRule)(nil)).Elem() } func (i NatRuleMap) ToNatRuleMapOutput() NatRuleMapOutput { return i.ToNatRuleMapOutputWithContext(context.Background()) } func (i NatRuleMap) ToNatRuleMapOutputWithContext(ctx context.Context) NatRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NatRuleMapOutput) } type NatRuleOutput struct{ *pulumi.OutputState } func (NatRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**NatRule)(nil)).Elem() } func (o NatRuleOutput) ToNatRuleOutput() NatRuleOutput { return o } func (o NatRuleOutput) ToNatRuleOutputWithContext(ctx context.Context) NatRuleOutput { return o } // Specifies a reference to backendAddressPool resource. func (o NatRuleOutput) BackendAddressPoolId() pulumi.StringPtrOutput { return o.ApplyT(func(v *NatRule) pulumi.StringPtrOutput { return v.BackendAddressPoolId }).(pulumi.StringPtrOutput) } func (o NatRuleOutput) BackendIpConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *NatRule) pulumi.StringOutput { return v.BackendIpConfigurationId }).(pulumi.StringOutput) } // The port used for internal connections on the endpoint. Possible values range between 1 and 65535, inclusive. func (o NatRuleOutput) BackendPort() pulumi.IntOutput { return o.ApplyT(func(v *NatRule) pulumi.IntOutput { return v.BackendPort }).(pulumi.IntOutput) } // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. func (o NatRuleOutput) EnableFloatingIp() pulumi.BoolOutput { return o.ApplyT(func(v *NatRule) pulumi.BoolOutput { return v.EnableFloatingIp }).(pulumi.BoolOutput) } // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. func (o NatRuleOutput) EnableTcpReset() pulumi.BoolOutput { return o.ApplyT(func(v *NatRule) pulumi.BoolOutput { return v.EnableTcpReset }).(pulumi.BoolOutput) } // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. func (o NatRuleOutput) FloatingIpEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *NatRule) pulumi.BoolOutput { return v.FloatingIpEnabled }).(pulumi.BoolOutput) } func (o NatRuleOutput) FrontendIpConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *NatRule) pulumi.StringOutput { return v.FrontendIpConfigurationId }).(pulumi.StringOutput) } // The name of the frontend IP configuration exposing this rule. func (o NatRuleOutput) FrontendIpConfigurationName() pulumi.StringOutput { return o.ApplyT(func(v *NatRule) pulumi.StringOutput { return v.FrontendIpConfigurationName }).(pulumi.StringOutput) } // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 1 and 65534, inclusive. func (o NatRuleOutput) FrontendPort() pulumi.IntPtrOutput { return o.ApplyT(func(v *NatRule) pulumi.IntPtrOutput { return v.FrontendPort }).(pulumi.IntPtrOutput) } // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. func (o NatRuleOutput) FrontendPortEnd() pulumi.IntPtrOutput { return o.ApplyT(func(v *NatRule) pulumi.IntPtrOutput { return v.FrontendPortEnd }).(pulumi.IntPtrOutput) } // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534, inclusive. func (o NatRuleOutput) FrontendPortStart() pulumi.IntPtrOutput { return o.ApplyT(func(v *NatRule) pulumi.IntPtrOutput { return v.FrontendPortStart }).(pulumi.IntPtrOutput) } // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes. func (o NatRuleOutput) IdleTimeoutInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *NatRule) pulumi.IntPtrOutput { return v.IdleTimeoutInMinutes }).(pulumi.IntPtrOutput) } // The ID of the Load Balancer in which to create the NAT Rule. Changing this forces a new resource to be created. func (o NatRuleOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v *NatRule) pulumi.StringOutput { return v.LoadbalancerId }).(pulumi.StringOutput) } // Specifies the name of the NAT Rule. Changing this forces a new resource to be created. func (o NatRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NatRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. func (o NatRuleOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v *NatRule) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput) } // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. func (o NatRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NatRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Is TCP Reset enabled for this Load Balancer Rule? func (o NatRuleOutput) TcpResetEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *NatRule) pulumi.BoolOutput { return v.TcpResetEnabled }).(pulumi.BoolOutput) } type NatRuleArrayOutput struct{ *pulumi.OutputState } func (NatRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatRule)(nil)).Elem() } func (o NatRuleArrayOutput) ToNatRuleArrayOutput() NatRuleArrayOutput { return o } func (o NatRuleArrayOutput) ToNatRuleArrayOutputWithContext(ctx context.Context) NatRuleArrayOutput { return o } func (o NatRuleArrayOutput) Index(i pulumi.IntInput) NatRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NatRule { return vs[0].([]*NatRule)[vs[1].(int)] }).(NatRuleOutput) } type NatRuleMapOutput struct{ *pulumi.OutputState } func (NatRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatRule)(nil)).Elem() } func (o NatRuleMapOutput) ToNatRuleMapOutput() NatRuleMapOutput { return o } func (o NatRuleMapOutput) ToNatRuleMapOutputWithContext(ctx context.Context) NatRuleMapOutput { return o } func (o NatRuleMapOutput) MapIndex(k pulumi.StringInput) NatRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NatRule { return vs[0].(map[string]*NatRule)[vs[1].(string)] }).(NatRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NatRuleInput)(nil)).Elem(), &NatRule{}) pulumi.RegisterInputType(reflect.TypeOf((*NatRuleArrayInput)(nil)).Elem(), NatRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NatRuleMapInput)(nil)).Elem(), NatRuleMap{}) pulumi.RegisterOutputType(NatRuleOutput{}) pulumi.RegisterOutputType(NatRuleArrayOutput{}) pulumi.RegisterOutputType(NatRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/rule.go
sdk/go/azure/lb/rule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Load Balancer Rule. // // > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("LoadBalancerRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("PublicIPForLB"), // Location: pulumi.String("West US"), // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // }) // if err != nil { // return err // } // exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ // Name: pulumi.String("TestLoadBalancer"), // Location: pulumi.String("West US"), // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = lb.NewRule(ctx, "example", &lb.RuleArgs{ // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("LBRule"), // Protocol: pulumi.String("Tcp"), // FrontendPort: pulumi.Int(3389), // BackendPort: pulumi.Int(3389), // FrontendIpConfigurationName: pulumi.String("PublicIPAddress"), // }) // if err != 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` - 2023-09-01 // // ## Import // // Load Balancer Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/rule:Rule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/loadBalancingRules/rule1 // ``` type Rule struct { pulumi.CustomResourceState // A list of reference to a Backend Address Pool over which this Load Balancing Rule operates. // // > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`. BackendAddressPoolIds pulumi.StringArrayOutput `pulumi:"backendAddressPoolIds"` // The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port". BackendPort pulumi.IntOutput `pulumi:"backendPort"` // Is snat enabled for this Load Balancer Rule? Default `false`. DisableOutboundSnat pulumi.BoolPtrOutput `pulumi:"disableOutboundSnat"` // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp pulumi.BoolOutput `pulumi:"enableFloatingIp"` // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolOutput `pulumi:"enableTcpReset"` // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled pulumi.BoolOutput `pulumi:"floatingIpEnabled"` FrontendIpConfigurationId pulumi.StringOutput `pulumi:"frontendIpConfigurationId"` // The name of the frontend IP configuration to which the rule is associated. FrontendIpConfigurationName pulumi.StringOutput `pulumi:"frontendIpConfigurationName"` // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port". FrontendPort pulumi.IntOutput `pulumi:"frontendPort"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"idleTimeoutInMinutes"` // Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are: `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers. `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers. `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where in the Azure portal the options are called `None`, `Client IP` and `Client IP and Protocol` respectively. Defaults to `Default`. LoadDistribution pulumi.StringPtrOutput `pulumi:"loadDistribution"` // The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringOutput `pulumi:"loadbalancerId"` // Specifies the name of the LB Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A reference to a Probe used by this Load Balancing Rule. ProbeId pulumi.StringPtrOutput `pulumi:"probeId"` // The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`. Protocol pulumi.StringOutput `pulumi:"protocol"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolOutput `pulumi:"tcpResetEnabled"` } // NewRule registers a new resource with the given unique name, arguments, and options. func NewRule(ctx *pulumi.Context, name string, args *RuleArgs, opts ...pulumi.ResourceOption) (*Rule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendPort == nil { return nil, errors.New("invalid value for required argument 'BackendPort'") } if args.FrontendIpConfigurationName == nil { return nil, errors.New("invalid value for required argument 'FrontendIpConfigurationName'") } if args.FrontendPort == nil { return nil, errors.New("invalid value for required argument 'FrontendPort'") } if args.LoadbalancerId == nil { return nil, errors.New("invalid value for required argument 'LoadbalancerId'") } if args.Protocol == nil { return nil, errors.New("invalid value for required argument 'Protocol'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Rule err := ctx.RegisterResource("azure:lb/rule:Rule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRule gets an existing Rule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RuleState, opts ...pulumi.ResourceOption) (*Rule, error) { var resource Rule err := ctx.ReadResource("azure:lb/rule:Rule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Rule resources. type ruleState struct { // A list of reference to a Backend Address Pool over which this Load Balancing Rule operates. // // > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`. BackendAddressPoolIds []string `pulumi:"backendAddressPoolIds"` // The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port". BackendPort *int `pulumi:"backendPort"` // Is snat enabled for this Load Balancer Rule? Default `false`. DisableOutboundSnat *bool `pulumi:"disableOutboundSnat"` // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp *bool `pulumi:"enableFloatingIp"` // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset *bool `pulumi:"enableTcpReset"` // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled *bool `pulumi:"floatingIpEnabled"` FrontendIpConfigurationId *string `pulumi:"frontendIpConfigurationId"` // The name of the frontend IP configuration to which the rule is associated. FrontendIpConfigurationName *string `pulumi:"frontendIpConfigurationName"` // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port". FrontendPort *int `pulumi:"frontendPort"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are: `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers. `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers. `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where in the Azure portal the options are called `None`, `Client IP` and `Client IP and Protocol` respectively. Defaults to `Default`. LoadDistribution *string `pulumi:"loadDistribution"` // The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created. LoadbalancerId *string `pulumi:"loadbalancerId"` // Specifies the name of the LB Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A reference to a Probe used by this Load Balancing Rule. ProbeId *string `pulumi:"probeId"` // The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`. Protocol *string `pulumi:"protocol"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } type RuleState struct { // A list of reference to a Backend Address Pool over which this Load Balancing Rule operates. // // > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`. BackendAddressPoolIds pulumi.StringArrayInput // The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port". BackendPort pulumi.IntPtrInput // Is snat enabled for this Load Balancer Rule? Default `false`. DisableOutboundSnat pulumi.BoolPtrInput // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp pulumi.BoolPtrInput // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolPtrInput // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled pulumi.BoolPtrInput FrontendIpConfigurationId pulumi.StringPtrInput // The name of the frontend IP configuration to which the rule is associated. FrontendIpConfigurationName pulumi.StringPtrInput // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port". FrontendPort pulumi.IntPtrInput // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes pulumi.IntPtrInput // Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are: `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers. `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers. `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where in the Azure portal the options are called `None`, `Client IP` and `Client IP and Protocol` respectively. Defaults to `Default`. LoadDistribution pulumi.StringPtrInput // The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringPtrInput // Specifies the name of the LB Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A reference to a Probe used by this Load Balancing Rule. ProbeId pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`. Protocol pulumi.StringPtrInput // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolPtrInput } func (RuleState) ElementType() reflect.Type { return reflect.TypeOf((*ruleState)(nil)).Elem() } type ruleArgs struct { // A list of reference to a Backend Address Pool over which this Load Balancing Rule operates. // // > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`. BackendAddressPoolIds []string `pulumi:"backendAddressPoolIds"` // The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port". BackendPort int `pulumi:"backendPort"` // Is snat enabled for this Load Balancer Rule? Default `false`. DisableOutboundSnat *bool `pulumi:"disableOutboundSnat"` // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp *bool `pulumi:"enableFloatingIp"` // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset *bool `pulumi:"enableTcpReset"` // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled *bool `pulumi:"floatingIpEnabled"` // The name of the frontend IP configuration to which the rule is associated. FrontendIpConfigurationName string `pulumi:"frontendIpConfigurationName"` // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port". FrontendPort int `pulumi:"frontendPort"` // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are: `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers. `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers. `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where in the Azure portal the options are called `None`, `Client IP` and `Client IP and Protocol` respectively. Defaults to `Default`. LoadDistribution *string `pulumi:"loadDistribution"` // The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created. LoadbalancerId string `pulumi:"loadbalancerId"` // Specifies the name of the LB Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A reference to a Probe used by this Load Balancing Rule. ProbeId *string `pulumi:"probeId"` // The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`. Protocol string `pulumi:"protocol"` // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } // The set of arguments for constructing a Rule resource. type RuleArgs struct { // A list of reference to a Backend Address Pool over which this Load Balancing Rule operates. // // > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`. BackendAddressPoolIds pulumi.StringArrayInput // The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port". BackendPort pulumi.IntInput // Is snat enabled for this Load Balancer Rule? Default `false`. DisableOutboundSnat pulumi.BoolPtrInput // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. EnableFloatingIp pulumi.BoolPtrInput // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolPtrInput // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. FloatingIpEnabled pulumi.BoolPtrInput // The name of the frontend IP configuration to which the rule is associated. FrontendIpConfigurationName pulumi.StringInput // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port". FrontendPort pulumi.IntInput // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes. IdleTimeoutInMinutes pulumi.IntPtrInput // Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are: `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers. `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers. `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where in the Azure portal the options are called `None`, `Client IP` and `Client IP and Protocol` respectively. Defaults to `Default`. LoadDistribution pulumi.StringPtrInput // The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringInput // Specifies the name of the LB Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A reference to a Probe used by this Load Balancing Rule. ProbeId pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`. Protocol pulumi.StringInput // Is TCP Reset enabled for this Load Balancer Rule? TcpResetEnabled pulumi.BoolPtrInput } func (RuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*ruleArgs)(nil)).Elem() } type RuleInput interface { pulumi.Input ToRuleOutput() RuleOutput ToRuleOutputWithContext(ctx context.Context) RuleOutput } func (*Rule) ElementType() reflect.Type { return reflect.TypeOf((**Rule)(nil)).Elem() } func (i *Rule) ToRuleOutput() RuleOutput { return i.ToRuleOutputWithContext(context.Background()) } func (i *Rule) ToRuleOutputWithContext(ctx context.Context) RuleOutput { return pulumi.ToOutputWithContext(ctx, i).(RuleOutput) } // RuleArrayInput is an input type that accepts RuleArray and RuleArrayOutput values. // You can construct a concrete instance of `RuleArrayInput` via: // // RuleArray{ RuleArgs{...} } type RuleArrayInput interface { pulumi.Input ToRuleArrayOutput() RuleArrayOutput ToRuleArrayOutputWithContext(context.Context) RuleArrayOutput } type RuleArray []RuleInput func (RuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Rule)(nil)).Elem() } func (i RuleArray) ToRuleArrayOutput() RuleArrayOutput { return i.ToRuleArrayOutputWithContext(context.Background()) } func (i RuleArray) ToRuleArrayOutputWithContext(ctx context.Context) RuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RuleArrayOutput) } // RuleMapInput is an input type that accepts RuleMap and RuleMapOutput values. // You can construct a concrete instance of `RuleMapInput` via: // // RuleMap{ "key": RuleArgs{...} } type RuleMapInput interface { pulumi.Input ToRuleMapOutput() RuleMapOutput ToRuleMapOutputWithContext(context.Context) RuleMapOutput } type RuleMap map[string]RuleInput func (RuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Rule)(nil)).Elem() } func (i RuleMap) ToRuleMapOutput() RuleMapOutput { return i.ToRuleMapOutputWithContext(context.Background()) } func (i RuleMap) ToRuleMapOutputWithContext(ctx context.Context) RuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RuleMapOutput) } type RuleOutput struct{ *pulumi.OutputState } func (RuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**Rule)(nil)).Elem() } func (o RuleOutput) ToRuleOutput() RuleOutput { return o } func (o RuleOutput) ToRuleOutputWithContext(ctx context.Context) RuleOutput { return o } // A list of reference to a Backend Address Pool over which this Load Balancing Rule operates. // // > **Note:** In most cases users can only set one Backend Address Pool ID in the `backendAddressPoolIds`. Especially, when the sku of the LB is `Gateway`, users can set up to two IDs in the `backendAddressPoolIds`. func (o RuleOutput) BackendAddressPoolIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *Rule) pulumi.StringArrayOutput { return v.BackendAddressPoolIds }).(pulumi.StringArrayOutput) } // The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive. A port of `0` means "Any Port". func (o RuleOutput) BackendPort() pulumi.IntOutput { return o.ApplyT(func(v *Rule) pulumi.IntOutput { return v.BackendPort }).(pulumi.IntOutput) } // Is snat enabled for this Load Balancer Rule? Default `false`. func (o RuleOutput) DisableOutboundSnat() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Rule) pulumi.BoolPtrOutput { return v.DisableOutboundSnat }).(pulumi.BoolPtrOutput) } // Deprecated: This field is deprecated in favour of `floatingIpEnabled` and will be removed in version 5.0 of the provider. func (o RuleOutput) EnableFloatingIp() pulumi.BoolOutput { return o.ApplyT(func(v *Rule) pulumi.BoolOutput { return v.EnableFloatingIp }).(pulumi.BoolOutput) } // Deprecated: This field is deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. func (o RuleOutput) EnableTcpReset() pulumi.BoolOutput { return o.ApplyT(func(v *Rule) pulumi.BoolOutput { return v.EnableTcpReset }).(pulumi.BoolOutput) } // Are the Floating IPs enabled for this Load Balancer Rule? A "floating" IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to `false`. func (o RuleOutput) FloatingIpEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *Rule) pulumi.BoolOutput { return v.FloatingIpEnabled }).(pulumi.BoolOutput) } func (o RuleOutput) FrontendIpConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.FrontendIpConfigurationId }).(pulumi.StringOutput) } // The name of the frontend IP configuration to which the rule is associated. func (o RuleOutput) FrontendIpConfigurationName() pulumi.StringOutput { return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.FrontendIpConfigurationName }).(pulumi.StringOutput) } // The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive. A port of `0` means "Any Port". func (o RuleOutput) FrontendPort() pulumi.IntOutput { return o.ApplyT(func(v *Rule) pulumi.IntOutput { return v.FrontendPort }).(pulumi.IntOutput) } // Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `100` minutes. Defaults to `4` minutes. func (o RuleOutput) IdleTimeoutInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *Rule) pulumi.IntPtrOutput { return v.IdleTimeoutInMinutes }).(pulumi.IntPtrOutput) } // Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are: `Default` – The load balancer is configured to use a 5 tuple hash to map traffic to available servers. `SourceIP` – The load balancer is configured to use a 2 tuple hash to map traffic to available servers. `SourceIPProtocol` – The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where in the Azure portal the options are called `None`, `Client IP` and `Client IP and Protocol` respectively. Defaults to `Default`. func (o RuleOutput) LoadDistribution() pulumi.StringPtrOutput { return o.ApplyT(func(v *Rule) pulumi.StringPtrOutput { return v.LoadDistribution }).(pulumi.StringPtrOutput) } // The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created. func (o RuleOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.LoadbalancerId }).(pulumi.StringOutput) } // Specifies the name of the LB Rule. Changing this forces a new resource to be created. func (o RuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A reference to a Probe used by this Load Balancing Rule. func (o RuleOutput) ProbeId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Rule) pulumi.StringPtrOutput { return v.ProbeId }).(pulumi.StringPtrOutput) } // The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`. func (o RuleOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v *Rule) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput) } // Is TCP Reset enabled for this Load Balancer Rule? func (o RuleOutput) TcpResetEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *Rule) pulumi.BoolOutput { return v.TcpResetEnabled }).(pulumi.BoolOutput) } type RuleArrayOutput struct{ *pulumi.OutputState } func (RuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Rule)(nil)).Elem() } func (o RuleArrayOutput) ToRuleArrayOutput() RuleArrayOutput { return o } func (o RuleArrayOutput) ToRuleArrayOutputWithContext(ctx context.Context) RuleArrayOutput { return o } func (o RuleArrayOutput) Index(i pulumi.IntInput) RuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Rule { return vs[0].([]*Rule)[vs[1].(int)] }).(RuleOutput) } type RuleMapOutput struct{ *pulumi.OutputState } func (RuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Rule)(nil)).Elem() } func (o RuleMapOutput) ToRuleMapOutput() RuleMapOutput { return o } func (o RuleMapOutput) ToRuleMapOutputWithContext(ctx context.Context) RuleMapOutput { return o } func (o RuleMapOutput) MapIndex(k pulumi.StringInput) RuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Rule { return vs[0].(map[string]*Rule)[vs[1].(string)] }).(RuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RuleInput)(nil)).Elem(), &Rule{}) pulumi.RegisterInputType(reflect.TypeOf((*RuleArrayInput)(nil)).Elem(), RuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RuleMapInput)(nil)).Elem(), RuleMap{}) pulumi.RegisterOutputType(RuleOutput{}) pulumi.RegisterOutputType(RuleArrayOutput{}) pulumi.RegisterOutputType(RuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/lb/outboundRule.go
sdk/go/azure/lb/outboundRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lb import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Load Balancer Outbound Rule. // // > **Note:** When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration and a Backend Address Pool Attached. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("LoadBalancerRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("PublicIPForLB"), // 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("TestLoadBalancer"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // exampleBackendAddressPool, err := lb.NewBackendAddressPool(ctx, "example", &lb.BackendAddressPoolArgs{ // Name: pulumi.String("example"), // LoadbalancerId: exampleLoadBalancer.ID(), // }) // if err != nil { // return err // } // _, err = lb.NewOutboundRule(ctx, "example", &lb.OutboundRuleArgs{ // Name: pulumi.String("OutboundRule"), // LoadbalancerId: exampleLoadBalancer.ID(), // Protocol: pulumi.String("Tcp"), // BackendAddressPoolId: exampleBackendAddressPool.ID(), // FrontendIpConfigurations: lb.OutboundRuleFrontendIpConfigurationArray{ // &lb.OutboundRuleFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // }, // }, // }) // if err != 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` - 2023-09-01 // // ## Import // // Load Balancer Outbound Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lb/outboundRule:OutboundRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/outboundRules/rule1 // ``` type OutboundRule struct { pulumi.CustomResourceState // The number of outbound ports to be used for NAT. Defaults to `1024`. AllocatedOutboundPorts pulumi.IntPtrOutput `pulumi:"allocatedOutboundPorts"` // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPoolId pulumi.StringOutput `pulumi:"backendAddressPoolId"` // Deprecated: This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolOutput `pulumi:"enableTcpReset"` // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations OutboundRuleFrontendIpConfigurationArrayOutput `pulumi:"frontendIpConfigurations"` // The timeout for the TCP idle connection Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringOutput `pulumi:"loadbalancerId"` // Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol pulumi.StringOutput `pulumi:"protocol"` // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. TcpResetEnabled pulumi.BoolOutput `pulumi:"tcpResetEnabled"` } // NewOutboundRule registers a new resource with the given unique name, arguments, and options. func NewOutboundRule(ctx *pulumi.Context, name string, args *OutboundRuleArgs, opts ...pulumi.ResourceOption) (*OutboundRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendAddressPoolId == nil { return nil, errors.New("invalid value for required argument 'BackendAddressPoolId'") } if args.LoadbalancerId == nil { return nil, errors.New("invalid value for required argument 'LoadbalancerId'") } if args.Protocol == nil { return nil, errors.New("invalid value for required argument 'Protocol'") } opts = internal.PkgResourceDefaultOpts(opts) var resource OutboundRule err := ctx.RegisterResource("azure:lb/outboundRule:OutboundRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutboundRule gets an existing OutboundRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetOutboundRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutboundRuleState, opts ...pulumi.ResourceOption) (*OutboundRule, error) { var resource OutboundRule err := ctx.ReadResource("azure:lb/outboundRule:OutboundRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutboundRule resources. type outboundRuleState struct { // The number of outbound ports to be used for NAT. Defaults to `1024`. AllocatedOutboundPorts *int `pulumi:"allocatedOutboundPorts"` // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPoolId *string `pulumi:"backendAddressPoolId"` // Deprecated: This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset *bool `pulumi:"enableTcpReset"` // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations []OutboundRuleFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // The timeout for the TCP idle connection Defaults to `4`. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. LoadbalancerId *string `pulumi:"loadbalancerId"` // Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol *string `pulumi:"protocol"` // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } type OutboundRuleState struct { // The number of outbound ports to be used for NAT. Defaults to `1024`. AllocatedOutboundPorts pulumi.IntPtrInput // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPoolId pulumi.StringPtrInput // Deprecated: This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolPtrInput // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations OutboundRuleFrontendIpConfigurationArrayInput // The timeout for the TCP idle connection Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrInput // The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringPtrInput // Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol pulumi.StringPtrInput // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. TcpResetEnabled pulumi.BoolPtrInput } func (OutboundRuleState) ElementType() reflect.Type { return reflect.TypeOf((*outboundRuleState)(nil)).Elem() } type outboundRuleArgs struct { // The number of outbound ports to be used for NAT. Defaults to `1024`. AllocatedOutboundPorts *int `pulumi:"allocatedOutboundPorts"` // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPoolId string `pulumi:"backendAddressPoolId"` // Deprecated: This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset *bool `pulumi:"enableTcpReset"` // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations []OutboundRuleFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // The timeout for the TCP idle connection Defaults to `4`. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. LoadbalancerId string `pulumi:"loadbalancerId"` // Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol string `pulumi:"protocol"` // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. TcpResetEnabled *bool `pulumi:"tcpResetEnabled"` } // The set of arguments for constructing a OutboundRule resource. type OutboundRuleArgs struct { // The number of outbound ports to be used for NAT. Defaults to `1024`. AllocatedOutboundPorts pulumi.IntPtrInput // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPoolId pulumi.StringInput // Deprecated: This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. EnableTcpReset pulumi.BoolPtrInput // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations OutboundRuleFrontendIpConfigurationArrayInput // The timeout for the TCP idle connection Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrInput // The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. LoadbalancerId pulumi.StringInput // Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. Protocol pulumi.StringInput // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. TcpResetEnabled pulumi.BoolPtrInput } func (OutboundRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*outboundRuleArgs)(nil)).Elem() } type OutboundRuleInput interface { pulumi.Input ToOutboundRuleOutput() OutboundRuleOutput ToOutboundRuleOutputWithContext(ctx context.Context) OutboundRuleOutput } func (*OutboundRule) ElementType() reflect.Type { return reflect.TypeOf((**OutboundRule)(nil)).Elem() } func (i *OutboundRule) ToOutboundRuleOutput() OutboundRuleOutput { return i.ToOutboundRuleOutputWithContext(context.Background()) } func (i *OutboundRule) ToOutboundRuleOutputWithContext(ctx context.Context) OutboundRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(OutboundRuleOutput) } // OutboundRuleArrayInput is an input type that accepts OutboundRuleArray and OutboundRuleArrayOutput values. // You can construct a concrete instance of `OutboundRuleArrayInput` via: // // OutboundRuleArray{ OutboundRuleArgs{...} } type OutboundRuleArrayInput interface { pulumi.Input ToOutboundRuleArrayOutput() OutboundRuleArrayOutput ToOutboundRuleArrayOutputWithContext(context.Context) OutboundRuleArrayOutput } type OutboundRuleArray []OutboundRuleInput func (OutboundRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutboundRule)(nil)).Elem() } func (i OutboundRuleArray) ToOutboundRuleArrayOutput() OutboundRuleArrayOutput { return i.ToOutboundRuleArrayOutputWithContext(context.Background()) } func (i OutboundRuleArray) ToOutboundRuleArrayOutputWithContext(ctx context.Context) OutboundRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutboundRuleArrayOutput) } // OutboundRuleMapInput is an input type that accepts OutboundRuleMap and OutboundRuleMapOutput values. // You can construct a concrete instance of `OutboundRuleMapInput` via: // // OutboundRuleMap{ "key": OutboundRuleArgs{...} } type OutboundRuleMapInput interface { pulumi.Input ToOutboundRuleMapOutput() OutboundRuleMapOutput ToOutboundRuleMapOutputWithContext(context.Context) OutboundRuleMapOutput } type OutboundRuleMap map[string]OutboundRuleInput func (OutboundRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutboundRule)(nil)).Elem() } func (i OutboundRuleMap) ToOutboundRuleMapOutput() OutboundRuleMapOutput { return i.ToOutboundRuleMapOutputWithContext(context.Background()) } func (i OutboundRuleMap) ToOutboundRuleMapOutputWithContext(ctx context.Context) OutboundRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutboundRuleMapOutput) } type OutboundRuleOutput struct{ *pulumi.OutputState } func (OutboundRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutboundRule)(nil)).Elem() } func (o OutboundRuleOutput) ToOutboundRuleOutput() OutboundRuleOutput { return o } func (o OutboundRuleOutput) ToOutboundRuleOutputWithContext(ctx context.Context) OutboundRuleOutput { return o } // The number of outbound ports to be used for NAT. Defaults to `1024`. func (o OutboundRuleOutput) AllocatedOutboundPorts() pulumi.IntPtrOutput { return o.ApplyT(func(v *OutboundRule) pulumi.IntPtrOutput { return v.AllocatedOutboundPorts }).(pulumi.IntPtrOutput) } // The ID of the Backend Address Pool. Outbound traffic is randomly load balanced across IPs in the backend IPs. func (o OutboundRuleOutput) BackendAddressPoolId() pulumi.StringOutput { return o.ApplyT(func(v *OutboundRule) pulumi.StringOutput { return v.BackendAddressPoolId }).(pulumi.StringOutput) } // Deprecated: This property is being deprecated in favour of `tcpResetEnabled` and will be removed in version 5.0 of the provider. func (o OutboundRuleOutput) EnableTcpReset() pulumi.BoolOutput { return o.ApplyT(func(v *OutboundRule) pulumi.BoolOutput { return v.EnableTcpReset }).(pulumi.BoolOutput) } // One or more `frontendIpConfiguration` blocks as defined below. func (o OutboundRuleOutput) FrontendIpConfigurations() OutboundRuleFrontendIpConfigurationArrayOutput { return o.ApplyT(func(v *OutboundRule) OutboundRuleFrontendIpConfigurationArrayOutput { return v.FrontendIpConfigurations }).(OutboundRuleFrontendIpConfigurationArrayOutput) } // The timeout for the TCP idle connection Defaults to `4`. func (o OutboundRuleOutput) IdleTimeoutInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *OutboundRule) pulumi.IntPtrOutput { return v.IdleTimeoutInMinutes }).(pulumi.IntPtrOutput) } // The ID of the Load Balancer in which to create the Outbound Rule. Changing this forces a new resource to be created. func (o OutboundRuleOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v *OutboundRule) pulumi.StringOutput { return v.LoadbalancerId }).(pulumi.StringOutput) } // Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. func (o OutboundRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutboundRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. func (o OutboundRuleOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v *OutboundRule) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput) } // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. func (o OutboundRuleOutput) TcpResetEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *OutboundRule) pulumi.BoolOutput { return v.TcpResetEnabled }).(pulumi.BoolOutput) } type OutboundRuleArrayOutput struct{ *pulumi.OutputState } func (OutboundRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutboundRule)(nil)).Elem() } func (o OutboundRuleArrayOutput) ToOutboundRuleArrayOutput() OutboundRuleArrayOutput { return o } func (o OutboundRuleArrayOutput) ToOutboundRuleArrayOutputWithContext(ctx context.Context) OutboundRuleArrayOutput { return o } func (o OutboundRuleArrayOutput) Index(i pulumi.IntInput) OutboundRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutboundRule { return vs[0].([]*OutboundRule)[vs[1].(int)] }).(OutboundRuleOutput) } type OutboundRuleMapOutput struct{ *pulumi.OutputState } func (OutboundRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutboundRule)(nil)).Elem() } func (o OutboundRuleMapOutput) ToOutboundRuleMapOutput() OutboundRuleMapOutput { return o } func (o OutboundRuleMapOutput) ToOutboundRuleMapOutputWithContext(ctx context.Context) OutboundRuleMapOutput { return o } func (o OutboundRuleMapOutput) MapIndex(k pulumi.StringInput) OutboundRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutboundRule { return vs[0].(map[string]*OutboundRule)[vs[1].(string)] }).(OutboundRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutboundRuleInput)(nil)).Elem(), &OutboundRule{}) pulumi.RegisterInputType(reflect.TypeOf((*OutboundRuleArrayInput)(nil)).Elem(), OutboundRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutboundRuleMapInput)(nil)).Elem(), OutboundRuleMap{}) pulumi.RegisterOutputType(OutboundRuleOutput{}) pulumi.RegisterOutputType(OutboundRuleArrayOutput{}) pulumi.RegisterOutputType(OutboundRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticcloud/init.go
sdk/go/azure/elasticcloud/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 elasticcloud 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:elasticcloud/elasticsearch:Elasticsearch": r = &Elasticsearch{} 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", "elasticcloud/elasticsearch", &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/elasticcloud/pulumiTypes.go
sdk/go/azure/elasticcloud/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 elasticcloud 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 ElasticsearchLogs struct { // A list of `filteringTag` blocks as defined above. FilteringTags []ElasticsearchLogsFilteringTag `pulumi:"filteringTags"` // Specifies if the Azure Activity Logs should be sent to the Elasticsearch cluster. Defaults to `false`. SendActivityLogs *bool `pulumi:"sendActivityLogs"` // Specifies if the AzureAD Logs should be sent to the Elasticsearch cluster. Defaults to `false`. SendAzureadLogs *bool `pulumi:"sendAzureadLogs"` // Specifies if the Azure Subscription Logs should be sent to the Elasticsearch cluster. Defaults to `false`. SendSubscriptionLogs *bool `pulumi:"sendSubscriptionLogs"` } // ElasticsearchLogsInput is an input type that accepts ElasticsearchLogsArgs and ElasticsearchLogsOutput values. // You can construct a concrete instance of `ElasticsearchLogsInput` via: // // ElasticsearchLogsArgs{...} type ElasticsearchLogsInput interface { pulumi.Input ToElasticsearchLogsOutput() ElasticsearchLogsOutput ToElasticsearchLogsOutputWithContext(context.Context) ElasticsearchLogsOutput } type ElasticsearchLogsArgs struct { // A list of `filteringTag` blocks as defined above. FilteringTags ElasticsearchLogsFilteringTagArrayInput `pulumi:"filteringTags"` // Specifies if the Azure Activity Logs should be sent to the Elasticsearch cluster. Defaults to `false`. SendActivityLogs pulumi.BoolPtrInput `pulumi:"sendActivityLogs"` // Specifies if the AzureAD Logs should be sent to the Elasticsearch cluster. Defaults to `false`. SendAzureadLogs pulumi.BoolPtrInput `pulumi:"sendAzureadLogs"` // Specifies if the Azure Subscription Logs should be sent to the Elasticsearch cluster. Defaults to `false`. SendSubscriptionLogs pulumi.BoolPtrInput `pulumi:"sendSubscriptionLogs"` } func (ElasticsearchLogsArgs) ElementType() reflect.Type { return reflect.TypeOf((*ElasticsearchLogs)(nil)).Elem() } func (i ElasticsearchLogsArgs) ToElasticsearchLogsOutput() ElasticsearchLogsOutput { return i.ToElasticsearchLogsOutputWithContext(context.Background()) } func (i ElasticsearchLogsArgs) ToElasticsearchLogsOutputWithContext(ctx context.Context) ElasticsearchLogsOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchLogsOutput) } func (i ElasticsearchLogsArgs) ToElasticsearchLogsPtrOutput() ElasticsearchLogsPtrOutput { return i.ToElasticsearchLogsPtrOutputWithContext(context.Background()) } func (i ElasticsearchLogsArgs) ToElasticsearchLogsPtrOutputWithContext(ctx context.Context) ElasticsearchLogsPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchLogsOutput).ToElasticsearchLogsPtrOutputWithContext(ctx) } // ElasticsearchLogsPtrInput is an input type that accepts ElasticsearchLogsArgs, ElasticsearchLogsPtr and ElasticsearchLogsPtrOutput values. // You can construct a concrete instance of `ElasticsearchLogsPtrInput` via: // // ElasticsearchLogsArgs{...} // // or: // // nil type ElasticsearchLogsPtrInput interface { pulumi.Input ToElasticsearchLogsPtrOutput() ElasticsearchLogsPtrOutput ToElasticsearchLogsPtrOutputWithContext(context.Context) ElasticsearchLogsPtrOutput } type elasticsearchLogsPtrType ElasticsearchLogsArgs func ElasticsearchLogsPtr(v *ElasticsearchLogsArgs) ElasticsearchLogsPtrInput { return (*elasticsearchLogsPtrType)(v) } func (*elasticsearchLogsPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ElasticsearchLogs)(nil)).Elem() } func (i *elasticsearchLogsPtrType) ToElasticsearchLogsPtrOutput() ElasticsearchLogsPtrOutput { return i.ToElasticsearchLogsPtrOutputWithContext(context.Background()) } func (i *elasticsearchLogsPtrType) ToElasticsearchLogsPtrOutputWithContext(ctx context.Context) ElasticsearchLogsPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchLogsPtrOutput) } type ElasticsearchLogsOutput struct{ *pulumi.OutputState } func (ElasticsearchLogsOutput) ElementType() reflect.Type { return reflect.TypeOf((*ElasticsearchLogs)(nil)).Elem() } func (o ElasticsearchLogsOutput) ToElasticsearchLogsOutput() ElasticsearchLogsOutput { return o } func (o ElasticsearchLogsOutput) ToElasticsearchLogsOutputWithContext(ctx context.Context) ElasticsearchLogsOutput { return o } func (o ElasticsearchLogsOutput) ToElasticsearchLogsPtrOutput() ElasticsearchLogsPtrOutput { return o.ToElasticsearchLogsPtrOutputWithContext(context.Background()) } func (o ElasticsearchLogsOutput) ToElasticsearchLogsPtrOutputWithContext(ctx context.Context) ElasticsearchLogsPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ElasticsearchLogs) *ElasticsearchLogs { return &v }).(ElasticsearchLogsPtrOutput) } // A list of `filteringTag` blocks as defined above. func (o ElasticsearchLogsOutput) FilteringTags() ElasticsearchLogsFilteringTagArrayOutput { return o.ApplyT(func(v ElasticsearchLogs) []ElasticsearchLogsFilteringTag { return v.FilteringTags }).(ElasticsearchLogsFilteringTagArrayOutput) } // Specifies if the Azure Activity Logs should be sent to the Elasticsearch cluster. Defaults to `false`. func (o ElasticsearchLogsOutput) SendActivityLogs() pulumi.BoolPtrOutput { return o.ApplyT(func(v ElasticsearchLogs) *bool { return v.SendActivityLogs }).(pulumi.BoolPtrOutput) } // Specifies if the AzureAD Logs should be sent to the Elasticsearch cluster. Defaults to `false`. func (o ElasticsearchLogsOutput) SendAzureadLogs() pulumi.BoolPtrOutput { return o.ApplyT(func(v ElasticsearchLogs) *bool { return v.SendAzureadLogs }).(pulumi.BoolPtrOutput) } // Specifies if the Azure Subscription Logs should be sent to the Elasticsearch cluster. Defaults to `false`. func (o ElasticsearchLogsOutput) SendSubscriptionLogs() pulumi.BoolPtrOutput { return o.ApplyT(func(v ElasticsearchLogs) *bool { return v.SendSubscriptionLogs }).(pulumi.BoolPtrOutput) } type ElasticsearchLogsPtrOutput struct{ *pulumi.OutputState } func (ElasticsearchLogsPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ElasticsearchLogs)(nil)).Elem() } func (o ElasticsearchLogsPtrOutput) ToElasticsearchLogsPtrOutput() ElasticsearchLogsPtrOutput { return o } func (o ElasticsearchLogsPtrOutput) ToElasticsearchLogsPtrOutputWithContext(ctx context.Context) ElasticsearchLogsPtrOutput { return o } func (o ElasticsearchLogsPtrOutput) Elem() ElasticsearchLogsOutput { return o.ApplyT(func(v *ElasticsearchLogs) ElasticsearchLogs { if v != nil { return *v } var ret ElasticsearchLogs return ret }).(ElasticsearchLogsOutput) } // A list of `filteringTag` blocks as defined above. func (o ElasticsearchLogsPtrOutput) FilteringTags() ElasticsearchLogsFilteringTagArrayOutput { return o.ApplyT(func(v *ElasticsearchLogs) []ElasticsearchLogsFilteringTag { if v == nil { return nil } return v.FilteringTags }).(ElasticsearchLogsFilteringTagArrayOutput) } // Specifies if the Azure Activity Logs should be sent to the Elasticsearch cluster. Defaults to `false`. func (o ElasticsearchLogsPtrOutput) SendActivityLogs() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ElasticsearchLogs) *bool { if v == nil { return nil } return v.SendActivityLogs }).(pulumi.BoolPtrOutput) } // Specifies if the AzureAD Logs should be sent to the Elasticsearch cluster. Defaults to `false`. func (o ElasticsearchLogsPtrOutput) SendAzureadLogs() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ElasticsearchLogs) *bool { if v == nil { return nil } return v.SendAzureadLogs }).(pulumi.BoolPtrOutput) } // Specifies if the Azure Subscription Logs should be sent to the Elasticsearch cluster. Defaults to `false`. func (o ElasticsearchLogsPtrOutput) SendSubscriptionLogs() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ElasticsearchLogs) *bool { if v == nil { return nil } return v.SendSubscriptionLogs }).(pulumi.BoolPtrOutput) } type ElasticsearchLogsFilteringTag struct { // Specifies the type of action which should be taken when the Tag matches the `name` and `value`. Possible values are `Exclude` and `Include`. Action string `pulumi:"action"` // Specifies the name (key) of the Tag which should be filtered. Name string `pulumi:"name"` // Specifies the value of the Tag which should be filtered. Value string `pulumi:"value"` } // ElasticsearchLogsFilteringTagInput is an input type that accepts ElasticsearchLogsFilteringTagArgs and ElasticsearchLogsFilteringTagOutput values. // You can construct a concrete instance of `ElasticsearchLogsFilteringTagInput` via: // // ElasticsearchLogsFilteringTagArgs{...} type ElasticsearchLogsFilteringTagInput interface { pulumi.Input ToElasticsearchLogsFilteringTagOutput() ElasticsearchLogsFilteringTagOutput ToElasticsearchLogsFilteringTagOutputWithContext(context.Context) ElasticsearchLogsFilteringTagOutput } type ElasticsearchLogsFilteringTagArgs struct { // Specifies the type of action which should be taken when the Tag matches the `name` and `value`. Possible values are `Exclude` and `Include`. Action pulumi.StringInput `pulumi:"action"` // Specifies the name (key) of the Tag which should be filtered. Name pulumi.StringInput `pulumi:"name"` // Specifies the value of the Tag which should be filtered. Value pulumi.StringInput `pulumi:"value"` } func (ElasticsearchLogsFilteringTagArgs) ElementType() reflect.Type { return reflect.TypeOf((*ElasticsearchLogsFilteringTag)(nil)).Elem() } func (i ElasticsearchLogsFilteringTagArgs) ToElasticsearchLogsFilteringTagOutput() ElasticsearchLogsFilteringTagOutput { return i.ToElasticsearchLogsFilteringTagOutputWithContext(context.Background()) } func (i ElasticsearchLogsFilteringTagArgs) ToElasticsearchLogsFilteringTagOutputWithContext(ctx context.Context) ElasticsearchLogsFilteringTagOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchLogsFilteringTagOutput) } // ElasticsearchLogsFilteringTagArrayInput is an input type that accepts ElasticsearchLogsFilteringTagArray and ElasticsearchLogsFilteringTagArrayOutput values. // You can construct a concrete instance of `ElasticsearchLogsFilteringTagArrayInput` via: // // ElasticsearchLogsFilteringTagArray{ ElasticsearchLogsFilteringTagArgs{...} } type ElasticsearchLogsFilteringTagArrayInput interface { pulumi.Input ToElasticsearchLogsFilteringTagArrayOutput() ElasticsearchLogsFilteringTagArrayOutput ToElasticsearchLogsFilteringTagArrayOutputWithContext(context.Context) ElasticsearchLogsFilteringTagArrayOutput } type ElasticsearchLogsFilteringTagArray []ElasticsearchLogsFilteringTagInput func (ElasticsearchLogsFilteringTagArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ElasticsearchLogsFilteringTag)(nil)).Elem() } func (i ElasticsearchLogsFilteringTagArray) ToElasticsearchLogsFilteringTagArrayOutput() ElasticsearchLogsFilteringTagArrayOutput { return i.ToElasticsearchLogsFilteringTagArrayOutputWithContext(context.Background()) } func (i ElasticsearchLogsFilteringTagArray) ToElasticsearchLogsFilteringTagArrayOutputWithContext(ctx context.Context) ElasticsearchLogsFilteringTagArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchLogsFilteringTagArrayOutput) } type ElasticsearchLogsFilteringTagOutput struct{ *pulumi.OutputState } func (ElasticsearchLogsFilteringTagOutput) ElementType() reflect.Type { return reflect.TypeOf((*ElasticsearchLogsFilteringTag)(nil)).Elem() } func (o ElasticsearchLogsFilteringTagOutput) ToElasticsearchLogsFilteringTagOutput() ElasticsearchLogsFilteringTagOutput { return o } func (o ElasticsearchLogsFilteringTagOutput) ToElasticsearchLogsFilteringTagOutputWithContext(ctx context.Context) ElasticsearchLogsFilteringTagOutput { return o } // Specifies the type of action which should be taken when the Tag matches the `name` and `value`. Possible values are `Exclude` and `Include`. func (o ElasticsearchLogsFilteringTagOutput) Action() pulumi.StringOutput { return o.ApplyT(func(v ElasticsearchLogsFilteringTag) string { return v.Action }).(pulumi.StringOutput) } // Specifies the name (key) of the Tag which should be filtered. func (o ElasticsearchLogsFilteringTagOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ElasticsearchLogsFilteringTag) string { return v.Name }).(pulumi.StringOutput) } // Specifies the value of the Tag which should be filtered. func (o ElasticsearchLogsFilteringTagOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v ElasticsearchLogsFilteringTag) string { return v.Value }).(pulumi.StringOutput) } type ElasticsearchLogsFilteringTagArrayOutput struct{ *pulumi.OutputState } func (ElasticsearchLogsFilteringTagArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ElasticsearchLogsFilteringTag)(nil)).Elem() } func (o ElasticsearchLogsFilteringTagArrayOutput) ToElasticsearchLogsFilteringTagArrayOutput() ElasticsearchLogsFilteringTagArrayOutput { return o } func (o ElasticsearchLogsFilteringTagArrayOutput) ToElasticsearchLogsFilteringTagArrayOutputWithContext(ctx context.Context) ElasticsearchLogsFilteringTagArrayOutput { return o } func (o ElasticsearchLogsFilteringTagArrayOutput) Index(i pulumi.IntInput) ElasticsearchLogsFilteringTagOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ElasticsearchLogsFilteringTag { return vs[0].([]ElasticsearchLogsFilteringTag)[vs[1].(int)] }).(ElasticsearchLogsFilteringTagOutput) } type GetElasticsearchLog struct { // A list of `filteringTag` blocks as defined above. FilteringTags []GetElasticsearchLogFilteringTag `pulumi:"filteringTags"` // Should the Azure Activity Logs should be sent to the Elasticsearch cluster? SendActivityLogs bool `pulumi:"sendActivityLogs"` // Should the AzureAD Logs should be sent to the Elasticsearch cluster? SendAzureadLogs bool `pulumi:"sendAzureadLogs"` // Should the Azure Subscription Logs should be sent to the Elasticsearch cluster? SendSubscriptionLogs bool `pulumi:"sendSubscriptionLogs"` } // GetElasticsearchLogInput is an input type that accepts GetElasticsearchLogArgs and GetElasticsearchLogOutput values. // You can construct a concrete instance of `GetElasticsearchLogInput` via: // // GetElasticsearchLogArgs{...} type GetElasticsearchLogInput interface { pulumi.Input ToGetElasticsearchLogOutput() GetElasticsearchLogOutput ToGetElasticsearchLogOutputWithContext(context.Context) GetElasticsearchLogOutput } type GetElasticsearchLogArgs struct { // A list of `filteringTag` blocks as defined above. FilteringTags GetElasticsearchLogFilteringTagArrayInput `pulumi:"filteringTags"` // Should the Azure Activity Logs should be sent to the Elasticsearch cluster? SendActivityLogs pulumi.BoolInput `pulumi:"sendActivityLogs"` // Should the AzureAD Logs should be sent to the Elasticsearch cluster? SendAzureadLogs pulumi.BoolInput `pulumi:"sendAzureadLogs"` // Should the Azure Subscription Logs should be sent to the Elasticsearch cluster? SendSubscriptionLogs pulumi.BoolInput `pulumi:"sendSubscriptionLogs"` } func (GetElasticsearchLogArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetElasticsearchLog)(nil)).Elem() } func (i GetElasticsearchLogArgs) ToGetElasticsearchLogOutput() GetElasticsearchLogOutput { return i.ToGetElasticsearchLogOutputWithContext(context.Background()) } func (i GetElasticsearchLogArgs) ToGetElasticsearchLogOutputWithContext(ctx context.Context) GetElasticsearchLogOutput { return pulumi.ToOutputWithContext(ctx, i).(GetElasticsearchLogOutput) } // GetElasticsearchLogArrayInput is an input type that accepts GetElasticsearchLogArray and GetElasticsearchLogArrayOutput values. // You can construct a concrete instance of `GetElasticsearchLogArrayInput` via: // // GetElasticsearchLogArray{ GetElasticsearchLogArgs{...} } type GetElasticsearchLogArrayInput interface { pulumi.Input ToGetElasticsearchLogArrayOutput() GetElasticsearchLogArrayOutput ToGetElasticsearchLogArrayOutputWithContext(context.Context) GetElasticsearchLogArrayOutput } type GetElasticsearchLogArray []GetElasticsearchLogInput func (GetElasticsearchLogArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetElasticsearchLog)(nil)).Elem() } func (i GetElasticsearchLogArray) ToGetElasticsearchLogArrayOutput() GetElasticsearchLogArrayOutput { return i.ToGetElasticsearchLogArrayOutputWithContext(context.Background()) } func (i GetElasticsearchLogArray) ToGetElasticsearchLogArrayOutputWithContext(ctx context.Context) GetElasticsearchLogArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetElasticsearchLogArrayOutput) } type GetElasticsearchLogOutput struct{ *pulumi.OutputState } func (GetElasticsearchLogOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetElasticsearchLog)(nil)).Elem() } func (o GetElasticsearchLogOutput) ToGetElasticsearchLogOutput() GetElasticsearchLogOutput { return o } func (o GetElasticsearchLogOutput) ToGetElasticsearchLogOutputWithContext(ctx context.Context) GetElasticsearchLogOutput { return o } // A list of `filteringTag` blocks as defined above. func (o GetElasticsearchLogOutput) FilteringTags() GetElasticsearchLogFilteringTagArrayOutput { return o.ApplyT(func(v GetElasticsearchLog) []GetElasticsearchLogFilteringTag { return v.FilteringTags }).(GetElasticsearchLogFilteringTagArrayOutput) } // Should the Azure Activity Logs should be sent to the Elasticsearch cluster? func (o GetElasticsearchLogOutput) SendActivityLogs() pulumi.BoolOutput { return o.ApplyT(func(v GetElasticsearchLog) bool { return v.SendActivityLogs }).(pulumi.BoolOutput) } // Should the AzureAD Logs should be sent to the Elasticsearch cluster? func (o GetElasticsearchLogOutput) SendAzureadLogs() pulumi.BoolOutput { return o.ApplyT(func(v GetElasticsearchLog) bool { return v.SendAzureadLogs }).(pulumi.BoolOutput) } // Should the Azure Subscription Logs should be sent to the Elasticsearch cluster? func (o GetElasticsearchLogOutput) SendSubscriptionLogs() pulumi.BoolOutput { return o.ApplyT(func(v GetElasticsearchLog) bool { return v.SendSubscriptionLogs }).(pulumi.BoolOutput) } type GetElasticsearchLogArrayOutput struct{ *pulumi.OutputState } func (GetElasticsearchLogArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetElasticsearchLog)(nil)).Elem() } func (o GetElasticsearchLogArrayOutput) ToGetElasticsearchLogArrayOutput() GetElasticsearchLogArrayOutput { return o } func (o GetElasticsearchLogArrayOutput) ToGetElasticsearchLogArrayOutputWithContext(ctx context.Context) GetElasticsearchLogArrayOutput { return o } func (o GetElasticsearchLogArrayOutput) Index(i pulumi.IntInput) GetElasticsearchLogOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetElasticsearchLog { return vs[0].([]GetElasticsearchLog)[vs[1].(int)] }).(GetElasticsearchLogOutput) } type GetElasticsearchLogFilteringTag struct { // The type of action which is taken when the Tag matches the `name` and `value`. Action string `pulumi:"action"` // The name of the Elasticsearch resource. Name string `pulumi:"name"` // The value of the Tag which should be filtered. Value string `pulumi:"value"` } // GetElasticsearchLogFilteringTagInput is an input type that accepts GetElasticsearchLogFilteringTagArgs and GetElasticsearchLogFilteringTagOutput values. // You can construct a concrete instance of `GetElasticsearchLogFilteringTagInput` via: // // GetElasticsearchLogFilteringTagArgs{...} type GetElasticsearchLogFilteringTagInput interface { pulumi.Input ToGetElasticsearchLogFilteringTagOutput() GetElasticsearchLogFilteringTagOutput ToGetElasticsearchLogFilteringTagOutputWithContext(context.Context) GetElasticsearchLogFilteringTagOutput } type GetElasticsearchLogFilteringTagArgs struct { // The type of action which is taken when the Tag matches the `name` and `value`. Action pulumi.StringInput `pulumi:"action"` // The name of the Elasticsearch resource. Name pulumi.StringInput `pulumi:"name"` // The value of the Tag which should be filtered. Value pulumi.StringInput `pulumi:"value"` } func (GetElasticsearchLogFilteringTagArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetElasticsearchLogFilteringTag)(nil)).Elem() } func (i GetElasticsearchLogFilteringTagArgs) ToGetElasticsearchLogFilteringTagOutput() GetElasticsearchLogFilteringTagOutput { return i.ToGetElasticsearchLogFilteringTagOutputWithContext(context.Background()) } func (i GetElasticsearchLogFilteringTagArgs) ToGetElasticsearchLogFilteringTagOutputWithContext(ctx context.Context) GetElasticsearchLogFilteringTagOutput { return pulumi.ToOutputWithContext(ctx, i).(GetElasticsearchLogFilteringTagOutput) } // GetElasticsearchLogFilteringTagArrayInput is an input type that accepts GetElasticsearchLogFilteringTagArray and GetElasticsearchLogFilteringTagArrayOutput values. // You can construct a concrete instance of `GetElasticsearchLogFilteringTagArrayInput` via: // // GetElasticsearchLogFilteringTagArray{ GetElasticsearchLogFilteringTagArgs{...} } type GetElasticsearchLogFilteringTagArrayInput interface { pulumi.Input ToGetElasticsearchLogFilteringTagArrayOutput() GetElasticsearchLogFilteringTagArrayOutput ToGetElasticsearchLogFilteringTagArrayOutputWithContext(context.Context) GetElasticsearchLogFilteringTagArrayOutput } type GetElasticsearchLogFilteringTagArray []GetElasticsearchLogFilteringTagInput func (GetElasticsearchLogFilteringTagArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetElasticsearchLogFilteringTag)(nil)).Elem() } func (i GetElasticsearchLogFilteringTagArray) ToGetElasticsearchLogFilteringTagArrayOutput() GetElasticsearchLogFilteringTagArrayOutput { return i.ToGetElasticsearchLogFilteringTagArrayOutputWithContext(context.Background()) } func (i GetElasticsearchLogFilteringTagArray) ToGetElasticsearchLogFilteringTagArrayOutputWithContext(ctx context.Context) GetElasticsearchLogFilteringTagArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetElasticsearchLogFilteringTagArrayOutput) } type GetElasticsearchLogFilteringTagOutput struct{ *pulumi.OutputState } func (GetElasticsearchLogFilteringTagOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetElasticsearchLogFilteringTag)(nil)).Elem() } func (o GetElasticsearchLogFilteringTagOutput) ToGetElasticsearchLogFilteringTagOutput() GetElasticsearchLogFilteringTagOutput { return o } func (o GetElasticsearchLogFilteringTagOutput) ToGetElasticsearchLogFilteringTagOutputWithContext(ctx context.Context) GetElasticsearchLogFilteringTagOutput { return o } // The type of action which is taken when the Tag matches the `name` and `value`. func (o GetElasticsearchLogFilteringTagOutput) Action() pulumi.StringOutput { return o.ApplyT(func(v GetElasticsearchLogFilteringTag) string { return v.Action }).(pulumi.StringOutput) } // The name of the Elasticsearch resource. func (o GetElasticsearchLogFilteringTagOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetElasticsearchLogFilteringTag) string { return v.Name }).(pulumi.StringOutput) } // The value of the Tag which should be filtered. func (o GetElasticsearchLogFilteringTagOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v GetElasticsearchLogFilteringTag) string { return v.Value }).(pulumi.StringOutput) } type GetElasticsearchLogFilteringTagArrayOutput struct{ *pulumi.OutputState } func (GetElasticsearchLogFilteringTagArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetElasticsearchLogFilteringTag)(nil)).Elem() } func (o GetElasticsearchLogFilteringTagArrayOutput) ToGetElasticsearchLogFilteringTagArrayOutput() GetElasticsearchLogFilteringTagArrayOutput { return o } func (o GetElasticsearchLogFilteringTagArrayOutput) ToGetElasticsearchLogFilteringTagArrayOutputWithContext(ctx context.Context) GetElasticsearchLogFilteringTagArrayOutput { return o } func (o GetElasticsearchLogFilteringTagArrayOutput) Index(i pulumi.IntInput) GetElasticsearchLogFilteringTagOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetElasticsearchLogFilteringTag { return vs[0].([]GetElasticsearchLogFilteringTag)[vs[1].(int)] }).(GetElasticsearchLogFilteringTagOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ElasticsearchLogsInput)(nil)).Elem(), ElasticsearchLogsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ElasticsearchLogsPtrInput)(nil)).Elem(), ElasticsearchLogsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ElasticsearchLogsFilteringTagInput)(nil)).Elem(), ElasticsearchLogsFilteringTagArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ElasticsearchLogsFilteringTagArrayInput)(nil)).Elem(), ElasticsearchLogsFilteringTagArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetElasticsearchLogInput)(nil)).Elem(), GetElasticsearchLogArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetElasticsearchLogArrayInput)(nil)).Elem(), GetElasticsearchLogArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetElasticsearchLogFilteringTagInput)(nil)).Elem(), GetElasticsearchLogFilteringTagArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetElasticsearchLogFilteringTagArrayInput)(nil)).Elem(), GetElasticsearchLogFilteringTagArray{}) pulumi.RegisterOutputType(ElasticsearchLogsOutput{}) pulumi.RegisterOutputType(ElasticsearchLogsPtrOutput{}) pulumi.RegisterOutputType(ElasticsearchLogsFilteringTagOutput{}) pulumi.RegisterOutputType(ElasticsearchLogsFilteringTagArrayOutput{}) pulumi.RegisterOutputType(GetElasticsearchLogOutput{}) pulumi.RegisterOutputType(GetElasticsearchLogArrayOutput{}) pulumi.RegisterOutputType(GetElasticsearchLogFilteringTagOutput{}) pulumi.RegisterOutputType(GetElasticsearchLogFilteringTagArrayOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticcloud/elasticsearch.go
sdk/go/azure/elasticcloud/elasticsearch.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticcloud import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Elasticsearch in Elastic Cloud. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticcloud" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // test, err := core.NewResourceGroup(ctx, "test", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = elasticcloud.NewElasticsearch(ctx, "test", &elasticcloud.ElasticsearchArgs{ // Name: pulumi.String("example-elasticsearch"), // ResourceGroupName: test.Name, // Location: test.Location, // SkuName: pulumi.String("ess-consumption-2024_Monthly"), // ElasticCloudEmailAddress: pulumi.String("user@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.Elastic` - 2023-06-01 // // ## Import // // Elasticsearch's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:elasticcloud/elasticsearch:Elasticsearch example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Elastic/monitors/monitor1 // ``` type Elasticsearch struct { pulumi.CustomResourceState // The ID of the Deployment within Elastic Cloud. ElasticCloudDeploymentId pulumi.StringOutput `pulumi:"elasticCloudDeploymentId"` // Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created. ElasticCloudEmailAddress pulumi.StringOutput `pulumi:"elasticCloudEmailAddress"` // The Default URL used for Single Sign On (SSO) to Elastic Cloud. ElasticCloudSsoDefaultUrl pulumi.StringOutput `pulumi:"elasticCloudSsoDefaultUrl"` // The ID of the User Account within Elastic Cloud. ElasticCloudUserId pulumi.StringOutput `pulumi:"elasticCloudUserId"` // The URL to the Elasticsearch Service associated with this Elasticsearch. ElasticsearchServiceUrl pulumi.StringOutput `pulumi:"elasticsearchServiceUrl"` // The URL to the Kibana Dashboard associated with this Elasticsearch. KibanaServiceUrl pulumi.StringOutput `pulumi:"kibanaServiceUrl"` // The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch. KibanaSsoUri pulumi.StringOutput `pulumi:"kibanaSsoUri"` // The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. Location pulumi.StringOutput `pulumi:"location"` // A `logs` block as defined below. Logs ElasticsearchLogsPtrOutput `pulumi:"logs"` // Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created. MonitoringEnabled pulumi.BoolPtrOutput `pulumi:"monitoringEnabled"` // The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created. // // > **Note:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term. // Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly". // You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags which should be assigned to the Elasticsearch resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewElasticsearch registers a new resource with the given unique name, arguments, and options. func NewElasticsearch(ctx *pulumi.Context, name string, args *ElasticsearchArgs, opts ...pulumi.ResourceOption) (*Elasticsearch, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ElasticCloudEmailAddress == nil { return nil, errors.New("invalid value for required argument 'ElasticCloudEmailAddress'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Elasticsearch err := ctx.RegisterResource("azure:elasticcloud/elasticsearch:Elasticsearch", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetElasticsearch gets an existing Elasticsearch resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetElasticsearch(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ElasticsearchState, opts ...pulumi.ResourceOption) (*Elasticsearch, error) { var resource Elasticsearch err := ctx.ReadResource("azure:elasticcloud/elasticsearch:Elasticsearch", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Elasticsearch resources. type elasticsearchState struct { // The ID of the Deployment within Elastic Cloud. ElasticCloudDeploymentId *string `pulumi:"elasticCloudDeploymentId"` // Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created. ElasticCloudEmailAddress *string `pulumi:"elasticCloudEmailAddress"` // The Default URL used for Single Sign On (SSO) to Elastic Cloud. ElasticCloudSsoDefaultUrl *string `pulumi:"elasticCloudSsoDefaultUrl"` // The ID of the User Account within Elastic Cloud. ElasticCloudUserId *string `pulumi:"elasticCloudUserId"` // The URL to the Elasticsearch Service associated with this Elasticsearch. ElasticsearchServiceUrl *string `pulumi:"elasticsearchServiceUrl"` // The URL to the Kibana Dashboard associated with this Elasticsearch. KibanaServiceUrl *string `pulumi:"kibanaServiceUrl"` // The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch. KibanaSsoUri *string `pulumi:"kibanaSsoUri"` // The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. Location *string `pulumi:"location"` // A `logs` block as defined below. Logs *ElasticsearchLogs `pulumi:"logs"` // Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created. MonitoringEnabled *bool `pulumi:"monitoringEnabled"` // The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created. // // > **Note:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term. // Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly". // You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU. SkuName *string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Elasticsearch resource. Tags map[string]string `pulumi:"tags"` } type ElasticsearchState struct { // The ID of the Deployment within Elastic Cloud. ElasticCloudDeploymentId pulumi.StringPtrInput // Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created. ElasticCloudEmailAddress pulumi.StringPtrInput // The Default URL used for Single Sign On (SSO) to Elastic Cloud. ElasticCloudSsoDefaultUrl pulumi.StringPtrInput // The ID of the User Account within Elastic Cloud. ElasticCloudUserId pulumi.StringPtrInput // The URL to the Elasticsearch Service associated with this Elasticsearch. ElasticsearchServiceUrl pulumi.StringPtrInput // The URL to the Kibana Dashboard associated with this Elasticsearch. KibanaServiceUrl pulumi.StringPtrInput // The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch. KibanaSsoUri pulumi.StringPtrInput // The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. Location pulumi.StringPtrInput // A `logs` block as defined below. Logs ElasticsearchLogsPtrInput // Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created. MonitoringEnabled pulumi.BoolPtrInput // The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created. // // > **Note:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term. // Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly". // You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU. SkuName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Elasticsearch resource. Tags pulumi.StringMapInput } func (ElasticsearchState) ElementType() reflect.Type { return reflect.TypeOf((*elasticsearchState)(nil)).Elem() } type elasticsearchArgs struct { // Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created. ElasticCloudEmailAddress string `pulumi:"elasticCloudEmailAddress"` // The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. Location *string `pulumi:"location"` // A `logs` block as defined below. Logs *ElasticsearchLogs `pulumi:"logs"` // Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created. MonitoringEnabled *bool `pulumi:"monitoringEnabled"` // The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created. // // > **Note:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term. // Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly". // You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU. SkuName string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Elasticsearch resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Elasticsearch resource. type ElasticsearchArgs struct { // Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created. ElasticCloudEmailAddress pulumi.StringInput // The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. Location pulumi.StringPtrInput // A `logs` block as defined below. Logs ElasticsearchLogsPtrInput // Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created. MonitoringEnabled pulumi.BoolPtrInput // The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created. // // > **Note:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term. // Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly". // You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU. SkuName pulumi.StringInput // A mapping of tags which should be assigned to the Elasticsearch resource. Tags pulumi.StringMapInput } func (ElasticsearchArgs) ElementType() reflect.Type { return reflect.TypeOf((*elasticsearchArgs)(nil)).Elem() } type ElasticsearchInput interface { pulumi.Input ToElasticsearchOutput() ElasticsearchOutput ToElasticsearchOutputWithContext(ctx context.Context) ElasticsearchOutput } func (*Elasticsearch) ElementType() reflect.Type { return reflect.TypeOf((**Elasticsearch)(nil)).Elem() } func (i *Elasticsearch) ToElasticsearchOutput() ElasticsearchOutput { return i.ToElasticsearchOutputWithContext(context.Background()) } func (i *Elasticsearch) ToElasticsearchOutputWithContext(ctx context.Context) ElasticsearchOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchOutput) } // ElasticsearchArrayInput is an input type that accepts ElasticsearchArray and ElasticsearchArrayOutput values. // You can construct a concrete instance of `ElasticsearchArrayInput` via: // // ElasticsearchArray{ ElasticsearchArgs{...} } type ElasticsearchArrayInput interface { pulumi.Input ToElasticsearchArrayOutput() ElasticsearchArrayOutput ToElasticsearchArrayOutputWithContext(context.Context) ElasticsearchArrayOutput } type ElasticsearchArray []ElasticsearchInput func (ElasticsearchArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Elasticsearch)(nil)).Elem() } func (i ElasticsearchArray) ToElasticsearchArrayOutput() ElasticsearchArrayOutput { return i.ToElasticsearchArrayOutputWithContext(context.Background()) } func (i ElasticsearchArray) ToElasticsearchArrayOutputWithContext(ctx context.Context) ElasticsearchArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchArrayOutput) } // ElasticsearchMapInput is an input type that accepts ElasticsearchMap and ElasticsearchMapOutput values. // You can construct a concrete instance of `ElasticsearchMapInput` via: // // ElasticsearchMap{ "key": ElasticsearchArgs{...} } type ElasticsearchMapInput interface { pulumi.Input ToElasticsearchMapOutput() ElasticsearchMapOutput ToElasticsearchMapOutputWithContext(context.Context) ElasticsearchMapOutput } type ElasticsearchMap map[string]ElasticsearchInput func (ElasticsearchMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Elasticsearch)(nil)).Elem() } func (i ElasticsearchMap) ToElasticsearchMapOutput() ElasticsearchMapOutput { return i.ToElasticsearchMapOutputWithContext(context.Background()) } func (i ElasticsearchMap) ToElasticsearchMapOutputWithContext(ctx context.Context) ElasticsearchMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticsearchMapOutput) } type ElasticsearchOutput struct{ *pulumi.OutputState } func (ElasticsearchOutput) ElementType() reflect.Type { return reflect.TypeOf((**Elasticsearch)(nil)).Elem() } func (o ElasticsearchOutput) ToElasticsearchOutput() ElasticsearchOutput { return o } func (o ElasticsearchOutput) ToElasticsearchOutputWithContext(ctx context.Context) ElasticsearchOutput { return o } // The ID of the Deployment within Elastic Cloud. func (o ElasticsearchOutput) ElasticCloudDeploymentId() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.ElasticCloudDeploymentId }).(pulumi.StringOutput) } // Specifies the Email Address which should be associated with this Elasticsearch account. Changing this forces a new Elasticsearch to be created. func (o ElasticsearchOutput) ElasticCloudEmailAddress() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.ElasticCloudEmailAddress }).(pulumi.StringOutput) } // The Default URL used for Single Sign On (SSO) to Elastic Cloud. func (o ElasticsearchOutput) ElasticCloudSsoDefaultUrl() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.ElasticCloudSsoDefaultUrl }).(pulumi.StringOutput) } // The ID of the User Account within Elastic Cloud. func (o ElasticsearchOutput) ElasticCloudUserId() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.ElasticCloudUserId }).(pulumi.StringOutput) } // The URL to the Elasticsearch Service associated with this Elasticsearch. func (o ElasticsearchOutput) ElasticsearchServiceUrl() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.ElasticsearchServiceUrl }).(pulumi.StringOutput) } // The URL to the Kibana Dashboard associated with this Elasticsearch. func (o ElasticsearchOutput) KibanaServiceUrl() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.KibanaServiceUrl }).(pulumi.StringOutput) } // The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch. func (o ElasticsearchOutput) KibanaSsoUri() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.KibanaSsoUri }).(pulumi.StringOutput) } // The Azure Region where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. func (o ElasticsearchOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A `logs` block as defined below. func (o ElasticsearchOutput) Logs() ElasticsearchLogsPtrOutput { return o.ApplyT(func(v *Elasticsearch) ElasticsearchLogsPtrOutput { return v.Logs }).(ElasticsearchLogsPtrOutput) } // Specifies if the Elasticsearch should have monitoring configured? Defaults to `true`. Changing this forces a new Elasticsearch to be created. func (o ElasticsearchOutput) MonitoringEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.BoolPtrOutput { return v.MonitoringEnabled }).(pulumi.BoolPtrOutput) } // The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created. func (o ElasticsearchOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Elasticsearch resource should exist. Changing this forces a new Elasticsearch to be created. func (o ElasticsearchOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created. // // > **Note:** The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term. // Ex: If the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly". // You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp?tab=PlansAndPrice) for more details or in case of any issues with the SKU. func (o ElasticsearchOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Elasticsearch resource. func (o ElasticsearchOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Elasticsearch) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ElasticsearchArrayOutput struct{ *pulumi.OutputState } func (ElasticsearchArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Elasticsearch)(nil)).Elem() } func (o ElasticsearchArrayOutput) ToElasticsearchArrayOutput() ElasticsearchArrayOutput { return o } func (o ElasticsearchArrayOutput) ToElasticsearchArrayOutputWithContext(ctx context.Context) ElasticsearchArrayOutput { return o } func (o ElasticsearchArrayOutput) Index(i pulumi.IntInput) ElasticsearchOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Elasticsearch { return vs[0].([]*Elasticsearch)[vs[1].(int)] }).(ElasticsearchOutput) } type ElasticsearchMapOutput struct{ *pulumi.OutputState } func (ElasticsearchMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Elasticsearch)(nil)).Elem() } func (o ElasticsearchMapOutput) ToElasticsearchMapOutput() ElasticsearchMapOutput { return o } func (o ElasticsearchMapOutput) ToElasticsearchMapOutputWithContext(ctx context.Context) ElasticsearchMapOutput { return o } func (o ElasticsearchMapOutput) MapIndex(k pulumi.StringInput) ElasticsearchOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Elasticsearch { return vs[0].(map[string]*Elasticsearch)[vs[1].(string)] }).(ElasticsearchOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ElasticsearchInput)(nil)).Elem(), &Elasticsearch{}) pulumi.RegisterInputType(reflect.TypeOf((*ElasticsearchArrayInput)(nil)).Elem(), ElasticsearchArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ElasticsearchMapInput)(nil)).Elem(), ElasticsearchMap{}) pulumi.RegisterOutputType(ElasticsearchOutput{}) pulumi.RegisterOutputType(ElasticsearchArrayOutput{}) pulumi.RegisterOutputType(ElasticsearchMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticcloud/getElasticsearch.go
sdk/go/azure/elasticcloud/getElasticsearch.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticcloud 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 Elasticsearch resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticcloud" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := elasticcloud.LookupElasticsearch(ctx, &elasticcloud.LookupElasticsearchArgs{ // Name: "my-elastic-search", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("elasticsearchEndpoint", example.ElasticsearchServiceUrl) // ctx.Export("kibanaEndpoint", example.KibanaServiceUrl) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Elastic` - 2023-06-01 func LookupElasticsearch(ctx *pulumi.Context, args *LookupElasticsearchArgs, opts ...pulumi.InvokeOption) (*LookupElasticsearchResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupElasticsearchResult err := ctx.Invoke("azure:elasticcloud/getElasticsearch:getElasticsearch", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getElasticsearch. type LookupElasticsearchArgs struct { // A `logs` block as defined below. Logs []GetElasticsearchLog `pulumi:"logs"` // The name of the Elasticsearch resource. Name string `pulumi:"name"` // The name of the resource group in which the Elasticsearch exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getElasticsearch. type LookupElasticsearchResult struct { // The ID of the Deployment within Elastic Cloud. ElasticCloudDeploymentId string `pulumi:"elasticCloudDeploymentId"` // The Email Address which is associated with this Elasticsearch account. ElasticCloudEmailAddress string `pulumi:"elasticCloudEmailAddress"` // The Default URL used for Single Sign On (SSO) to Elastic Cloud. ElasticCloudSsoDefaultUrl string `pulumi:"elasticCloudSsoDefaultUrl"` // The ID of the User Account within Elastic Cloud. ElasticCloudUserId string `pulumi:"elasticCloudUserId"` // The URL to the Elasticsearch Service associated with this Elasticsearch. ElasticsearchServiceUrl string `pulumi:"elasticsearchServiceUrl"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The URL to the Kibana Dashboard associated with this Elasticsearch. KibanaServiceUrl string `pulumi:"kibanaServiceUrl"` // The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch. KibanaSsoUri string `pulumi:"kibanaSsoUri"` // The Azure Region in which this Elasticsearch exists. Location string `pulumi:"location"` // A `logs` block as defined below. Logs []GetElasticsearchLog `pulumi:"logs"` // Specifies if monitoring is enabled on this Elasticsearch or not. MonitoringEnabled bool `pulumi:"monitoringEnabled"` // The name (key) of the Tag which should be filtered. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the SKU used for this Elasticsearch. SkuName string `pulumi:"skuName"` // A mapping of tags assigned to the Elasticsearch. Tags map[string]string `pulumi:"tags"` } func LookupElasticsearchOutput(ctx *pulumi.Context, args LookupElasticsearchOutputArgs, opts ...pulumi.InvokeOption) LookupElasticsearchResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupElasticsearchResultOutput, error) { args := v.(LookupElasticsearchArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:elasticcloud/getElasticsearch:getElasticsearch", args, LookupElasticsearchResultOutput{}, options).(LookupElasticsearchResultOutput), nil }).(LookupElasticsearchResultOutput) } // A collection of arguments for invoking getElasticsearch. type LookupElasticsearchOutputArgs struct { // A `logs` block as defined below. Logs GetElasticsearchLogArrayInput `pulumi:"logs"` // The name of the Elasticsearch resource. Name pulumi.StringInput `pulumi:"name"` // The name of the resource group in which the Elasticsearch exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupElasticsearchOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupElasticsearchArgs)(nil)).Elem() } // A collection of values returned by getElasticsearch. type LookupElasticsearchResultOutput struct{ *pulumi.OutputState } func (LookupElasticsearchResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupElasticsearchResult)(nil)).Elem() } func (o LookupElasticsearchResultOutput) ToLookupElasticsearchResultOutput() LookupElasticsearchResultOutput { return o } func (o LookupElasticsearchResultOutput) ToLookupElasticsearchResultOutputWithContext(ctx context.Context) LookupElasticsearchResultOutput { return o } // The ID of the Deployment within Elastic Cloud. func (o LookupElasticsearchResultOutput) ElasticCloudDeploymentId() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.ElasticCloudDeploymentId }).(pulumi.StringOutput) } // The Email Address which is associated with this Elasticsearch account. func (o LookupElasticsearchResultOutput) ElasticCloudEmailAddress() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.ElasticCloudEmailAddress }).(pulumi.StringOutput) } // The Default URL used for Single Sign On (SSO) to Elastic Cloud. func (o LookupElasticsearchResultOutput) ElasticCloudSsoDefaultUrl() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.ElasticCloudSsoDefaultUrl }).(pulumi.StringOutput) } // The ID of the User Account within Elastic Cloud. func (o LookupElasticsearchResultOutput) ElasticCloudUserId() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.ElasticCloudUserId }).(pulumi.StringOutput) } // The URL to the Elasticsearch Service associated with this Elasticsearch. func (o LookupElasticsearchResultOutput) ElasticsearchServiceUrl() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.ElasticsearchServiceUrl }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupElasticsearchResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.Id }).(pulumi.StringOutput) } // The URL to the Kibana Dashboard associated with this Elasticsearch. func (o LookupElasticsearchResultOutput) KibanaServiceUrl() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.KibanaServiceUrl }).(pulumi.StringOutput) } // The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch. func (o LookupElasticsearchResultOutput) KibanaSsoUri() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.KibanaSsoUri }).(pulumi.StringOutput) } // The Azure Region in which this Elasticsearch exists. func (o LookupElasticsearchResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.Location }).(pulumi.StringOutput) } // A `logs` block as defined below. func (o LookupElasticsearchResultOutput) Logs() GetElasticsearchLogArrayOutput { return o.ApplyT(func(v LookupElasticsearchResult) []GetElasticsearchLog { return v.Logs }).(GetElasticsearchLogArrayOutput) } // Specifies if monitoring is enabled on this Elasticsearch or not. func (o LookupElasticsearchResultOutput) MonitoringEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupElasticsearchResult) bool { return v.MonitoringEnabled }).(pulumi.BoolOutput) } // The name (key) of the Tag which should be filtered. func (o LookupElasticsearchResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupElasticsearchResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the SKU used for this Elasticsearch. func (o LookupElasticsearchResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupElasticsearchResult) string { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Elasticsearch. func (o LookupElasticsearchResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupElasticsearchResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupElasticsearchResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/consumption/init.go
sdk/go/azure/consumption/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 consumption 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:consumption/budgetManagementGroup:BudgetManagementGroup": r = &BudgetManagementGroup{} case "azure:consumption/budgetResourceGroup:BudgetResourceGroup": r = &BudgetResourceGroup{} case "azure:consumption/budgetSubscription:BudgetSubscription": r = &BudgetSubscription{} 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", "consumption/budgetManagementGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "consumption/budgetResourceGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "consumption/budgetSubscription", &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/consumption/pulumiTypes.go
sdk/go/azure/consumption/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 consumption 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 BudgetManagementGroupFilter struct { // One or more `dimension` blocks as defined below to filter the budget on. Dimensions []BudgetManagementGroupFilterDimension `pulumi:"dimensions"` // One or more `tag` blocks as defined below to filter the budget on. Tags []BudgetManagementGroupFilterTag `pulumi:"tags"` } // BudgetManagementGroupFilterInput is an input type that accepts BudgetManagementGroupFilterArgs and BudgetManagementGroupFilterOutput values. // You can construct a concrete instance of `BudgetManagementGroupFilterInput` via: // // BudgetManagementGroupFilterArgs{...} type BudgetManagementGroupFilterInput interface { pulumi.Input ToBudgetManagementGroupFilterOutput() BudgetManagementGroupFilterOutput ToBudgetManagementGroupFilterOutputWithContext(context.Context) BudgetManagementGroupFilterOutput } type BudgetManagementGroupFilterArgs struct { // One or more `dimension` blocks as defined below to filter the budget on. Dimensions BudgetManagementGroupFilterDimensionArrayInput `pulumi:"dimensions"` // One or more `tag` blocks as defined below to filter the budget on. Tags BudgetManagementGroupFilterTagArrayInput `pulumi:"tags"` } func (BudgetManagementGroupFilterArgs) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupFilter)(nil)).Elem() } func (i BudgetManagementGroupFilterArgs) ToBudgetManagementGroupFilterOutput() BudgetManagementGroupFilterOutput { return i.ToBudgetManagementGroupFilterOutputWithContext(context.Background()) } func (i BudgetManagementGroupFilterArgs) ToBudgetManagementGroupFilterOutputWithContext(ctx context.Context) BudgetManagementGroupFilterOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupFilterOutput) } func (i BudgetManagementGroupFilterArgs) ToBudgetManagementGroupFilterPtrOutput() BudgetManagementGroupFilterPtrOutput { return i.ToBudgetManagementGroupFilterPtrOutputWithContext(context.Background()) } func (i BudgetManagementGroupFilterArgs) ToBudgetManagementGroupFilterPtrOutputWithContext(ctx context.Context) BudgetManagementGroupFilterPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupFilterOutput).ToBudgetManagementGroupFilterPtrOutputWithContext(ctx) } // BudgetManagementGroupFilterPtrInput is an input type that accepts BudgetManagementGroupFilterArgs, BudgetManagementGroupFilterPtr and BudgetManagementGroupFilterPtrOutput values. // You can construct a concrete instance of `BudgetManagementGroupFilterPtrInput` via: // // BudgetManagementGroupFilterArgs{...} // // or: // // nil type BudgetManagementGroupFilterPtrInput interface { pulumi.Input ToBudgetManagementGroupFilterPtrOutput() BudgetManagementGroupFilterPtrOutput ToBudgetManagementGroupFilterPtrOutputWithContext(context.Context) BudgetManagementGroupFilterPtrOutput } type budgetManagementGroupFilterPtrType BudgetManagementGroupFilterArgs func BudgetManagementGroupFilterPtr(v *BudgetManagementGroupFilterArgs) BudgetManagementGroupFilterPtrInput { return (*budgetManagementGroupFilterPtrType)(v) } func (*budgetManagementGroupFilterPtrType) ElementType() reflect.Type { return reflect.TypeOf((**BudgetManagementGroupFilter)(nil)).Elem() } func (i *budgetManagementGroupFilterPtrType) ToBudgetManagementGroupFilterPtrOutput() BudgetManagementGroupFilterPtrOutput { return i.ToBudgetManagementGroupFilterPtrOutputWithContext(context.Background()) } func (i *budgetManagementGroupFilterPtrType) ToBudgetManagementGroupFilterPtrOutputWithContext(ctx context.Context) BudgetManagementGroupFilterPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupFilterPtrOutput) } type BudgetManagementGroupFilterOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupFilterOutput) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupFilter)(nil)).Elem() } func (o BudgetManagementGroupFilterOutput) ToBudgetManagementGroupFilterOutput() BudgetManagementGroupFilterOutput { return o } func (o BudgetManagementGroupFilterOutput) ToBudgetManagementGroupFilterOutputWithContext(ctx context.Context) BudgetManagementGroupFilterOutput { return o } func (o BudgetManagementGroupFilterOutput) ToBudgetManagementGroupFilterPtrOutput() BudgetManagementGroupFilterPtrOutput { return o.ToBudgetManagementGroupFilterPtrOutputWithContext(context.Background()) } func (o BudgetManagementGroupFilterOutput) ToBudgetManagementGroupFilterPtrOutputWithContext(ctx context.Context) BudgetManagementGroupFilterPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v BudgetManagementGroupFilter) *BudgetManagementGroupFilter { return &v }).(BudgetManagementGroupFilterPtrOutput) } // One or more `dimension` blocks as defined below to filter the budget on. func (o BudgetManagementGroupFilterOutput) Dimensions() BudgetManagementGroupFilterDimensionArrayOutput { return o.ApplyT(func(v BudgetManagementGroupFilter) []BudgetManagementGroupFilterDimension { return v.Dimensions }).(BudgetManagementGroupFilterDimensionArrayOutput) } // One or more `tag` blocks as defined below to filter the budget on. func (o BudgetManagementGroupFilterOutput) Tags() BudgetManagementGroupFilterTagArrayOutput { return o.ApplyT(func(v BudgetManagementGroupFilter) []BudgetManagementGroupFilterTag { return v.Tags }).(BudgetManagementGroupFilterTagArrayOutput) } type BudgetManagementGroupFilterPtrOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupFilterPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**BudgetManagementGroupFilter)(nil)).Elem() } func (o BudgetManagementGroupFilterPtrOutput) ToBudgetManagementGroupFilterPtrOutput() BudgetManagementGroupFilterPtrOutput { return o } func (o BudgetManagementGroupFilterPtrOutput) ToBudgetManagementGroupFilterPtrOutputWithContext(ctx context.Context) BudgetManagementGroupFilterPtrOutput { return o } func (o BudgetManagementGroupFilterPtrOutput) Elem() BudgetManagementGroupFilterOutput { return o.ApplyT(func(v *BudgetManagementGroupFilter) BudgetManagementGroupFilter { if v != nil { return *v } var ret BudgetManagementGroupFilter return ret }).(BudgetManagementGroupFilterOutput) } // One or more `dimension` blocks as defined below to filter the budget on. func (o BudgetManagementGroupFilterPtrOutput) Dimensions() BudgetManagementGroupFilterDimensionArrayOutput { return o.ApplyT(func(v *BudgetManagementGroupFilter) []BudgetManagementGroupFilterDimension { if v == nil { return nil } return v.Dimensions }).(BudgetManagementGroupFilterDimensionArrayOutput) } // One or more `tag` blocks as defined below to filter the budget on. func (o BudgetManagementGroupFilterPtrOutput) Tags() BudgetManagementGroupFilterTagArrayOutput { return o.ApplyT(func(v *BudgetManagementGroupFilter) []BudgetManagementGroupFilterTag { if v == nil { return nil } return v.Tags }).(BudgetManagementGroupFilterTagArrayOutput) } type BudgetManagementGroupFilterDimension struct { // The name of the column to use for the filter. The allowed values are `ChargeType`, `Frequency`, `InvoiceId`, `Meter`, `MeterCategory`, `MeterSubCategory`, `PartNumber`, `PricingModel`, `Product`, `ProductOrderId`, `ProductOrderName`, `PublisherType`, `ReservationId`, `ReservationName`, `ResourceGroupName`, `ResourceGuid`, `ResourceId`, `ResourceLocation`, `ResourceType`, `ServiceFamily`, `ServiceName`, `SubscriptionID`, `SubscriptionName`, `UnitOfMeasure`. Name string `pulumi:"name"` // The operator to use for comparison. The allowed values are `In`. Defaults to `In`. Operator *string `pulumi:"operator"` // Specifies a list of values for the column. Values []string `pulumi:"values"` } // BudgetManagementGroupFilterDimensionInput is an input type that accepts BudgetManagementGroupFilterDimensionArgs and BudgetManagementGroupFilterDimensionOutput values. // You can construct a concrete instance of `BudgetManagementGroupFilterDimensionInput` via: // // BudgetManagementGroupFilterDimensionArgs{...} type BudgetManagementGroupFilterDimensionInput interface { pulumi.Input ToBudgetManagementGroupFilterDimensionOutput() BudgetManagementGroupFilterDimensionOutput ToBudgetManagementGroupFilterDimensionOutputWithContext(context.Context) BudgetManagementGroupFilterDimensionOutput } type BudgetManagementGroupFilterDimensionArgs struct { // The name of the column to use for the filter. The allowed values are `ChargeType`, `Frequency`, `InvoiceId`, `Meter`, `MeterCategory`, `MeterSubCategory`, `PartNumber`, `PricingModel`, `Product`, `ProductOrderId`, `ProductOrderName`, `PublisherType`, `ReservationId`, `ReservationName`, `ResourceGroupName`, `ResourceGuid`, `ResourceId`, `ResourceLocation`, `ResourceType`, `ServiceFamily`, `ServiceName`, `SubscriptionID`, `SubscriptionName`, `UnitOfMeasure`. Name pulumi.StringInput `pulumi:"name"` // The operator to use for comparison. The allowed values are `In`. Defaults to `In`. Operator pulumi.StringPtrInput `pulumi:"operator"` // Specifies a list of values for the column. Values pulumi.StringArrayInput `pulumi:"values"` } func (BudgetManagementGroupFilterDimensionArgs) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupFilterDimension)(nil)).Elem() } func (i BudgetManagementGroupFilterDimensionArgs) ToBudgetManagementGroupFilterDimensionOutput() BudgetManagementGroupFilterDimensionOutput { return i.ToBudgetManagementGroupFilterDimensionOutputWithContext(context.Background()) } func (i BudgetManagementGroupFilterDimensionArgs) ToBudgetManagementGroupFilterDimensionOutputWithContext(ctx context.Context) BudgetManagementGroupFilterDimensionOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupFilterDimensionOutput) } // BudgetManagementGroupFilterDimensionArrayInput is an input type that accepts BudgetManagementGroupFilterDimensionArray and BudgetManagementGroupFilterDimensionArrayOutput values. // You can construct a concrete instance of `BudgetManagementGroupFilterDimensionArrayInput` via: // // BudgetManagementGroupFilterDimensionArray{ BudgetManagementGroupFilterDimensionArgs{...} } type BudgetManagementGroupFilterDimensionArrayInput interface { pulumi.Input ToBudgetManagementGroupFilterDimensionArrayOutput() BudgetManagementGroupFilterDimensionArrayOutput ToBudgetManagementGroupFilterDimensionArrayOutputWithContext(context.Context) BudgetManagementGroupFilterDimensionArrayOutput } type BudgetManagementGroupFilterDimensionArray []BudgetManagementGroupFilterDimensionInput func (BudgetManagementGroupFilterDimensionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]BudgetManagementGroupFilterDimension)(nil)).Elem() } func (i BudgetManagementGroupFilterDimensionArray) ToBudgetManagementGroupFilterDimensionArrayOutput() BudgetManagementGroupFilterDimensionArrayOutput { return i.ToBudgetManagementGroupFilterDimensionArrayOutputWithContext(context.Background()) } func (i BudgetManagementGroupFilterDimensionArray) ToBudgetManagementGroupFilterDimensionArrayOutputWithContext(ctx context.Context) BudgetManagementGroupFilterDimensionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupFilterDimensionArrayOutput) } type BudgetManagementGroupFilterDimensionOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupFilterDimensionOutput) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupFilterDimension)(nil)).Elem() } func (o BudgetManagementGroupFilterDimensionOutput) ToBudgetManagementGroupFilterDimensionOutput() BudgetManagementGroupFilterDimensionOutput { return o } func (o BudgetManagementGroupFilterDimensionOutput) ToBudgetManagementGroupFilterDimensionOutputWithContext(ctx context.Context) BudgetManagementGroupFilterDimensionOutput { return o } // The name of the column to use for the filter. The allowed values are `ChargeType`, `Frequency`, `InvoiceId`, `Meter`, `MeterCategory`, `MeterSubCategory`, `PartNumber`, `PricingModel`, `Product`, `ProductOrderId`, `ProductOrderName`, `PublisherType`, `ReservationId`, `ReservationName`, `ResourceGroupName`, `ResourceGuid`, `ResourceId`, `ResourceLocation`, `ResourceType`, `ServiceFamily`, `ServiceName`, `SubscriptionID`, `SubscriptionName`, `UnitOfMeasure`. func (o BudgetManagementGroupFilterDimensionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v BudgetManagementGroupFilterDimension) string { return v.Name }).(pulumi.StringOutput) } // The operator to use for comparison. The allowed values are `In`. Defaults to `In`. func (o BudgetManagementGroupFilterDimensionOutput) Operator() pulumi.StringPtrOutput { return o.ApplyT(func(v BudgetManagementGroupFilterDimension) *string { return v.Operator }).(pulumi.StringPtrOutput) } // Specifies a list of values for the column. func (o BudgetManagementGroupFilterDimensionOutput) Values() pulumi.StringArrayOutput { return o.ApplyT(func(v BudgetManagementGroupFilterDimension) []string { return v.Values }).(pulumi.StringArrayOutput) } type BudgetManagementGroupFilterDimensionArrayOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupFilterDimensionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]BudgetManagementGroupFilterDimension)(nil)).Elem() } func (o BudgetManagementGroupFilterDimensionArrayOutput) ToBudgetManagementGroupFilterDimensionArrayOutput() BudgetManagementGroupFilterDimensionArrayOutput { return o } func (o BudgetManagementGroupFilterDimensionArrayOutput) ToBudgetManagementGroupFilterDimensionArrayOutputWithContext(ctx context.Context) BudgetManagementGroupFilterDimensionArrayOutput { return o } func (o BudgetManagementGroupFilterDimensionArrayOutput) Index(i pulumi.IntInput) BudgetManagementGroupFilterDimensionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) BudgetManagementGroupFilterDimension { return vs[0].([]BudgetManagementGroupFilterDimension)[vs[1].(int)] }).(BudgetManagementGroupFilterDimensionOutput) } type BudgetManagementGroupFilterTag struct { // The name of the tag to use for the filter. Name string `pulumi:"name"` // The operator to use for comparison. The allowed values are `In`. Defaults to `In`. Operator *string `pulumi:"operator"` // Specifies a list of values for the tag. Values []string `pulumi:"values"` } // BudgetManagementGroupFilterTagInput is an input type that accepts BudgetManagementGroupFilterTagArgs and BudgetManagementGroupFilterTagOutput values. // You can construct a concrete instance of `BudgetManagementGroupFilterTagInput` via: // // BudgetManagementGroupFilterTagArgs{...} type BudgetManagementGroupFilterTagInput interface { pulumi.Input ToBudgetManagementGroupFilterTagOutput() BudgetManagementGroupFilterTagOutput ToBudgetManagementGroupFilterTagOutputWithContext(context.Context) BudgetManagementGroupFilterTagOutput } type BudgetManagementGroupFilterTagArgs struct { // The name of the tag to use for the filter. Name pulumi.StringInput `pulumi:"name"` // The operator to use for comparison. The allowed values are `In`. Defaults to `In`. Operator pulumi.StringPtrInput `pulumi:"operator"` // Specifies a list of values for the tag. Values pulumi.StringArrayInput `pulumi:"values"` } func (BudgetManagementGroupFilterTagArgs) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupFilterTag)(nil)).Elem() } func (i BudgetManagementGroupFilterTagArgs) ToBudgetManagementGroupFilterTagOutput() BudgetManagementGroupFilterTagOutput { return i.ToBudgetManagementGroupFilterTagOutputWithContext(context.Background()) } func (i BudgetManagementGroupFilterTagArgs) ToBudgetManagementGroupFilterTagOutputWithContext(ctx context.Context) BudgetManagementGroupFilterTagOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupFilterTagOutput) } // BudgetManagementGroupFilterTagArrayInput is an input type that accepts BudgetManagementGroupFilterTagArray and BudgetManagementGroupFilterTagArrayOutput values. // You can construct a concrete instance of `BudgetManagementGroupFilterTagArrayInput` via: // // BudgetManagementGroupFilterTagArray{ BudgetManagementGroupFilterTagArgs{...} } type BudgetManagementGroupFilterTagArrayInput interface { pulumi.Input ToBudgetManagementGroupFilterTagArrayOutput() BudgetManagementGroupFilterTagArrayOutput ToBudgetManagementGroupFilterTagArrayOutputWithContext(context.Context) BudgetManagementGroupFilterTagArrayOutput } type BudgetManagementGroupFilterTagArray []BudgetManagementGroupFilterTagInput func (BudgetManagementGroupFilterTagArray) ElementType() reflect.Type { return reflect.TypeOf((*[]BudgetManagementGroupFilterTag)(nil)).Elem() } func (i BudgetManagementGroupFilterTagArray) ToBudgetManagementGroupFilterTagArrayOutput() BudgetManagementGroupFilterTagArrayOutput { return i.ToBudgetManagementGroupFilterTagArrayOutputWithContext(context.Background()) } func (i BudgetManagementGroupFilterTagArray) ToBudgetManagementGroupFilterTagArrayOutputWithContext(ctx context.Context) BudgetManagementGroupFilterTagArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupFilterTagArrayOutput) } type BudgetManagementGroupFilterTagOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupFilterTagOutput) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupFilterTag)(nil)).Elem() } func (o BudgetManagementGroupFilterTagOutput) ToBudgetManagementGroupFilterTagOutput() BudgetManagementGroupFilterTagOutput { return o } func (o BudgetManagementGroupFilterTagOutput) ToBudgetManagementGroupFilterTagOutputWithContext(ctx context.Context) BudgetManagementGroupFilterTagOutput { return o } // The name of the tag to use for the filter. func (o BudgetManagementGroupFilterTagOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v BudgetManagementGroupFilterTag) string { return v.Name }).(pulumi.StringOutput) } // The operator to use for comparison. The allowed values are `In`. Defaults to `In`. func (o BudgetManagementGroupFilterTagOutput) Operator() pulumi.StringPtrOutput { return o.ApplyT(func(v BudgetManagementGroupFilterTag) *string { return v.Operator }).(pulumi.StringPtrOutput) } // Specifies a list of values for the tag. func (o BudgetManagementGroupFilterTagOutput) Values() pulumi.StringArrayOutput { return o.ApplyT(func(v BudgetManagementGroupFilterTag) []string { return v.Values }).(pulumi.StringArrayOutput) } type BudgetManagementGroupFilterTagArrayOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupFilterTagArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]BudgetManagementGroupFilterTag)(nil)).Elem() } func (o BudgetManagementGroupFilterTagArrayOutput) ToBudgetManagementGroupFilterTagArrayOutput() BudgetManagementGroupFilterTagArrayOutput { return o } func (o BudgetManagementGroupFilterTagArrayOutput) ToBudgetManagementGroupFilterTagArrayOutputWithContext(ctx context.Context) BudgetManagementGroupFilterTagArrayOutput { return o } func (o BudgetManagementGroupFilterTagArrayOutput) Index(i pulumi.IntInput) BudgetManagementGroupFilterTagOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) BudgetManagementGroupFilterTag { return vs[0].([]BudgetManagementGroupFilterTag)[vs[1].(int)] }).(BudgetManagementGroupFilterTagOutput) } type BudgetManagementGroupNotification struct { // Specifies a list of email addresses to send the budget notification to when the threshold is exceeded. ContactEmails []string `pulumi:"contactEmails"` // Should the notification be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`. Operator string `pulumi:"operator"` // Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000. Threshold int `pulumi:"threshold"` // The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. ThresholdType *string `pulumi:"thresholdType"` } // BudgetManagementGroupNotificationInput is an input type that accepts BudgetManagementGroupNotificationArgs and BudgetManagementGroupNotificationOutput values. // You can construct a concrete instance of `BudgetManagementGroupNotificationInput` via: // // BudgetManagementGroupNotificationArgs{...} type BudgetManagementGroupNotificationInput interface { pulumi.Input ToBudgetManagementGroupNotificationOutput() BudgetManagementGroupNotificationOutput ToBudgetManagementGroupNotificationOutputWithContext(context.Context) BudgetManagementGroupNotificationOutput } type BudgetManagementGroupNotificationArgs struct { // Specifies a list of email addresses to send the budget notification to when the threshold is exceeded. ContactEmails pulumi.StringArrayInput `pulumi:"contactEmails"` // Should the notification be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput `pulumi:"enabled"` // The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`. Operator pulumi.StringInput `pulumi:"operator"` // Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000. Threshold pulumi.IntInput `pulumi:"threshold"` // The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. ThresholdType pulumi.StringPtrInput `pulumi:"thresholdType"` } func (BudgetManagementGroupNotificationArgs) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupNotification)(nil)).Elem() } func (i BudgetManagementGroupNotificationArgs) ToBudgetManagementGroupNotificationOutput() BudgetManagementGroupNotificationOutput { return i.ToBudgetManagementGroupNotificationOutputWithContext(context.Background()) } func (i BudgetManagementGroupNotificationArgs) ToBudgetManagementGroupNotificationOutputWithContext(ctx context.Context) BudgetManagementGroupNotificationOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupNotificationOutput) } // BudgetManagementGroupNotificationArrayInput is an input type that accepts BudgetManagementGroupNotificationArray and BudgetManagementGroupNotificationArrayOutput values. // You can construct a concrete instance of `BudgetManagementGroupNotificationArrayInput` via: // // BudgetManagementGroupNotificationArray{ BudgetManagementGroupNotificationArgs{...} } type BudgetManagementGroupNotificationArrayInput interface { pulumi.Input ToBudgetManagementGroupNotificationArrayOutput() BudgetManagementGroupNotificationArrayOutput ToBudgetManagementGroupNotificationArrayOutputWithContext(context.Context) BudgetManagementGroupNotificationArrayOutput } type BudgetManagementGroupNotificationArray []BudgetManagementGroupNotificationInput func (BudgetManagementGroupNotificationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]BudgetManagementGroupNotification)(nil)).Elem() } func (i BudgetManagementGroupNotificationArray) ToBudgetManagementGroupNotificationArrayOutput() BudgetManagementGroupNotificationArrayOutput { return i.ToBudgetManagementGroupNotificationArrayOutputWithContext(context.Background()) } func (i BudgetManagementGroupNotificationArray) ToBudgetManagementGroupNotificationArrayOutputWithContext(ctx context.Context) BudgetManagementGroupNotificationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupNotificationArrayOutput) } type BudgetManagementGroupNotificationOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupNotificationOutput) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupNotification)(nil)).Elem() } func (o BudgetManagementGroupNotificationOutput) ToBudgetManagementGroupNotificationOutput() BudgetManagementGroupNotificationOutput { return o } func (o BudgetManagementGroupNotificationOutput) ToBudgetManagementGroupNotificationOutputWithContext(ctx context.Context) BudgetManagementGroupNotificationOutput { return o } // Specifies a list of email addresses to send the budget notification to when the threshold is exceeded. func (o BudgetManagementGroupNotificationOutput) ContactEmails() pulumi.StringArrayOutput { return o.ApplyT(func(v BudgetManagementGroupNotification) []string { return v.ContactEmails }).(pulumi.StringArrayOutput) } // Should the notification be enabled? Defaults to `true`. func (o BudgetManagementGroupNotificationOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v BudgetManagementGroupNotification) *bool { return v.Enabled }).(pulumi.BoolPtrOutput) } // The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`. func (o BudgetManagementGroupNotificationOutput) Operator() pulumi.StringOutput { return o.ApplyT(func(v BudgetManagementGroupNotification) string { return v.Operator }).(pulumi.StringOutput) } // Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000. func (o BudgetManagementGroupNotificationOutput) Threshold() pulumi.IntOutput { return o.ApplyT(func(v BudgetManagementGroupNotification) int { return v.Threshold }).(pulumi.IntOutput) } // The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. func (o BudgetManagementGroupNotificationOutput) ThresholdType() pulumi.StringPtrOutput { return o.ApplyT(func(v BudgetManagementGroupNotification) *string { return v.ThresholdType }).(pulumi.StringPtrOutput) } type BudgetManagementGroupNotificationArrayOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupNotificationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]BudgetManagementGroupNotification)(nil)).Elem() } func (o BudgetManagementGroupNotificationArrayOutput) ToBudgetManagementGroupNotificationArrayOutput() BudgetManagementGroupNotificationArrayOutput { return o } func (o BudgetManagementGroupNotificationArrayOutput) ToBudgetManagementGroupNotificationArrayOutputWithContext(ctx context.Context) BudgetManagementGroupNotificationArrayOutput { return o } func (o BudgetManagementGroupNotificationArrayOutput) Index(i pulumi.IntInput) BudgetManagementGroupNotificationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) BudgetManagementGroupNotification { return vs[0].([]BudgetManagementGroupNotification)[vs[1].(int)] }).(BudgetManagementGroupNotificationOutput) } type BudgetManagementGroupTimePeriod struct { // The end date for the budget. If not set this will be 10 years after the start date. EndDate *string `pulumi:"endDate"` // The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new resource to be created. StartDate string `pulumi:"startDate"` } // BudgetManagementGroupTimePeriodInput is an input type that accepts BudgetManagementGroupTimePeriodArgs and BudgetManagementGroupTimePeriodOutput values. // You can construct a concrete instance of `BudgetManagementGroupTimePeriodInput` via: // // BudgetManagementGroupTimePeriodArgs{...} type BudgetManagementGroupTimePeriodInput interface { pulumi.Input ToBudgetManagementGroupTimePeriodOutput() BudgetManagementGroupTimePeriodOutput ToBudgetManagementGroupTimePeriodOutputWithContext(context.Context) BudgetManagementGroupTimePeriodOutput } type BudgetManagementGroupTimePeriodArgs struct { // The end date for the budget. If not set this will be 10 years after the start date. EndDate pulumi.StringPtrInput `pulumi:"endDate"` // The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new resource to be created. StartDate pulumi.StringInput `pulumi:"startDate"` } func (BudgetManagementGroupTimePeriodArgs) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupTimePeriod)(nil)).Elem() } func (i BudgetManagementGroupTimePeriodArgs) ToBudgetManagementGroupTimePeriodOutput() BudgetManagementGroupTimePeriodOutput { return i.ToBudgetManagementGroupTimePeriodOutputWithContext(context.Background()) } func (i BudgetManagementGroupTimePeriodArgs) ToBudgetManagementGroupTimePeriodOutputWithContext(ctx context.Context) BudgetManagementGroupTimePeriodOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupTimePeriodOutput) } func (i BudgetManagementGroupTimePeriodArgs) ToBudgetManagementGroupTimePeriodPtrOutput() BudgetManagementGroupTimePeriodPtrOutput { return i.ToBudgetManagementGroupTimePeriodPtrOutputWithContext(context.Background()) } func (i BudgetManagementGroupTimePeriodArgs) ToBudgetManagementGroupTimePeriodPtrOutputWithContext(ctx context.Context) BudgetManagementGroupTimePeriodPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupTimePeriodOutput).ToBudgetManagementGroupTimePeriodPtrOutputWithContext(ctx) } // BudgetManagementGroupTimePeriodPtrInput is an input type that accepts BudgetManagementGroupTimePeriodArgs, BudgetManagementGroupTimePeriodPtr and BudgetManagementGroupTimePeriodPtrOutput values. // You can construct a concrete instance of `BudgetManagementGroupTimePeriodPtrInput` via: // // BudgetManagementGroupTimePeriodArgs{...} // // or: // // nil type BudgetManagementGroupTimePeriodPtrInput interface { pulumi.Input ToBudgetManagementGroupTimePeriodPtrOutput() BudgetManagementGroupTimePeriodPtrOutput ToBudgetManagementGroupTimePeriodPtrOutputWithContext(context.Context) BudgetManagementGroupTimePeriodPtrOutput } type budgetManagementGroupTimePeriodPtrType BudgetManagementGroupTimePeriodArgs func BudgetManagementGroupTimePeriodPtr(v *BudgetManagementGroupTimePeriodArgs) BudgetManagementGroupTimePeriodPtrInput { return (*budgetManagementGroupTimePeriodPtrType)(v) } func (*budgetManagementGroupTimePeriodPtrType) ElementType() reflect.Type { return reflect.TypeOf((**BudgetManagementGroupTimePeriod)(nil)).Elem() } func (i *budgetManagementGroupTimePeriodPtrType) ToBudgetManagementGroupTimePeriodPtrOutput() BudgetManagementGroupTimePeriodPtrOutput { return i.ToBudgetManagementGroupTimePeriodPtrOutputWithContext(context.Background()) } func (i *budgetManagementGroupTimePeriodPtrType) ToBudgetManagementGroupTimePeriodPtrOutputWithContext(ctx context.Context) BudgetManagementGroupTimePeriodPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupTimePeriodPtrOutput) } type BudgetManagementGroupTimePeriodOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupTimePeriodOutput) ElementType() reflect.Type { return reflect.TypeOf((*BudgetManagementGroupTimePeriod)(nil)).Elem() } func (o BudgetManagementGroupTimePeriodOutput) ToBudgetManagementGroupTimePeriodOutput() BudgetManagementGroupTimePeriodOutput { return o } func (o BudgetManagementGroupTimePeriodOutput) ToBudgetManagementGroupTimePeriodOutputWithContext(ctx context.Context) BudgetManagementGroupTimePeriodOutput { return o } func (o BudgetManagementGroupTimePeriodOutput) ToBudgetManagementGroupTimePeriodPtrOutput() BudgetManagementGroupTimePeriodPtrOutput { return o.ToBudgetManagementGroupTimePeriodPtrOutputWithContext(context.Background()) } func (o BudgetManagementGroupTimePeriodOutput) ToBudgetManagementGroupTimePeriodPtrOutputWithContext(ctx context.Context) BudgetManagementGroupTimePeriodPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v BudgetManagementGroupTimePeriod) *BudgetManagementGroupTimePeriod { return &v }).(BudgetManagementGroupTimePeriodPtrOutput) }
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/consumption/getBudgetSubscription.go
sdk/go/azure/consumption/getBudgetSubscription.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package consumption 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 Consumption Budget for a specific subscription. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/consumption" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := consumption.LookupBudgetSubscription(ctx, &consumption.LookupBudgetSubscriptionArgs{ // Name: "existing", // SubscriptionId: "/subscriptions/00000000-0000-0000-0000-000000000000/", // }, nil) // if err != nil { // return err // } // ctx.Export("id", exampleAzurermConsumptionBudget.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Consumption` - 2019-10-01 func LookupBudgetSubscription(ctx *pulumi.Context, args *LookupBudgetSubscriptionArgs, opts ...pulumi.InvokeOption) (*LookupBudgetSubscriptionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupBudgetSubscriptionResult err := ctx.Invoke("azure:consumption/getBudgetSubscription:getBudgetSubscription", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getBudgetSubscription. type LookupBudgetSubscriptionArgs struct { // The name of this Consumption Budget. Name string `pulumi:"name"` // The ID of the subscription. SubscriptionId string `pulumi:"subscriptionId"` } // A collection of values returned by getBudgetSubscription. type LookupBudgetSubscriptionResult struct { // The total amount of cost to track with the budget. Amount float64 `pulumi:"amount"` // A `filter` block as defined below. Filters []GetBudgetSubscriptionFilter `pulumi:"filters"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The name of the tag to use for the filter. Name string `pulumi:"name"` // A `notification` block as defined below. Notifications []GetBudgetSubscriptionNotification `pulumi:"notifications"` SubscriptionId string `pulumi:"subscriptionId"` // The time covered by a budget. TimeGrain string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriods []GetBudgetSubscriptionTimePeriod `pulumi:"timePeriods"` } func LookupBudgetSubscriptionOutput(ctx *pulumi.Context, args LookupBudgetSubscriptionOutputArgs, opts ...pulumi.InvokeOption) LookupBudgetSubscriptionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupBudgetSubscriptionResultOutput, error) { args := v.(LookupBudgetSubscriptionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:consumption/getBudgetSubscription:getBudgetSubscription", args, LookupBudgetSubscriptionResultOutput{}, options).(LookupBudgetSubscriptionResultOutput), nil }).(LookupBudgetSubscriptionResultOutput) } // A collection of arguments for invoking getBudgetSubscription. type LookupBudgetSubscriptionOutputArgs struct { // The name of this Consumption Budget. Name pulumi.StringInput `pulumi:"name"` // The ID of the subscription. SubscriptionId pulumi.StringInput `pulumi:"subscriptionId"` } func (LookupBudgetSubscriptionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupBudgetSubscriptionArgs)(nil)).Elem() } // A collection of values returned by getBudgetSubscription. type LookupBudgetSubscriptionResultOutput struct{ *pulumi.OutputState } func (LookupBudgetSubscriptionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupBudgetSubscriptionResult)(nil)).Elem() } func (o LookupBudgetSubscriptionResultOutput) ToLookupBudgetSubscriptionResultOutput() LookupBudgetSubscriptionResultOutput { return o } func (o LookupBudgetSubscriptionResultOutput) ToLookupBudgetSubscriptionResultOutputWithContext(ctx context.Context) LookupBudgetSubscriptionResultOutput { return o } // The total amount of cost to track with the budget. func (o LookupBudgetSubscriptionResultOutput) Amount() pulumi.Float64Output { return o.ApplyT(func(v LookupBudgetSubscriptionResult) float64 { return v.Amount }).(pulumi.Float64Output) } // A `filter` block as defined below. func (o LookupBudgetSubscriptionResultOutput) Filters() GetBudgetSubscriptionFilterArrayOutput { return o.ApplyT(func(v LookupBudgetSubscriptionResult) []GetBudgetSubscriptionFilter { return v.Filters }).(GetBudgetSubscriptionFilterArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupBudgetSubscriptionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetSubscriptionResult) string { return v.Id }).(pulumi.StringOutput) } // The name of the tag to use for the filter. func (o LookupBudgetSubscriptionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetSubscriptionResult) string { return v.Name }).(pulumi.StringOutput) } // A `notification` block as defined below. func (o LookupBudgetSubscriptionResultOutput) Notifications() GetBudgetSubscriptionNotificationArrayOutput { return o.ApplyT(func(v LookupBudgetSubscriptionResult) []GetBudgetSubscriptionNotification { return v.Notifications }).(GetBudgetSubscriptionNotificationArrayOutput) } func (o LookupBudgetSubscriptionResultOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetSubscriptionResult) string { return v.SubscriptionId }).(pulumi.StringOutput) } // The time covered by a budget. func (o LookupBudgetSubscriptionResultOutput) TimeGrain() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetSubscriptionResult) string { return v.TimeGrain }).(pulumi.StringOutput) } // A `timePeriod` block as defined below. func (o LookupBudgetSubscriptionResultOutput) TimePeriods() GetBudgetSubscriptionTimePeriodArrayOutput { return o.ApplyT(func(v LookupBudgetSubscriptionResult) []GetBudgetSubscriptionTimePeriod { return v.TimePeriods }).(GetBudgetSubscriptionTimePeriodArrayOutput) } func init() { pulumi.RegisterOutputType(LookupBudgetSubscriptionResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/consumption/budgetManagementGroup.go
sdk/go/azure/consumption/budgetManagementGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package consumption import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Consumption Budget for a Management Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/consumption" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := management.NewGroup(ctx, "example", &management.GroupArgs{ // DisplayName: pulumi.String("example"), // }) // if err != nil { // return err // } // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example"), // Location: pulumi.String("eastus"), // }) // if err != nil { // return err // } // _, err = consumption.NewBudgetManagementGroup(ctx, "example", &consumption.BudgetManagementGroupArgs{ // Name: pulumi.String("example"), // ManagementGroupId: example.ID(), // Amount: pulumi.Float64(1000), // TimeGrain: pulumi.String("Monthly"), // TimePeriod: &consumption.BudgetManagementGroupTimePeriodArgs{ // StartDate: pulumi.String("2022-06-01T00:00:00Z"), // EndDate: pulumi.String("2022-07-01T00:00:00Z"), // }, // Filter: &consumption.BudgetManagementGroupFilterArgs{ // Dimensions: consumption.BudgetManagementGroupFilterDimensionArray{ // &consumption.BudgetManagementGroupFilterDimensionArgs{ // Name: pulumi.String("ResourceGroupName"), // Values: pulumi.StringArray{ // exampleResourceGroup.Name, // }, // }, // }, // Tags: consumption.BudgetManagementGroupFilterTagArray{ // &consumption.BudgetManagementGroupFilterTagArgs{ // Name: pulumi.String("foo"), // Values: pulumi.StringArray{ // pulumi.String("bar"), // pulumi.String("baz"), // }, // }, // }, // }, // Notifications: consumption.BudgetManagementGroupNotificationArray{ // &consumption.BudgetManagementGroupNotificationArgs{ // Enabled: pulumi.Bool(true), // Threshold: pulumi.Int(90), // Operator: pulumi.String("EqualTo"), // ContactEmails: pulumi.StringArray{ // pulumi.String("foo@example.com"), // pulumi.String("bar@example.com"), // }, // }, // &consumption.BudgetManagementGroupNotificationArgs{ // Enabled: pulumi.Bool(false), // Threshold: pulumi.Int(100), // Operator: pulumi.String("GreaterThan"), // ThresholdType: pulumi.String("Forecasted"), // ContactEmails: pulumi.StringArray{ // pulumi.String("foo@example.com"), // pulumi.String("bar@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.Consumption` - 2019-10-01 // // ## Import // // Management Group Consumption Budgets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:consumption/budgetManagementGroup:BudgetManagementGroup example /providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/budgets/budget1 // ``` type BudgetManagementGroup struct { pulumi.CustomResourceState // The total amount of cost to track with the budget. Amount pulumi.Float64Output `pulumi:"amount"` // (Optional) The ETag of the Management Group Consumption Budget. Etag pulumi.StringOutput `pulumi:"etag"` // A `filter` block as defined below. Filter BudgetManagementGroupFilterPtrOutput `pulumi:"filter"` // The ID of the Management Group. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"` // The name which should be used for this Management Group Consumption Budget. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications BudgetManagementGroupNotificationArrayOutput `pulumi:"notifications"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrOutput `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod BudgetManagementGroupTimePeriodOutput `pulumi:"timePeriod"` } // NewBudgetManagementGroup registers a new resource with the given unique name, arguments, and options. func NewBudgetManagementGroup(ctx *pulumi.Context, name string, args *BudgetManagementGroupArgs, opts ...pulumi.ResourceOption) (*BudgetManagementGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Amount == nil { return nil, errors.New("invalid value for required argument 'Amount'") } if args.ManagementGroupId == nil { return nil, errors.New("invalid value for required argument 'ManagementGroupId'") } if args.Notifications == nil { return nil, errors.New("invalid value for required argument 'Notifications'") } if args.TimePeriod == nil { return nil, errors.New("invalid value for required argument 'TimePeriod'") } opts = internal.PkgResourceDefaultOpts(opts) var resource BudgetManagementGroup err := ctx.RegisterResource("azure:consumption/budgetManagementGroup:BudgetManagementGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetBudgetManagementGroup gets an existing BudgetManagementGroup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetBudgetManagementGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *BudgetManagementGroupState, opts ...pulumi.ResourceOption) (*BudgetManagementGroup, error) { var resource BudgetManagementGroup err := ctx.ReadResource("azure:consumption/budgetManagementGroup:BudgetManagementGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering BudgetManagementGroup resources. type budgetManagementGroupState struct { // The total amount of cost to track with the budget. Amount *float64 `pulumi:"amount"` // (Optional) The ETag of the Management Group Consumption Budget. Etag *string `pulumi:"etag"` // A `filter` block as defined below. Filter *BudgetManagementGroupFilter `pulumi:"filter"` // The ID of the Management Group. Changing this forces a new resource to be created. ManagementGroupId *string `pulumi:"managementGroupId"` // The name which should be used for this Management Group Consumption Budget. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications []BudgetManagementGroupNotification `pulumi:"notifications"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain *string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod *BudgetManagementGroupTimePeriod `pulumi:"timePeriod"` } type BudgetManagementGroupState struct { // The total amount of cost to track with the budget. Amount pulumi.Float64PtrInput // (Optional) The ETag of the Management Group Consumption Budget. Etag pulumi.StringPtrInput // A `filter` block as defined below. Filter BudgetManagementGroupFilterPtrInput // The ID of the Management Group. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringPtrInput // The name which should be used for this Management Group Consumption Budget. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `notification` blocks as defined below. Notifications BudgetManagementGroupNotificationArrayInput // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrInput // A `timePeriod` block as defined below. TimePeriod BudgetManagementGroupTimePeriodPtrInput } func (BudgetManagementGroupState) ElementType() reflect.Type { return reflect.TypeOf((*budgetManagementGroupState)(nil)).Elem() } type budgetManagementGroupArgs struct { // The total amount of cost to track with the budget. Amount float64 `pulumi:"amount"` // (Optional) The ETag of the Management Group Consumption Budget. Etag *string `pulumi:"etag"` // A `filter` block as defined below. Filter *BudgetManagementGroupFilter `pulumi:"filter"` // The ID of the Management Group. Changing this forces a new resource to be created. ManagementGroupId string `pulumi:"managementGroupId"` // The name which should be used for this Management Group Consumption Budget. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications []BudgetManagementGroupNotification `pulumi:"notifications"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain *string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod BudgetManagementGroupTimePeriod `pulumi:"timePeriod"` } // The set of arguments for constructing a BudgetManagementGroup resource. type BudgetManagementGroupArgs struct { // The total amount of cost to track with the budget. Amount pulumi.Float64Input // (Optional) The ETag of the Management Group Consumption Budget. Etag pulumi.StringPtrInput // A `filter` block as defined below. Filter BudgetManagementGroupFilterPtrInput // The ID of the Management Group. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringInput // The name which should be used for this Management Group Consumption Budget. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `notification` blocks as defined below. Notifications BudgetManagementGroupNotificationArrayInput // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrInput // A `timePeriod` block as defined below. TimePeriod BudgetManagementGroupTimePeriodInput } func (BudgetManagementGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*budgetManagementGroupArgs)(nil)).Elem() } type BudgetManagementGroupInput interface { pulumi.Input ToBudgetManagementGroupOutput() BudgetManagementGroupOutput ToBudgetManagementGroupOutputWithContext(ctx context.Context) BudgetManagementGroupOutput } func (*BudgetManagementGroup) ElementType() reflect.Type { return reflect.TypeOf((**BudgetManagementGroup)(nil)).Elem() } func (i *BudgetManagementGroup) ToBudgetManagementGroupOutput() BudgetManagementGroupOutput { return i.ToBudgetManagementGroupOutputWithContext(context.Background()) } func (i *BudgetManagementGroup) ToBudgetManagementGroupOutputWithContext(ctx context.Context) BudgetManagementGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupOutput) } // BudgetManagementGroupArrayInput is an input type that accepts BudgetManagementGroupArray and BudgetManagementGroupArrayOutput values. // You can construct a concrete instance of `BudgetManagementGroupArrayInput` via: // // BudgetManagementGroupArray{ BudgetManagementGroupArgs{...} } type BudgetManagementGroupArrayInput interface { pulumi.Input ToBudgetManagementGroupArrayOutput() BudgetManagementGroupArrayOutput ToBudgetManagementGroupArrayOutputWithContext(context.Context) BudgetManagementGroupArrayOutput } type BudgetManagementGroupArray []BudgetManagementGroupInput func (BudgetManagementGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*BudgetManagementGroup)(nil)).Elem() } func (i BudgetManagementGroupArray) ToBudgetManagementGroupArrayOutput() BudgetManagementGroupArrayOutput { return i.ToBudgetManagementGroupArrayOutputWithContext(context.Background()) } func (i BudgetManagementGroupArray) ToBudgetManagementGroupArrayOutputWithContext(ctx context.Context) BudgetManagementGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupArrayOutput) } // BudgetManagementGroupMapInput is an input type that accepts BudgetManagementGroupMap and BudgetManagementGroupMapOutput values. // You can construct a concrete instance of `BudgetManagementGroupMapInput` via: // // BudgetManagementGroupMap{ "key": BudgetManagementGroupArgs{...} } type BudgetManagementGroupMapInput interface { pulumi.Input ToBudgetManagementGroupMapOutput() BudgetManagementGroupMapOutput ToBudgetManagementGroupMapOutputWithContext(context.Context) BudgetManagementGroupMapOutput } type BudgetManagementGroupMap map[string]BudgetManagementGroupInput func (BudgetManagementGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BudgetManagementGroup)(nil)).Elem() } func (i BudgetManagementGroupMap) ToBudgetManagementGroupMapOutput() BudgetManagementGroupMapOutput { return i.ToBudgetManagementGroupMapOutputWithContext(context.Background()) } func (i BudgetManagementGroupMap) ToBudgetManagementGroupMapOutputWithContext(ctx context.Context) BudgetManagementGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetManagementGroupMapOutput) } type BudgetManagementGroupOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**BudgetManagementGroup)(nil)).Elem() } func (o BudgetManagementGroupOutput) ToBudgetManagementGroupOutput() BudgetManagementGroupOutput { return o } func (o BudgetManagementGroupOutput) ToBudgetManagementGroupOutputWithContext(ctx context.Context) BudgetManagementGroupOutput { return o } // The total amount of cost to track with the budget. func (o BudgetManagementGroupOutput) Amount() pulumi.Float64Output { return o.ApplyT(func(v *BudgetManagementGroup) pulumi.Float64Output { return v.Amount }).(pulumi.Float64Output) } // (Optional) The ETag of the Management Group Consumption Budget. func (o BudgetManagementGroupOutput) Etag() pulumi.StringOutput { return o.ApplyT(func(v *BudgetManagementGroup) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) } // A `filter` block as defined below. func (o BudgetManagementGroupOutput) Filter() BudgetManagementGroupFilterPtrOutput { return o.ApplyT(func(v *BudgetManagementGroup) BudgetManagementGroupFilterPtrOutput { return v.Filter }).(BudgetManagementGroupFilterPtrOutput) } // The ID of the Management Group. Changing this forces a new resource to be created. func (o BudgetManagementGroupOutput) ManagementGroupId() pulumi.StringOutput { return o.ApplyT(func(v *BudgetManagementGroup) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput) } // The name which should be used for this Management Group Consumption Budget. Changing this forces a new resource to be created. func (o BudgetManagementGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *BudgetManagementGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `notification` blocks as defined below. func (o BudgetManagementGroupOutput) Notifications() BudgetManagementGroupNotificationArrayOutput { return o.ApplyT(func(v *BudgetManagementGroup) BudgetManagementGroupNotificationArrayOutput { return v.Notifications }).(BudgetManagementGroupNotificationArrayOutput) } // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. func (o BudgetManagementGroupOutput) TimeGrain() pulumi.StringPtrOutput { return o.ApplyT(func(v *BudgetManagementGroup) pulumi.StringPtrOutput { return v.TimeGrain }).(pulumi.StringPtrOutput) } // A `timePeriod` block as defined below. func (o BudgetManagementGroupOutput) TimePeriod() BudgetManagementGroupTimePeriodOutput { return o.ApplyT(func(v *BudgetManagementGroup) BudgetManagementGroupTimePeriodOutput { return v.TimePeriod }).(BudgetManagementGroupTimePeriodOutput) } type BudgetManagementGroupArrayOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*BudgetManagementGroup)(nil)).Elem() } func (o BudgetManagementGroupArrayOutput) ToBudgetManagementGroupArrayOutput() BudgetManagementGroupArrayOutput { return o } func (o BudgetManagementGroupArrayOutput) ToBudgetManagementGroupArrayOutputWithContext(ctx context.Context) BudgetManagementGroupArrayOutput { return o } func (o BudgetManagementGroupArrayOutput) Index(i pulumi.IntInput) BudgetManagementGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BudgetManagementGroup { return vs[0].([]*BudgetManagementGroup)[vs[1].(int)] }).(BudgetManagementGroupOutput) } type BudgetManagementGroupMapOutput struct{ *pulumi.OutputState } func (BudgetManagementGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BudgetManagementGroup)(nil)).Elem() } func (o BudgetManagementGroupMapOutput) ToBudgetManagementGroupMapOutput() BudgetManagementGroupMapOutput { return o } func (o BudgetManagementGroupMapOutput) ToBudgetManagementGroupMapOutputWithContext(ctx context.Context) BudgetManagementGroupMapOutput { return o } func (o BudgetManagementGroupMapOutput) MapIndex(k pulumi.StringInput) BudgetManagementGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BudgetManagementGroup { return vs[0].(map[string]*BudgetManagementGroup)[vs[1].(string)] }).(BudgetManagementGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*BudgetManagementGroupInput)(nil)).Elem(), &BudgetManagementGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*BudgetManagementGroupArrayInput)(nil)).Elem(), BudgetManagementGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*BudgetManagementGroupMapInput)(nil)).Elem(), BudgetManagementGroupMap{}) pulumi.RegisterOutputType(BudgetManagementGroupOutput{}) pulumi.RegisterOutputType(BudgetManagementGroupArrayOutput{}) pulumi.RegisterOutputType(BudgetManagementGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/consumption/budgetSubscription.go
sdk/go/azure/consumption/budgetSubscription.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package consumption import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Subscription Consumption Budget. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/consumption" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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"), // Location: pulumi.String("eastus"), // }) // if err != nil { // return err // } // exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("example"), // }) // if err != nil { // return err // } // _, err = consumption.NewBudgetSubscription(ctx, "example", &consumption.BudgetSubscriptionArgs{ // Name: pulumi.String("example"), // SubscriptionId: pulumi.String(current.Id), // Amount: pulumi.Float64(1000), // TimeGrain: pulumi.String("Monthly"), // TimePeriod: &consumption.BudgetSubscriptionTimePeriodArgs{ // StartDate: pulumi.String("2022-06-01T00:00:00Z"), // EndDate: pulumi.String("2022-07-01T00:00:00Z"), // }, // Filter: &consumption.BudgetSubscriptionFilterArgs{ // Dimensions: consumption.BudgetSubscriptionFilterDimensionArray{ // &consumption.BudgetSubscriptionFilterDimensionArgs{ // Name: pulumi.String("ResourceGroupName"), // Values: pulumi.StringArray{ // example.Name, // }, // }, // }, // Tags: consumption.BudgetSubscriptionFilterTagArray{ // &consumption.BudgetSubscriptionFilterTagArgs{ // Name: pulumi.String("foo"), // Values: pulumi.StringArray{ // pulumi.String("bar"), // pulumi.String("baz"), // }, // }, // }, // }, // Notifications: consumption.BudgetSubscriptionNotificationArray{ // &consumption.BudgetSubscriptionNotificationArgs{ // Enabled: pulumi.Bool(true), // Threshold: pulumi.Int(90), // Operator: pulumi.String("EqualTo"), // ContactEmails: pulumi.StringArray{ // pulumi.String("foo@example.com"), // pulumi.String("bar@example.com"), // }, // ContactGroups: pulumi.StringArray{ // exampleActionGroup.ID(), // }, // ContactRoles: pulumi.StringArray{ // pulumi.String("Owner"), // }, // }, // &consumption.BudgetSubscriptionNotificationArgs{ // Enabled: pulumi.Bool(false), // Threshold: pulumi.Int(100), // Operator: pulumi.String("GreaterThan"), // ThresholdType: pulumi.String("Forecasted"), // ContactEmails: pulumi.StringArray{ // pulumi.String("foo@example.com"), // pulumi.String("bar@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.Consumption` - 2019-10-01 // // ## Import // // Subscription Consumption Budgets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:consumption/budgetSubscription:BudgetSubscription example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/budgets/subscription1 // ``` type BudgetSubscription struct { pulumi.CustomResourceState // The total amount of cost to track with the budget. Amount pulumi.Float64Output `pulumi:"amount"` // (Optional) The ETag of the Subscription Consumption Budget. Etag pulumi.StringOutput `pulumi:"etag"` // A `filter` block as defined below. Filter BudgetSubscriptionFilterPtrOutput `pulumi:"filter"` // The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications BudgetSubscriptionNotificationArrayOutput `pulumi:"notifications"` // The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created. // // > **Note:** The `subscriptionId` property can accept a subscription ID e.g. `00000000-0000-0000-0000-000000000000` or the subscription resource ID e.g. `/subscriptions/00000000-0000-0000-0000-000000000000`. In version 3.0 this property will only accept the subscription resource ID. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrOutput `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod BudgetSubscriptionTimePeriodOutput `pulumi:"timePeriod"` } // NewBudgetSubscription registers a new resource with the given unique name, arguments, and options. func NewBudgetSubscription(ctx *pulumi.Context, name string, args *BudgetSubscriptionArgs, opts ...pulumi.ResourceOption) (*BudgetSubscription, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Amount == nil { return nil, errors.New("invalid value for required argument 'Amount'") } if args.Notifications == nil { return nil, errors.New("invalid value for required argument 'Notifications'") } if args.SubscriptionId == nil { return nil, errors.New("invalid value for required argument 'SubscriptionId'") } if args.TimePeriod == nil { return nil, errors.New("invalid value for required argument 'TimePeriod'") } opts = internal.PkgResourceDefaultOpts(opts) var resource BudgetSubscription err := ctx.RegisterResource("azure:consumption/budgetSubscription:BudgetSubscription", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetBudgetSubscription gets an existing BudgetSubscription resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetBudgetSubscription(ctx *pulumi.Context, name string, id pulumi.IDInput, state *BudgetSubscriptionState, opts ...pulumi.ResourceOption) (*BudgetSubscription, error) { var resource BudgetSubscription err := ctx.ReadResource("azure:consumption/budgetSubscription:BudgetSubscription", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering BudgetSubscription resources. type budgetSubscriptionState struct { // The total amount of cost to track with the budget. Amount *float64 `pulumi:"amount"` // (Optional) The ETag of the Subscription Consumption Budget. Etag *string `pulumi:"etag"` // A `filter` block as defined below. Filter *BudgetSubscriptionFilter `pulumi:"filter"` // The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications []BudgetSubscriptionNotification `pulumi:"notifications"` // The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created. // // > **Note:** The `subscriptionId` property can accept a subscription ID e.g. `00000000-0000-0000-0000-000000000000` or the subscription resource ID e.g. `/subscriptions/00000000-0000-0000-0000-000000000000`. In version 3.0 this property will only accept the subscription resource ID. SubscriptionId *string `pulumi:"subscriptionId"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain *string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod *BudgetSubscriptionTimePeriod `pulumi:"timePeriod"` } type BudgetSubscriptionState struct { // The total amount of cost to track with the budget. Amount pulumi.Float64PtrInput // (Optional) The ETag of the Subscription Consumption Budget. Etag pulumi.StringPtrInput // A `filter` block as defined below. Filter BudgetSubscriptionFilterPtrInput // The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `notification` blocks as defined below. Notifications BudgetSubscriptionNotificationArrayInput // The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created. // // > **Note:** The `subscriptionId` property can accept a subscription ID e.g. `00000000-0000-0000-0000-000000000000` or the subscription resource ID e.g. `/subscriptions/00000000-0000-0000-0000-000000000000`. In version 3.0 this property will only accept the subscription resource ID. SubscriptionId pulumi.StringPtrInput // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrInput // A `timePeriod` block as defined below. TimePeriod BudgetSubscriptionTimePeriodPtrInput } func (BudgetSubscriptionState) ElementType() reflect.Type { return reflect.TypeOf((*budgetSubscriptionState)(nil)).Elem() } type budgetSubscriptionArgs struct { // The total amount of cost to track with the budget. Amount float64 `pulumi:"amount"` // (Optional) The ETag of the Subscription Consumption Budget. Etag *string `pulumi:"etag"` // A `filter` block as defined below. Filter *BudgetSubscriptionFilter `pulumi:"filter"` // The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications []BudgetSubscriptionNotification `pulumi:"notifications"` // The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created. // // > **Note:** The `subscriptionId` property can accept a subscription ID e.g. `00000000-0000-0000-0000-000000000000` or the subscription resource ID e.g. `/subscriptions/00000000-0000-0000-0000-000000000000`. In version 3.0 this property will only accept the subscription resource ID. SubscriptionId string `pulumi:"subscriptionId"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain *string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod BudgetSubscriptionTimePeriod `pulumi:"timePeriod"` } // The set of arguments for constructing a BudgetSubscription resource. type BudgetSubscriptionArgs struct { // The total amount of cost to track with the budget. Amount pulumi.Float64Input // (Optional) The ETag of the Subscription Consumption Budget. Etag pulumi.StringPtrInput // A `filter` block as defined below. Filter BudgetSubscriptionFilterPtrInput // The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `notification` blocks as defined below. Notifications BudgetSubscriptionNotificationArrayInput // The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created. // // > **Note:** The `subscriptionId` property can accept a subscription ID e.g. `00000000-0000-0000-0000-000000000000` or the subscription resource ID e.g. `/subscriptions/00000000-0000-0000-0000-000000000000`. In version 3.0 this property will only accept the subscription resource ID. SubscriptionId pulumi.StringInput // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrInput // A `timePeriod` block as defined below. TimePeriod BudgetSubscriptionTimePeriodInput } func (BudgetSubscriptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*budgetSubscriptionArgs)(nil)).Elem() } type BudgetSubscriptionInput interface { pulumi.Input ToBudgetSubscriptionOutput() BudgetSubscriptionOutput ToBudgetSubscriptionOutputWithContext(ctx context.Context) BudgetSubscriptionOutput } func (*BudgetSubscription) ElementType() reflect.Type { return reflect.TypeOf((**BudgetSubscription)(nil)).Elem() } func (i *BudgetSubscription) ToBudgetSubscriptionOutput() BudgetSubscriptionOutput { return i.ToBudgetSubscriptionOutputWithContext(context.Background()) } func (i *BudgetSubscription) ToBudgetSubscriptionOutputWithContext(ctx context.Context) BudgetSubscriptionOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetSubscriptionOutput) } // BudgetSubscriptionArrayInput is an input type that accepts BudgetSubscriptionArray and BudgetSubscriptionArrayOutput values. // You can construct a concrete instance of `BudgetSubscriptionArrayInput` via: // // BudgetSubscriptionArray{ BudgetSubscriptionArgs{...} } type BudgetSubscriptionArrayInput interface { pulumi.Input ToBudgetSubscriptionArrayOutput() BudgetSubscriptionArrayOutput ToBudgetSubscriptionArrayOutputWithContext(context.Context) BudgetSubscriptionArrayOutput } type BudgetSubscriptionArray []BudgetSubscriptionInput func (BudgetSubscriptionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*BudgetSubscription)(nil)).Elem() } func (i BudgetSubscriptionArray) ToBudgetSubscriptionArrayOutput() BudgetSubscriptionArrayOutput { return i.ToBudgetSubscriptionArrayOutputWithContext(context.Background()) } func (i BudgetSubscriptionArray) ToBudgetSubscriptionArrayOutputWithContext(ctx context.Context) BudgetSubscriptionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetSubscriptionArrayOutput) } // BudgetSubscriptionMapInput is an input type that accepts BudgetSubscriptionMap and BudgetSubscriptionMapOutput values. // You can construct a concrete instance of `BudgetSubscriptionMapInput` via: // // BudgetSubscriptionMap{ "key": BudgetSubscriptionArgs{...} } type BudgetSubscriptionMapInput interface { pulumi.Input ToBudgetSubscriptionMapOutput() BudgetSubscriptionMapOutput ToBudgetSubscriptionMapOutputWithContext(context.Context) BudgetSubscriptionMapOutput } type BudgetSubscriptionMap map[string]BudgetSubscriptionInput func (BudgetSubscriptionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BudgetSubscription)(nil)).Elem() } func (i BudgetSubscriptionMap) ToBudgetSubscriptionMapOutput() BudgetSubscriptionMapOutput { return i.ToBudgetSubscriptionMapOutputWithContext(context.Background()) } func (i BudgetSubscriptionMap) ToBudgetSubscriptionMapOutputWithContext(ctx context.Context) BudgetSubscriptionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetSubscriptionMapOutput) } type BudgetSubscriptionOutput struct{ *pulumi.OutputState } func (BudgetSubscriptionOutput) ElementType() reflect.Type { return reflect.TypeOf((**BudgetSubscription)(nil)).Elem() } func (o BudgetSubscriptionOutput) ToBudgetSubscriptionOutput() BudgetSubscriptionOutput { return o } func (o BudgetSubscriptionOutput) ToBudgetSubscriptionOutputWithContext(ctx context.Context) BudgetSubscriptionOutput { return o } // The total amount of cost to track with the budget. func (o BudgetSubscriptionOutput) Amount() pulumi.Float64Output { return o.ApplyT(func(v *BudgetSubscription) pulumi.Float64Output { return v.Amount }).(pulumi.Float64Output) } // (Optional) The ETag of the Subscription Consumption Budget. func (o BudgetSubscriptionOutput) Etag() pulumi.StringOutput { return o.ApplyT(func(v *BudgetSubscription) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) } // A `filter` block as defined below. func (o BudgetSubscriptionOutput) Filter() BudgetSubscriptionFilterPtrOutput { return o.ApplyT(func(v *BudgetSubscription) BudgetSubscriptionFilterPtrOutput { return v.Filter }).(BudgetSubscriptionFilterPtrOutput) } // The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created. func (o BudgetSubscriptionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *BudgetSubscription) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `notification` blocks as defined below. func (o BudgetSubscriptionOutput) Notifications() BudgetSubscriptionNotificationArrayOutput { return o.ApplyT(func(v *BudgetSubscription) BudgetSubscriptionNotificationArrayOutput { return v.Notifications }).(BudgetSubscriptionNotificationArrayOutput) } // The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created. // // > **Note:** The `subscriptionId` property can accept a subscription ID e.g. `00000000-0000-0000-0000-000000000000` or the subscription resource ID e.g. `/subscriptions/00000000-0000-0000-0000-000000000000`. In version 3.0 this property will only accept the subscription resource ID. func (o BudgetSubscriptionOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *BudgetSubscription) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. func (o BudgetSubscriptionOutput) TimeGrain() pulumi.StringPtrOutput { return o.ApplyT(func(v *BudgetSubscription) pulumi.StringPtrOutput { return v.TimeGrain }).(pulumi.StringPtrOutput) } // A `timePeriod` block as defined below. func (o BudgetSubscriptionOutput) TimePeriod() BudgetSubscriptionTimePeriodOutput { return o.ApplyT(func(v *BudgetSubscription) BudgetSubscriptionTimePeriodOutput { return v.TimePeriod }).(BudgetSubscriptionTimePeriodOutput) } type BudgetSubscriptionArrayOutput struct{ *pulumi.OutputState } func (BudgetSubscriptionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*BudgetSubscription)(nil)).Elem() } func (o BudgetSubscriptionArrayOutput) ToBudgetSubscriptionArrayOutput() BudgetSubscriptionArrayOutput { return o } func (o BudgetSubscriptionArrayOutput) ToBudgetSubscriptionArrayOutputWithContext(ctx context.Context) BudgetSubscriptionArrayOutput { return o } func (o BudgetSubscriptionArrayOutput) Index(i pulumi.IntInput) BudgetSubscriptionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BudgetSubscription { return vs[0].([]*BudgetSubscription)[vs[1].(int)] }).(BudgetSubscriptionOutput) } type BudgetSubscriptionMapOutput struct{ *pulumi.OutputState } func (BudgetSubscriptionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BudgetSubscription)(nil)).Elem() } func (o BudgetSubscriptionMapOutput) ToBudgetSubscriptionMapOutput() BudgetSubscriptionMapOutput { return o } func (o BudgetSubscriptionMapOutput) ToBudgetSubscriptionMapOutputWithContext(ctx context.Context) BudgetSubscriptionMapOutput { return o } func (o BudgetSubscriptionMapOutput) MapIndex(k pulumi.StringInput) BudgetSubscriptionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BudgetSubscription { return vs[0].(map[string]*BudgetSubscription)[vs[1].(string)] }).(BudgetSubscriptionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*BudgetSubscriptionInput)(nil)).Elem(), &BudgetSubscription{}) pulumi.RegisterInputType(reflect.TypeOf((*BudgetSubscriptionArrayInput)(nil)).Elem(), BudgetSubscriptionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*BudgetSubscriptionMapInput)(nil)).Elem(), BudgetSubscriptionMap{}) pulumi.RegisterOutputType(BudgetSubscriptionOutput{}) pulumi.RegisterOutputType(BudgetSubscriptionArrayOutput{}) pulumi.RegisterOutputType(BudgetSubscriptionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/consumption/getBudgetResourceGroup.go
sdk/go/azure/consumption/getBudgetResourceGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package consumption 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 Consumption Budget for a specific resource group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/consumption" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := consumption.LookupBudgetResourceGroup(ctx, &consumption.LookupBudgetResourceGroupArgs{ // Name: "existing", // ResourceGroupId: exampleAzurermResourceGroup.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.Consumption` - 2019-10-01 func LookupBudgetResourceGroup(ctx *pulumi.Context, args *LookupBudgetResourceGroupArgs, opts ...pulumi.InvokeOption) (*LookupBudgetResourceGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupBudgetResourceGroupResult err := ctx.Invoke("azure:consumption/getBudgetResourceGroup:getBudgetResourceGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getBudgetResourceGroup. type LookupBudgetResourceGroupArgs struct { // The name of this Consumption Budget. Name string `pulumi:"name"` // The ID of the subscription. ResourceGroupId string `pulumi:"resourceGroupId"` } // A collection of values returned by getBudgetResourceGroup. type LookupBudgetResourceGroupResult struct { // The total amount of cost to track with the budget. Amount float64 `pulumi:"amount"` // A `filter` block as defined below. Filters []GetBudgetResourceGroupFilter `pulumi:"filters"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The name of the tag used for the filter. Name string `pulumi:"name"` // A `notification` block as defined below. Notifications []GetBudgetResourceGroupNotification `pulumi:"notifications"` ResourceGroupId string `pulumi:"resourceGroupId"` // The time covered by a budget. TimeGrain string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriods []GetBudgetResourceGroupTimePeriod `pulumi:"timePeriods"` } func LookupBudgetResourceGroupOutput(ctx *pulumi.Context, args LookupBudgetResourceGroupOutputArgs, opts ...pulumi.InvokeOption) LookupBudgetResourceGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupBudgetResourceGroupResultOutput, error) { args := v.(LookupBudgetResourceGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:consumption/getBudgetResourceGroup:getBudgetResourceGroup", args, LookupBudgetResourceGroupResultOutput{}, options).(LookupBudgetResourceGroupResultOutput), nil }).(LookupBudgetResourceGroupResultOutput) } // A collection of arguments for invoking getBudgetResourceGroup. type LookupBudgetResourceGroupOutputArgs struct { // The name of this Consumption Budget. Name pulumi.StringInput `pulumi:"name"` // The ID of the subscription. ResourceGroupId pulumi.StringInput `pulumi:"resourceGroupId"` } func (LookupBudgetResourceGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupBudgetResourceGroupArgs)(nil)).Elem() } // A collection of values returned by getBudgetResourceGroup. type LookupBudgetResourceGroupResultOutput struct{ *pulumi.OutputState } func (LookupBudgetResourceGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupBudgetResourceGroupResult)(nil)).Elem() } func (o LookupBudgetResourceGroupResultOutput) ToLookupBudgetResourceGroupResultOutput() LookupBudgetResourceGroupResultOutput { return o } func (o LookupBudgetResourceGroupResultOutput) ToLookupBudgetResourceGroupResultOutputWithContext(ctx context.Context) LookupBudgetResourceGroupResultOutput { return o } // The total amount of cost to track with the budget. func (o LookupBudgetResourceGroupResultOutput) Amount() pulumi.Float64Output { return o.ApplyT(func(v LookupBudgetResourceGroupResult) float64 { return v.Amount }).(pulumi.Float64Output) } // A `filter` block as defined below. func (o LookupBudgetResourceGroupResultOutput) Filters() GetBudgetResourceGroupFilterArrayOutput { return o.ApplyT(func(v LookupBudgetResourceGroupResult) []GetBudgetResourceGroupFilter { return v.Filters }).(GetBudgetResourceGroupFilterArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupBudgetResourceGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetResourceGroupResult) string { return v.Id }).(pulumi.StringOutput) } // The name of the tag used for the filter. func (o LookupBudgetResourceGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetResourceGroupResult) string { return v.Name }).(pulumi.StringOutput) } // A `notification` block as defined below. func (o LookupBudgetResourceGroupResultOutput) Notifications() GetBudgetResourceGroupNotificationArrayOutput { return o.ApplyT(func(v LookupBudgetResourceGroupResult) []GetBudgetResourceGroupNotification { return v.Notifications }).(GetBudgetResourceGroupNotificationArrayOutput) } func (o LookupBudgetResourceGroupResultOutput) ResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetResourceGroupResult) string { return v.ResourceGroupId }).(pulumi.StringOutput) } // The time covered by a budget. func (o LookupBudgetResourceGroupResultOutput) TimeGrain() pulumi.StringOutput { return o.ApplyT(func(v LookupBudgetResourceGroupResult) string { return v.TimeGrain }).(pulumi.StringOutput) } // A `timePeriod` block as defined below. func (o LookupBudgetResourceGroupResultOutput) TimePeriods() GetBudgetResourceGroupTimePeriodArrayOutput { return o.ApplyT(func(v LookupBudgetResourceGroupResult) []GetBudgetResourceGroupTimePeriod { return v.TimePeriods }).(GetBudgetResourceGroupTimePeriodArrayOutput) } func init() { pulumi.RegisterOutputType(LookupBudgetResourceGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/consumption/budgetResourceGroup.go
sdk/go/azure/consumption/budgetResourceGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package consumption 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 Group Consumption Budget. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/consumption" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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"), // Location: pulumi.String("eastus"), // }) // if err != nil { // return err // } // exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("example"), // }) // if err != nil { // return err // } // _, err = consumption.NewBudgetResourceGroup(ctx, "example", &consumption.BudgetResourceGroupArgs{ // Name: pulumi.String("example"), // ResourceGroupId: example.ID(), // Amount: pulumi.Float64(1000), // TimeGrain: pulumi.String("Monthly"), // TimePeriod: &consumption.BudgetResourceGroupTimePeriodArgs{ // StartDate: pulumi.String("2022-06-01T00:00:00Z"), // EndDate: pulumi.String("2022-07-01T00:00:00Z"), // }, // Filter: &consumption.BudgetResourceGroupFilterArgs{ // Dimensions: consumption.BudgetResourceGroupFilterDimensionArray{ // &consumption.BudgetResourceGroupFilterDimensionArgs{ // Name: pulumi.String("ResourceId"), // Values: pulumi.StringArray{ // exampleActionGroup.ID(), // }, // }, // }, // Tags: consumption.BudgetResourceGroupFilterTagArray{ // &consumption.BudgetResourceGroupFilterTagArgs{ // Name: pulumi.String("foo"), // Values: pulumi.StringArray{ // pulumi.String("bar"), // pulumi.String("baz"), // }, // }, // }, // }, // Notifications: consumption.BudgetResourceGroupNotificationArray{ // &consumption.BudgetResourceGroupNotificationArgs{ // Enabled: pulumi.Bool(true), // Threshold: pulumi.Int(90), // Operator: pulumi.String("EqualTo"), // ThresholdType: pulumi.String("Forecasted"), // ContactEmails: pulumi.StringArray{ // pulumi.String("foo@example.com"), // pulumi.String("bar@example.com"), // }, // ContactGroups: pulumi.StringArray{ // exampleActionGroup.ID(), // }, // ContactRoles: pulumi.StringArray{ // pulumi.String("Owner"), // }, // }, // &consumption.BudgetResourceGroupNotificationArgs{ // Enabled: pulumi.Bool(false), // Threshold: pulumi.Int(100), // Operator: pulumi.String("GreaterThan"), // ContactEmails: pulumi.StringArray{ // pulumi.String("foo@example.com"), // pulumi.String("bar@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.Consumption` - 2019-10-01 // // ## Import // // Resource Group Consumption Budgets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:consumption/budgetResourceGroup:BudgetResourceGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Consumption/budgets/resourceGroup1 // ``` type BudgetResourceGroup struct { pulumi.CustomResourceState // The total amount of cost to track with the budget. Amount pulumi.Float64Output `pulumi:"amount"` // (Optional) The ETag of the Resource Group Consumption Budget Etag pulumi.StringOutput `pulumi:"etag"` // A `filter` block as defined below. Filter BudgetResourceGroupFilterPtrOutput `pulumi:"filter"` // The name which should be used for this Resource Group Consumption Budget. Changing this forces a new Resource Group Consumption Budget to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications BudgetResourceGroupNotificationArrayOutput `pulumi:"notifications"` // The ID of the Resource Group to create the consumption budget for in the form of /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1. Changing this forces a new Resource Group Consumption Budget to be created. ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrOutput `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod BudgetResourceGroupTimePeriodOutput `pulumi:"timePeriod"` } // NewBudgetResourceGroup registers a new resource with the given unique name, arguments, and options. func NewBudgetResourceGroup(ctx *pulumi.Context, name string, args *BudgetResourceGroupArgs, opts ...pulumi.ResourceOption) (*BudgetResourceGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Amount == nil { return nil, errors.New("invalid value for required argument 'Amount'") } if args.Notifications == nil { return nil, errors.New("invalid value for required argument 'Notifications'") } if args.ResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupId'") } if args.TimePeriod == nil { return nil, errors.New("invalid value for required argument 'TimePeriod'") } opts = internal.PkgResourceDefaultOpts(opts) var resource BudgetResourceGroup err := ctx.RegisterResource("azure:consumption/budgetResourceGroup:BudgetResourceGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetBudgetResourceGroup gets an existing BudgetResourceGroup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetBudgetResourceGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *BudgetResourceGroupState, opts ...pulumi.ResourceOption) (*BudgetResourceGroup, error) { var resource BudgetResourceGroup err := ctx.ReadResource("azure:consumption/budgetResourceGroup:BudgetResourceGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering BudgetResourceGroup resources. type budgetResourceGroupState struct { // The total amount of cost to track with the budget. Amount *float64 `pulumi:"amount"` // (Optional) The ETag of the Resource Group Consumption Budget Etag *string `pulumi:"etag"` // A `filter` block as defined below. Filter *BudgetResourceGroupFilter `pulumi:"filter"` // The name which should be used for this Resource Group Consumption Budget. Changing this forces a new Resource Group Consumption Budget to be created. Name *string `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications []BudgetResourceGroupNotification `pulumi:"notifications"` // The ID of the Resource Group to create the consumption budget for in the form of /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1. Changing this forces a new Resource Group Consumption Budget to be created. ResourceGroupId *string `pulumi:"resourceGroupId"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain *string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod *BudgetResourceGroupTimePeriod `pulumi:"timePeriod"` } type BudgetResourceGroupState struct { // The total amount of cost to track with the budget. Amount pulumi.Float64PtrInput // (Optional) The ETag of the Resource Group Consumption Budget Etag pulumi.StringPtrInput // A `filter` block as defined below. Filter BudgetResourceGroupFilterPtrInput // The name which should be used for this Resource Group Consumption Budget. Changing this forces a new Resource Group Consumption Budget to be created. Name pulumi.StringPtrInput // One or more `notification` blocks as defined below. Notifications BudgetResourceGroupNotificationArrayInput // The ID of the Resource Group to create the consumption budget for in the form of /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1. Changing this forces a new Resource Group Consumption Budget to be created. ResourceGroupId pulumi.StringPtrInput // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrInput // A `timePeriod` block as defined below. TimePeriod BudgetResourceGroupTimePeriodPtrInput } func (BudgetResourceGroupState) ElementType() reflect.Type { return reflect.TypeOf((*budgetResourceGroupState)(nil)).Elem() } type budgetResourceGroupArgs struct { // The total amount of cost to track with the budget. Amount float64 `pulumi:"amount"` // (Optional) The ETag of the Resource Group Consumption Budget Etag *string `pulumi:"etag"` // A `filter` block as defined below. Filter *BudgetResourceGroupFilter `pulumi:"filter"` // The name which should be used for this Resource Group Consumption Budget. Changing this forces a new Resource Group Consumption Budget to be created. Name *string `pulumi:"name"` // One or more `notification` blocks as defined below. Notifications []BudgetResourceGroupNotification `pulumi:"notifications"` // The ID of the Resource Group to create the consumption budget for in the form of /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1. Changing this forces a new Resource Group Consumption Budget to be created. ResourceGroupId string `pulumi:"resourceGroupId"` // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain *string `pulumi:"timeGrain"` // A `timePeriod` block as defined below. TimePeriod BudgetResourceGroupTimePeriod `pulumi:"timePeriod"` } // The set of arguments for constructing a BudgetResourceGroup resource. type BudgetResourceGroupArgs struct { // The total amount of cost to track with the budget. Amount pulumi.Float64Input // (Optional) The ETag of the Resource Group Consumption Budget Etag pulumi.StringPtrInput // A `filter` block as defined below. Filter BudgetResourceGroupFilterPtrInput // The name which should be used for this Resource Group Consumption Budget. Changing this forces a new Resource Group Consumption Budget to be created. Name pulumi.StringPtrInput // One or more `notification` blocks as defined below. Notifications BudgetResourceGroupNotificationArrayInput // The ID of the Resource Group to create the consumption budget for in the form of /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1. Changing this forces a new Resource Group Consumption Budget to be created. ResourceGroupId pulumi.StringInput // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. TimeGrain pulumi.StringPtrInput // A `timePeriod` block as defined below. TimePeriod BudgetResourceGroupTimePeriodInput } func (BudgetResourceGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*budgetResourceGroupArgs)(nil)).Elem() } type BudgetResourceGroupInput interface { pulumi.Input ToBudgetResourceGroupOutput() BudgetResourceGroupOutput ToBudgetResourceGroupOutputWithContext(ctx context.Context) BudgetResourceGroupOutput } func (*BudgetResourceGroup) ElementType() reflect.Type { return reflect.TypeOf((**BudgetResourceGroup)(nil)).Elem() } func (i *BudgetResourceGroup) ToBudgetResourceGroupOutput() BudgetResourceGroupOutput { return i.ToBudgetResourceGroupOutputWithContext(context.Background()) } func (i *BudgetResourceGroup) ToBudgetResourceGroupOutputWithContext(ctx context.Context) BudgetResourceGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetResourceGroupOutput) } // BudgetResourceGroupArrayInput is an input type that accepts BudgetResourceGroupArray and BudgetResourceGroupArrayOutput values. // You can construct a concrete instance of `BudgetResourceGroupArrayInput` via: // // BudgetResourceGroupArray{ BudgetResourceGroupArgs{...} } type BudgetResourceGroupArrayInput interface { pulumi.Input ToBudgetResourceGroupArrayOutput() BudgetResourceGroupArrayOutput ToBudgetResourceGroupArrayOutputWithContext(context.Context) BudgetResourceGroupArrayOutput } type BudgetResourceGroupArray []BudgetResourceGroupInput func (BudgetResourceGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*BudgetResourceGroup)(nil)).Elem() } func (i BudgetResourceGroupArray) ToBudgetResourceGroupArrayOutput() BudgetResourceGroupArrayOutput { return i.ToBudgetResourceGroupArrayOutputWithContext(context.Background()) } func (i BudgetResourceGroupArray) ToBudgetResourceGroupArrayOutputWithContext(ctx context.Context) BudgetResourceGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetResourceGroupArrayOutput) } // BudgetResourceGroupMapInput is an input type that accepts BudgetResourceGroupMap and BudgetResourceGroupMapOutput values. // You can construct a concrete instance of `BudgetResourceGroupMapInput` via: // // BudgetResourceGroupMap{ "key": BudgetResourceGroupArgs{...} } type BudgetResourceGroupMapInput interface { pulumi.Input ToBudgetResourceGroupMapOutput() BudgetResourceGroupMapOutput ToBudgetResourceGroupMapOutputWithContext(context.Context) BudgetResourceGroupMapOutput } type BudgetResourceGroupMap map[string]BudgetResourceGroupInput func (BudgetResourceGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BudgetResourceGroup)(nil)).Elem() } func (i BudgetResourceGroupMap) ToBudgetResourceGroupMapOutput() BudgetResourceGroupMapOutput { return i.ToBudgetResourceGroupMapOutputWithContext(context.Background()) } func (i BudgetResourceGroupMap) ToBudgetResourceGroupMapOutputWithContext(ctx context.Context) BudgetResourceGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(BudgetResourceGroupMapOutput) } type BudgetResourceGroupOutput struct{ *pulumi.OutputState } func (BudgetResourceGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**BudgetResourceGroup)(nil)).Elem() } func (o BudgetResourceGroupOutput) ToBudgetResourceGroupOutput() BudgetResourceGroupOutput { return o } func (o BudgetResourceGroupOutput) ToBudgetResourceGroupOutputWithContext(ctx context.Context) BudgetResourceGroupOutput { return o } // The total amount of cost to track with the budget. func (o BudgetResourceGroupOutput) Amount() pulumi.Float64Output { return o.ApplyT(func(v *BudgetResourceGroup) pulumi.Float64Output { return v.Amount }).(pulumi.Float64Output) } // (Optional) The ETag of the Resource Group Consumption Budget func (o BudgetResourceGroupOutput) Etag() pulumi.StringOutput { return o.ApplyT(func(v *BudgetResourceGroup) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) } // A `filter` block as defined below. func (o BudgetResourceGroupOutput) Filter() BudgetResourceGroupFilterPtrOutput { return o.ApplyT(func(v *BudgetResourceGroup) BudgetResourceGroupFilterPtrOutput { return v.Filter }).(BudgetResourceGroupFilterPtrOutput) } // The name which should be used for this Resource Group Consumption Budget. Changing this forces a new Resource Group Consumption Budget to be created. func (o BudgetResourceGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *BudgetResourceGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `notification` blocks as defined below. func (o BudgetResourceGroupOutput) Notifications() BudgetResourceGroupNotificationArrayOutput { return o.ApplyT(func(v *BudgetResourceGroup) BudgetResourceGroupNotificationArrayOutput { return v.Notifications }).(BudgetResourceGroupNotificationArrayOutput) } // The ID of the Resource Group to create the consumption budget for in the form of /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1. Changing this forces a new Resource Group Consumption Budget to be created. func (o BudgetResourceGroupOutput) ResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v *BudgetResourceGroup) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput) } // The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. func (o BudgetResourceGroupOutput) TimeGrain() pulumi.StringPtrOutput { return o.ApplyT(func(v *BudgetResourceGroup) pulumi.StringPtrOutput { return v.TimeGrain }).(pulumi.StringPtrOutput) } // A `timePeriod` block as defined below. func (o BudgetResourceGroupOutput) TimePeriod() BudgetResourceGroupTimePeriodOutput { return o.ApplyT(func(v *BudgetResourceGroup) BudgetResourceGroupTimePeriodOutput { return v.TimePeriod }).(BudgetResourceGroupTimePeriodOutput) } type BudgetResourceGroupArrayOutput struct{ *pulumi.OutputState } func (BudgetResourceGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*BudgetResourceGroup)(nil)).Elem() } func (o BudgetResourceGroupArrayOutput) ToBudgetResourceGroupArrayOutput() BudgetResourceGroupArrayOutput { return o } func (o BudgetResourceGroupArrayOutput) ToBudgetResourceGroupArrayOutputWithContext(ctx context.Context) BudgetResourceGroupArrayOutput { return o } func (o BudgetResourceGroupArrayOutput) Index(i pulumi.IntInput) BudgetResourceGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BudgetResourceGroup { return vs[0].([]*BudgetResourceGroup)[vs[1].(int)] }).(BudgetResourceGroupOutput) } type BudgetResourceGroupMapOutput struct{ *pulumi.OutputState } func (BudgetResourceGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BudgetResourceGroup)(nil)).Elem() } func (o BudgetResourceGroupMapOutput) ToBudgetResourceGroupMapOutput() BudgetResourceGroupMapOutput { return o } func (o BudgetResourceGroupMapOutput) ToBudgetResourceGroupMapOutputWithContext(ctx context.Context) BudgetResourceGroupMapOutput { return o } func (o BudgetResourceGroupMapOutput) MapIndex(k pulumi.StringInput) BudgetResourceGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BudgetResourceGroup { return vs[0].(map[string]*BudgetResourceGroup)[vs[1].(string)] }).(BudgetResourceGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*BudgetResourceGroupInput)(nil)).Elem(), &BudgetResourceGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*BudgetResourceGroupArrayInput)(nil)).Elem(), BudgetResourceGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*BudgetResourceGroupMapInput)(nil)).Elem(), BudgetResourceGroupMap{}) pulumi.RegisterOutputType(BudgetResourceGroupOutput{}) pulumi.RegisterOutputType(BudgetResourceGroupArrayOutput{}) pulumi.RegisterOutputType(BudgetResourceGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/licationLoadBalancer.go
sdk/go/azure/appconfiguration/licationLoadBalancer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Gateway for Containers (ALB). // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "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 = appconfiguration.NewLicationLoadBalancer(ctx, "example", &appconfiguration.LicationLoadBalancerArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.ServiceNetworking` - 2025-01-01 // // ## Import // // Application Gateway for Containers (ALB) can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appconfiguration/licationLoadBalancer:LicationLoadBalancer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceNetworking/trafficControllers/alb1 // ``` type LicationLoadBalancer struct { pulumi.CustomResourceState // The Azure Region where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Application Gateway for Containers (ALB). Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The primary configuration endpoints of the Application Gateway for Containers (ALB). PrimaryConfigurationEndpoint pulumi.StringOutput `pulumi:"primaryConfigurationEndpoint"` // The name of Resource Group where the Application Gateway for Containers (ALB) 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 Application Gateway for Containers (ALB). Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewLicationLoadBalancer registers a new resource with the given unique name, arguments, and options. func NewLicationLoadBalancer(ctx *pulumi.Context, name string, args *LicationLoadBalancerArgs, opts ...pulumi.ResourceOption) (*LicationLoadBalancer, 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 LicationLoadBalancer err := ctx.RegisterResource("azure:appconfiguration/licationLoadBalancer:LicationLoadBalancer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLicationLoadBalancer gets an existing LicationLoadBalancer resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetLicationLoadBalancer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LicationLoadBalancerState, opts ...pulumi.ResourceOption) (*LicationLoadBalancer, error) { var resource LicationLoadBalancer err := ctx.ReadResource("azure:appconfiguration/licationLoadBalancer:LicationLoadBalancer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LicationLoadBalancer resources. type licationLoadBalancerState struct { // The Azure Region where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Application Gateway for Containers (ALB). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The primary configuration endpoints of the Application Gateway for Containers (ALB). PrimaryConfigurationEndpoint *string `pulumi:"primaryConfigurationEndpoint"` // The name of Resource Group where the Application Gateway for Containers (ALB) 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 Application Gateway for Containers (ALB). Tags map[string]string `pulumi:"tags"` } type LicationLoadBalancerState struct { // The Azure Region where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Application Gateway for Containers (ALB). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The primary configuration endpoints of the Application Gateway for Containers (ALB). PrimaryConfigurationEndpoint pulumi.StringPtrInput // The name of Resource Group where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Gateway for Containers (ALB). Tags pulumi.StringMapInput } func (LicationLoadBalancerState) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerState)(nil)).Elem() } type licationLoadBalancerArgs struct { // The Azure Region where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Application Gateway for Containers (ALB). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of Resource Group where the Application Gateway for Containers (ALB) 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 Application Gateway for Containers (ALB). Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a LicationLoadBalancer resource. type LicationLoadBalancerArgs struct { // The Azure Region where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Application Gateway for Containers (ALB). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of Resource Group where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Application Gateway for Containers (ALB). Tags pulumi.StringMapInput } func (LicationLoadBalancerArgs) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerArgs)(nil)).Elem() } type LicationLoadBalancerInput interface { pulumi.Input ToLicationLoadBalancerOutput() LicationLoadBalancerOutput ToLicationLoadBalancerOutputWithContext(ctx context.Context) LicationLoadBalancerOutput } func (*LicationLoadBalancer) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancer)(nil)).Elem() } func (i *LicationLoadBalancer) ToLicationLoadBalancerOutput() LicationLoadBalancerOutput { return i.ToLicationLoadBalancerOutputWithContext(context.Background()) } func (i *LicationLoadBalancer) ToLicationLoadBalancerOutputWithContext(ctx context.Context) LicationLoadBalancerOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerOutput) } // LicationLoadBalancerArrayInput is an input type that accepts LicationLoadBalancerArray and LicationLoadBalancerArrayOutput values. // You can construct a concrete instance of `LicationLoadBalancerArrayInput` via: // // LicationLoadBalancerArray{ LicationLoadBalancerArgs{...} } type LicationLoadBalancerArrayInput interface { pulumi.Input ToLicationLoadBalancerArrayOutput() LicationLoadBalancerArrayOutput ToLicationLoadBalancerArrayOutputWithContext(context.Context) LicationLoadBalancerArrayOutput } type LicationLoadBalancerArray []LicationLoadBalancerInput func (LicationLoadBalancerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancer)(nil)).Elem() } func (i LicationLoadBalancerArray) ToLicationLoadBalancerArrayOutput() LicationLoadBalancerArrayOutput { return i.ToLicationLoadBalancerArrayOutputWithContext(context.Background()) } func (i LicationLoadBalancerArray) ToLicationLoadBalancerArrayOutputWithContext(ctx context.Context) LicationLoadBalancerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerArrayOutput) } // LicationLoadBalancerMapInput is an input type that accepts LicationLoadBalancerMap and LicationLoadBalancerMapOutput values. // You can construct a concrete instance of `LicationLoadBalancerMapInput` via: // // LicationLoadBalancerMap{ "key": LicationLoadBalancerArgs{...} } type LicationLoadBalancerMapInput interface { pulumi.Input ToLicationLoadBalancerMapOutput() LicationLoadBalancerMapOutput ToLicationLoadBalancerMapOutputWithContext(context.Context) LicationLoadBalancerMapOutput } type LicationLoadBalancerMap map[string]LicationLoadBalancerInput func (LicationLoadBalancerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancer)(nil)).Elem() } func (i LicationLoadBalancerMap) ToLicationLoadBalancerMapOutput() LicationLoadBalancerMapOutput { return i.ToLicationLoadBalancerMapOutputWithContext(context.Background()) } func (i LicationLoadBalancerMap) ToLicationLoadBalancerMapOutputWithContext(ctx context.Context) LicationLoadBalancerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerMapOutput) } type LicationLoadBalancerOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerOutput) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancer)(nil)).Elem() } func (o LicationLoadBalancerOutput) ToLicationLoadBalancerOutput() LicationLoadBalancerOutput { return o } func (o LicationLoadBalancerOutput) ToLicationLoadBalancerOutputWithContext(ctx context.Context) LicationLoadBalancerOutput { return o } // The Azure Region where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. func (o LicationLoadBalancerOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancer) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Application Gateway for Containers (ALB). Changing this forces a new resource to be created. func (o LicationLoadBalancerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The primary configuration endpoints of the Application Gateway for Containers (ALB). func (o LicationLoadBalancerOutput) PrimaryConfigurationEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancer) pulumi.StringOutput { return v.PrimaryConfigurationEndpoint }).(pulumi.StringOutput) } // The name of Resource Group where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. func (o LicationLoadBalancerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancer) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Application Gateway for Containers (ALB). func (o LicationLoadBalancerOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *LicationLoadBalancer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type LicationLoadBalancerArrayOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancer)(nil)).Elem() } func (o LicationLoadBalancerArrayOutput) ToLicationLoadBalancerArrayOutput() LicationLoadBalancerArrayOutput { return o } func (o LicationLoadBalancerArrayOutput) ToLicationLoadBalancerArrayOutputWithContext(ctx context.Context) LicationLoadBalancerArrayOutput { return o } func (o LicationLoadBalancerArrayOutput) Index(i pulumi.IntInput) LicationLoadBalancerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LicationLoadBalancer { return vs[0].([]*LicationLoadBalancer)[vs[1].(int)] }).(LicationLoadBalancerOutput) } type LicationLoadBalancerMapOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancer)(nil)).Elem() } func (o LicationLoadBalancerMapOutput) ToLicationLoadBalancerMapOutput() LicationLoadBalancerMapOutput { return o } func (o LicationLoadBalancerMapOutput) ToLicationLoadBalancerMapOutputWithContext(ctx context.Context) LicationLoadBalancerMapOutput { return o } func (o LicationLoadBalancerMapOutput) MapIndex(k pulumi.StringInput) LicationLoadBalancerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LicationLoadBalancer { return vs[0].(map[string]*LicationLoadBalancer)[vs[1].(string)] }).(LicationLoadBalancerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerInput)(nil)).Elem(), &LicationLoadBalancer{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerArrayInput)(nil)).Elem(), LicationLoadBalancerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerMapInput)(nil)).Elem(), LicationLoadBalancerMap{}) pulumi.RegisterOutputType(LicationLoadBalancerOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerArrayOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/init.go
sdk/go/azure/appconfiguration/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 appconfiguration 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:appconfiguration/configurationFeature:ConfigurationFeature": r = &ConfigurationFeature{} case "azure:appconfiguration/configurationKey:ConfigurationKey": r = &ConfigurationKey{} case "azure:appconfiguration/configurationStore:ConfigurationStore": r = &ConfigurationStore{} case "azure:appconfiguration/licationLoadBalancer:LicationLoadBalancer": r = &LicationLoadBalancer{} case "azure:appconfiguration/licationLoadBalancerFrontend:LicationLoadBalancerFrontend": r = &LicationLoadBalancerFrontend{} case "azure:appconfiguration/licationLoadBalancerSecurityPolicy:LicationLoadBalancerSecurityPolicy": r = &LicationLoadBalancerSecurityPolicy{} case "azure:appconfiguration/licationLoadBalancerSubnetAssociation:LicationLoadBalancerSubnetAssociation": r = &LicationLoadBalancerSubnetAssociation{} 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", "appconfiguration/configurationFeature", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appconfiguration/configurationKey", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appconfiguration/configurationStore", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appconfiguration/licationLoadBalancer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appconfiguration/licationLoadBalancerFrontend", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appconfiguration/licationLoadBalancerSecurityPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appconfiguration/licationLoadBalancerSubnetAssociation", &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/appconfiguration/pulumiTypes.go
sdk/go/azure/appconfiguration/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 appconfiguration 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 ConfigurationFeatureTargetingFilter struct { // A number representing the percentage of the entire user base. DefaultRolloutPercentage int `pulumi:"defaultRolloutPercentage"` // One or more `groups` blocks as defined below. Groups []ConfigurationFeatureTargetingFilterGroup `pulumi:"groups"` // A list of users to target for this feature. Users []string `pulumi:"users"` } // ConfigurationFeatureTargetingFilterInput is an input type that accepts ConfigurationFeatureTargetingFilterArgs and ConfigurationFeatureTargetingFilterOutput values. // You can construct a concrete instance of `ConfigurationFeatureTargetingFilterInput` via: // // ConfigurationFeatureTargetingFilterArgs{...} type ConfigurationFeatureTargetingFilterInput interface { pulumi.Input ToConfigurationFeatureTargetingFilterOutput() ConfigurationFeatureTargetingFilterOutput ToConfigurationFeatureTargetingFilterOutputWithContext(context.Context) ConfigurationFeatureTargetingFilterOutput } type ConfigurationFeatureTargetingFilterArgs struct { // A number representing the percentage of the entire user base. DefaultRolloutPercentage pulumi.IntInput `pulumi:"defaultRolloutPercentage"` // One or more `groups` blocks as defined below. Groups ConfigurationFeatureTargetingFilterGroupArrayInput `pulumi:"groups"` // A list of users to target for this feature. Users pulumi.StringArrayInput `pulumi:"users"` } func (ConfigurationFeatureTargetingFilterArgs) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationFeatureTargetingFilter)(nil)).Elem() } func (i ConfigurationFeatureTargetingFilterArgs) ToConfigurationFeatureTargetingFilterOutput() ConfigurationFeatureTargetingFilterOutput { return i.ToConfigurationFeatureTargetingFilterOutputWithContext(context.Background()) } func (i ConfigurationFeatureTargetingFilterArgs) ToConfigurationFeatureTargetingFilterOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureTargetingFilterOutput) } // ConfigurationFeatureTargetingFilterArrayInput is an input type that accepts ConfigurationFeatureTargetingFilterArray and ConfigurationFeatureTargetingFilterArrayOutput values. // You can construct a concrete instance of `ConfigurationFeatureTargetingFilterArrayInput` via: // // ConfigurationFeatureTargetingFilterArray{ ConfigurationFeatureTargetingFilterArgs{...} } type ConfigurationFeatureTargetingFilterArrayInput interface { pulumi.Input ToConfigurationFeatureTargetingFilterArrayOutput() ConfigurationFeatureTargetingFilterArrayOutput ToConfigurationFeatureTargetingFilterArrayOutputWithContext(context.Context) ConfigurationFeatureTargetingFilterArrayOutput } type ConfigurationFeatureTargetingFilterArray []ConfigurationFeatureTargetingFilterInput func (ConfigurationFeatureTargetingFilterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ConfigurationFeatureTargetingFilter)(nil)).Elem() } func (i ConfigurationFeatureTargetingFilterArray) ToConfigurationFeatureTargetingFilterArrayOutput() ConfigurationFeatureTargetingFilterArrayOutput { return i.ToConfigurationFeatureTargetingFilterArrayOutputWithContext(context.Background()) } func (i ConfigurationFeatureTargetingFilterArray) ToConfigurationFeatureTargetingFilterArrayOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureTargetingFilterArrayOutput) } type ConfigurationFeatureTargetingFilterOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureTargetingFilterOutput) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationFeatureTargetingFilter)(nil)).Elem() } func (o ConfigurationFeatureTargetingFilterOutput) ToConfigurationFeatureTargetingFilterOutput() ConfigurationFeatureTargetingFilterOutput { return o } func (o ConfigurationFeatureTargetingFilterOutput) ToConfigurationFeatureTargetingFilterOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterOutput { return o } // A number representing the percentage of the entire user base. func (o ConfigurationFeatureTargetingFilterOutput) DefaultRolloutPercentage() pulumi.IntOutput { return o.ApplyT(func(v ConfigurationFeatureTargetingFilter) int { return v.DefaultRolloutPercentage }).(pulumi.IntOutput) } // One or more `groups` blocks as defined below. func (o ConfigurationFeatureTargetingFilterOutput) Groups() ConfigurationFeatureTargetingFilterGroupArrayOutput { return o.ApplyT(func(v ConfigurationFeatureTargetingFilter) []ConfigurationFeatureTargetingFilterGroup { return v.Groups }).(ConfigurationFeatureTargetingFilterGroupArrayOutput) } // A list of users to target for this feature. func (o ConfigurationFeatureTargetingFilterOutput) Users() pulumi.StringArrayOutput { return o.ApplyT(func(v ConfigurationFeatureTargetingFilter) []string { return v.Users }).(pulumi.StringArrayOutput) } type ConfigurationFeatureTargetingFilterArrayOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureTargetingFilterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ConfigurationFeatureTargetingFilter)(nil)).Elem() } func (o ConfigurationFeatureTargetingFilterArrayOutput) ToConfigurationFeatureTargetingFilterArrayOutput() ConfigurationFeatureTargetingFilterArrayOutput { return o } func (o ConfigurationFeatureTargetingFilterArrayOutput) ToConfigurationFeatureTargetingFilterArrayOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterArrayOutput { return o } func (o ConfigurationFeatureTargetingFilterArrayOutput) Index(i pulumi.IntInput) ConfigurationFeatureTargetingFilterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ConfigurationFeatureTargetingFilter { return vs[0].([]ConfigurationFeatureTargetingFilter)[vs[1].(int)] }).(ConfigurationFeatureTargetingFilterOutput) } type ConfigurationFeatureTargetingFilterGroup struct { // The name of the group. Name string `pulumi:"name"` // Rollout percentage of the group. RolloutPercentage int `pulumi:"rolloutPercentage"` } // ConfigurationFeatureTargetingFilterGroupInput is an input type that accepts ConfigurationFeatureTargetingFilterGroupArgs and ConfigurationFeatureTargetingFilterGroupOutput values. // You can construct a concrete instance of `ConfigurationFeatureTargetingFilterGroupInput` via: // // ConfigurationFeatureTargetingFilterGroupArgs{...} type ConfigurationFeatureTargetingFilterGroupInput interface { pulumi.Input ToConfigurationFeatureTargetingFilterGroupOutput() ConfigurationFeatureTargetingFilterGroupOutput ToConfigurationFeatureTargetingFilterGroupOutputWithContext(context.Context) ConfigurationFeatureTargetingFilterGroupOutput } type ConfigurationFeatureTargetingFilterGroupArgs struct { // The name of the group. Name pulumi.StringInput `pulumi:"name"` // Rollout percentage of the group. RolloutPercentage pulumi.IntInput `pulumi:"rolloutPercentage"` } func (ConfigurationFeatureTargetingFilterGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationFeatureTargetingFilterGroup)(nil)).Elem() } func (i ConfigurationFeatureTargetingFilterGroupArgs) ToConfigurationFeatureTargetingFilterGroupOutput() ConfigurationFeatureTargetingFilterGroupOutput { return i.ToConfigurationFeatureTargetingFilterGroupOutputWithContext(context.Background()) } func (i ConfigurationFeatureTargetingFilterGroupArgs) ToConfigurationFeatureTargetingFilterGroupOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureTargetingFilterGroupOutput) } // ConfigurationFeatureTargetingFilterGroupArrayInput is an input type that accepts ConfigurationFeatureTargetingFilterGroupArray and ConfigurationFeatureTargetingFilterGroupArrayOutput values. // You can construct a concrete instance of `ConfigurationFeatureTargetingFilterGroupArrayInput` via: // // ConfigurationFeatureTargetingFilterGroupArray{ ConfigurationFeatureTargetingFilterGroupArgs{...} } type ConfigurationFeatureTargetingFilterGroupArrayInput interface { pulumi.Input ToConfigurationFeatureTargetingFilterGroupArrayOutput() ConfigurationFeatureTargetingFilterGroupArrayOutput ToConfigurationFeatureTargetingFilterGroupArrayOutputWithContext(context.Context) ConfigurationFeatureTargetingFilterGroupArrayOutput } type ConfigurationFeatureTargetingFilterGroupArray []ConfigurationFeatureTargetingFilterGroupInput func (ConfigurationFeatureTargetingFilterGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ConfigurationFeatureTargetingFilterGroup)(nil)).Elem() } func (i ConfigurationFeatureTargetingFilterGroupArray) ToConfigurationFeatureTargetingFilterGroupArrayOutput() ConfigurationFeatureTargetingFilterGroupArrayOutput { return i.ToConfigurationFeatureTargetingFilterGroupArrayOutputWithContext(context.Background()) } func (i ConfigurationFeatureTargetingFilterGroupArray) ToConfigurationFeatureTargetingFilterGroupArrayOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureTargetingFilterGroupArrayOutput) } type ConfigurationFeatureTargetingFilterGroupOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureTargetingFilterGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationFeatureTargetingFilterGroup)(nil)).Elem() } func (o ConfigurationFeatureTargetingFilterGroupOutput) ToConfigurationFeatureTargetingFilterGroupOutput() ConfigurationFeatureTargetingFilterGroupOutput { return o } func (o ConfigurationFeatureTargetingFilterGroupOutput) ToConfigurationFeatureTargetingFilterGroupOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterGroupOutput { return o } // The name of the group. func (o ConfigurationFeatureTargetingFilterGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ConfigurationFeatureTargetingFilterGroup) string { return v.Name }).(pulumi.StringOutput) } // Rollout percentage of the group. func (o ConfigurationFeatureTargetingFilterGroupOutput) RolloutPercentage() pulumi.IntOutput { return o.ApplyT(func(v ConfigurationFeatureTargetingFilterGroup) int { return v.RolloutPercentage }).(pulumi.IntOutput) } type ConfigurationFeatureTargetingFilterGroupArrayOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureTargetingFilterGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ConfigurationFeatureTargetingFilterGroup)(nil)).Elem() } func (o ConfigurationFeatureTargetingFilterGroupArrayOutput) ToConfigurationFeatureTargetingFilterGroupArrayOutput() ConfigurationFeatureTargetingFilterGroupArrayOutput { return o } func (o ConfigurationFeatureTargetingFilterGroupArrayOutput) ToConfigurationFeatureTargetingFilterGroupArrayOutputWithContext(ctx context.Context) ConfigurationFeatureTargetingFilterGroupArrayOutput { return o } func (o ConfigurationFeatureTargetingFilterGroupArrayOutput) Index(i pulumi.IntInput) ConfigurationFeatureTargetingFilterGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ConfigurationFeatureTargetingFilterGroup { return vs[0].([]ConfigurationFeatureTargetingFilterGroup)[vs[1].(int)] }).(ConfigurationFeatureTargetingFilterGroupOutput) } type ConfigurationFeatureTimewindowFilter struct { // The latest timestamp the feature is enabled. The timestamp must be in RFC3339 format. End *string `pulumi:"end"` // The earliest timestamp the feature is enabled. The timestamp must be in RFC3339 format. Start *string `pulumi:"start"` } // ConfigurationFeatureTimewindowFilterInput is an input type that accepts ConfigurationFeatureTimewindowFilterArgs and ConfigurationFeatureTimewindowFilterOutput values. // You can construct a concrete instance of `ConfigurationFeatureTimewindowFilterInput` via: // // ConfigurationFeatureTimewindowFilterArgs{...} type ConfigurationFeatureTimewindowFilterInput interface { pulumi.Input ToConfigurationFeatureTimewindowFilterOutput() ConfigurationFeatureTimewindowFilterOutput ToConfigurationFeatureTimewindowFilterOutputWithContext(context.Context) ConfigurationFeatureTimewindowFilterOutput } type ConfigurationFeatureTimewindowFilterArgs struct { // The latest timestamp the feature is enabled. The timestamp must be in RFC3339 format. End pulumi.StringPtrInput `pulumi:"end"` // The earliest timestamp the feature is enabled. The timestamp must be in RFC3339 format. Start pulumi.StringPtrInput `pulumi:"start"` } func (ConfigurationFeatureTimewindowFilterArgs) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationFeatureTimewindowFilter)(nil)).Elem() } func (i ConfigurationFeatureTimewindowFilterArgs) ToConfigurationFeatureTimewindowFilterOutput() ConfigurationFeatureTimewindowFilterOutput { return i.ToConfigurationFeatureTimewindowFilterOutputWithContext(context.Background()) } func (i ConfigurationFeatureTimewindowFilterArgs) ToConfigurationFeatureTimewindowFilterOutputWithContext(ctx context.Context) ConfigurationFeatureTimewindowFilterOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureTimewindowFilterOutput) } // ConfigurationFeatureTimewindowFilterArrayInput is an input type that accepts ConfigurationFeatureTimewindowFilterArray and ConfigurationFeatureTimewindowFilterArrayOutput values. // You can construct a concrete instance of `ConfigurationFeatureTimewindowFilterArrayInput` via: // // ConfigurationFeatureTimewindowFilterArray{ ConfigurationFeatureTimewindowFilterArgs{...} } type ConfigurationFeatureTimewindowFilterArrayInput interface { pulumi.Input ToConfigurationFeatureTimewindowFilterArrayOutput() ConfigurationFeatureTimewindowFilterArrayOutput ToConfigurationFeatureTimewindowFilterArrayOutputWithContext(context.Context) ConfigurationFeatureTimewindowFilterArrayOutput } type ConfigurationFeatureTimewindowFilterArray []ConfigurationFeatureTimewindowFilterInput func (ConfigurationFeatureTimewindowFilterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ConfigurationFeatureTimewindowFilter)(nil)).Elem() } func (i ConfigurationFeatureTimewindowFilterArray) ToConfigurationFeatureTimewindowFilterArrayOutput() ConfigurationFeatureTimewindowFilterArrayOutput { return i.ToConfigurationFeatureTimewindowFilterArrayOutputWithContext(context.Background()) } func (i ConfigurationFeatureTimewindowFilterArray) ToConfigurationFeatureTimewindowFilterArrayOutputWithContext(ctx context.Context) ConfigurationFeatureTimewindowFilterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureTimewindowFilterArrayOutput) } type ConfigurationFeatureTimewindowFilterOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureTimewindowFilterOutput) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationFeatureTimewindowFilter)(nil)).Elem() } func (o ConfigurationFeatureTimewindowFilterOutput) ToConfigurationFeatureTimewindowFilterOutput() ConfigurationFeatureTimewindowFilterOutput { return o } func (o ConfigurationFeatureTimewindowFilterOutput) ToConfigurationFeatureTimewindowFilterOutputWithContext(ctx context.Context) ConfigurationFeatureTimewindowFilterOutput { return o } // The latest timestamp the feature is enabled. The timestamp must be in RFC3339 format. func (o ConfigurationFeatureTimewindowFilterOutput) End() pulumi.StringPtrOutput { return o.ApplyT(func(v ConfigurationFeatureTimewindowFilter) *string { return v.End }).(pulumi.StringPtrOutput) } // The earliest timestamp the feature is enabled. The timestamp must be in RFC3339 format. func (o ConfigurationFeatureTimewindowFilterOutput) Start() pulumi.StringPtrOutput { return o.ApplyT(func(v ConfigurationFeatureTimewindowFilter) *string { return v.Start }).(pulumi.StringPtrOutput) } type ConfigurationFeatureTimewindowFilterArrayOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureTimewindowFilterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ConfigurationFeatureTimewindowFilter)(nil)).Elem() } func (o ConfigurationFeatureTimewindowFilterArrayOutput) ToConfigurationFeatureTimewindowFilterArrayOutput() ConfigurationFeatureTimewindowFilterArrayOutput { return o } func (o ConfigurationFeatureTimewindowFilterArrayOutput) ToConfigurationFeatureTimewindowFilterArrayOutputWithContext(ctx context.Context) ConfigurationFeatureTimewindowFilterArrayOutput { return o } func (o ConfigurationFeatureTimewindowFilterArrayOutput) Index(i pulumi.IntInput) ConfigurationFeatureTimewindowFilterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ConfigurationFeatureTimewindowFilter { return vs[0].([]ConfigurationFeatureTimewindowFilter)[vs[1].(int)] }).(ConfigurationFeatureTimewindowFilterOutput) } type ConfigurationStoreEncryption struct { // Specifies the client ID of the identity which will be used to access key vault. IdentityClientId *string `pulumi:"identityClientId"` // Specifies the URI of the key vault key used to encrypt data. KeyVaultKeyIdentifier *string `pulumi:"keyVaultKeyIdentifier"` } // ConfigurationStoreEncryptionInput is an input type that accepts ConfigurationStoreEncryptionArgs and ConfigurationStoreEncryptionOutput values. // You can construct a concrete instance of `ConfigurationStoreEncryptionInput` via: // // ConfigurationStoreEncryptionArgs{...} type ConfigurationStoreEncryptionInput interface { pulumi.Input ToConfigurationStoreEncryptionOutput() ConfigurationStoreEncryptionOutput ToConfigurationStoreEncryptionOutputWithContext(context.Context) ConfigurationStoreEncryptionOutput } type ConfigurationStoreEncryptionArgs struct { // Specifies the client ID of the identity which will be used to access key vault. IdentityClientId pulumi.StringPtrInput `pulumi:"identityClientId"` // Specifies the URI of the key vault key used to encrypt data. KeyVaultKeyIdentifier pulumi.StringPtrInput `pulumi:"keyVaultKeyIdentifier"` } func (ConfigurationStoreEncryptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationStoreEncryption)(nil)).Elem() } func (i ConfigurationStoreEncryptionArgs) ToConfigurationStoreEncryptionOutput() ConfigurationStoreEncryptionOutput { return i.ToConfigurationStoreEncryptionOutputWithContext(context.Background()) } func (i ConfigurationStoreEncryptionArgs) ToConfigurationStoreEncryptionOutputWithContext(ctx context.Context) ConfigurationStoreEncryptionOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreEncryptionOutput) } func (i ConfigurationStoreEncryptionArgs) ToConfigurationStoreEncryptionPtrOutput() ConfigurationStoreEncryptionPtrOutput { return i.ToConfigurationStoreEncryptionPtrOutputWithContext(context.Background()) } func (i ConfigurationStoreEncryptionArgs) ToConfigurationStoreEncryptionPtrOutputWithContext(ctx context.Context) ConfigurationStoreEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreEncryptionOutput).ToConfigurationStoreEncryptionPtrOutputWithContext(ctx) } // ConfigurationStoreEncryptionPtrInput is an input type that accepts ConfigurationStoreEncryptionArgs, ConfigurationStoreEncryptionPtr and ConfigurationStoreEncryptionPtrOutput values. // You can construct a concrete instance of `ConfigurationStoreEncryptionPtrInput` via: // // ConfigurationStoreEncryptionArgs{...} // // or: // // nil type ConfigurationStoreEncryptionPtrInput interface { pulumi.Input ToConfigurationStoreEncryptionPtrOutput() ConfigurationStoreEncryptionPtrOutput ToConfigurationStoreEncryptionPtrOutputWithContext(context.Context) ConfigurationStoreEncryptionPtrOutput } type configurationStoreEncryptionPtrType ConfigurationStoreEncryptionArgs func ConfigurationStoreEncryptionPtr(v *ConfigurationStoreEncryptionArgs) ConfigurationStoreEncryptionPtrInput { return (*configurationStoreEncryptionPtrType)(v) } func (*configurationStoreEncryptionPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationStoreEncryption)(nil)).Elem() } func (i *configurationStoreEncryptionPtrType) ToConfigurationStoreEncryptionPtrOutput() ConfigurationStoreEncryptionPtrOutput { return i.ToConfigurationStoreEncryptionPtrOutputWithContext(context.Background()) } func (i *configurationStoreEncryptionPtrType) ToConfigurationStoreEncryptionPtrOutputWithContext(ctx context.Context) ConfigurationStoreEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreEncryptionPtrOutput) } type ConfigurationStoreEncryptionOutput struct{ *pulumi.OutputState } func (ConfigurationStoreEncryptionOutput) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationStoreEncryption)(nil)).Elem() } func (o ConfigurationStoreEncryptionOutput) ToConfigurationStoreEncryptionOutput() ConfigurationStoreEncryptionOutput { return o } func (o ConfigurationStoreEncryptionOutput) ToConfigurationStoreEncryptionOutputWithContext(ctx context.Context) ConfigurationStoreEncryptionOutput { return o } func (o ConfigurationStoreEncryptionOutput) ToConfigurationStoreEncryptionPtrOutput() ConfigurationStoreEncryptionPtrOutput { return o.ToConfigurationStoreEncryptionPtrOutputWithContext(context.Background()) } func (o ConfigurationStoreEncryptionOutput) ToConfigurationStoreEncryptionPtrOutputWithContext(ctx context.Context) ConfigurationStoreEncryptionPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ConfigurationStoreEncryption) *ConfigurationStoreEncryption { return &v }).(ConfigurationStoreEncryptionPtrOutput) } // Specifies the client ID of the identity which will be used to access key vault. func (o ConfigurationStoreEncryptionOutput) IdentityClientId() pulumi.StringPtrOutput { return o.ApplyT(func(v ConfigurationStoreEncryption) *string { return v.IdentityClientId }).(pulumi.StringPtrOutput) } // Specifies the URI of the key vault key used to encrypt data. func (o ConfigurationStoreEncryptionOutput) KeyVaultKeyIdentifier() pulumi.StringPtrOutput { return o.ApplyT(func(v ConfigurationStoreEncryption) *string { return v.KeyVaultKeyIdentifier }).(pulumi.StringPtrOutput) } type ConfigurationStoreEncryptionPtrOutput struct{ *pulumi.OutputState } func (ConfigurationStoreEncryptionPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationStoreEncryption)(nil)).Elem() } func (o ConfigurationStoreEncryptionPtrOutput) ToConfigurationStoreEncryptionPtrOutput() ConfigurationStoreEncryptionPtrOutput { return o } func (o ConfigurationStoreEncryptionPtrOutput) ToConfigurationStoreEncryptionPtrOutputWithContext(ctx context.Context) ConfigurationStoreEncryptionPtrOutput { return o } func (o ConfigurationStoreEncryptionPtrOutput) Elem() ConfigurationStoreEncryptionOutput { return o.ApplyT(func(v *ConfigurationStoreEncryption) ConfigurationStoreEncryption { if v != nil { return *v } var ret ConfigurationStoreEncryption return ret }).(ConfigurationStoreEncryptionOutput) } // Specifies the client ID of the identity which will be used to access key vault. func (o ConfigurationStoreEncryptionPtrOutput) IdentityClientId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationStoreEncryption) *string { if v == nil { return nil } return v.IdentityClientId }).(pulumi.StringPtrOutput) } // Specifies the URI of the key vault key used to encrypt data. func (o ConfigurationStoreEncryptionPtrOutput) KeyVaultKeyIdentifier() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationStoreEncryption) *string { if v == nil { return nil } return v.KeyVaultKeyIdentifier }).(pulumi.StringPtrOutput) } type ConfigurationStoreIdentity struct { // A list of User Assigned Managed Identity IDs to be assigned to this App Configuration. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds []string `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId *string `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this App Configuration. Possible values are `SystemAssigned`, `UserAssigned`, and `SystemAssigned, UserAssigned` (to enable both). Type string `pulumi:"type"` } // ConfigurationStoreIdentityInput is an input type that accepts ConfigurationStoreIdentityArgs and ConfigurationStoreIdentityOutput values. // You can construct a concrete instance of `ConfigurationStoreIdentityInput` via: // // ConfigurationStoreIdentityArgs{...} type ConfigurationStoreIdentityInput interface { pulumi.Input ToConfigurationStoreIdentityOutput() ConfigurationStoreIdentityOutput ToConfigurationStoreIdentityOutputWithContext(context.Context) ConfigurationStoreIdentityOutput } type ConfigurationStoreIdentityArgs struct { // A list of User Assigned Managed Identity IDs to be assigned to this App Configuration. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this App Configuration. Possible values are `SystemAssigned`, `UserAssigned`, and `SystemAssigned, UserAssigned` (to enable both). Type pulumi.StringInput `pulumi:"type"` } func (ConfigurationStoreIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationStoreIdentity)(nil)).Elem() } func (i ConfigurationStoreIdentityArgs) ToConfigurationStoreIdentityOutput() ConfigurationStoreIdentityOutput { return i.ToConfigurationStoreIdentityOutputWithContext(context.Background()) } func (i ConfigurationStoreIdentityArgs) ToConfigurationStoreIdentityOutputWithContext(ctx context.Context) ConfigurationStoreIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreIdentityOutput) } func (i ConfigurationStoreIdentityArgs) ToConfigurationStoreIdentityPtrOutput() ConfigurationStoreIdentityPtrOutput { return i.ToConfigurationStoreIdentityPtrOutputWithContext(context.Background()) } func (i ConfigurationStoreIdentityArgs) ToConfigurationStoreIdentityPtrOutputWithContext(ctx context.Context) ConfigurationStoreIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreIdentityOutput).ToConfigurationStoreIdentityPtrOutputWithContext(ctx) } // ConfigurationStoreIdentityPtrInput is an input type that accepts ConfigurationStoreIdentityArgs, ConfigurationStoreIdentityPtr and ConfigurationStoreIdentityPtrOutput values. // You can construct a concrete instance of `ConfigurationStoreIdentityPtrInput` via: // // ConfigurationStoreIdentityArgs{...} // // or: // // nil type ConfigurationStoreIdentityPtrInput interface { pulumi.Input ToConfigurationStoreIdentityPtrOutput() ConfigurationStoreIdentityPtrOutput ToConfigurationStoreIdentityPtrOutputWithContext(context.Context) ConfigurationStoreIdentityPtrOutput } type configurationStoreIdentityPtrType ConfigurationStoreIdentityArgs func ConfigurationStoreIdentityPtr(v *ConfigurationStoreIdentityArgs) ConfigurationStoreIdentityPtrInput { return (*configurationStoreIdentityPtrType)(v) } func (*configurationStoreIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationStoreIdentity)(nil)).Elem() } func (i *configurationStoreIdentityPtrType) ToConfigurationStoreIdentityPtrOutput() ConfigurationStoreIdentityPtrOutput { return i.ToConfigurationStoreIdentityPtrOutputWithContext(context.Background()) } func (i *configurationStoreIdentityPtrType) ToConfigurationStoreIdentityPtrOutputWithContext(ctx context.Context) ConfigurationStoreIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreIdentityPtrOutput) } type ConfigurationStoreIdentityOutput struct{ *pulumi.OutputState } func (ConfigurationStoreIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*ConfigurationStoreIdentity)(nil)).Elem() } func (o ConfigurationStoreIdentityOutput) ToConfigurationStoreIdentityOutput() ConfigurationStoreIdentityOutput { return o } func (o ConfigurationStoreIdentityOutput) ToConfigurationStoreIdentityOutputWithContext(ctx context.Context) ConfigurationStoreIdentityOutput { return o } func (o ConfigurationStoreIdentityOutput) ToConfigurationStoreIdentityPtrOutput() ConfigurationStoreIdentityPtrOutput { return o.ToConfigurationStoreIdentityPtrOutputWithContext(context.Background()) } func (o ConfigurationStoreIdentityOutput) ToConfigurationStoreIdentityPtrOutputWithContext(ctx context.Context) ConfigurationStoreIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ConfigurationStoreIdentity) *ConfigurationStoreIdentity { return &v }).(ConfigurationStoreIdentityPtrOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this App Configuration. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o ConfigurationStoreIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v ConfigurationStoreIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o ConfigurationStoreIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v ConfigurationStoreIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o ConfigurationStoreIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v ConfigurationStoreIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this App Configuration. Possible values are `SystemAssigned`, `UserAssigned`, and `SystemAssigned, UserAssigned` (to enable both). func (o ConfigurationStoreIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v ConfigurationStoreIdentity) string { return v.Type }).(pulumi.StringOutput) } type ConfigurationStoreIdentityPtrOutput struct{ *pulumi.OutputState } func (ConfigurationStoreIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationStoreIdentity)(nil)).Elem() } func (o ConfigurationStoreIdentityPtrOutput) ToConfigurationStoreIdentityPtrOutput() ConfigurationStoreIdentityPtrOutput { return o } func (o ConfigurationStoreIdentityPtrOutput) ToConfigurationStoreIdentityPtrOutputWithContext(ctx context.Context) ConfigurationStoreIdentityPtrOutput { return o } func (o ConfigurationStoreIdentityPtrOutput) Elem() ConfigurationStoreIdentityOutput { return o.ApplyT(func(v *ConfigurationStoreIdentity) ConfigurationStoreIdentity { if v != nil { return *v } var ret ConfigurationStoreIdentity return ret }).(ConfigurationStoreIdentityOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this App Configuration. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o ConfigurationStoreIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ConfigurationStoreIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o ConfigurationStoreIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationStoreIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o ConfigurationStoreIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationStoreIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) }
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/appconfiguration/configurationStore.go
sdk/go/azure/appconfiguration/configurationStore.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "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 = appconfiguration.NewConfigurationStore(ctx, "appconf", &appconfiguration.ConfigurationStoreArgs{ // Name: pulumi.String("appConf1"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Encryption) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "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/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 // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example-identity"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // 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("exampleKVt123"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // SoftDeleteRetentionDays: pulumi.Int(7), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // server, err := keyvault.NewAccessPolicy(ctx, "server", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: exampleUserAssignedIdentity.PrincipalId, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("UnwrapKey"), // pulumi.String("WrapKey"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // }) // if err != nil { // return err // } // client, err := keyvault.NewAccessPolicy(ctx, "client", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("List"), // pulumi.String("Restore"), // pulumi.String("Recover"), // pulumi.String("UnwrapKey"), // pulumi.String("WrapKey"), // pulumi.String("Purge"), // pulumi.String("Encrypt"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // pulumi.String("Verify"), // pulumi.String("GetRotationPolicy"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("exampleKVkey"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("decrypt"), // pulumi.String("encrypt"), // pulumi.String("sign"), // pulumi.String("unwrapKey"), // pulumi.String("verify"), // pulumi.String("wrapKey"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // client, // server, // })) // if err != nil { // return err // } // _, err = appconfiguration.NewConfigurationStore(ctx, "example", &appconfiguration.ConfigurationStoreArgs{ // Name: pulumi.String("appConf2"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("standard"), // LocalAuthEnabled: pulumi.Bool(true), // PublicNetworkAccess: pulumi.String("Enabled"), // PurgeProtectionEnabled: pulumi.Bool(false), // SoftDeleteRetentionDays: pulumi.Int(1), // Identity: &appconfiguration.ConfigurationStoreIdentityArgs{ // Type: pulumi.String("UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.ID(), // }, // }, // Encryption: &appconfiguration.ConfigurationStoreEncryptionArgs{ // KeyVaultKeyIdentifier: exampleKey.ID(), // IdentityClientId: exampleUserAssignedIdentity.ClientId, // }, // Replicas: appconfiguration.ConfigurationStoreReplicaArray{ // &appconfiguration.ConfigurationStoreReplicaArgs{ // Name: pulumi.String("replica1"), // Location: pulumi.String("West US"), // }, // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("development"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // client, // server, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.AppConfiguration` - 2024-05-01 // // ## Import // // App Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appconfiguration/configurationStore:ConfigurationStore appconf /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppConfiguration/configurationStores/appConf1 // ``` type ConfigurationStore struct { pulumi.CustomResourceState // The data plane proxy authentication mode. Possible values are `Local` and `Pass-through`. Defaults to `Local`. DataPlaneProxyAuthenticationMode pulumi.StringPtrOutput `pulumi:"dataPlaneProxyAuthenticationMode"` // Whether data plane proxy private link delegation is enabled. Defaults to `false`. // // > **Note:** `dataPlaneProxyPrivateLinkDelegationEnabled` cannot be set to `true` when `dataPlaneProxyAuthenticationMode` is set to `Local`. DataPlaneProxyPrivateLinkDelegationEnabled pulumi.BoolPtrOutput `pulumi:"dataPlaneProxyPrivateLinkDelegationEnabled"` // An `encryption` block as defined below. Encryption ConfigurationStoreEncryptionPtrOutput `pulumi:"encryption"` // The URL of the App Configuration Replica. Endpoint pulumi.StringOutput `pulumi:"endpoint"` // An `identity` block as defined below. Identity ConfigurationStoreIdentityPtrOutput `pulumi:"identity"` // Whether local authentication methods is enabled. Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the App Configuration. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A `primaryReadKey` block as defined below containing the primary read access key. PrimaryReadKeys ConfigurationStorePrimaryReadKeyArrayOutput `pulumi:"primaryReadKeys"` // A `primaryWriteKey` block as defined below containing the primary write access key. PrimaryWriteKeys ConfigurationStorePrimaryWriteKeyArrayOutput `pulumi:"primaryWriteKeys"` // The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. // // > **Note:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"` // Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. // // !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days). PurgeProtectionEnabled pulumi.BoolPtrOutput `pulumi:"purgeProtectionEnabled"` // One or more `replica` blocks as defined below. Replicas ConfigurationStoreReplicaArrayOutput `pulumi:"replicas"` // The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `secondaryReadKey` block as defined below containing the secondary read access key. SecondaryReadKeys ConfigurationStoreSecondaryReadKeyArrayOutput `pulumi:"secondaryReadKeys"` // A `secondaryWriteKey` block as defined below containing the secondary write access key. SecondaryWriteKeys ConfigurationStoreSecondaryWriteKeyArrayOutput `pulumi:"secondaryWriteKeys"` // The SKU name of the App Configuration. Possible values are `free`, `developer`, `standard` and `premium`. Defaults to `free`. // // > **Note:** Azure does not support downgrading `sku` to a lower tier, except from `premium` to `standard`. Downgrading will force a new resource to be created. Sku pulumi.StringPtrOutput `pulumi:"sku"` // The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. // // > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. SoftDeleteRetentionDays pulumi.IntPtrOutput `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewConfigurationStore registers a new resource with the given unique name, arguments, and options. func NewConfigurationStore(ctx *pulumi.Context, name string, args *ConfigurationStoreArgs, opts ...pulumi.ResourceOption) (*ConfigurationStore, 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 ConfigurationStore err := ctx.RegisterResource("azure:appconfiguration/configurationStore:ConfigurationStore", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetConfigurationStore gets an existing ConfigurationStore resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetConfigurationStore(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ConfigurationStoreState, opts ...pulumi.ResourceOption) (*ConfigurationStore, error) { var resource ConfigurationStore err := ctx.ReadResource("azure:appconfiguration/configurationStore:ConfigurationStore", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ConfigurationStore resources. type configurationStoreState struct { // The data plane proxy authentication mode. Possible values are `Local` and `Pass-through`. Defaults to `Local`. DataPlaneProxyAuthenticationMode *string `pulumi:"dataPlaneProxyAuthenticationMode"` // Whether data plane proxy private link delegation is enabled. Defaults to `false`. // // > **Note:** `dataPlaneProxyPrivateLinkDelegationEnabled` cannot be set to `true` when `dataPlaneProxyAuthenticationMode` is set to `Local`. DataPlaneProxyPrivateLinkDelegationEnabled *bool `pulumi:"dataPlaneProxyPrivateLinkDelegationEnabled"` // An `encryption` block as defined below. Encryption *ConfigurationStoreEncryption `pulumi:"encryption"` // The URL of the App Configuration Replica. Endpoint *string `pulumi:"endpoint"` // An `identity` block as defined below. Identity *ConfigurationStoreIdentity `pulumi:"identity"` // Whether local authentication methods is enabled. Defaults to `true`. LocalAuthEnabled *bool `pulumi:"localAuthEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the App Configuration. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `primaryReadKey` block as defined below containing the primary read access key. PrimaryReadKeys []ConfigurationStorePrimaryReadKey `pulumi:"primaryReadKeys"` // A `primaryWriteKey` block as defined below containing the primary write access key. PrimaryWriteKeys []ConfigurationStorePrimaryWriteKey `pulumi:"primaryWriteKeys"` // The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. // // > **Note:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. // // !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days). PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"` // One or more `replica` blocks as defined below. Replicas []ConfigurationStoreReplica `pulumi:"replicas"` // The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `secondaryReadKey` block as defined below containing the secondary read access key. SecondaryReadKeys []ConfigurationStoreSecondaryReadKey `pulumi:"secondaryReadKeys"` // A `secondaryWriteKey` block as defined below containing the secondary write access key. SecondaryWriteKeys []ConfigurationStoreSecondaryWriteKey `pulumi:"secondaryWriteKeys"` // The SKU name of the App Configuration. Possible values are `free`, `developer`, `standard` and `premium`. Defaults to `free`. // // > **Note:** Azure does not support downgrading `sku` to a lower tier, except from `premium` to `standard`. Downgrading will force a new resource to be created. Sku *string `pulumi:"sku"` // The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. // // > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type ConfigurationStoreState struct { // The data plane proxy authentication mode. Possible values are `Local` and `Pass-through`. Defaults to `Local`. DataPlaneProxyAuthenticationMode pulumi.StringPtrInput // Whether data plane proxy private link delegation is enabled. Defaults to `false`. // // > **Note:** `dataPlaneProxyPrivateLinkDelegationEnabled` cannot be set to `true` when `dataPlaneProxyAuthenticationMode` is set to `Local`. DataPlaneProxyPrivateLinkDelegationEnabled pulumi.BoolPtrInput // An `encryption` block as defined below. Encryption ConfigurationStoreEncryptionPtrInput // The URL of the App Configuration Replica. Endpoint pulumi.StringPtrInput // An `identity` block as defined below. Identity ConfigurationStoreIdentityPtrInput // Whether local authentication methods is enabled. Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the App Configuration. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `primaryReadKey` block as defined below containing the primary read access key. PrimaryReadKeys ConfigurationStorePrimaryReadKeyArrayInput // A `primaryWriteKey` block as defined below containing the primary write access key. PrimaryWriteKeys ConfigurationStorePrimaryWriteKeyArrayInput // The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. // // > **Note:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. PublicNetworkAccess pulumi.StringPtrInput // Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. // // !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days). PurgeProtectionEnabled pulumi.BoolPtrInput // One or more `replica` blocks as defined below. Replicas ConfigurationStoreReplicaArrayInput // The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `secondaryReadKey` block as defined below containing the secondary read access key. SecondaryReadKeys ConfigurationStoreSecondaryReadKeyArrayInput // A `secondaryWriteKey` block as defined below containing the secondary write access key. SecondaryWriteKeys ConfigurationStoreSecondaryWriteKeyArrayInput // The SKU name of the App Configuration. Possible values are `free`, `developer`, `standard` and `premium`. Defaults to `free`. // // > **Note:** Azure does not support downgrading `sku` to a lower tier, except from `premium` to `standard`. Downgrading will force a new resource to be created. Sku pulumi.StringPtrInput // The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. // // > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. SoftDeleteRetentionDays pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ConfigurationStoreState) ElementType() reflect.Type { return reflect.TypeOf((*configurationStoreState)(nil)).Elem() } type configurationStoreArgs struct { // The data plane proxy authentication mode. Possible values are `Local` and `Pass-through`. Defaults to `Local`. DataPlaneProxyAuthenticationMode *string `pulumi:"dataPlaneProxyAuthenticationMode"` // Whether data plane proxy private link delegation is enabled. Defaults to `false`. // // > **Note:** `dataPlaneProxyPrivateLinkDelegationEnabled` cannot be set to `true` when `dataPlaneProxyAuthenticationMode` is set to `Local`. DataPlaneProxyPrivateLinkDelegationEnabled *bool `pulumi:"dataPlaneProxyPrivateLinkDelegationEnabled"` // An `encryption` block as defined below. Encryption *ConfigurationStoreEncryption `pulumi:"encryption"` // An `identity` block as defined below. Identity *ConfigurationStoreIdentity `pulumi:"identity"` // Whether local authentication methods is enabled. Defaults to `true`. LocalAuthEnabled *bool `pulumi:"localAuthEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the App Configuration. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. // // > **Note:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. // // !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days). PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"` // One or more `replica` blocks as defined below. Replicas []ConfigurationStoreReplica `pulumi:"replicas"` // The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU name of the App Configuration. Possible values are `free`, `developer`, `standard` and `premium`. Defaults to `free`. // // > **Note:** Azure does not support downgrading `sku` to a lower tier, except from `premium` to `standard`. Downgrading will force a new resource to be created. Sku *string `pulumi:"sku"` // The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. // // > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ConfigurationStore resource. type ConfigurationStoreArgs struct { // The data plane proxy authentication mode. Possible values are `Local` and `Pass-through`. Defaults to `Local`. DataPlaneProxyAuthenticationMode pulumi.StringPtrInput // Whether data plane proxy private link delegation is enabled. Defaults to `false`. // // > **Note:** `dataPlaneProxyPrivateLinkDelegationEnabled` cannot be set to `true` when `dataPlaneProxyAuthenticationMode` is set to `Local`. DataPlaneProxyPrivateLinkDelegationEnabled pulumi.BoolPtrInput // An `encryption` block as defined below. Encryption ConfigurationStoreEncryptionPtrInput // An `identity` block as defined below. Identity ConfigurationStoreIdentityPtrInput // Whether local authentication methods is enabled. Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the App Configuration. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. // // > **Note:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. PublicNetworkAccess pulumi.StringPtrInput // Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. // // !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days). PurgeProtectionEnabled pulumi.BoolPtrInput // One or more `replica` blocks as defined below. Replicas ConfigurationStoreReplicaArrayInput // The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU name of the App Configuration. Possible values are `free`, `developer`, `standard` and `premium`. Defaults to `free`. // // > **Note:** Azure does not support downgrading `sku` to a lower tier, except from `premium` to `standard`. Downgrading will force a new resource to be created. Sku pulumi.StringPtrInput // The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. // // > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. SoftDeleteRetentionDays pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ConfigurationStoreArgs) ElementType() reflect.Type { return reflect.TypeOf((*configurationStoreArgs)(nil)).Elem() } type ConfigurationStoreInput interface { pulumi.Input ToConfigurationStoreOutput() ConfigurationStoreOutput ToConfigurationStoreOutputWithContext(ctx context.Context) ConfigurationStoreOutput } func (*ConfigurationStore) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationStore)(nil)).Elem() } func (i *ConfigurationStore) ToConfigurationStoreOutput() ConfigurationStoreOutput { return i.ToConfigurationStoreOutputWithContext(context.Background()) } func (i *ConfigurationStore) ToConfigurationStoreOutputWithContext(ctx context.Context) ConfigurationStoreOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreOutput) } // ConfigurationStoreArrayInput is an input type that accepts ConfigurationStoreArray and ConfigurationStoreArrayOutput values. // You can construct a concrete instance of `ConfigurationStoreArrayInput` via: // // ConfigurationStoreArray{ ConfigurationStoreArgs{...} } type ConfigurationStoreArrayInput interface { pulumi.Input ToConfigurationStoreArrayOutput() ConfigurationStoreArrayOutput ToConfigurationStoreArrayOutputWithContext(context.Context) ConfigurationStoreArrayOutput } type ConfigurationStoreArray []ConfigurationStoreInput func (ConfigurationStoreArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ConfigurationStore)(nil)).Elem() } func (i ConfigurationStoreArray) ToConfigurationStoreArrayOutput() ConfigurationStoreArrayOutput { return i.ToConfigurationStoreArrayOutputWithContext(context.Background()) } func (i ConfigurationStoreArray) ToConfigurationStoreArrayOutputWithContext(ctx context.Context) ConfigurationStoreArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreArrayOutput) } // ConfigurationStoreMapInput is an input type that accepts ConfigurationStoreMap and ConfigurationStoreMapOutput values. // You can construct a concrete instance of `ConfigurationStoreMapInput` via: // // ConfigurationStoreMap{ "key": ConfigurationStoreArgs{...} } type ConfigurationStoreMapInput interface { pulumi.Input ToConfigurationStoreMapOutput() ConfigurationStoreMapOutput ToConfigurationStoreMapOutputWithContext(context.Context) ConfigurationStoreMapOutput } type ConfigurationStoreMap map[string]ConfigurationStoreInput func (ConfigurationStoreMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ConfigurationStore)(nil)).Elem() } func (i ConfigurationStoreMap) ToConfigurationStoreMapOutput() ConfigurationStoreMapOutput { return i.ToConfigurationStoreMapOutputWithContext(context.Background()) } func (i ConfigurationStoreMap) ToConfigurationStoreMapOutputWithContext(ctx context.Context) ConfigurationStoreMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreMapOutput) } type ConfigurationStoreOutput struct{ *pulumi.OutputState } func (ConfigurationStoreOutput) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationStore)(nil)).Elem() } func (o ConfigurationStoreOutput) ToConfigurationStoreOutput() ConfigurationStoreOutput { return o } func (o ConfigurationStoreOutput) ToConfigurationStoreOutputWithContext(ctx context.Context) ConfigurationStoreOutput { return o } // The data plane proxy authentication mode. Possible values are `Local` and `Pass-through`. Defaults to `Local`. func (o ConfigurationStoreOutput) DataPlaneProxyAuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationStore) pulumi.StringPtrOutput { return v.DataPlaneProxyAuthenticationMode }).(pulumi.StringPtrOutput) } // Whether data plane proxy private link delegation is enabled. Defaults to `false`. // // > **Note:** `dataPlaneProxyPrivateLinkDelegationEnabled` cannot be set to `true` when `dataPlaneProxyAuthenticationMode` is set to `Local`. func (o ConfigurationStoreOutput) DataPlaneProxyPrivateLinkDelegationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ConfigurationStore) pulumi.BoolPtrOutput { return v.DataPlaneProxyPrivateLinkDelegationEnabled }).(pulumi.BoolPtrOutput) } // An `encryption` block as defined below. func (o ConfigurationStoreOutput) Encryption() ConfigurationStoreEncryptionPtrOutput { return o.ApplyT(func(v *ConfigurationStore) ConfigurationStoreEncryptionPtrOutput { return v.Encryption }).(ConfigurationStoreEncryptionPtrOutput) } // The URL of the App Configuration Replica. func (o ConfigurationStoreOutput) Endpoint() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationStore) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o ConfigurationStoreOutput) Identity() ConfigurationStoreIdentityPtrOutput { return o.ApplyT(func(v *ConfigurationStore) ConfigurationStoreIdentityPtrOutput { return v.Identity }).(ConfigurationStoreIdentityPtrOutput) } // Whether local authentication methods is enabled. Defaults to `true`. func (o ConfigurationStoreOutput) LocalAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ConfigurationStore) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ConfigurationStoreOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationStore) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the App Configuration. Changing this forces a new resource to be created. func (o ConfigurationStoreOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationStore) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `primaryReadKey` block as defined below containing the primary read access key. func (o ConfigurationStoreOutput) PrimaryReadKeys() ConfigurationStorePrimaryReadKeyArrayOutput { return o.ApplyT(func(v *ConfigurationStore) ConfigurationStorePrimaryReadKeyArrayOutput { return v.PrimaryReadKeys }).(ConfigurationStorePrimaryReadKeyArrayOutput) } // A `primaryWriteKey` block as defined below containing the primary write access key. func (o ConfigurationStoreOutput) PrimaryWriteKeys() ConfigurationStorePrimaryWriteKeyArrayOutput { return o.ApplyT(func(v *ConfigurationStore) ConfigurationStorePrimaryWriteKeyArrayOutput { return v.PrimaryWriteKeys }).(ConfigurationStorePrimaryWriteKeyArrayOutput) } // The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. //
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/appconfiguration/configurationFeature.go
sdk/go/azure/appconfiguration/configurationFeature.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure App Configuration Feature. // // > **Note:** App Configuration Features are provisioned using a Data Plane API which requires the role `App Configuration Data Owner` on either the App Configuration or a parent scope (such as the Resource Group/Subscription). [More information can be found in the Azure Documentation for App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/concept-enable-rbac#azure-built-in-roles-for-azure-app-configuration). This is similar to providing App Configuration Keys. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // appconf, err := appconfiguration.NewConfigurationStore(ctx, "appconf", &appconfiguration.ConfigurationStoreArgs{ // Name: pulumi.String("appConf1"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "appconf_dataowner", &authorization.AssignmentArgs{ // Scope: appconf.ID(), // RoleDefinitionName: pulumi.String("App Configuration Data Owner"), // PrincipalId: pulumi.String(current.ObjectId), // }) // if err != nil { // return err // } // _, err = appconfiguration.NewConfigurationFeature(ctx, "test", &appconfiguration.ConfigurationFeatureArgs{ // ConfigurationStoreId: appconf.ID(), // Description: pulumi.String("test description"), // Name: pulumi.String("test-ackey"), // Label: pulumi.String("test-ackeylabel"), // Enabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // App Configuration Features can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appconfiguration/configurationFeature:ConfigurationFeature test https://appconfname1.azconfig.io/kv/.appconfig.featureflag%2FkeyName?label=labelName // ``` // // If you wish to import with an empty label then simply leave the label's name blank: // // ```sh // $ pulumi import azure:appconfiguration/configurationFeature:ConfigurationFeature test https://appconfname1.azconfig.io/kv/.appconfig.featureflag%2FkeyName?label= // ``` type ConfigurationFeature struct { pulumi.CustomResourceState // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId pulumi.StringOutput `pulumi:"configurationStoreId"` // The description of the App Configuration Feature. Description pulumi.StringPtrOutput `pulumi:"description"` // The status of the App Configuration Feature. By default, this is set to false. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` Etag pulumi.StringOutput `pulumi:"etag"` // The key of the App Configuration Feature. The value for `name` will be used if this is unspecified. Changing this forces a new resource to be created. Key pulumi.StringOutput `pulumi:"key"` // The label of the App Configuration Feature. Changing this forces a new resource to be created. Label pulumi.StringPtrOutput `pulumi:"label"` // Should this App Configuration Feature be Locked to prevent changes? Locked pulumi.BoolPtrOutput `pulumi:"locked"` // The name of the App Configuration Feature. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A number representing the value of the percentage required to enable this feature. PercentageFilterValue pulumi.Float64PtrOutput `pulumi:"percentageFilterValue"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // A `targetingFilter` block as defined below. TargetingFilters ConfigurationFeatureTargetingFilterArrayOutput `pulumi:"targetingFilters"` // A `timewindowFilter` block as defined below. TimewindowFilters ConfigurationFeatureTimewindowFilterArrayOutput `pulumi:"timewindowFilters"` } // NewConfigurationFeature registers a new resource with the given unique name, arguments, and options. func NewConfigurationFeature(ctx *pulumi.Context, name string, args *ConfigurationFeatureArgs, opts ...pulumi.ResourceOption) (*ConfigurationFeature, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ConfigurationStoreId == nil { return nil, errors.New("invalid value for required argument 'ConfigurationStoreId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ConfigurationFeature err := ctx.RegisterResource("azure:appconfiguration/configurationFeature:ConfigurationFeature", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetConfigurationFeature gets an existing ConfigurationFeature resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetConfigurationFeature(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ConfigurationFeatureState, opts ...pulumi.ResourceOption) (*ConfigurationFeature, error) { var resource ConfigurationFeature err := ctx.ReadResource("azure:appconfiguration/configurationFeature:ConfigurationFeature", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ConfigurationFeature resources. type configurationFeatureState struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId *string `pulumi:"configurationStoreId"` // The description of the App Configuration Feature. Description *string `pulumi:"description"` // The status of the App Configuration Feature. By default, this is set to false. Enabled *bool `pulumi:"enabled"` Etag *string `pulumi:"etag"` // The key of the App Configuration Feature. The value for `name` will be used if this is unspecified. Changing this forces a new resource to be created. Key *string `pulumi:"key"` // The label of the App Configuration Feature. Changing this forces a new resource to be created. Label *string `pulumi:"label"` // Should this App Configuration Feature be Locked to prevent changes? Locked *bool `pulumi:"locked"` // The name of the App Configuration Feature. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A number representing the value of the percentage required to enable this feature. PercentageFilterValue *float64 `pulumi:"percentageFilterValue"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A `targetingFilter` block as defined below. TargetingFilters []ConfigurationFeatureTargetingFilter `pulumi:"targetingFilters"` // A `timewindowFilter` block as defined below. TimewindowFilters []ConfigurationFeatureTimewindowFilter `pulumi:"timewindowFilters"` } type ConfigurationFeatureState struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId pulumi.StringPtrInput // The description of the App Configuration Feature. Description pulumi.StringPtrInput // The status of the App Configuration Feature. By default, this is set to false. Enabled pulumi.BoolPtrInput Etag pulumi.StringPtrInput // The key of the App Configuration Feature. The value for `name` will be used if this is unspecified. Changing this forces a new resource to be created. Key pulumi.StringPtrInput // The label of the App Configuration Feature. Changing this forces a new resource to be created. Label pulumi.StringPtrInput // Should this App Configuration Feature be Locked to prevent changes? Locked pulumi.BoolPtrInput // The name of the App Configuration Feature. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A number representing the value of the percentage required to enable this feature. PercentageFilterValue pulumi.Float64PtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A `targetingFilter` block as defined below. TargetingFilters ConfigurationFeatureTargetingFilterArrayInput // A `timewindowFilter` block as defined below. TimewindowFilters ConfigurationFeatureTimewindowFilterArrayInput } func (ConfigurationFeatureState) ElementType() reflect.Type { return reflect.TypeOf((*configurationFeatureState)(nil)).Elem() } type configurationFeatureArgs struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId string `pulumi:"configurationStoreId"` // The description of the App Configuration Feature. Description *string `pulumi:"description"` // The status of the App Configuration Feature. By default, this is set to false. Enabled *bool `pulumi:"enabled"` Etag *string `pulumi:"etag"` // The key of the App Configuration Feature. The value for `name` will be used if this is unspecified. Changing this forces a new resource to be created. Key *string `pulumi:"key"` // The label of the App Configuration Feature. Changing this forces a new resource to be created. Label *string `pulumi:"label"` // Should this App Configuration Feature be Locked to prevent changes? Locked *bool `pulumi:"locked"` // The name of the App Configuration Feature. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A number representing the value of the percentage required to enable this feature. PercentageFilterValue *float64 `pulumi:"percentageFilterValue"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A `targetingFilter` block as defined below. TargetingFilters []ConfigurationFeatureTargetingFilter `pulumi:"targetingFilters"` // A `timewindowFilter` block as defined below. TimewindowFilters []ConfigurationFeatureTimewindowFilter `pulumi:"timewindowFilters"` } // The set of arguments for constructing a ConfigurationFeature resource. type ConfigurationFeatureArgs struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId pulumi.StringInput // The description of the App Configuration Feature. Description pulumi.StringPtrInput // The status of the App Configuration Feature. By default, this is set to false. Enabled pulumi.BoolPtrInput Etag pulumi.StringPtrInput // The key of the App Configuration Feature. The value for `name` will be used if this is unspecified. Changing this forces a new resource to be created. Key pulumi.StringPtrInput // The label of the App Configuration Feature. Changing this forces a new resource to be created. Label pulumi.StringPtrInput // Should this App Configuration Feature be Locked to prevent changes? Locked pulumi.BoolPtrInput // The name of the App Configuration Feature. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A number representing the value of the percentage required to enable this feature. PercentageFilterValue pulumi.Float64PtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A `targetingFilter` block as defined below. TargetingFilters ConfigurationFeatureTargetingFilterArrayInput // A `timewindowFilter` block as defined below. TimewindowFilters ConfigurationFeatureTimewindowFilterArrayInput } func (ConfigurationFeatureArgs) ElementType() reflect.Type { return reflect.TypeOf((*configurationFeatureArgs)(nil)).Elem() } type ConfigurationFeatureInput interface { pulumi.Input ToConfigurationFeatureOutput() ConfigurationFeatureOutput ToConfigurationFeatureOutputWithContext(ctx context.Context) ConfigurationFeatureOutput } func (*ConfigurationFeature) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationFeature)(nil)).Elem() } func (i *ConfigurationFeature) ToConfigurationFeatureOutput() ConfigurationFeatureOutput { return i.ToConfigurationFeatureOutputWithContext(context.Background()) } func (i *ConfigurationFeature) ToConfigurationFeatureOutputWithContext(ctx context.Context) ConfigurationFeatureOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureOutput) } // ConfigurationFeatureArrayInput is an input type that accepts ConfigurationFeatureArray and ConfigurationFeatureArrayOutput values. // You can construct a concrete instance of `ConfigurationFeatureArrayInput` via: // // ConfigurationFeatureArray{ ConfigurationFeatureArgs{...} } type ConfigurationFeatureArrayInput interface { pulumi.Input ToConfigurationFeatureArrayOutput() ConfigurationFeatureArrayOutput ToConfigurationFeatureArrayOutputWithContext(context.Context) ConfigurationFeatureArrayOutput } type ConfigurationFeatureArray []ConfigurationFeatureInput func (ConfigurationFeatureArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ConfigurationFeature)(nil)).Elem() } func (i ConfigurationFeatureArray) ToConfigurationFeatureArrayOutput() ConfigurationFeatureArrayOutput { return i.ToConfigurationFeatureArrayOutputWithContext(context.Background()) } func (i ConfigurationFeatureArray) ToConfigurationFeatureArrayOutputWithContext(ctx context.Context) ConfigurationFeatureArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureArrayOutput) } // ConfigurationFeatureMapInput is an input type that accepts ConfigurationFeatureMap and ConfigurationFeatureMapOutput values. // You can construct a concrete instance of `ConfigurationFeatureMapInput` via: // // ConfigurationFeatureMap{ "key": ConfigurationFeatureArgs{...} } type ConfigurationFeatureMapInput interface { pulumi.Input ToConfigurationFeatureMapOutput() ConfigurationFeatureMapOutput ToConfigurationFeatureMapOutputWithContext(context.Context) ConfigurationFeatureMapOutput } type ConfigurationFeatureMap map[string]ConfigurationFeatureInput func (ConfigurationFeatureMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ConfigurationFeature)(nil)).Elem() } func (i ConfigurationFeatureMap) ToConfigurationFeatureMapOutput() ConfigurationFeatureMapOutput { return i.ToConfigurationFeatureMapOutputWithContext(context.Background()) } func (i ConfigurationFeatureMap) ToConfigurationFeatureMapOutputWithContext(ctx context.Context) ConfigurationFeatureMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationFeatureMapOutput) } type ConfigurationFeatureOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureOutput) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationFeature)(nil)).Elem() } func (o ConfigurationFeatureOutput) ToConfigurationFeatureOutput() ConfigurationFeatureOutput { return o } func (o ConfigurationFeatureOutput) ToConfigurationFeatureOutputWithContext(ctx context.Context) ConfigurationFeatureOutput { return o } // Specifies the id of the App Configuration. Changing this forces a new resource to be created. func (o ConfigurationFeatureOutput) ConfigurationStoreId() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.StringOutput { return v.ConfigurationStoreId }).(pulumi.StringOutput) } // The description of the App Configuration Feature. func (o ConfigurationFeatureOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The status of the App Configuration Feature. By default, this is set to false. func (o ConfigurationFeatureOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } func (o ConfigurationFeatureOutput) Etag() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) } // The key of the App Configuration Feature. The value for `name` will be used if this is unspecified. Changing this forces a new resource to be created. func (o ConfigurationFeatureOutput) Key() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.StringOutput { return v.Key }).(pulumi.StringOutput) } // The label of the App Configuration Feature. Changing this forces a new resource to be created. func (o ConfigurationFeatureOutput) Label() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.StringPtrOutput { return v.Label }).(pulumi.StringPtrOutput) } // Should this App Configuration Feature be Locked to prevent changes? func (o ConfigurationFeatureOutput) Locked() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.BoolPtrOutput { return v.Locked }).(pulumi.BoolPtrOutput) } // The name of the App Configuration Feature. Changing this forces a new resource to be created. func (o ConfigurationFeatureOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A number representing the value of the percentage required to enable this feature. func (o ConfigurationFeatureOutput) PercentageFilterValue() pulumi.Float64PtrOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.Float64PtrOutput { return v.PercentageFilterValue }).(pulumi.Float64PtrOutput) } // A mapping of tags to assign to the resource. func (o ConfigurationFeatureOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ConfigurationFeature) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A `targetingFilter` block as defined below. func (o ConfigurationFeatureOutput) TargetingFilters() ConfigurationFeatureTargetingFilterArrayOutput { return o.ApplyT(func(v *ConfigurationFeature) ConfigurationFeatureTargetingFilterArrayOutput { return v.TargetingFilters }).(ConfigurationFeatureTargetingFilterArrayOutput) } // A `timewindowFilter` block as defined below. func (o ConfigurationFeatureOutput) TimewindowFilters() ConfigurationFeatureTimewindowFilterArrayOutput { return o.ApplyT(func(v *ConfigurationFeature) ConfigurationFeatureTimewindowFilterArrayOutput { return v.TimewindowFilters }).(ConfigurationFeatureTimewindowFilterArrayOutput) } type ConfigurationFeatureArrayOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ConfigurationFeature)(nil)).Elem() } func (o ConfigurationFeatureArrayOutput) ToConfigurationFeatureArrayOutput() ConfigurationFeatureArrayOutput { return o } func (o ConfigurationFeatureArrayOutput) ToConfigurationFeatureArrayOutputWithContext(ctx context.Context) ConfigurationFeatureArrayOutput { return o } func (o ConfigurationFeatureArrayOutput) Index(i pulumi.IntInput) ConfigurationFeatureOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigurationFeature { return vs[0].([]*ConfigurationFeature)[vs[1].(int)] }).(ConfigurationFeatureOutput) } type ConfigurationFeatureMapOutput struct{ *pulumi.OutputState } func (ConfigurationFeatureMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ConfigurationFeature)(nil)).Elem() } func (o ConfigurationFeatureMapOutput) ToConfigurationFeatureMapOutput() ConfigurationFeatureMapOutput { return o } func (o ConfigurationFeatureMapOutput) ToConfigurationFeatureMapOutputWithContext(ctx context.Context) ConfigurationFeatureMapOutput { return o } func (o ConfigurationFeatureMapOutput) MapIndex(k pulumi.StringInput) ConfigurationFeatureOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigurationFeature { return vs[0].(map[string]*ConfigurationFeature)[vs[1].(string)] }).(ConfigurationFeatureOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationFeatureInput)(nil)).Elem(), &ConfigurationFeature{}) pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationFeatureArrayInput)(nil)).Elem(), ConfigurationFeatureArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationFeatureMapInput)(nil)).Elem(), ConfigurationFeatureMap{}) pulumi.RegisterOutputType(ConfigurationFeatureOutput{}) pulumi.RegisterOutputType(ConfigurationFeatureArrayOutput{}) pulumi.RegisterOutputType(ConfigurationFeatureMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/licationLoadBalancerFrontend.go
sdk/go/azure/appconfiguration/licationLoadBalancerFrontend.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Gateway for Containers Frontend. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := appconfiguration.NewLicationLoadBalancer(ctx, "example", &appconfiguration.LicationLoadBalancerArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.String("example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = appconfiguration.NewLicationLoadBalancerFrontend(ctx, "example", &appconfiguration.LicationLoadBalancerFrontendArgs{ // Name: pulumi.String("example"), // ApplicationLoadBalancerId: example.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.ServiceNetworking` - 2025-01-01 // // ## Import // // Application Gateway for Containers Frontend can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appconfiguration/licationLoadBalancerFrontend:LicationLoadBalancerFrontend example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceNetworking/trafficControllers/alb1/frontends/frontend1 // ``` type LicationLoadBalancerFrontend struct { pulumi.CustomResourceState // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId pulumi.StringOutput `pulumi:"applicationLoadBalancerId"` // The Fully Qualified Domain Name of the DNS record associated to an Application Gateway for Containers Frontend. FullyQualifiedDomainName pulumi.StringOutput `pulumi:"fullyQualifiedDomainName"` // The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewLicationLoadBalancerFrontend registers a new resource with the given unique name, arguments, and options. func NewLicationLoadBalancerFrontend(ctx *pulumi.Context, name string, args *LicationLoadBalancerFrontendArgs, opts ...pulumi.ResourceOption) (*LicationLoadBalancerFrontend, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationLoadBalancerId == nil { return nil, errors.New("invalid value for required argument 'ApplicationLoadBalancerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource LicationLoadBalancerFrontend err := ctx.RegisterResource("azure:appconfiguration/licationLoadBalancerFrontend:LicationLoadBalancerFrontend", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLicationLoadBalancerFrontend gets an existing LicationLoadBalancerFrontend resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetLicationLoadBalancerFrontend(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LicationLoadBalancerFrontendState, opts ...pulumi.ResourceOption) (*LicationLoadBalancerFrontend, error) { var resource LicationLoadBalancerFrontend err := ctx.ReadResource("azure:appconfiguration/licationLoadBalancerFrontend:LicationLoadBalancerFrontend", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LicationLoadBalancerFrontend resources. type licationLoadBalancerFrontendState struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId *string `pulumi:"applicationLoadBalancerId"` // The Fully Qualified Domain Name of the DNS record associated to an Application Gateway for Containers Frontend. FullyQualifiedDomainName *string `pulumi:"fullyQualifiedDomainName"` // The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. Tags map[string]string `pulumi:"tags"` } type LicationLoadBalancerFrontendState struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId pulumi.StringPtrInput // The Fully Qualified Domain Name of the DNS record associated to an Application Gateway for Containers Frontend. FullyQualifiedDomainName pulumi.StringPtrInput // The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. Tags pulumi.StringMapInput } func (LicationLoadBalancerFrontendState) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerFrontendState)(nil)).Elem() } type licationLoadBalancerFrontendArgs struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId string `pulumi:"applicationLoadBalancerId"` // The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a LicationLoadBalancerFrontend resource. type LicationLoadBalancerFrontendArgs struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId pulumi.StringInput // The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. Tags pulumi.StringMapInput } func (LicationLoadBalancerFrontendArgs) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerFrontendArgs)(nil)).Elem() } type LicationLoadBalancerFrontendInput interface { pulumi.Input ToLicationLoadBalancerFrontendOutput() LicationLoadBalancerFrontendOutput ToLicationLoadBalancerFrontendOutputWithContext(ctx context.Context) LicationLoadBalancerFrontendOutput } func (*LicationLoadBalancerFrontend) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancerFrontend)(nil)).Elem() } func (i *LicationLoadBalancerFrontend) ToLicationLoadBalancerFrontendOutput() LicationLoadBalancerFrontendOutput { return i.ToLicationLoadBalancerFrontendOutputWithContext(context.Background()) } func (i *LicationLoadBalancerFrontend) ToLicationLoadBalancerFrontendOutputWithContext(ctx context.Context) LicationLoadBalancerFrontendOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerFrontendOutput) } // LicationLoadBalancerFrontendArrayInput is an input type that accepts LicationLoadBalancerFrontendArray and LicationLoadBalancerFrontendArrayOutput values. // You can construct a concrete instance of `LicationLoadBalancerFrontendArrayInput` via: // // LicationLoadBalancerFrontendArray{ LicationLoadBalancerFrontendArgs{...} } type LicationLoadBalancerFrontendArrayInput interface { pulumi.Input ToLicationLoadBalancerFrontendArrayOutput() LicationLoadBalancerFrontendArrayOutput ToLicationLoadBalancerFrontendArrayOutputWithContext(context.Context) LicationLoadBalancerFrontendArrayOutput } type LicationLoadBalancerFrontendArray []LicationLoadBalancerFrontendInput func (LicationLoadBalancerFrontendArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancerFrontend)(nil)).Elem() } func (i LicationLoadBalancerFrontendArray) ToLicationLoadBalancerFrontendArrayOutput() LicationLoadBalancerFrontendArrayOutput { return i.ToLicationLoadBalancerFrontendArrayOutputWithContext(context.Background()) } func (i LicationLoadBalancerFrontendArray) ToLicationLoadBalancerFrontendArrayOutputWithContext(ctx context.Context) LicationLoadBalancerFrontendArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerFrontendArrayOutput) } // LicationLoadBalancerFrontendMapInput is an input type that accepts LicationLoadBalancerFrontendMap and LicationLoadBalancerFrontendMapOutput values. // You can construct a concrete instance of `LicationLoadBalancerFrontendMapInput` via: // // LicationLoadBalancerFrontendMap{ "key": LicationLoadBalancerFrontendArgs{...} } type LicationLoadBalancerFrontendMapInput interface { pulumi.Input ToLicationLoadBalancerFrontendMapOutput() LicationLoadBalancerFrontendMapOutput ToLicationLoadBalancerFrontendMapOutputWithContext(context.Context) LicationLoadBalancerFrontendMapOutput } type LicationLoadBalancerFrontendMap map[string]LicationLoadBalancerFrontendInput func (LicationLoadBalancerFrontendMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancerFrontend)(nil)).Elem() } func (i LicationLoadBalancerFrontendMap) ToLicationLoadBalancerFrontendMapOutput() LicationLoadBalancerFrontendMapOutput { return i.ToLicationLoadBalancerFrontendMapOutputWithContext(context.Background()) } func (i LicationLoadBalancerFrontendMap) ToLicationLoadBalancerFrontendMapOutputWithContext(ctx context.Context) LicationLoadBalancerFrontendMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerFrontendMapOutput) } type LicationLoadBalancerFrontendOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerFrontendOutput) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancerFrontend)(nil)).Elem() } func (o LicationLoadBalancerFrontendOutput) ToLicationLoadBalancerFrontendOutput() LicationLoadBalancerFrontendOutput { return o } func (o LicationLoadBalancerFrontendOutput) ToLicationLoadBalancerFrontendOutputWithContext(ctx context.Context) LicationLoadBalancerFrontendOutput { return o } // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. func (o LicationLoadBalancerFrontendOutput) ApplicationLoadBalancerId() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerFrontend) pulumi.StringOutput { return v.ApplicationLoadBalancerId }).(pulumi.StringOutput) } // The Fully Qualified Domain Name of the DNS record associated to an Application Gateway for Containers Frontend. func (o LicationLoadBalancerFrontendOutput) FullyQualifiedDomainName() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerFrontend) pulumi.StringOutput { return v.FullyQualifiedDomainName }).(pulumi.StringOutput) } // The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. func (o LicationLoadBalancerFrontendOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerFrontend) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. func (o LicationLoadBalancerFrontendOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *LicationLoadBalancerFrontend) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type LicationLoadBalancerFrontendArrayOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerFrontendArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancerFrontend)(nil)).Elem() } func (o LicationLoadBalancerFrontendArrayOutput) ToLicationLoadBalancerFrontendArrayOutput() LicationLoadBalancerFrontendArrayOutput { return o } func (o LicationLoadBalancerFrontendArrayOutput) ToLicationLoadBalancerFrontendArrayOutputWithContext(ctx context.Context) LicationLoadBalancerFrontendArrayOutput { return o } func (o LicationLoadBalancerFrontendArrayOutput) Index(i pulumi.IntInput) LicationLoadBalancerFrontendOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LicationLoadBalancerFrontend { return vs[0].([]*LicationLoadBalancerFrontend)[vs[1].(int)] }).(LicationLoadBalancerFrontendOutput) } type LicationLoadBalancerFrontendMapOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerFrontendMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancerFrontend)(nil)).Elem() } func (o LicationLoadBalancerFrontendMapOutput) ToLicationLoadBalancerFrontendMapOutput() LicationLoadBalancerFrontendMapOutput { return o } func (o LicationLoadBalancerFrontendMapOutput) ToLicationLoadBalancerFrontendMapOutputWithContext(ctx context.Context) LicationLoadBalancerFrontendMapOutput { return o } func (o LicationLoadBalancerFrontendMapOutput) MapIndex(k pulumi.StringInput) LicationLoadBalancerFrontendOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LicationLoadBalancerFrontend { return vs[0].(map[string]*LicationLoadBalancerFrontend)[vs[1].(string)] }).(LicationLoadBalancerFrontendOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerFrontendInput)(nil)).Elem(), &LicationLoadBalancerFrontend{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerFrontendArrayInput)(nil)).Elem(), LicationLoadBalancerFrontendArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerFrontendMapInput)(nil)).Elem(), LicationLoadBalancerFrontendMap{}) pulumi.RegisterOutputType(LicationLoadBalancerFrontendOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerFrontendArrayOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerFrontendMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/getConfigurationKeys.go
sdk/go/azure/appconfiguration/getConfigurationKeys.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about existing Azure App Configuration Keys. // // > **Note:** App Configuration Keys are provisioned using a Data Plane API which requires the role `App Configuration Data Owner` on either the App Configuration or a parent scope (such as the Resource Group/Subscription). [More information can be found in the Azure Documentation for App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/concept-enable-rbac#azure-built-in-roles-for-azure-app-configuration). // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // test, err := appconfiguration.GetConfigurationKeys(ctx, &appconfiguration.GetConfigurationKeysArgs{ // ConfigurationStoreId: appconf.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("value", test.Items) // return nil // }) // } // // ``` func GetConfigurationKeys(ctx *pulumi.Context, args *GetConfigurationKeysArgs, opts ...pulumi.InvokeOption) (*GetConfigurationKeysResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetConfigurationKeysResult err := ctx.Invoke("azure:appconfiguration/getConfigurationKeys:getConfigurationKeys", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getConfigurationKeys. type GetConfigurationKeysArgs struct { // Specifies the id of the App Configuration. ConfigurationStoreId string `pulumi:"configurationStoreId"` // The name of the App Configuration Keys to look up. Key *string `pulumi:"key"` // The label of the App Configuration Keys tp look up. Label *string `pulumi:"label"` } // A collection of values returned by getConfigurationKeys. type GetConfigurationKeysResult struct { ConfigurationStoreId string `pulumi:"configurationStoreId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A list of `items` blocks as defined below. Items []GetConfigurationKeysItem `pulumi:"items"` // The name of the App Configuration Key. Key *string `pulumi:"key"` // The label of the App Configuration Key. Label *string `pulumi:"label"` } func GetConfigurationKeysOutput(ctx *pulumi.Context, args GetConfigurationKeysOutputArgs, opts ...pulumi.InvokeOption) GetConfigurationKeysResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetConfigurationKeysResultOutput, error) { args := v.(GetConfigurationKeysArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:appconfiguration/getConfigurationKeys:getConfigurationKeys", args, GetConfigurationKeysResultOutput{}, options).(GetConfigurationKeysResultOutput), nil }).(GetConfigurationKeysResultOutput) } // A collection of arguments for invoking getConfigurationKeys. type GetConfigurationKeysOutputArgs struct { // Specifies the id of the App Configuration. ConfigurationStoreId pulumi.StringInput `pulumi:"configurationStoreId"` // The name of the App Configuration Keys to look up. Key pulumi.StringPtrInput `pulumi:"key"` // The label of the App Configuration Keys tp look up. Label pulumi.StringPtrInput `pulumi:"label"` } func (GetConfigurationKeysOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetConfigurationKeysArgs)(nil)).Elem() } // A collection of values returned by getConfigurationKeys. type GetConfigurationKeysResultOutput struct{ *pulumi.OutputState } func (GetConfigurationKeysResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetConfigurationKeysResult)(nil)).Elem() } func (o GetConfigurationKeysResultOutput) ToGetConfigurationKeysResultOutput() GetConfigurationKeysResultOutput { return o } func (o GetConfigurationKeysResultOutput) ToGetConfigurationKeysResultOutputWithContext(ctx context.Context) GetConfigurationKeysResultOutput { return o } func (o GetConfigurationKeysResultOutput) ConfigurationStoreId() pulumi.StringOutput { return o.ApplyT(func(v GetConfigurationKeysResult) string { return v.ConfigurationStoreId }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetConfigurationKeysResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetConfigurationKeysResult) string { return v.Id }).(pulumi.StringOutput) } // A list of `items` blocks as defined below. func (o GetConfigurationKeysResultOutput) Items() GetConfigurationKeysItemArrayOutput { return o.ApplyT(func(v GetConfigurationKeysResult) []GetConfigurationKeysItem { return v.Items }).(GetConfigurationKeysItemArrayOutput) } // The name of the App Configuration Key. func (o GetConfigurationKeysResultOutput) Key() pulumi.StringPtrOutput { return o.ApplyT(func(v GetConfigurationKeysResult) *string { return v.Key }).(pulumi.StringPtrOutput) } // The label of the App Configuration Key. func (o GetConfigurationKeysResultOutput) Label() pulumi.StringPtrOutput { return o.ApplyT(func(v GetConfigurationKeysResult) *string { return v.Label }).(pulumi.StringPtrOutput) } func init() { pulumi.RegisterOutputType(GetConfigurationKeysResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/getConfigurationKey.go
sdk/go/azure/appconfiguration/getConfigurationKey.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Azure App Configuration Key. // // > **Note:** App Configuration Keys are provisioned using a Data Plane API which requires the role `App Configuration Data Owner` on either the App Configuration or a parent scope (such as the Resource Group/Subscription). [More information can be found in the Azure Documentation for App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/concept-enable-rbac#azure-built-in-roles-for-azure-app-configuration). // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // test, err := appconfiguration.LookupConfigurationKey(ctx, &appconfiguration.LookupConfigurationKeyArgs{ // ConfigurationStoreId: appconf.Id, // Key: "appConfKey1", // Label: pulumi.StringRef("somelabel"), // }, nil) // if err != nil { // return err // } // ctx.Export("value", test.Value) // return nil // }) // } // // ``` func LookupConfigurationKey(ctx *pulumi.Context, args *LookupConfigurationKeyArgs, opts ...pulumi.InvokeOption) (*LookupConfigurationKeyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupConfigurationKeyResult err := ctx.Invoke("azure:appconfiguration/getConfigurationKey:getConfigurationKey", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getConfigurationKey. type LookupConfigurationKeyArgs struct { // Specifies the id of the App Configuration. ConfigurationStoreId string `pulumi:"configurationStoreId"` // The name of the App Configuration Key. Key string `pulumi:"key"` // The label of the App Configuration Key. Label *string `pulumi:"label"` } // A collection of values returned by getConfigurationKey. type LookupConfigurationKeyResult struct { ConfigurationStoreId string `pulumi:"configurationStoreId"` // The content type of the App Configuration Key. ContentType string `pulumi:"contentType"` // The ETag of the key. Etag string `pulumi:"etag"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Key string `pulumi:"key"` Label *string `pulumi:"label"` // Is this App Configuration Key be Locked to prevent changes. Locked bool `pulumi:"locked"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). Type string `pulumi:"type"` // The value of the App Configuration Key. Value string `pulumi:"value"` // The ID of the vault secret this App Configuration Key refers to, when `type` is `vault`. VaultKeyReference string `pulumi:"vaultKeyReference"` } func LookupConfigurationKeyOutput(ctx *pulumi.Context, args LookupConfigurationKeyOutputArgs, opts ...pulumi.InvokeOption) LookupConfigurationKeyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupConfigurationKeyResultOutput, error) { args := v.(LookupConfigurationKeyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:appconfiguration/getConfigurationKey:getConfigurationKey", args, LookupConfigurationKeyResultOutput{}, options).(LookupConfigurationKeyResultOutput), nil }).(LookupConfigurationKeyResultOutput) } // A collection of arguments for invoking getConfigurationKey. type LookupConfigurationKeyOutputArgs struct { // Specifies the id of the App Configuration. ConfigurationStoreId pulumi.StringInput `pulumi:"configurationStoreId"` // The name of the App Configuration Key. Key pulumi.StringInput `pulumi:"key"` // The label of the App Configuration Key. Label pulumi.StringPtrInput `pulumi:"label"` } func (LookupConfigurationKeyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupConfigurationKeyArgs)(nil)).Elem() } // A collection of values returned by getConfigurationKey. type LookupConfigurationKeyResultOutput struct{ *pulumi.OutputState } func (LookupConfigurationKeyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupConfigurationKeyResult)(nil)).Elem() } func (o LookupConfigurationKeyResultOutput) ToLookupConfigurationKeyResultOutput() LookupConfigurationKeyResultOutput { return o } func (o LookupConfigurationKeyResultOutput) ToLookupConfigurationKeyResultOutputWithContext(ctx context.Context) LookupConfigurationKeyResultOutput { return o } func (o LookupConfigurationKeyResultOutput) ConfigurationStoreId() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.ConfigurationStoreId }).(pulumi.StringOutput) } // The content type of the App Configuration Key. func (o LookupConfigurationKeyResultOutput) ContentType() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.ContentType }).(pulumi.StringOutput) } // The ETag of the key. func (o LookupConfigurationKeyResultOutput) Etag() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.Etag }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupConfigurationKeyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupConfigurationKeyResultOutput) Key() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.Key }).(pulumi.StringOutput) } func (o LookupConfigurationKeyResultOutput) Label() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) *string { return v.Label }).(pulumi.StringPtrOutput) } // Is this App Configuration Key be Locked to prevent changes. func (o LookupConfigurationKeyResultOutput) Locked() pulumi.BoolOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) bool { return v.Locked }).(pulumi.BoolOutput) } // A mapping of tags assigned to the resource. func (o LookupConfigurationKeyResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). func (o LookupConfigurationKeyResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.Type }).(pulumi.StringOutput) } // The value of the App Configuration Key. func (o LookupConfigurationKeyResultOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.Value }).(pulumi.StringOutput) } // The ID of the vault secret this App Configuration Key refers to, when `type` is `vault`. func (o LookupConfigurationKeyResultOutput) VaultKeyReference() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationKeyResult) string { return v.VaultKeyReference }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupConfigurationKeyResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/licationLoadBalancerSecurityPolicy.go
sdk/go/azure/appconfiguration/licationLoadBalancerSecurityPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Load Balancer Security Policy. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/waf" // "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 // } // exampleLicationLoadBalancer, err := appconfiguration.NewLicationLoadBalancer(ctx, "example", &appconfiguration.LicationLoadBalancerArgs{ // Name: pulumi.String("example-alb"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // examplePolicy, err := waf.NewPolicy(ctx, "example", &waf.PolicyArgs{ // Name: pulumi.String("example-wafpolicy"), // ResourceGroupName: example.Name, // Location: example.Location, // ManagedRules: &waf.PolicyManagedRulesArgs{ // ManagedRuleSets: waf.PolicyManagedRulesManagedRuleSetArray{ // &waf.PolicyManagedRulesManagedRuleSetArgs{ // Type: pulumi.String("Microsoft_DefaultRuleSet"), // Version: pulumi.String("2.1"), // }, // }, // }, // PolicySettings: &waf.PolicyPolicySettingsArgs{ // Enabled: pulumi.Bool(true), // Mode: pulumi.String("Detection"), // }, // }) // if err != nil { // return err // } // _, err = appconfiguration.NewLicationLoadBalancerSecurityPolicy(ctx, "example", &appconfiguration.LicationLoadBalancerSecurityPolicyArgs{ // Name: pulumi.String("example-albsp"), // ApplicationLoadBalancerId: exampleLicationLoadBalancer.ID(), // Location: example.Location, // WebApplicationFirewallPolicyId: examplePolicy.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.ServiceNetworking` - 2025-01-01 // // ## Import // // Application Load Balancer Security Policy can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appconfiguration/licationLoadBalancerSecurityPolicy:LicationLoadBalancerSecurityPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/alb/securityPolicies/sp1 // ``` type LicationLoadBalancerSecurityPolicy struct { pulumi.CustomResourceState // The ID of the Application Load Balancer. Changing this forces a new Application Gateway for Containers Security Policy to be created. ApplicationLoadBalancerId pulumi.StringOutput `pulumi:"applicationLoadBalancerId"` // The Azure Region where the Application Load Balancer Security Policy should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Application Load Balancer Security Policy. Changing this forces a new Application Load Balancer Security Policy to be created. Name pulumi.StringOutput `pulumi:"name"` // A mapping of tags which should be assigned to the Application Load Balancer Security Policy. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Web Application Firewall Policy. Changing this forces a new Application Load Balancer Security Policy to be created. WebApplicationFirewallPolicyId pulumi.StringOutput `pulumi:"webApplicationFirewallPolicyId"` } // NewLicationLoadBalancerSecurityPolicy registers a new resource with the given unique name, arguments, and options. func NewLicationLoadBalancerSecurityPolicy(ctx *pulumi.Context, name string, args *LicationLoadBalancerSecurityPolicyArgs, opts ...pulumi.ResourceOption) (*LicationLoadBalancerSecurityPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationLoadBalancerId == nil { return nil, errors.New("invalid value for required argument 'ApplicationLoadBalancerId'") } if args.WebApplicationFirewallPolicyId == nil { return nil, errors.New("invalid value for required argument 'WebApplicationFirewallPolicyId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource LicationLoadBalancerSecurityPolicy err := ctx.RegisterResource("azure:appconfiguration/licationLoadBalancerSecurityPolicy:LicationLoadBalancerSecurityPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLicationLoadBalancerSecurityPolicy gets an existing LicationLoadBalancerSecurityPolicy resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetLicationLoadBalancerSecurityPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LicationLoadBalancerSecurityPolicyState, opts ...pulumi.ResourceOption) (*LicationLoadBalancerSecurityPolicy, error) { var resource LicationLoadBalancerSecurityPolicy err := ctx.ReadResource("azure:appconfiguration/licationLoadBalancerSecurityPolicy:LicationLoadBalancerSecurityPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LicationLoadBalancerSecurityPolicy resources. type licationLoadBalancerSecurityPolicyState struct { // The ID of the Application Load Balancer. Changing this forces a new Application Gateway for Containers Security Policy to be created. ApplicationLoadBalancerId *string `pulumi:"applicationLoadBalancerId"` // The Azure Region where the Application Load Balancer Security Policy should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Application Load Balancer Security Policy. Changing this forces a new Application Load Balancer Security Policy to be created. Name *string `pulumi:"name"` // A mapping of tags which should be assigned to the Application Load Balancer Security Policy. Tags map[string]string `pulumi:"tags"` // The ID of the Web Application Firewall Policy. Changing this forces a new Application Load Balancer Security Policy to be created. WebApplicationFirewallPolicyId *string `pulumi:"webApplicationFirewallPolicyId"` } type LicationLoadBalancerSecurityPolicyState struct { // The ID of the Application Load Balancer. Changing this forces a new Application Gateway for Containers Security Policy to be created. ApplicationLoadBalancerId pulumi.StringPtrInput // The Azure Region where the Application Load Balancer Security Policy should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Application Load Balancer Security Policy. Changing this forces a new Application Load Balancer Security Policy to be created. Name pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Load Balancer Security Policy. Tags pulumi.StringMapInput // The ID of the Web Application Firewall Policy. Changing this forces a new Application Load Balancer Security Policy to be created. WebApplicationFirewallPolicyId pulumi.StringPtrInput } func (LicationLoadBalancerSecurityPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerSecurityPolicyState)(nil)).Elem() } type licationLoadBalancerSecurityPolicyArgs struct { // The ID of the Application Load Balancer. Changing this forces a new Application Gateway for Containers Security Policy to be created. ApplicationLoadBalancerId string `pulumi:"applicationLoadBalancerId"` // The Azure Region where the Application Load Balancer Security Policy should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Application Load Balancer Security Policy. Changing this forces a new Application Load Balancer Security Policy to be created. Name *string `pulumi:"name"` // A mapping of tags which should be assigned to the Application Load Balancer Security Policy. Tags map[string]string `pulumi:"tags"` // The ID of the Web Application Firewall Policy. Changing this forces a new Application Load Balancer Security Policy to be created. WebApplicationFirewallPolicyId string `pulumi:"webApplicationFirewallPolicyId"` } // The set of arguments for constructing a LicationLoadBalancerSecurityPolicy resource. type LicationLoadBalancerSecurityPolicyArgs struct { // The ID of the Application Load Balancer. Changing this forces a new Application Gateway for Containers Security Policy to be created. ApplicationLoadBalancerId pulumi.StringInput // The Azure Region where the Application Load Balancer Security Policy should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Application Load Balancer Security Policy. Changing this forces a new Application Load Balancer Security Policy to be created. Name pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Load Balancer Security Policy. Tags pulumi.StringMapInput // The ID of the Web Application Firewall Policy. Changing this forces a new Application Load Balancer Security Policy to be created. WebApplicationFirewallPolicyId pulumi.StringInput } func (LicationLoadBalancerSecurityPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerSecurityPolicyArgs)(nil)).Elem() } type LicationLoadBalancerSecurityPolicyInput interface { pulumi.Input ToLicationLoadBalancerSecurityPolicyOutput() LicationLoadBalancerSecurityPolicyOutput ToLicationLoadBalancerSecurityPolicyOutputWithContext(ctx context.Context) LicationLoadBalancerSecurityPolicyOutput } func (*LicationLoadBalancerSecurityPolicy) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancerSecurityPolicy)(nil)).Elem() } func (i *LicationLoadBalancerSecurityPolicy) ToLicationLoadBalancerSecurityPolicyOutput() LicationLoadBalancerSecurityPolicyOutput { return i.ToLicationLoadBalancerSecurityPolicyOutputWithContext(context.Background()) } func (i *LicationLoadBalancerSecurityPolicy) ToLicationLoadBalancerSecurityPolicyOutputWithContext(ctx context.Context) LicationLoadBalancerSecurityPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerSecurityPolicyOutput) } // LicationLoadBalancerSecurityPolicyArrayInput is an input type that accepts LicationLoadBalancerSecurityPolicyArray and LicationLoadBalancerSecurityPolicyArrayOutput values. // You can construct a concrete instance of `LicationLoadBalancerSecurityPolicyArrayInput` via: // // LicationLoadBalancerSecurityPolicyArray{ LicationLoadBalancerSecurityPolicyArgs{...} } type LicationLoadBalancerSecurityPolicyArrayInput interface { pulumi.Input ToLicationLoadBalancerSecurityPolicyArrayOutput() LicationLoadBalancerSecurityPolicyArrayOutput ToLicationLoadBalancerSecurityPolicyArrayOutputWithContext(context.Context) LicationLoadBalancerSecurityPolicyArrayOutput } type LicationLoadBalancerSecurityPolicyArray []LicationLoadBalancerSecurityPolicyInput func (LicationLoadBalancerSecurityPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancerSecurityPolicy)(nil)).Elem() } func (i LicationLoadBalancerSecurityPolicyArray) ToLicationLoadBalancerSecurityPolicyArrayOutput() LicationLoadBalancerSecurityPolicyArrayOutput { return i.ToLicationLoadBalancerSecurityPolicyArrayOutputWithContext(context.Background()) } func (i LicationLoadBalancerSecurityPolicyArray) ToLicationLoadBalancerSecurityPolicyArrayOutputWithContext(ctx context.Context) LicationLoadBalancerSecurityPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerSecurityPolicyArrayOutput) } // LicationLoadBalancerSecurityPolicyMapInput is an input type that accepts LicationLoadBalancerSecurityPolicyMap and LicationLoadBalancerSecurityPolicyMapOutput values. // You can construct a concrete instance of `LicationLoadBalancerSecurityPolicyMapInput` via: // // LicationLoadBalancerSecurityPolicyMap{ "key": LicationLoadBalancerSecurityPolicyArgs{...} } type LicationLoadBalancerSecurityPolicyMapInput interface { pulumi.Input ToLicationLoadBalancerSecurityPolicyMapOutput() LicationLoadBalancerSecurityPolicyMapOutput ToLicationLoadBalancerSecurityPolicyMapOutputWithContext(context.Context) LicationLoadBalancerSecurityPolicyMapOutput } type LicationLoadBalancerSecurityPolicyMap map[string]LicationLoadBalancerSecurityPolicyInput func (LicationLoadBalancerSecurityPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancerSecurityPolicy)(nil)).Elem() } func (i LicationLoadBalancerSecurityPolicyMap) ToLicationLoadBalancerSecurityPolicyMapOutput() LicationLoadBalancerSecurityPolicyMapOutput { return i.ToLicationLoadBalancerSecurityPolicyMapOutputWithContext(context.Background()) } func (i LicationLoadBalancerSecurityPolicyMap) ToLicationLoadBalancerSecurityPolicyMapOutputWithContext(ctx context.Context) LicationLoadBalancerSecurityPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerSecurityPolicyMapOutput) } type LicationLoadBalancerSecurityPolicyOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerSecurityPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancerSecurityPolicy)(nil)).Elem() } func (o LicationLoadBalancerSecurityPolicyOutput) ToLicationLoadBalancerSecurityPolicyOutput() LicationLoadBalancerSecurityPolicyOutput { return o } func (o LicationLoadBalancerSecurityPolicyOutput) ToLicationLoadBalancerSecurityPolicyOutputWithContext(ctx context.Context) LicationLoadBalancerSecurityPolicyOutput { return o } // The ID of the Application Load Balancer. Changing this forces a new Application Gateway for Containers Security Policy to be created. func (o LicationLoadBalancerSecurityPolicyOutput) ApplicationLoadBalancerId() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerSecurityPolicy) pulumi.StringOutput { return v.ApplicationLoadBalancerId }).(pulumi.StringOutput) } // The Azure Region where the Application Load Balancer Security Policy should exist. Changing this forces a new resource to be created. func (o LicationLoadBalancerSecurityPolicyOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerSecurityPolicy) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Application Load Balancer Security Policy. Changing this forces a new Application Load Balancer Security Policy to be created. func (o LicationLoadBalancerSecurityPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerSecurityPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Application Load Balancer Security Policy. func (o LicationLoadBalancerSecurityPolicyOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *LicationLoadBalancerSecurityPolicy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Web Application Firewall Policy. Changing this forces a new Application Load Balancer Security Policy to be created. func (o LicationLoadBalancerSecurityPolicyOutput) WebApplicationFirewallPolicyId() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerSecurityPolicy) pulumi.StringOutput { return v.WebApplicationFirewallPolicyId }).(pulumi.StringOutput) } type LicationLoadBalancerSecurityPolicyArrayOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerSecurityPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancerSecurityPolicy)(nil)).Elem() } func (o LicationLoadBalancerSecurityPolicyArrayOutput) ToLicationLoadBalancerSecurityPolicyArrayOutput() LicationLoadBalancerSecurityPolicyArrayOutput { return o } func (o LicationLoadBalancerSecurityPolicyArrayOutput) ToLicationLoadBalancerSecurityPolicyArrayOutputWithContext(ctx context.Context) LicationLoadBalancerSecurityPolicyArrayOutput { return o } func (o LicationLoadBalancerSecurityPolicyArrayOutput) Index(i pulumi.IntInput) LicationLoadBalancerSecurityPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LicationLoadBalancerSecurityPolicy { return vs[0].([]*LicationLoadBalancerSecurityPolicy)[vs[1].(int)] }).(LicationLoadBalancerSecurityPolicyOutput) } type LicationLoadBalancerSecurityPolicyMapOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerSecurityPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancerSecurityPolicy)(nil)).Elem() } func (o LicationLoadBalancerSecurityPolicyMapOutput) ToLicationLoadBalancerSecurityPolicyMapOutput() LicationLoadBalancerSecurityPolicyMapOutput { return o } func (o LicationLoadBalancerSecurityPolicyMapOutput) ToLicationLoadBalancerSecurityPolicyMapOutputWithContext(ctx context.Context) LicationLoadBalancerSecurityPolicyMapOutput { return o } func (o LicationLoadBalancerSecurityPolicyMapOutput) MapIndex(k pulumi.StringInput) LicationLoadBalancerSecurityPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LicationLoadBalancerSecurityPolicy { return vs[0].(map[string]*LicationLoadBalancerSecurityPolicy)[vs[1].(string)] }).(LicationLoadBalancerSecurityPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerSecurityPolicyInput)(nil)).Elem(), &LicationLoadBalancerSecurityPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerSecurityPolicyArrayInput)(nil)).Elem(), LicationLoadBalancerSecurityPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerSecurityPolicyMapInput)(nil)).Elem(), LicationLoadBalancerSecurityPolicyMap{}) pulumi.RegisterOutputType(LicationLoadBalancerSecurityPolicyOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerSecurityPolicyArrayOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerSecurityPolicyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/getConfigurationStore.go
sdk/go/azure/appconfiguration/getConfigurationStore.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration 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 App Configuration. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := appconfiguration.LookupConfigurationStore(ctx, &appconfiguration.LookupConfigurationStoreArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.AppConfiguration` - 2024-05-01 func LookupConfigurationStore(ctx *pulumi.Context, args *LookupConfigurationStoreArgs, opts ...pulumi.InvokeOption) (*LookupConfigurationStoreResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupConfigurationStoreResult err := ctx.Invoke("azure:appconfiguration/getConfigurationStore:getConfigurationStore", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getConfigurationStore. type LookupConfigurationStoreArgs struct { // The Name of this App Configuration. Name string `pulumi:"name"` // The name of the Resource Group where the App Configuration exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getConfigurationStore. type LookupConfigurationStoreResult struct { // The data plane proxy authentication mode. DataPlaneProxyAuthenticationMode string `pulumi:"dataPlaneProxyAuthenticationMode"` // Whether data plane proxy private link delegation is enabled. DataPlaneProxyPrivateLinkDelegationEnabled bool `pulumi:"dataPlaneProxyPrivateLinkDelegationEnabled"` // An `encryption` block as defined below. Encryptions []GetConfigurationStoreEncryption `pulumi:"encryptions"` // The URL of the App Configuration Replica. Endpoint string `pulumi:"endpoint"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetConfigurationStoreIdentity `pulumi:"identities"` // Whether local authentication methods are enabled. LocalAuthEnabled bool `pulumi:"localAuthEnabled"` // The supported Azure location where the App Configuration Replica exists. Location string `pulumi:"location"` // The name of the App Configuration Replica. Name string `pulumi:"name"` // A `primaryReadKey` block as defined below containing the primary read access key. PrimaryReadKeys []GetConfigurationStorePrimaryReadKey `pulumi:"primaryReadKeys"` // A `primaryWriteKey` block as defined below containing the primary write access key. PrimaryWriteKeys []GetConfigurationStorePrimaryWriteKey `pulumi:"primaryWriteKeys"` // The Public Network Access setting of this App Configuration. PublicNetworkAccess string `pulumi:"publicNetworkAccess"` PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` // Whether Purge Protection is enabled. PurgeProtectionEnabled bool `pulumi:"purgeProtectionEnabled"` // One or more `replica` blocks as defined below. Replicas []GetConfigurationStoreReplica `pulumi:"replicas"` ResourceGroupName string `pulumi:"resourceGroupName"` // A `secondaryReadKey` block as defined below containing the secondary read access key. SecondaryReadKeys []GetConfigurationStoreSecondaryReadKey `pulumi:"secondaryReadKeys"` // A `secondaryWriteKey` block as defined below containing the secondary write access key. SecondaryWriteKeys []GetConfigurationStoreSecondaryWriteKey `pulumi:"secondaryWriteKeys"` // The name of the SKU used for this App Configuration. Sku string `pulumi:"sku"` // The number of days that items should be retained for once soft-deleted. SoftDeleteRetentionDays int `pulumi:"softDeleteRetentionDays"` // A mapping of tags assigned to the App Configuration. Tags map[string]string `pulumi:"tags"` } func LookupConfigurationStoreOutput(ctx *pulumi.Context, args LookupConfigurationStoreOutputArgs, opts ...pulumi.InvokeOption) LookupConfigurationStoreResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupConfigurationStoreResultOutput, error) { args := v.(LookupConfigurationStoreArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:appconfiguration/getConfigurationStore:getConfigurationStore", args, LookupConfigurationStoreResultOutput{}, options).(LookupConfigurationStoreResultOutput), nil }).(LookupConfigurationStoreResultOutput) } // A collection of arguments for invoking getConfigurationStore. type LookupConfigurationStoreOutputArgs struct { // The Name of this App Configuration. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the App Configuration exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupConfigurationStoreOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupConfigurationStoreArgs)(nil)).Elem() } // A collection of values returned by getConfigurationStore. type LookupConfigurationStoreResultOutput struct{ *pulumi.OutputState } func (LookupConfigurationStoreResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupConfigurationStoreResult)(nil)).Elem() } func (o LookupConfigurationStoreResultOutput) ToLookupConfigurationStoreResultOutput() LookupConfigurationStoreResultOutput { return o } func (o LookupConfigurationStoreResultOutput) ToLookupConfigurationStoreResultOutputWithContext(ctx context.Context) LookupConfigurationStoreResultOutput { return o } // The data plane proxy authentication mode. func (o LookupConfigurationStoreResultOutput) DataPlaneProxyAuthenticationMode() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.DataPlaneProxyAuthenticationMode }).(pulumi.StringOutput) } // Whether data plane proxy private link delegation is enabled. func (o LookupConfigurationStoreResultOutput) DataPlaneProxyPrivateLinkDelegationEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) bool { return v.DataPlaneProxyPrivateLinkDelegationEnabled }).(pulumi.BoolOutput) } // An `encryption` block as defined below. func (o LookupConfigurationStoreResultOutput) Encryptions() GetConfigurationStoreEncryptionArrayOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) []GetConfigurationStoreEncryption { return v.Encryptions }).(GetConfigurationStoreEncryptionArrayOutput) } // The URL of the App Configuration Replica. func (o LookupConfigurationStoreResultOutput) Endpoint() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.Endpoint }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupConfigurationStoreResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupConfigurationStoreResultOutput) Identities() GetConfigurationStoreIdentityArrayOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) []GetConfigurationStoreIdentity { return v.Identities }).(GetConfigurationStoreIdentityArrayOutput) } // Whether local authentication methods are enabled. func (o LookupConfigurationStoreResultOutput) LocalAuthEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) bool { return v.LocalAuthEnabled }).(pulumi.BoolOutput) } // The supported Azure location where the App Configuration Replica exists. func (o LookupConfigurationStoreResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the App Configuration Replica. func (o LookupConfigurationStoreResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.Name }).(pulumi.StringOutput) } // A `primaryReadKey` block as defined below containing the primary read access key. func (o LookupConfigurationStoreResultOutput) PrimaryReadKeys() GetConfigurationStorePrimaryReadKeyArrayOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) []GetConfigurationStorePrimaryReadKey { return v.PrimaryReadKeys }).(GetConfigurationStorePrimaryReadKeyArrayOutput) } // A `primaryWriteKey` block as defined below containing the primary write access key. func (o LookupConfigurationStoreResultOutput) PrimaryWriteKeys() GetConfigurationStorePrimaryWriteKeyArrayOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) []GetConfigurationStorePrimaryWriteKey { return v.PrimaryWriteKeys }).(GetConfigurationStorePrimaryWriteKeyArrayOutput) } // The Public Network Access setting of this App Configuration. func (o LookupConfigurationStoreResultOutput) PublicNetworkAccess() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.PublicNetworkAccess }).(pulumi.StringOutput) } func (o LookupConfigurationStoreResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } // Whether Purge Protection is enabled. func (o LookupConfigurationStoreResultOutput) PurgeProtectionEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) bool { return v.PurgeProtectionEnabled }).(pulumi.BoolOutput) } // One or more `replica` blocks as defined below. func (o LookupConfigurationStoreResultOutput) Replicas() GetConfigurationStoreReplicaArrayOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) []GetConfigurationStoreReplica { return v.Replicas }).(GetConfigurationStoreReplicaArrayOutput) } func (o LookupConfigurationStoreResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `secondaryReadKey` block as defined below containing the secondary read access key. func (o LookupConfigurationStoreResultOutput) SecondaryReadKeys() GetConfigurationStoreSecondaryReadKeyArrayOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) []GetConfigurationStoreSecondaryReadKey { return v.SecondaryReadKeys }).(GetConfigurationStoreSecondaryReadKeyArrayOutput) } // A `secondaryWriteKey` block as defined below containing the secondary write access key. func (o LookupConfigurationStoreResultOutput) SecondaryWriteKeys() GetConfigurationStoreSecondaryWriteKeyArrayOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) []GetConfigurationStoreSecondaryWriteKey { return v.SecondaryWriteKeys }).(GetConfigurationStoreSecondaryWriteKeyArrayOutput) } // The name of the SKU used for this App Configuration. func (o LookupConfigurationStoreResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) string { return v.Sku }).(pulumi.StringOutput) } // The number of days that items should be retained for once soft-deleted. func (o LookupConfigurationStoreResultOutput) SoftDeleteRetentionDays() pulumi.IntOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) int { return v.SoftDeleteRetentionDays }).(pulumi.IntOutput) } // A mapping of tags assigned to the App Configuration. func (o LookupConfigurationStoreResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupConfigurationStoreResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupConfigurationStoreResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/configurationKey.go
sdk/go/azure/appconfiguration/configurationKey.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure App Configuration Key. // // > **Note:** App Configuration Keys are provisioned using a Data Plane API which requires the role `App Configuration Data Owner` on either the App Configuration or a parent scope (such as the Resource Group/Subscription). [More information can be found in the Azure Documentation for App Configuration](https://docs.microsoft.com/azure/azure-app-configuration/concept-enable-rbac#azure-built-in-roles-for-azure-app-configuration). // // ## Example Usage // // ### `Kv` Type // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // appconf, err := appconfiguration.NewConfigurationStore(ctx, "appconf", &appconfiguration.ConfigurationStoreArgs{ // Name: pulumi.String("appConf1"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // appconfDataowner, err := authorization.NewAssignment(ctx, "appconf_dataowner", &authorization.AssignmentArgs{ // Scope: appconf.ID(), // RoleDefinitionName: pulumi.String("App Configuration Data Owner"), // PrincipalId: pulumi.String(current.ObjectId), // }) // if err != nil { // return err // } // _, err = appconfiguration.NewConfigurationKey(ctx, "test", &appconfiguration.ConfigurationKeyArgs{ // ConfigurationStoreId: appconf.ID(), // Key: pulumi.String("appConfKey1"), // Label: pulumi.String("somelabel"), // Value: pulumi.String("a test"), // }, pulumi.DependsOn([]pulumi.Resource{ // appconfDataowner, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### `Vault` Type // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "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/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 // } // appconf, err := appconfiguration.NewConfigurationStore(ctx, "appconf", &appconfiguration.ConfigurationStoreArgs{ // Name: pulumi.String("appConf1"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // kv, err := keyvault.NewKeyVault(ctx, "kv", &keyvault.KeyVaultArgs{ // Name: pulumi.String("kv"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.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"), // }, // }, // }, // }) // if err != nil { // return err // } // kvs, err := keyvault.NewSecret(ctx, "kvs", &keyvault.SecretArgs{ // Name: pulumi.String("kvs"), // Value: pulumi.String("szechuan"), // KeyVaultId: kv.ID(), // }) // if err != nil { // return err // } // appconfDataowner, err := authorization.NewAssignment(ctx, "appconf_dataowner", &authorization.AssignmentArgs{ // Scope: appconf.ID(), // RoleDefinitionName: pulumi.String("App Configuration Data Owner"), // PrincipalId: pulumi.String(current.ObjectId), // }) // if err != nil { // return err // } // _, err = appconfiguration.NewConfigurationKey(ctx, "test", &appconfiguration.ConfigurationKeyArgs{ // ConfigurationStoreId: pulumi.Any(testAzurermAppConfiguration.Id), // Key: pulumi.String("key1"), // Type: pulumi.String("vault"), // Label: pulumi.String("label1"), // VaultKeyReference: kvs.VersionlessId, // }, pulumi.DependsOn([]pulumi.Resource{ // appconfDataowner, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // App Configuration Keys can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appconfiguration/configurationKey:ConfigurationKey test https://appconfname1.azconfig.io/kv/keyName?label=labelName // ``` // // If you wish to import a key with an empty label then simply leave label's name blank: // // ```sh // $ pulumi import azure:appconfiguration/configurationKey:ConfigurationKey test https://appconfname1.azconfig.io/kv/keyName?label= // ``` type ConfigurationKey struct { pulumi.CustomResourceState // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId pulumi.StringOutput `pulumi:"configurationStoreId"` // The content type of the App Configuration Key. This should only be set when type is set to `kv`. ContentType pulumi.StringOutput `pulumi:"contentType"` // (Optional) The ETag of the key. Etag pulumi.StringOutput `pulumi:"etag"` // The name of the App Configuration Key to create. Changing this forces a new resource to be created. Key pulumi.StringOutput `pulumi:"key"` // The label of the App Configuration Key. Changing this forces a new resource to be created. Label pulumi.StringPtrOutput `pulumi:"label"` // Should this App Configuration Key be Locked to prevent changes? Locked pulumi.BoolPtrOutput `pulumi:"locked"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). Defaults to `kv`. Type pulumi.StringPtrOutput `pulumi:"type"` // The value of the App Configuration Key. This should only be set when type is set to `kv`. // // > **Note:** `value` and `vaultKeyReference` are mutually exclusive. Value pulumi.StringPtrOutput `pulumi:"value"` // The ID of the vault secret this App Configuration Key refers to. This should only be set when `type` is set to `vault`. // // > **Note:** `vaultKeyReference` and `value` are mutually exclusive. // // > **Note:** When setting the `vaultKeyReference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionlessId` VaultKeyReference pulumi.StringPtrOutput `pulumi:"vaultKeyReference"` } // NewConfigurationKey registers a new resource with the given unique name, arguments, and options. func NewConfigurationKey(ctx *pulumi.Context, name string, args *ConfigurationKeyArgs, opts ...pulumi.ResourceOption) (*ConfigurationKey, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ConfigurationStoreId == nil { return nil, errors.New("invalid value for required argument 'ConfigurationStoreId'") } if args.Key == nil { return nil, errors.New("invalid value for required argument 'Key'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ConfigurationKey err := ctx.RegisterResource("azure:appconfiguration/configurationKey:ConfigurationKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetConfigurationKey gets an existing ConfigurationKey resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetConfigurationKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ConfigurationKeyState, opts ...pulumi.ResourceOption) (*ConfigurationKey, error) { var resource ConfigurationKey err := ctx.ReadResource("azure:appconfiguration/configurationKey:ConfigurationKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ConfigurationKey resources. type configurationKeyState struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId *string `pulumi:"configurationStoreId"` // The content type of the App Configuration Key. This should only be set when type is set to `kv`. ContentType *string `pulumi:"contentType"` // (Optional) The ETag of the key. Etag *string `pulumi:"etag"` // The name of the App Configuration Key to create. Changing this forces a new resource to be created. Key *string `pulumi:"key"` // The label of the App Configuration Key. Changing this forces a new resource to be created. Label *string `pulumi:"label"` // Should this App Configuration Key be Locked to prevent changes? Locked *bool `pulumi:"locked"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). Defaults to `kv`. Type *string `pulumi:"type"` // The value of the App Configuration Key. This should only be set when type is set to `kv`. // // > **Note:** `value` and `vaultKeyReference` are mutually exclusive. Value *string `pulumi:"value"` // The ID of the vault secret this App Configuration Key refers to. This should only be set when `type` is set to `vault`. // // > **Note:** `vaultKeyReference` and `value` are mutually exclusive. // // > **Note:** When setting the `vaultKeyReference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionlessId` VaultKeyReference *string `pulumi:"vaultKeyReference"` } type ConfigurationKeyState struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId pulumi.StringPtrInput // The content type of the App Configuration Key. This should only be set when type is set to `kv`. ContentType pulumi.StringPtrInput // (Optional) The ETag of the key. Etag pulumi.StringPtrInput // The name of the App Configuration Key to create. Changing this forces a new resource to be created. Key pulumi.StringPtrInput // The label of the App Configuration Key. Changing this forces a new resource to be created. Label pulumi.StringPtrInput // Should this App Configuration Key be Locked to prevent changes? Locked pulumi.BoolPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). Defaults to `kv`. Type pulumi.StringPtrInput // The value of the App Configuration Key. This should only be set when type is set to `kv`. // // > **Note:** `value` and `vaultKeyReference` are mutually exclusive. Value pulumi.StringPtrInput // The ID of the vault secret this App Configuration Key refers to. This should only be set when `type` is set to `vault`. // // > **Note:** `vaultKeyReference` and `value` are mutually exclusive. // // > **Note:** When setting the `vaultKeyReference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionlessId` VaultKeyReference pulumi.StringPtrInput } func (ConfigurationKeyState) ElementType() reflect.Type { return reflect.TypeOf((*configurationKeyState)(nil)).Elem() } type configurationKeyArgs struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId string `pulumi:"configurationStoreId"` // The content type of the App Configuration Key. This should only be set when type is set to `kv`. ContentType *string `pulumi:"contentType"` // (Optional) The ETag of the key. Etag *string `pulumi:"etag"` // The name of the App Configuration Key to create. Changing this forces a new resource to be created. Key string `pulumi:"key"` // The label of the App Configuration Key. Changing this forces a new resource to be created. Label *string `pulumi:"label"` // Should this App Configuration Key be Locked to prevent changes? Locked *bool `pulumi:"locked"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). Defaults to `kv`. Type *string `pulumi:"type"` // The value of the App Configuration Key. This should only be set when type is set to `kv`. // // > **Note:** `value` and `vaultKeyReference` are mutually exclusive. Value *string `pulumi:"value"` // The ID of the vault secret this App Configuration Key refers to. This should only be set when `type` is set to `vault`. // // > **Note:** `vaultKeyReference` and `value` are mutually exclusive. // // > **Note:** When setting the `vaultKeyReference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionlessId` VaultKeyReference *string `pulumi:"vaultKeyReference"` } // The set of arguments for constructing a ConfigurationKey resource. type ConfigurationKeyArgs struct { // Specifies the id of the App Configuration. Changing this forces a new resource to be created. ConfigurationStoreId pulumi.StringInput // The content type of the App Configuration Key. This should only be set when type is set to `kv`. ContentType pulumi.StringPtrInput // (Optional) The ETag of the key. Etag pulumi.StringPtrInput // The name of the App Configuration Key to create. Changing this forces a new resource to be created. Key pulumi.StringInput // The label of the App Configuration Key. Changing this forces a new resource to be created. Label pulumi.StringPtrInput // Should this App Configuration Key be Locked to prevent changes? Locked pulumi.BoolPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). Defaults to `kv`. Type pulumi.StringPtrInput // The value of the App Configuration Key. This should only be set when type is set to `kv`. // // > **Note:** `value` and `vaultKeyReference` are mutually exclusive. Value pulumi.StringPtrInput // The ID of the vault secret this App Configuration Key refers to. This should only be set when `type` is set to `vault`. // // > **Note:** `vaultKeyReference` and `value` are mutually exclusive. // // > **Note:** When setting the `vaultKeyReference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionlessId` VaultKeyReference pulumi.StringPtrInput } func (ConfigurationKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*configurationKeyArgs)(nil)).Elem() } type ConfigurationKeyInput interface { pulumi.Input ToConfigurationKeyOutput() ConfigurationKeyOutput ToConfigurationKeyOutputWithContext(ctx context.Context) ConfigurationKeyOutput } func (*ConfigurationKey) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationKey)(nil)).Elem() } func (i *ConfigurationKey) ToConfigurationKeyOutput() ConfigurationKeyOutput { return i.ToConfigurationKeyOutputWithContext(context.Background()) } func (i *ConfigurationKey) ToConfigurationKeyOutputWithContext(ctx context.Context) ConfigurationKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationKeyOutput) } // ConfigurationKeyArrayInput is an input type that accepts ConfigurationKeyArray and ConfigurationKeyArrayOutput values. // You can construct a concrete instance of `ConfigurationKeyArrayInput` via: // // ConfigurationKeyArray{ ConfigurationKeyArgs{...} } type ConfigurationKeyArrayInput interface { pulumi.Input ToConfigurationKeyArrayOutput() ConfigurationKeyArrayOutput ToConfigurationKeyArrayOutputWithContext(context.Context) ConfigurationKeyArrayOutput } type ConfigurationKeyArray []ConfigurationKeyInput func (ConfigurationKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ConfigurationKey)(nil)).Elem() } func (i ConfigurationKeyArray) ToConfigurationKeyArrayOutput() ConfigurationKeyArrayOutput { return i.ToConfigurationKeyArrayOutputWithContext(context.Background()) } func (i ConfigurationKeyArray) ToConfigurationKeyArrayOutputWithContext(ctx context.Context) ConfigurationKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationKeyArrayOutput) } // ConfigurationKeyMapInput is an input type that accepts ConfigurationKeyMap and ConfigurationKeyMapOutput values. // You can construct a concrete instance of `ConfigurationKeyMapInput` via: // // ConfigurationKeyMap{ "key": ConfigurationKeyArgs{...} } type ConfigurationKeyMapInput interface { pulumi.Input ToConfigurationKeyMapOutput() ConfigurationKeyMapOutput ToConfigurationKeyMapOutputWithContext(context.Context) ConfigurationKeyMapOutput } type ConfigurationKeyMap map[string]ConfigurationKeyInput func (ConfigurationKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ConfigurationKey)(nil)).Elem() } func (i ConfigurationKeyMap) ToConfigurationKeyMapOutput() ConfigurationKeyMapOutput { return i.ToConfigurationKeyMapOutputWithContext(context.Background()) } func (i ConfigurationKeyMap) ToConfigurationKeyMapOutputWithContext(ctx context.Context) ConfigurationKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationKeyMapOutput) } type ConfigurationKeyOutput struct{ *pulumi.OutputState } func (ConfigurationKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**ConfigurationKey)(nil)).Elem() } func (o ConfigurationKeyOutput) ToConfigurationKeyOutput() ConfigurationKeyOutput { return o } func (o ConfigurationKeyOutput) ToConfigurationKeyOutputWithContext(ctx context.Context) ConfigurationKeyOutput { return o } // Specifies the id of the App Configuration. Changing this forces a new resource to be created. func (o ConfigurationKeyOutput) ConfigurationStoreId() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringOutput { return v.ConfigurationStoreId }).(pulumi.StringOutput) } // The content type of the App Configuration Key. This should only be set when type is set to `kv`. func (o ConfigurationKeyOutput) ContentType() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringOutput { return v.ContentType }).(pulumi.StringOutput) } // (Optional) The ETag of the key. func (o ConfigurationKeyOutput) Etag() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) } // The name of the App Configuration Key to create. Changing this forces a new resource to be created. func (o ConfigurationKeyOutput) Key() pulumi.StringOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringOutput { return v.Key }).(pulumi.StringOutput) } // The label of the App Configuration Key. Changing this forces a new resource to be created. func (o ConfigurationKeyOutput) Label() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringPtrOutput { return v.Label }).(pulumi.StringPtrOutput) } // Should this App Configuration Key be Locked to prevent changes? func (o ConfigurationKeyOutput) Locked() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.BoolPtrOutput { return v.Locked }).(pulumi.BoolPtrOutput) } // A mapping of tags to assign to the resource. func (o ConfigurationKeyOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The type of the App Configuration Key. It can either be `kv` (simple [key/value](https://docs.microsoft.com/azure/azure-app-configuration/concept-key-value)) or `vault` (where the value is a reference to a [Key Vault Secret](https://azure.microsoft.com/en-gb/services/key-vault/). Defaults to `kv`. func (o ConfigurationKeyOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) } // The value of the App Configuration Key. This should only be set when type is set to `kv`. // // > **Note:** `value` and `vaultKeyReference` are mutually exclusive. func (o ConfigurationKeyOutput) Value() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringPtrOutput { return v.Value }).(pulumi.StringPtrOutput) } // The ID of the vault secret this App Configuration Key refers to. This should only be set when `type` is set to `vault`. // // > **Note:** `vaultKeyReference` and `value` are mutually exclusive. // // > **Note:** When setting the `vaultKeyReference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionlessId` func (o ConfigurationKeyOutput) VaultKeyReference() pulumi.StringPtrOutput { return o.ApplyT(func(v *ConfigurationKey) pulumi.StringPtrOutput { return v.VaultKeyReference }).(pulumi.StringPtrOutput) } type ConfigurationKeyArrayOutput struct{ *pulumi.OutputState } func (ConfigurationKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ConfigurationKey)(nil)).Elem() } func (o ConfigurationKeyArrayOutput) ToConfigurationKeyArrayOutput() ConfigurationKeyArrayOutput { return o } func (o ConfigurationKeyArrayOutput) ToConfigurationKeyArrayOutputWithContext(ctx context.Context) ConfigurationKeyArrayOutput { return o } func (o ConfigurationKeyArrayOutput) Index(i pulumi.IntInput) ConfigurationKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigurationKey { return vs[0].([]*ConfigurationKey)[vs[1].(int)] }).(ConfigurationKeyOutput) } type ConfigurationKeyMapOutput struct{ *pulumi.OutputState } func (ConfigurationKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ConfigurationKey)(nil)).Elem() } func (o ConfigurationKeyMapOutput) ToConfigurationKeyMapOutput() ConfigurationKeyMapOutput { return o } func (o ConfigurationKeyMapOutput) ToConfigurationKeyMapOutputWithContext(ctx context.Context) ConfigurationKeyMapOutput { return o } func (o ConfigurationKeyMapOutput) MapIndex(k pulumi.StringInput) ConfigurationKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigurationKey { return vs[0].(map[string]*ConfigurationKey)[vs[1].(string)] }).(ConfigurationKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationKeyInput)(nil)).Elem(), &ConfigurationKey{}) pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationKeyArrayInput)(nil)).Elem(), ConfigurationKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationKeyMapInput)(nil)).Elem(), ConfigurationKeyMap{}) pulumi.RegisterOutputType(ConfigurationKeyOutput{}) pulumi.RegisterOutputType(ConfigurationKeyArrayOutput{}) pulumi.RegisterOutputType(ConfigurationKeyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appconfiguration/licationLoadBalancerSubnetAssociation.go
sdk/go/azure/appconfiguration/licationLoadBalancerSubnetAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appconfiguration 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 an Application Gateway for Containers and a Subnet. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appconfiguration" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("westeurope"), // }) // if err != nil { // return err // } // exampleLicationLoadBalancer, err := appconfiguration.NewLicationLoadBalancer(ctx, "example", &appconfiguration.LicationLoadBalancerArgs{ // Name: pulumi.String("example-alb"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // Delegations: network.SubnetDelegationArray{ // &network.SubnetDelegationArgs{ // Name: pulumi.String("delegation"), // ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ // Name: pulumi.String("Microsoft.ServiceNetworking/trafficControllers"), // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // _, err = appconfiguration.NewLicationLoadBalancerSubnetAssociation(ctx, "example", &appconfiguration.LicationLoadBalancerSubnetAssociationArgs{ // Name: pulumi.String("example"), // ApplicationLoadBalancerId: exampleLicationLoadBalancer.ID(), // SubnetId: exampleSubnet.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.ServiceNetworking` - 2025-01-01 // // ## Import // // Application Gateway for Containers Associations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appconfiguration/licationLoadBalancerSubnetAssociation:LicationLoadBalancerSubnetAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/alb1/associations/association1 // ``` type LicationLoadBalancerSubnetAssociation struct { pulumi.CustomResourceState // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId pulumi.StringOutput `pulumi:"applicationLoadBalancerId"` // The name which should be used for this Application Gateway for Containers Association. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the subnet which the Application Gateway for Containers associated to. // // > **Note:** The subnet to be used must have a delegation for `Microsoft.ServiceNetworking/trafficControllers` as shown in the example above. SubnetId pulumi.StringOutput `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Application Gateway for Containers Association. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewLicationLoadBalancerSubnetAssociation registers a new resource with the given unique name, arguments, and options. func NewLicationLoadBalancerSubnetAssociation(ctx *pulumi.Context, name string, args *LicationLoadBalancerSubnetAssociationArgs, opts ...pulumi.ResourceOption) (*LicationLoadBalancerSubnetAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationLoadBalancerId == nil { return nil, errors.New("invalid value for required argument 'ApplicationLoadBalancerId'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource LicationLoadBalancerSubnetAssociation err := ctx.RegisterResource("azure:appconfiguration/licationLoadBalancerSubnetAssociation:LicationLoadBalancerSubnetAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLicationLoadBalancerSubnetAssociation gets an existing LicationLoadBalancerSubnetAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetLicationLoadBalancerSubnetAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LicationLoadBalancerSubnetAssociationState, opts ...pulumi.ResourceOption) (*LicationLoadBalancerSubnetAssociation, error) { var resource LicationLoadBalancerSubnetAssociation err := ctx.ReadResource("azure:appconfiguration/licationLoadBalancerSubnetAssociation:LicationLoadBalancerSubnetAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LicationLoadBalancerSubnetAssociation resources. type licationLoadBalancerSubnetAssociationState struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId *string `pulumi:"applicationLoadBalancerId"` // The name which should be used for this Application Gateway for Containers Association. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the subnet which the Application Gateway for Containers associated to. // // > **Note:** The subnet to be used must have a delegation for `Microsoft.ServiceNetworking/trafficControllers` as shown in the example above. SubnetId *string `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Application Gateway for Containers Association. Tags map[string]string `pulumi:"tags"` } type LicationLoadBalancerSubnetAssociationState struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId pulumi.StringPtrInput // The name which should be used for this Application Gateway for Containers Association. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the subnet which the Application Gateway for Containers associated to. // // > **Note:** The subnet to be used must have a delegation for `Microsoft.ServiceNetworking/trafficControllers` as shown in the example above. SubnetId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Gateway for Containers Association. Tags pulumi.StringMapInput } func (LicationLoadBalancerSubnetAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerSubnetAssociationState)(nil)).Elem() } type licationLoadBalancerSubnetAssociationArgs struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId string `pulumi:"applicationLoadBalancerId"` // The name which should be used for this Application Gateway for Containers Association. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the subnet which the Application Gateway for Containers associated to. // // > **Note:** The subnet to be used must have a delegation for `Microsoft.ServiceNetworking/trafficControllers` as shown in the example above. SubnetId string `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Application Gateway for Containers Association. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a LicationLoadBalancerSubnetAssociation resource. type LicationLoadBalancerSubnetAssociationArgs struct { // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. ApplicationLoadBalancerId pulumi.StringInput // The name which should be used for this Application Gateway for Containers Association. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the subnet which the Application Gateway for Containers associated to. // // > **Note:** The subnet to be used must have a delegation for `Microsoft.ServiceNetworking/trafficControllers` as shown in the example above. SubnetId pulumi.StringInput // A mapping of tags which should be assigned to the Application Gateway for Containers Association. Tags pulumi.StringMapInput } func (LicationLoadBalancerSubnetAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*licationLoadBalancerSubnetAssociationArgs)(nil)).Elem() } type LicationLoadBalancerSubnetAssociationInput interface { pulumi.Input ToLicationLoadBalancerSubnetAssociationOutput() LicationLoadBalancerSubnetAssociationOutput ToLicationLoadBalancerSubnetAssociationOutputWithContext(ctx context.Context) LicationLoadBalancerSubnetAssociationOutput } func (*LicationLoadBalancerSubnetAssociation) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancerSubnetAssociation)(nil)).Elem() } func (i *LicationLoadBalancerSubnetAssociation) ToLicationLoadBalancerSubnetAssociationOutput() LicationLoadBalancerSubnetAssociationOutput { return i.ToLicationLoadBalancerSubnetAssociationOutputWithContext(context.Background()) } func (i *LicationLoadBalancerSubnetAssociation) ToLicationLoadBalancerSubnetAssociationOutputWithContext(ctx context.Context) LicationLoadBalancerSubnetAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerSubnetAssociationOutput) } // LicationLoadBalancerSubnetAssociationArrayInput is an input type that accepts LicationLoadBalancerSubnetAssociationArray and LicationLoadBalancerSubnetAssociationArrayOutput values. // You can construct a concrete instance of `LicationLoadBalancerSubnetAssociationArrayInput` via: // // LicationLoadBalancerSubnetAssociationArray{ LicationLoadBalancerSubnetAssociationArgs{...} } type LicationLoadBalancerSubnetAssociationArrayInput interface { pulumi.Input ToLicationLoadBalancerSubnetAssociationArrayOutput() LicationLoadBalancerSubnetAssociationArrayOutput ToLicationLoadBalancerSubnetAssociationArrayOutputWithContext(context.Context) LicationLoadBalancerSubnetAssociationArrayOutput } type LicationLoadBalancerSubnetAssociationArray []LicationLoadBalancerSubnetAssociationInput func (LicationLoadBalancerSubnetAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancerSubnetAssociation)(nil)).Elem() } func (i LicationLoadBalancerSubnetAssociationArray) ToLicationLoadBalancerSubnetAssociationArrayOutput() LicationLoadBalancerSubnetAssociationArrayOutput { return i.ToLicationLoadBalancerSubnetAssociationArrayOutputWithContext(context.Background()) } func (i LicationLoadBalancerSubnetAssociationArray) ToLicationLoadBalancerSubnetAssociationArrayOutputWithContext(ctx context.Context) LicationLoadBalancerSubnetAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerSubnetAssociationArrayOutput) } // LicationLoadBalancerSubnetAssociationMapInput is an input type that accepts LicationLoadBalancerSubnetAssociationMap and LicationLoadBalancerSubnetAssociationMapOutput values. // You can construct a concrete instance of `LicationLoadBalancerSubnetAssociationMapInput` via: // // LicationLoadBalancerSubnetAssociationMap{ "key": LicationLoadBalancerSubnetAssociationArgs{...} } type LicationLoadBalancerSubnetAssociationMapInput interface { pulumi.Input ToLicationLoadBalancerSubnetAssociationMapOutput() LicationLoadBalancerSubnetAssociationMapOutput ToLicationLoadBalancerSubnetAssociationMapOutputWithContext(context.Context) LicationLoadBalancerSubnetAssociationMapOutput } type LicationLoadBalancerSubnetAssociationMap map[string]LicationLoadBalancerSubnetAssociationInput func (LicationLoadBalancerSubnetAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancerSubnetAssociation)(nil)).Elem() } func (i LicationLoadBalancerSubnetAssociationMap) ToLicationLoadBalancerSubnetAssociationMapOutput() LicationLoadBalancerSubnetAssociationMapOutput { return i.ToLicationLoadBalancerSubnetAssociationMapOutputWithContext(context.Background()) } func (i LicationLoadBalancerSubnetAssociationMap) ToLicationLoadBalancerSubnetAssociationMapOutputWithContext(ctx context.Context) LicationLoadBalancerSubnetAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LicationLoadBalancerSubnetAssociationMapOutput) } type LicationLoadBalancerSubnetAssociationOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerSubnetAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**LicationLoadBalancerSubnetAssociation)(nil)).Elem() } func (o LicationLoadBalancerSubnetAssociationOutput) ToLicationLoadBalancerSubnetAssociationOutput() LicationLoadBalancerSubnetAssociationOutput { return o } func (o LicationLoadBalancerSubnetAssociationOutput) ToLicationLoadBalancerSubnetAssociationOutputWithContext(ctx context.Context) LicationLoadBalancerSubnetAssociationOutput { return o } // The ID of the Application Gateway for Containers. Changing this forces a new resource to be created. func (o LicationLoadBalancerSubnetAssociationOutput) ApplicationLoadBalancerId() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerSubnetAssociation) pulumi.StringOutput { return v.ApplicationLoadBalancerId }).(pulumi.StringOutput) } // The name which should be used for this Application Gateway for Containers Association. Changing this forces a new resource to be created. func (o LicationLoadBalancerSubnetAssociationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerSubnetAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the subnet which the Application Gateway for Containers associated to. // // > **Note:** The subnet to be used must have a delegation for `Microsoft.ServiceNetworking/trafficControllers` as shown in the example above. func (o LicationLoadBalancerSubnetAssociationOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *LicationLoadBalancerSubnetAssociation) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Application Gateway for Containers Association. func (o LicationLoadBalancerSubnetAssociationOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *LicationLoadBalancerSubnetAssociation) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type LicationLoadBalancerSubnetAssociationArrayOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerSubnetAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LicationLoadBalancerSubnetAssociation)(nil)).Elem() } func (o LicationLoadBalancerSubnetAssociationArrayOutput) ToLicationLoadBalancerSubnetAssociationArrayOutput() LicationLoadBalancerSubnetAssociationArrayOutput { return o } func (o LicationLoadBalancerSubnetAssociationArrayOutput) ToLicationLoadBalancerSubnetAssociationArrayOutputWithContext(ctx context.Context) LicationLoadBalancerSubnetAssociationArrayOutput { return o } func (o LicationLoadBalancerSubnetAssociationArrayOutput) Index(i pulumi.IntInput) LicationLoadBalancerSubnetAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LicationLoadBalancerSubnetAssociation { return vs[0].([]*LicationLoadBalancerSubnetAssociation)[vs[1].(int)] }).(LicationLoadBalancerSubnetAssociationOutput) } type LicationLoadBalancerSubnetAssociationMapOutput struct{ *pulumi.OutputState } func (LicationLoadBalancerSubnetAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LicationLoadBalancerSubnetAssociation)(nil)).Elem() } func (o LicationLoadBalancerSubnetAssociationMapOutput) ToLicationLoadBalancerSubnetAssociationMapOutput() LicationLoadBalancerSubnetAssociationMapOutput { return o } func (o LicationLoadBalancerSubnetAssociationMapOutput) ToLicationLoadBalancerSubnetAssociationMapOutputWithContext(ctx context.Context) LicationLoadBalancerSubnetAssociationMapOutput { return o } func (o LicationLoadBalancerSubnetAssociationMapOutput) MapIndex(k pulumi.StringInput) LicationLoadBalancerSubnetAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LicationLoadBalancerSubnetAssociation { return vs[0].(map[string]*LicationLoadBalancerSubnetAssociation)[vs[1].(string)] }).(LicationLoadBalancerSubnetAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerSubnetAssociationInput)(nil)).Elem(), &LicationLoadBalancerSubnetAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerSubnetAssociationArrayInput)(nil)).Elem(), LicationLoadBalancerSubnetAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LicationLoadBalancerSubnetAssociationMapInput)(nil)).Elem(), LicationLoadBalancerSubnetAssociationMap{}) pulumi.RegisterOutputType(LicationLoadBalancerSubnetAssociationOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerSubnetAssociationArrayOutput{}) pulumi.RegisterOutputType(LicationLoadBalancerSubnetAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getTenantTemplateDeployment.go
sdk/go/azure/core/getTenantTemplateDeployment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Tenant Template Deployment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupTenantTemplateDeployment(ctx, &core.LookupTenantTemplateDeploymentArgs{ // Name: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // ctx.Export("exampleOutput", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{ // Input: example.OutputContent, // }, nil).Result.ExampleOutput.Value)) // return nil // }) // } // // ``` func LookupTenantTemplateDeployment(ctx *pulumi.Context, args *LookupTenantTemplateDeploymentArgs, opts ...pulumi.InvokeOption) (*LookupTenantTemplateDeploymentResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTenantTemplateDeploymentResult err := ctx.Invoke("azure:core/getTenantTemplateDeployment:getTenantTemplateDeployment", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getTenantTemplateDeployment. type LookupTenantTemplateDeploymentArgs struct { // The name of this Tenant Template Deployment. Name string `pulumi:"name"` } // A collection of values returned by getTenantTemplateDeployment. type LookupTenantTemplateDeploymentResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent string `pulumi:"outputContent"` } func LookupTenantTemplateDeploymentOutput(ctx *pulumi.Context, args LookupTenantTemplateDeploymentOutputArgs, opts ...pulumi.InvokeOption) LookupTenantTemplateDeploymentResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupTenantTemplateDeploymentResultOutput, error) { args := v.(LookupTenantTemplateDeploymentArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getTenantTemplateDeployment:getTenantTemplateDeployment", args, LookupTenantTemplateDeploymentResultOutput{}, options).(LookupTenantTemplateDeploymentResultOutput), nil }).(LookupTenantTemplateDeploymentResultOutput) } // A collection of arguments for invoking getTenantTemplateDeployment. type LookupTenantTemplateDeploymentOutputArgs struct { // The name of this Tenant Template Deployment. Name pulumi.StringInput `pulumi:"name"` } func (LookupTenantTemplateDeploymentOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupTenantTemplateDeploymentArgs)(nil)).Elem() } // A collection of values returned by getTenantTemplateDeployment. type LookupTenantTemplateDeploymentResultOutput struct{ *pulumi.OutputState } func (LookupTenantTemplateDeploymentResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupTenantTemplateDeploymentResult)(nil)).Elem() } func (o LookupTenantTemplateDeploymentResultOutput) ToLookupTenantTemplateDeploymentResultOutput() LookupTenantTemplateDeploymentResultOutput { return o } func (o LookupTenantTemplateDeploymentResultOutput) ToLookupTenantTemplateDeploymentResultOutputWithContext(ctx context.Context) LookupTenantTemplateDeploymentResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupTenantTemplateDeploymentResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupTenantTemplateDeploymentResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupTenantTemplateDeploymentResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupTenantTemplateDeploymentResult) string { return v.Name }).(pulumi.StringOutput) } // The JSON Content of the Outputs of the ARM Template Deployment. func (o LookupTenantTemplateDeploymentResultOutput) OutputContent() pulumi.StringOutput { return o.ApplyT(func(v LookupTenantTemplateDeploymentResult) string { return v.OutputContent }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupTenantTemplateDeploymentResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourcePolicyRemediation.go
sdk/go/azure/core/resourcePolicyRemediation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Resource Policy Remediation. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("resourcegroup1"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("vnet1"), // ResourceGroupName: example.Name, // Location: example.Location, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleDefinition, err := policy.NewDefinition(ctx, "example", &policy.DefinitionArgs{ // Name: pulumi.String("only-deploy-in-westeurope"), // PolicyType: pulumi.String("Custom"), // Mode: pulumi.String("All"), // DisplayName: pulumi.String("my-policy-definition"), // }) // if err != nil { // return err // } // _, err = core.NewResourcePolicyAssignment(ctx, "example", &core.ResourcePolicyAssignmentArgs{ // Name: pulumi.String("assignment1"), // ResourceId: exampleVirtualNetwork.ID(), // PolicyDefinitionId: exampleDefinition.ID(), // Parameters: example.Location.ApplyT(func(location string) (pulumi.String, error) { // var _zero pulumi.String // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "listOfAllowedLocations": map[string]interface{}{ // "value": []string{ // location, // "East US", // }, // }, // }) // if err != nil { // return _zero, err // } // json0 := string(tmpJSON0) // return pulumi.String(json0), nil // }).(pulumi.StringOutput), // }) // if err != nil { // return err // } // exampleResourceGroupPolicyAssignment, err := core.NewResourceGroupPolicyAssignment(ctx, "example", &core.ResourceGroupPolicyAssignmentArgs{ // Name: pulumi.String("example"), // ResourceGroupId: example.ID(), // PolicyDefinitionId: exampleDefinition.ID(), // }) // if err != nil { // return err // } // _, err = core.NewResourcePolicyRemediation(ctx, "example", &core.ResourcePolicyRemediationArgs{ // Name: pulumi.String("remediation1"), // ResourceId: exampleVirtualNetwork.ID(), // PolicyAssignmentId: exampleResourceGroupPolicyAssignment.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.PolicyInsights` - 2021-10-01 // // ## Import // // Policy Remediations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourcePolicyRemediation:ResourcePolicyRemediation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.PolicyInsights/remediations/remediation1 // ``` type ResourcePolicyRemediation struct { pulumi.CustomResourceState // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrOutput `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayOutput `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrOutput `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrOutput `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrOutput `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrOutput `pulumi:"resourceDiscoveryMode"` // The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceId pulumi.StringOutput `pulumi:"resourceId"` } // NewResourcePolicyRemediation registers a new resource with the given unique name, arguments, and options. func NewResourcePolicyRemediation(ctx *pulumi.Context, name string, args *ResourcePolicyRemediationArgs, opts ...pulumi.ResourceOption) (*ResourcePolicyRemediation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyAssignmentId == nil { return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'") } if args.ResourceId == nil { return nil, errors.New("invalid value for required argument 'ResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourcePolicyRemediation err := ctx.RegisterResource("azure:core/resourcePolicyRemediation:ResourcePolicyRemediation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourcePolicyRemediation gets an existing ResourcePolicyRemediation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourcePolicyRemediation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourcePolicyRemediationState, opts ...pulumi.ResourceOption) (*ResourcePolicyRemediation, error) { var resource ResourcePolicyRemediation err := ctx.ReadResource("azure:core/resourcePolicyRemediation:ResourcePolicyRemediation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourcePolicyRemediation resources. type resourcePolicyRemediationState struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage *float64 `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters []string `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments *int `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId *string `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount *int `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"` // The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceId *string `pulumi:"resourceId"` } type ResourcePolicyRemediationState struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrInput // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayInput // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrInput // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringPtrInput // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrInput // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrInput // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrInput // The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceId pulumi.StringPtrInput } func (ResourcePolicyRemediationState) ElementType() reflect.Type { return reflect.TypeOf((*resourcePolicyRemediationState)(nil)).Elem() } type resourcePolicyRemediationArgs struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage *float64 `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters []string `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments *int `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId string `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount *int `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"` // The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceId string `pulumi:"resourceId"` } // The set of arguments for constructing a ResourcePolicyRemediation resource. type ResourcePolicyRemediationArgs struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrInput // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayInput // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrInput // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringInput // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrInput // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrInput // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrInput // The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceId pulumi.StringInput } func (ResourcePolicyRemediationArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourcePolicyRemediationArgs)(nil)).Elem() } type ResourcePolicyRemediationInput interface { pulumi.Input ToResourcePolicyRemediationOutput() ResourcePolicyRemediationOutput ToResourcePolicyRemediationOutputWithContext(ctx context.Context) ResourcePolicyRemediationOutput } func (*ResourcePolicyRemediation) ElementType() reflect.Type { return reflect.TypeOf((**ResourcePolicyRemediation)(nil)).Elem() } func (i *ResourcePolicyRemediation) ToResourcePolicyRemediationOutput() ResourcePolicyRemediationOutput { return i.ToResourcePolicyRemediationOutputWithContext(context.Background()) } func (i *ResourcePolicyRemediation) ToResourcePolicyRemediationOutputWithContext(ctx context.Context) ResourcePolicyRemediationOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyRemediationOutput) } // ResourcePolicyRemediationArrayInput is an input type that accepts ResourcePolicyRemediationArray and ResourcePolicyRemediationArrayOutput values. // You can construct a concrete instance of `ResourcePolicyRemediationArrayInput` via: // // ResourcePolicyRemediationArray{ ResourcePolicyRemediationArgs{...} } type ResourcePolicyRemediationArrayInput interface { pulumi.Input ToResourcePolicyRemediationArrayOutput() ResourcePolicyRemediationArrayOutput ToResourcePolicyRemediationArrayOutputWithContext(context.Context) ResourcePolicyRemediationArrayOutput } type ResourcePolicyRemediationArray []ResourcePolicyRemediationInput func (ResourcePolicyRemediationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourcePolicyRemediation)(nil)).Elem() } func (i ResourcePolicyRemediationArray) ToResourcePolicyRemediationArrayOutput() ResourcePolicyRemediationArrayOutput { return i.ToResourcePolicyRemediationArrayOutputWithContext(context.Background()) } func (i ResourcePolicyRemediationArray) ToResourcePolicyRemediationArrayOutputWithContext(ctx context.Context) ResourcePolicyRemediationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyRemediationArrayOutput) } // ResourcePolicyRemediationMapInput is an input type that accepts ResourcePolicyRemediationMap and ResourcePolicyRemediationMapOutput values. // You can construct a concrete instance of `ResourcePolicyRemediationMapInput` via: // // ResourcePolicyRemediationMap{ "key": ResourcePolicyRemediationArgs{...} } type ResourcePolicyRemediationMapInput interface { pulumi.Input ToResourcePolicyRemediationMapOutput() ResourcePolicyRemediationMapOutput ToResourcePolicyRemediationMapOutputWithContext(context.Context) ResourcePolicyRemediationMapOutput } type ResourcePolicyRemediationMap map[string]ResourcePolicyRemediationInput func (ResourcePolicyRemediationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourcePolicyRemediation)(nil)).Elem() } func (i ResourcePolicyRemediationMap) ToResourcePolicyRemediationMapOutput() ResourcePolicyRemediationMapOutput { return i.ToResourcePolicyRemediationMapOutputWithContext(context.Background()) } func (i ResourcePolicyRemediationMap) ToResourcePolicyRemediationMapOutputWithContext(ctx context.Context) ResourcePolicyRemediationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyRemediationMapOutput) } type ResourcePolicyRemediationOutput struct{ *pulumi.OutputState } func (ResourcePolicyRemediationOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourcePolicyRemediation)(nil)).Elem() } func (o ResourcePolicyRemediationOutput) ToResourcePolicyRemediationOutput() ResourcePolicyRemediationOutput { return o } func (o ResourcePolicyRemediationOutput) ToResourcePolicyRemediationOutputWithContext(ctx context.Context) ResourcePolicyRemediationOutput { return o } // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. func (o ResourcePolicyRemediationOutput) FailurePercentage() pulumi.Float64PtrOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.Float64PtrOutput { return v.FailurePercentage }).(pulumi.Float64PtrOutput) } // A list of the resource locations that will be remediated. func (o ResourcePolicyRemediationOutput) LocationFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.StringArrayOutput { return v.LocationFilters }).(pulumi.StringArrayOutput) } // The name of the Policy Remediation. Changing this forces a new resource to be created. func (o ResourcePolicyRemediationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. func (o ResourcePolicyRemediationOutput) ParallelDeployments() pulumi.IntPtrOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.IntPtrOutput { return v.ParallelDeployments }).(pulumi.IntPtrOutput) } // The ID of the Policy Assignment that should be remediated. func (o ResourcePolicyRemediationOutput) PolicyAssignmentId() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput) } // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. func (o ResourcePolicyRemediationOutput) PolicyDefinitionReferenceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.StringPtrOutput { return v.PolicyDefinitionReferenceId }).(pulumi.StringPtrOutput) } // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. func (o ResourcePolicyRemediationOutput) ResourceCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.IntPtrOutput { return v.ResourceCount }).(pulumi.IntPtrOutput) } // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. func (o ResourcePolicyRemediationOutput) ResourceDiscoveryMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.StringPtrOutput { return v.ResourceDiscoveryMode }).(pulumi.StringPtrOutput) } // The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. func (o ResourcePolicyRemediationOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyRemediation) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) } type ResourcePolicyRemediationArrayOutput struct{ *pulumi.OutputState } func (ResourcePolicyRemediationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourcePolicyRemediation)(nil)).Elem() } func (o ResourcePolicyRemediationArrayOutput) ToResourcePolicyRemediationArrayOutput() ResourcePolicyRemediationArrayOutput { return o } func (o ResourcePolicyRemediationArrayOutput) ToResourcePolicyRemediationArrayOutputWithContext(ctx context.Context) ResourcePolicyRemediationArrayOutput { return o } func (o ResourcePolicyRemediationArrayOutput) Index(i pulumi.IntInput) ResourcePolicyRemediationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourcePolicyRemediation { return vs[0].([]*ResourcePolicyRemediation)[vs[1].(int)] }).(ResourcePolicyRemediationOutput) } type ResourcePolicyRemediationMapOutput struct{ *pulumi.OutputState } func (ResourcePolicyRemediationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourcePolicyRemediation)(nil)).Elem() } func (o ResourcePolicyRemediationMapOutput) ToResourcePolicyRemediationMapOutput() ResourcePolicyRemediationMapOutput { return o } func (o ResourcePolicyRemediationMapOutput) ToResourcePolicyRemediationMapOutputWithContext(ctx context.Context) ResourcePolicyRemediationMapOutput { return o } func (o ResourcePolicyRemediationMapOutput) MapIndex(k pulumi.StringInput) ResourcePolicyRemediationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourcePolicyRemediation { return vs[0].(map[string]*ResourcePolicyRemediation)[vs[1].(string)] }).(ResourcePolicyRemediationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyRemediationInput)(nil)).Elem(), &ResourcePolicyRemediation{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyRemediationArrayInput)(nil)).Elem(), ResourcePolicyRemediationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyRemediationMapInput)(nil)).Elem(), ResourcePolicyRemediationMap{}) pulumi.RegisterOutputType(ResourcePolicyRemediationOutput{}) pulumi.RegisterOutputType(ResourcePolicyRemediationArrayOutput{}) pulumi.RegisterOutputType(ResourcePolicyRemediationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/init.go
sdk/go/azure/core/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 core 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:core/customProvider:CustomProvider": r = &CustomProvider{} case "azure:core/portalTenantConfiguration:PortalTenantConfiguration": r = &PortalTenantConfiguration{} case "azure:core/resourceDeploymentScriptAzureCli:ResourceDeploymentScriptAzureCli": r = &ResourceDeploymentScriptAzureCli{} case "azure:core/resourceDeploymentScriptPowerShell:ResourceDeploymentScriptPowerShell": r = &ResourceDeploymentScriptPowerShell{} case "azure:core/resourceGroup:ResourceGroup": r = &ResourceGroup{} case "azure:core/resourceGroupCostManagementExport:ResourceGroupCostManagementExport": r = &ResourceGroupCostManagementExport{} case "azure:core/resourceGroupCostManagementView:ResourceGroupCostManagementView": r = &ResourceGroupCostManagementView{} case "azure:core/resourceGroupPolicyAssignment:ResourceGroupPolicyAssignment": r = &ResourceGroupPolicyAssignment{} case "azure:core/resourceGroupPolicyExemption:ResourceGroupPolicyExemption": r = &ResourceGroupPolicyExemption{} case "azure:core/resourceGroupPolicyRemediation:ResourceGroupPolicyRemediation": r = &ResourceGroupPolicyRemediation{} case "azure:core/resourceGroupTemplateDeployment:ResourceGroupTemplateDeployment": r = &ResourceGroupTemplateDeployment{} case "azure:core/resourcePolicyAssignment:ResourcePolicyAssignment": r = &ResourcePolicyAssignment{} case "azure:core/resourcePolicyExemption:ResourcePolicyExemption": r = &ResourcePolicyExemption{} case "azure:core/resourcePolicyRemediation:ResourcePolicyRemediation": r = &ResourcePolicyRemediation{} case "azure:core/resourceProviderRegistration:ResourceProviderRegistration": r = &ResourceProviderRegistration{} case "azure:core/subscription:Subscription": r = &Subscription{} case "azure:core/subscriptionCostManagementExport:SubscriptionCostManagementExport": r = &SubscriptionCostManagementExport{} case "azure:core/subscriptionCostManagementView:SubscriptionCostManagementView": r = &SubscriptionCostManagementView{} case "azure:core/subscriptionPolicyAssignment:SubscriptionPolicyAssignment": r = &SubscriptionPolicyAssignment{} case "azure:core/subscriptionPolicyExemption:SubscriptionPolicyExemption": r = &SubscriptionPolicyExemption{} case "azure:core/subscriptionPolicyRemediation:SubscriptionPolicyRemediation": r = &SubscriptionPolicyRemediation{} case "azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment": r = &SubscriptionTemplateDeployment{} case "azure:core/tenantTemplateDeployment:TenantTemplateDeployment": r = &TenantTemplateDeployment{} 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", "core/customProvider", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/portalTenantConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceDeploymentScriptAzureCli", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceDeploymentScriptPowerShell", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceGroupCostManagementExport", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceGroupCostManagementView", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceGroupPolicyAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceGroupPolicyExemption", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceGroupPolicyRemediation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceGroupTemplateDeployment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourcePolicyAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourcePolicyExemption", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourcePolicyRemediation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/resourceProviderRegistration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/subscription", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/subscriptionCostManagementExport", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/subscriptionCostManagementView", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/subscriptionPolicyAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/subscriptionPolicyExemption", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/subscriptionPolicyRemediation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/subscriptionTemplateDeployment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "core/tenantTemplateDeployment", &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/core/subscriptionPolicyAssignment.go
sdk/go/azure/core/subscriptionPolicyAssignment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Subscription Policy Assignment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "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 := policy.NewDefinition(ctx, "example", &policy.DefinitionArgs{ // Name: pulumi.String("only-deploy-in-westeurope"), // PolicyType: pulumi.String("Custom"), // Mode: pulumi.String("All"), // DisplayName: pulumi.String("Allowed resource types"), // PolicyRule: pulumi.String(` { // "if": { // "not": { // "field": "location", // "equals": "westeurope" // } // }, // "then": { // "effect": "Deny" // } // } // // `), // // }) // if err != nil { // return err // } // _, err = core.NewSubscriptionPolicyAssignment(ctx, "example", &core.SubscriptionPolicyAssignmentArgs{ // Name: pulumi.String("example"), // PolicyDefinitionId: example.ID(), // SubscriptionId: pulumi.String(current.Id), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2022-06-01 // // ## Import // // Subscription Policy Assignments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/subscriptionPolicyAssignment:SubscriptionPolicyAssignment example /subscriptions/00000000-0000-0000-000000000000/providers/Microsoft.Authorization/policyAssignments/assignment1 // ``` type SubscriptionPolicyAssignment struct { pulumi.CustomResourceState // A description which should be used for this Policy Assignment. Description pulumi.StringPtrOutput `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrOutput `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity SubscriptionPolicyAssignmentIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringOutput `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringOutput `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringOutput `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages SubscriptionPolicyAssignmentNonComplianceMessageArrayOutput `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayOutput `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides SubscriptionPolicyAssignmentOverrideArrayOutput `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrOutput `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringOutput `pulumi:"policyDefinitionId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors SubscriptionPolicyAssignmentResourceSelectorArrayOutput `pulumi:"resourceSelectors"` // The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewSubscriptionPolicyAssignment registers a new resource with the given unique name, arguments, and options. func NewSubscriptionPolicyAssignment(ctx *pulumi.Context, name string, args *SubscriptionPolicyAssignmentArgs, opts ...pulumi.ResourceOption) (*SubscriptionPolicyAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyDefinitionId == nil { return nil, errors.New("invalid value for required argument 'PolicyDefinitionId'") } if args.SubscriptionId == nil { return nil, errors.New("invalid value for required argument 'SubscriptionId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubscriptionPolicyAssignment err := ctx.RegisterResource("azure:core/subscriptionPolicyAssignment:SubscriptionPolicyAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubscriptionPolicyAssignment gets an existing SubscriptionPolicyAssignment resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubscriptionPolicyAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionPolicyAssignmentState, opts ...pulumi.ResourceOption) (*SubscriptionPolicyAssignment, error) { var resource SubscriptionPolicyAssignment err := ctx.ReadResource("azure:core/subscriptionPolicyAssignment:SubscriptionPolicyAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubscriptionPolicyAssignment resources. type subscriptionPolicyAssignmentState struct { // A description which should be used for this Policy Assignment. Description *string `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName *string `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce *bool `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity *SubscriptionPolicyAssignmentIdentity `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location *string `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name *string `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages []SubscriptionPolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes []string `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides []SubscriptionPolicyAssignmentOverride `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters *string `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId *string `pulumi:"policyDefinitionId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors []SubscriptionPolicyAssignmentResourceSelector `pulumi:"resourceSelectors"` // The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. SubscriptionId *string `pulumi:"subscriptionId"` } type SubscriptionPolicyAssignmentState struct { // A description which should be used for this Policy Assignment. Description pulumi.StringPtrInput // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrInput // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrInput // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity SubscriptionPolicyAssignmentIdentityPtrInput // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringPtrInput // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringPtrInput // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages SubscriptionPolicyAssignmentNonComplianceMessageArrayInput // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayInput // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides SubscriptionPolicyAssignmentOverrideArrayInput // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrInput // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringPtrInput // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors SubscriptionPolicyAssignmentResourceSelectorArrayInput // The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. SubscriptionId pulumi.StringPtrInput } func (SubscriptionPolicyAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionPolicyAssignmentState)(nil)).Elem() } type subscriptionPolicyAssignmentArgs struct { // A description which should be used for this Policy Assignment. Description *string `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName *string `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce *bool `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity *SubscriptionPolicyAssignmentIdentity `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location *string `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name *string `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages []SubscriptionPolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes []string `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides []SubscriptionPolicyAssignmentOverride `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters *string `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId string `pulumi:"policyDefinitionId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors []SubscriptionPolicyAssignmentResourceSelector `pulumi:"resourceSelectors"` // The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. SubscriptionId string `pulumi:"subscriptionId"` } // The set of arguments for constructing a SubscriptionPolicyAssignment resource. type SubscriptionPolicyAssignmentArgs struct { // A description which should be used for this Policy Assignment. Description pulumi.StringPtrInput // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrInput // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrInput // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity SubscriptionPolicyAssignmentIdentityPtrInput // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringPtrInput // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringPtrInput // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages SubscriptionPolicyAssignmentNonComplianceMessageArrayInput // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayInput // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides SubscriptionPolicyAssignmentOverrideArrayInput // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrInput // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringInput // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors SubscriptionPolicyAssignmentResourceSelectorArrayInput // The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. SubscriptionId pulumi.StringInput } func (SubscriptionPolicyAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionPolicyAssignmentArgs)(nil)).Elem() } type SubscriptionPolicyAssignmentInput interface { pulumi.Input ToSubscriptionPolicyAssignmentOutput() SubscriptionPolicyAssignmentOutput ToSubscriptionPolicyAssignmentOutputWithContext(ctx context.Context) SubscriptionPolicyAssignmentOutput } func (*SubscriptionPolicyAssignment) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionPolicyAssignment)(nil)).Elem() } func (i *SubscriptionPolicyAssignment) ToSubscriptionPolicyAssignmentOutput() SubscriptionPolicyAssignmentOutput { return i.ToSubscriptionPolicyAssignmentOutputWithContext(context.Background()) } func (i *SubscriptionPolicyAssignment) ToSubscriptionPolicyAssignmentOutputWithContext(ctx context.Context) SubscriptionPolicyAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyAssignmentOutput) } // SubscriptionPolicyAssignmentArrayInput is an input type that accepts SubscriptionPolicyAssignmentArray and SubscriptionPolicyAssignmentArrayOutput values. // You can construct a concrete instance of `SubscriptionPolicyAssignmentArrayInput` via: // // SubscriptionPolicyAssignmentArray{ SubscriptionPolicyAssignmentArgs{...} } type SubscriptionPolicyAssignmentArrayInput interface { pulumi.Input ToSubscriptionPolicyAssignmentArrayOutput() SubscriptionPolicyAssignmentArrayOutput ToSubscriptionPolicyAssignmentArrayOutputWithContext(context.Context) SubscriptionPolicyAssignmentArrayOutput } type SubscriptionPolicyAssignmentArray []SubscriptionPolicyAssignmentInput func (SubscriptionPolicyAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionPolicyAssignment)(nil)).Elem() } func (i SubscriptionPolicyAssignmentArray) ToSubscriptionPolicyAssignmentArrayOutput() SubscriptionPolicyAssignmentArrayOutput { return i.ToSubscriptionPolicyAssignmentArrayOutputWithContext(context.Background()) } func (i SubscriptionPolicyAssignmentArray) ToSubscriptionPolicyAssignmentArrayOutputWithContext(ctx context.Context) SubscriptionPolicyAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyAssignmentArrayOutput) } // SubscriptionPolicyAssignmentMapInput is an input type that accepts SubscriptionPolicyAssignmentMap and SubscriptionPolicyAssignmentMapOutput values. // You can construct a concrete instance of `SubscriptionPolicyAssignmentMapInput` via: // // SubscriptionPolicyAssignmentMap{ "key": SubscriptionPolicyAssignmentArgs{...} } type SubscriptionPolicyAssignmentMapInput interface { pulumi.Input ToSubscriptionPolicyAssignmentMapOutput() SubscriptionPolicyAssignmentMapOutput ToSubscriptionPolicyAssignmentMapOutputWithContext(context.Context) SubscriptionPolicyAssignmentMapOutput } type SubscriptionPolicyAssignmentMap map[string]SubscriptionPolicyAssignmentInput func (SubscriptionPolicyAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionPolicyAssignment)(nil)).Elem() } func (i SubscriptionPolicyAssignmentMap) ToSubscriptionPolicyAssignmentMapOutput() SubscriptionPolicyAssignmentMapOutput { return i.ToSubscriptionPolicyAssignmentMapOutputWithContext(context.Background()) } func (i SubscriptionPolicyAssignmentMap) ToSubscriptionPolicyAssignmentMapOutputWithContext(ctx context.Context) SubscriptionPolicyAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyAssignmentMapOutput) } type SubscriptionPolicyAssignmentOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionPolicyAssignment)(nil)).Elem() } func (o SubscriptionPolicyAssignmentOutput) ToSubscriptionPolicyAssignmentOutput() SubscriptionPolicyAssignmentOutput { return o } func (o SubscriptionPolicyAssignmentOutput) ToSubscriptionPolicyAssignmentOutputWithContext(ctx context.Context) SubscriptionPolicyAssignmentOutput { return o } // A description which should be used for this Policy Assignment. func (o SubscriptionPolicyAssignmentOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The Display Name for this Policy Assignment. func (o SubscriptionPolicyAssignmentOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) } // Specifies if this Policy should be enforced or not? Defaults to `true`. func (o SubscriptionPolicyAssignmentOutput) Enforce() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.BoolPtrOutput { return v.Enforce }).(pulumi.BoolPtrOutput) } // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. func (o SubscriptionPolicyAssignmentOutput) Identity() SubscriptionPolicyAssignmentIdentityPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) SubscriptionPolicyAssignmentIdentityPtrOutput { return v.Identity }).(SubscriptionPolicyAssignmentIdentityPtrOutput) } // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. func (o SubscriptionPolicyAssignmentOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A JSON mapping of any Metadata for this Policy. func (o SubscriptionPolicyAssignmentOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. func (o SubscriptionPolicyAssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `nonComplianceMessage` blocks as defined below. func (o SubscriptionPolicyAssignmentOutput) NonComplianceMessages() SubscriptionPolicyAssignmentNonComplianceMessageArrayOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) SubscriptionPolicyAssignmentNonComplianceMessageArrayOutput { return v.NonComplianceMessages }).(SubscriptionPolicyAssignmentNonComplianceMessageArrayOutput) } // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. func (o SubscriptionPolicyAssignmentOutput) NotScopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringArrayOutput { return v.NotScopes }).(pulumi.StringArrayOutput) } // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) func (o SubscriptionPolicyAssignmentOutput) Overrides() SubscriptionPolicyAssignmentOverrideArrayOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) SubscriptionPolicyAssignmentOverrideArrayOutput { return v.Overrides }).(SubscriptionPolicyAssignmentOverrideArrayOutput) } // A JSON mapping of any Parameters for this Policy. func (o SubscriptionPolicyAssignmentOutput) Parameters() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringPtrOutput { return v.Parameters }).(pulumi.StringPtrOutput) } // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. func (o SubscriptionPolicyAssignmentOutput) PolicyDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringOutput { return v.PolicyDefinitionId }).(pulumi.StringOutput) } // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. func (o SubscriptionPolicyAssignmentOutput) ResourceSelectors() SubscriptionPolicyAssignmentResourceSelectorArrayOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) SubscriptionPolicyAssignmentResourceSelectorArrayOutput { return v.ResourceSelectors }).(SubscriptionPolicyAssignmentResourceSelectorArrayOutput) } // The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. func (o SubscriptionPolicyAssignmentOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyAssignment) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type SubscriptionPolicyAssignmentArrayOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionPolicyAssignment)(nil)).Elem() } func (o SubscriptionPolicyAssignmentArrayOutput) ToSubscriptionPolicyAssignmentArrayOutput() SubscriptionPolicyAssignmentArrayOutput { return o } func (o SubscriptionPolicyAssignmentArrayOutput) ToSubscriptionPolicyAssignmentArrayOutputWithContext(ctx context.Context) SubscriptionPolicyAssignmentArrayOutput { return o } func (o SubscriptionPolicyAssignmentArrayOutput) Index(i pulumi.IntInput) SubscriptionPolicyAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionPolicyAssignment { return vs[0].([]*SubscriptionPolicyAssignment)[vs[1].(int)] }).(SubscriptionPolicyAssignmentOutput) } type SubscriptionPolicyAssignmentMapOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionPolicyAssignment)(nil)).Elem() } func (o SubscriptionPolicyAssignmentMapOutput) ToSubscriptionPolicyAssignmentMapOutput() SubscriptionPolicyAssignmentMapOutput { return o } func (o SubscriptionPolicyAssignmentMapOutput) ToSubscriptionPolicyAssignmentMapOutputWithContext(ctx context.Context) SubscriptionPolicyAssignmentMapOutput { return o } func (o SubscriptionPolicyAssignmentMapOutput) MapIndex(k pulumi.StringInput) SubscriptionPolicyAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionPolicyAssignment { return vs[0].(map[string]*SubscriptionPolicyAssignment)[vs[1].(string)] }).(SubscriptionPolicyAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyAssignmentInput)(nil)).Elem(), &SubscriptionPolicyAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyAssignmentArrayInput)(nil)).Elem(), SubscriptionPolicyAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyAssignmentMapInput)(nil)).Elem(), SubscriptionPolicyAssignmentMap{}) pulumi.RegisterOutputType(SubscriptionPolicyAssignmentOutput{}) pulumi.RegisterOutputType(SubscriptionPolicyAssignmentArrayOutput{}) pulumi.RegisterOutputType(SubscriptionPolicyAssignmentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/pulumiTypes.go
sdk/go/azure/core/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 core 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 CustomProviderAction struct { // Specifies the endpoint of the action. Endpoint string `pulumi:"endpoint"` // Specifies the name of the action. Name string `pulumi:"name"` } // CustomProviderActionInput is an input type that accepts CustomProviderActionArgs and CustomProviderActionOutput values. // You can construct a concrete instance of `CustomProviderActionInput` via: // // CustomProviderActionArgs{...} type CustomProviderActionInput interface { pulumi.Input ToCustomProviderActionOutput() CustomProviderActionOutput ToCustomProviderActionOutputWithContext(context.Context) CustomProviderActionOutput } type CustomProviderActionArgs struct { // Specifies the endpoint of the action. Endpoint pulumi.StringInput `pulumi:"endpoint"` // Specifies the name of the action. Name pulumi.StringInput `pulumi:"name"` } func (CustomProviderActionArgs) ElementType() reflect.Type { return reflect.TypeOf((*CustomProviderAction)(nil)).Elem() } func (i CustomProviderActionArgs) ToCustomProviderActionOutput() CustomProviderActionOutput { return i.ToCustomProviderActionOutputWithContext(context.Background()) } func (i CustomProviderActionArgs) ToCustomProviderActionOutputWithContext(ctx context.Context) CustomProviderActionOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderActionOutput) } // CustomProviderActionArrayInput is an input type that accepts CustomProviderActionArray and CustomProviderActionArrayOutput values. // You can construct a concrete instance of `CustomProviderActionArrayInput` via: // // CustomProviderActionArray{ CustomProviderActionArgs{...} } type CustomProviderActionArrayInput interface { pulumi.Input ToCustomProviderActionArrayOutput() CustomProviderActionArrayOutput ToCustomProviderActionArrayOutputWithContext(context.Context) CustomProviderActionArrayOutput } type CustomProviderActionArray []CustomProviderActionInput func (CustomProviderActionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]CustomProviderAction)(nil)).Elem() } func (i CustomProviderActionArray) ToCustomProviderActionArrayOutput() CustomProviderActionArrayOutput { return i.ToCustomProviderActionArrayOutputWithContext(context.Background()) } func (i CustomProviderActionArray) ToCustomProviderActionArrayOutputWithContext(ctx context.Context) CustomProviderActionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderActionArrayOutput) } type CustomProviderActionOutput struct{ *pulumi.OutputState } func (CustomProviderActionOutput) ElementType() reflect.Type { return reflect.TypeOf((*CustomProviderAction)(nil)).Elem() } func (o CustomProviderActionOutput) ToCustomProviderActionOutput() CustomProviderActionOutput { return o } func (o CustomProviderActionOutput) ToCustomProviderActionOutputWithContext(ctx context.Context) CustomProviderActionOutput { return o } // Specifies the endpoint of the action. func (o CustomProviderActionOutput) Endpoint() pulumi.StringOutput { return o.ApplyT(func(v CustomProviderAction) string { return v.Endpoint }).(pulumi.StringOutput) } // Specifies the name of the action. func (o CustomProviderActionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v CustomProviderAction) string { return v.Name }).(pulumi.StringOutput) } type CustomProviderActionArrayOutput struct{ *pulumi.OutputState } func (CustomProviderActionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]CustomProviderAction)(nil)).Elem() } func (o CustomProviderActionArrayOutput) ToCustomProviderActionArrayOutput() CustomProviderActionArrayOutput { return o } func (o CustomProviderActionArrayOutput) ToCustomProviderActionArrayOutputWithContext(ctx context.Context) CustomProviderActionArrayOutput { return o } func (o CustomProviderActionArrayOutput) Index(i pulumi.IntInput) CustomProviderActionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) CustomProviderAction { return vs[0].([]CustomProviderAction)[vs[1].(int)] }).(CustomProviderActionOutput) } type CustomProviderResourceType struct { // Specifies the endpoint of the route definition. Endpoint string `pulumi:"endpoint"` // Specifies the name of the route definition. Name string `pulumi:"name"` // The routing type that is supported for the resource request. Valid values are `Proxy` and `Proxy,Cache`. Defaults to `Proxy`. RoutingType *string `pulumi:"routingType"` } // CustomProviderResourceTypeInput is an input type that accepts CustomProviderResourceTypeArgs and CustomProviderResourceTypeOutput values. // You can construct a concrete instance of `CustomProviderResourceTypeInput` via: // // CustomProviderResourceTypeArgs{...} type CustomProviderResourceTypeInput interface { pulumi.Input ToCustomProviderResourceTypeOutput() CustomProviderResourceTypeOutput ToCustomProviderResourceTypeOutputWithContext(context.Context) CustomProviderResourceTypeOutput } type CustomProviderResourceTypeArgs struct { // Specifies the endpoint of the route definition. Endpoint pulumi.StringInput `pulumi:"endpoint"` // Specifies the name of the route definition. Name pulumi.StringInput `pulumi:"name"` // The routing type that is supported for the resource request. Valid values are `Proxy` and `Proxy,Cache`. Defaults to `Proxy`. RoutingType pulumi.StringPtrInput `pulumi:"routingType"` } func (CustomProviderResourceTypeArgs) ElementType() reflect.Type { return reflect.TypeOf((*CustomProviderResourceType)(nil)).Elem() } func (i CustomProviderResourceTypeArgs) ToCustomProviderResourceTypeOutput() CustomProviderResourceTypeOutput { return i.ToCustomProviderResourceTypeOutputWithContext(context.Background()) } func (i CustomProviderResourceTypeArgs) ToCustomProviderResourceTypeOutputWithContext(ctx context.Context) CustomProviderResourceTypeOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderResourceTypeOutput) } // CustomProviderResourceTypeArrayInput is an input type that accepts CustomProviderResourceTypeArray and CustomProviderResourceTypeArrayOutput values. // You can construct a concrete instance of `CustomProviderResourceTypeArrayInput` via: // // CustomProviderResourceTypeArray{ CustomProviderResourceTypeArgs{...} } type CustomProviderResourceTypeArrayInput interface { pulumi.Input ToCustomProviderResourceTypeArrayOutput() CustomProviderResourceTypeArrayOutput ToCustomProviderResourceTypeArrayOutputWithContext(context.Context) CustomProviderResourceTypeArrayOutput } type CustomProviderResourceTypeArray []CustomProviderResourceTypeInput func (CustomProviderResourceTypeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]CustomProviderResourceType)(nil)).Elem() } func (i CustomProviderResourceTypeArray) ToCustomProviderResourceTypeArrayOutput() CustomProviderResourceTypeArrayOutput { return i.ToCustomProviderResourceTypeArrayOutputWithContext(context.Background()) } func (i CustomProviderResourceTypeArray) ToCustomProviderResourceTypeArrayOutputWithContext(ctx context.Context) CustomProviderResourceTypeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderResourceTypeArrayOutput) } type CustomProviderResourceTypeOutput struct{ *pulumi.OutputState } func (CustomProviderResourceTypeOutput) ElementType() reflect.Type { return reflect.TypeOf((*CustomProviderResourceType)(nil)).Elem() } func (o CustomProviderResourceTypeOutput) ToCustomProviderResourceTypeOutput() CustomProviderResourceTypeOutput { return o } func (o CustomProviderResourceTypeOutput) ToCustomProviderResourceTypeOutputWithContext(ctx context.Context) CustomProviderResourceTypeOutput { return o } // Specifies the endpoint of the route definition. func (o CustomProviderResourceTypeOutput) Endpoint() pulumi.StringOutput { return o.ApplyT(func(v CustomProviderResourceType) string { return v.Endpoint }).(pulumi.StringOutput) } // Specifies the name of the route definition. func (o CustomProviderResourceTypeOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v CustomProviderResourceType) string { return v.Name }).(pulumi.StringOutput) } // The routing type that is supported for the resource request. Valid values are `Proxy` and `Proxy,Cache`. Defaults to `Proxy`. func (o CustomProviderResourceTypeOutput) RoutingType() pulumi.StringPtrOutput { return o.ApplyT(func(v CustomProviderResourceType) *string { return v.RoutingType }).(pulumi.StringPtrOutput) } type CustomProviderResourceTypeArrayOutput struct{ *pulumi.OutputState } func (CustomProviderResourceTypeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]CustomProviderResourceType)(nil)).Elem() } func (o CustomProviderResourceTypeArrayOutput) ToCustomProviderResourceTypeArrayOutput() CustomProviderResourceTypeArrayOutput { return o } func (o CustomProviderResourceTypeArrayOutput) ToCustomProviderResourceTypeArrayOutputWithContext(ctx context.Context) CustomProviderResourceTypeArrayOutput { return o } func (o CustomProviderResourceTypeArrayOutput) Index(i pulumi.IntInput) CustomProviderResourceTypeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) CustomProviderResourceType { return vs[0].([]CustomProviderResourceType)[vs[1].(int)] }).(CustomProviderResourceTypeOutput) } type CustomProviderValidation struct { // The endpoint where the validation specification is located. Specification string `pulumi:"specification"` } // CustomProviderValidationInput is an input type that accepts CustomProviderValidationArgs and CustomProviderValidationOutput values. // You can construct a concrete instance of `CustomProviderValidationInput` via: // // CustomProviderValidationArgs{...} type CustomProviderValidationInput interface { pulumi.Input ToCustomProviderValidationOutput() CustomProviderValidationOutput ToCustomProviderValidationOutputWithContext(context.Context) CustomProviderValidationOutput } type CustomProviderValidationArgs struct { // The endpoint where the validation specification is located. Specification pulumi.StringInput `pulumi:"specification"` } func (CustomProviderValidationArgs) ElementType() reflect.Type { return reflect.TypeOf((*CustomProviderValidation)(nil)).Elem() } func (i CustomProviderValidationArgs) ToCustomProviderValidationOutput() CustomProviderValidationOutput { return i.ToCustomProviderValidationOutputWithContext(context.Background()) } func (i CustomProviderValidationArgs) ToCustomProviderValidationOutputWithContext(ctx context.Context) CustomProviderValidationOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderValidationOutput) } // CustomProviderValidationArrayInput is an input type that accepts CustomProviderValidationArray and CustomProviderValidationArrayOutput values. // You can construct a concrete instance of `CustomProviderValidationArrayInput` via: // // CustomProviderValidationArray{ CustomProviderValidationArgs{...} } type CustomProviderValidationArrayInput interface { pulumi.Input ToCustomProviderValidationArrayOutput() CustomProviderValidationArrayOutput ToCustomProviderValidationArrayOutputWithContext(context.Context) CustomProviderValidationArrayOutput } type CustomProviderValidationArray []CustomProviderValidationInput func (CustomProviderValidationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]CustomProviderValidation)(nil)).Elem() } func (i CustomProviderValidationArray) ToCustomProviderValidationArrayOutput() CustomProviderValidationArrayOutput { return i.ToCustomProviderValidationArrayOutputWithContext(context.Background()) } func (i CustomProviderValidationArray) ToCustomProviderValidationArrayOutputWithContext(ctx context.Context) CustomProviderValidationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderValidationArrayOutput) } type CustomProviderValidationOutput struct{ *pulumi.OutputState } func (CustomProviderValidationOutput) ElementType() reflect.Type { return reflect.TypeOf((*CustomProviderValidation)(nil)).Elem() } func (o CustomProviderValidationOutput) ToCustomProviderValidationOutput() CustomProviderValidationOutput { return o } func (o CustomProviderValidationOutput) ToCustomProviderValidationOutputWithContext(ctx context.Context) CustomProviderValidationOutput { return o } // The endpoint where the validation specification is located. func (o CustomProviderValidationOutput) Specification() pulumi.StringOutput { return o.ApplyT(func(v CustomProviderValidation) string { return v.Specification }).(pulumi.StringOutput) } type CustomProviderValidationArrayOutput struct{ *pulumi.OutputState } func (CustomProviderValidationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]CustomProviderValidation)(nil)).Elem() } func (o CustomProviderValidationArrayOutput) ToCustomProviderValidationArrayOutput() CustomProviderValidationArrayOutput { return o } func (o CustomProviderValidationArrayOutput) ToCustomProviderValidationArrayOutputWithContext(ctx context.Context) CustomProviderValidationArrayOutput { return o } func (o CustomProviderValidationArrayOutput) Index(i pulumi.IntInput) CustomProviderValidationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) CustomProviderValidation { return vs[0].([]CustomProviderValidation)[vs[1].(int)] }).(CustomProviderValidationOutput) } type ResourceDeploymentScriptAzureCliContainer struct { // Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. ContainerGroupName *string `pulumi:"containerGroupName"` } // ResourceDeploymentScriptAzureCliContainerInput is an input type that accepts ResourceDeploymentScriptAzureCliContainerArgs and ResourceDeploymentScriptAzureCliContainerOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliContainerInput` via: // // ResourceDeploymentScriptAzureCliContainerArgs{...} type ResourceDeploymentScriptAzureCliContainerInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliContainerOutput() ResourceDeploymentScriptAzureCliContainerOutput ToResourceDeploymentScriptAzureCliContainerOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliContainerOutput } type ResourceDeploymentScriptAzureCliContainerArgs struct { // Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. ContainerGroupName pulumi.StringPtrInput `pulumi:"containerGroupName"` } func (ResourceDeploymentScriptAzureCliContainerArgs) ElementType() reflect.Type { return reflect.TypeOf((*ResourceDeploymentScriptAzureCliContainer)(nil)).Elem() } func (i ResourceDeploymentScriptAzureCliContainerArgs) ToResourceDeploymentScriptAzureCliContainerOutput() ResourceDeploymentScriptAzureCliContainerOutput { return i.ToResourceDeploymentScriptAzureCliContainerOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliContainerArgs) ToResourceDeploymentScriptAzureCliContainerOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliContainerOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliContainerOutput) } func (i ResourceDeploymentScriptAzureCliContainerArgs) ToResourceDeploymentScriptAzureCliContainerPtrOutput() ResourceDeploymentScriptAzureCliContainerPtrOutput { return i.ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliContainerArgs) ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliContainerPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliContainerOutput).ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(ctx) } // ResourceDeploymentScriptAzureCliContainerPtrInput is an input type that accepts ResourceDeploymentScriptAzureCliContainerArgs, ResourceDeploymentScriptAzureCliContainerPtr and ResourceDeploymentScriptAzureCliContainerPtrOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliContainerPtrInput` via: // // ResourceDeploymentScriptAzureCliContainerArgs{...} // // or: // // nil type ResourceDeploymentScriptAzureCliContainerPtrInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliContainerPtrOutput() ResourceDeploymentScriptAzureCliContainerPtrOutput ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliContainerPtrOutput } type resourceDeploymentScriptAzureCliContainerPtrType ResourceDeploymentScriptAzureCliContainerArgs func ResourceDeploymentScriptAzureCliContainerPtr(v *ResourceDeploymentScriptAzureCliContainerArgs) ResourceDeploymentScriptAzureCliContainerPtrInput { return (*resourceDeploymentScriptAzureCliContainerPtrType)(v) } func (*resourceDeploymentScriptAzureCliContainerPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ResourceDeploymentScriptAzureCliContainer)(nil)).Elem() } func (i *resourceDeploymentScriptAzureCliContainerPtrType) ToResourceDeploymentScriptAzureCliContainerPtrOutput() ResourceDeploymentScriptAzureCliContainerPtrOutput { return i.ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(context.Background()) } func (i *resourceDeploymentScriptAzureCliContainerPtrType) ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliContainerPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliContainerPtrOutput) } type ResourceDeploymentScriptAzureCliContainerOutput struct{ *pulumi.OutputState } func (ResourceDeploymentScriptAzureCliContainerOutput) ElementType() reflect.Type { return reflect.TypeOf((*ResourceDeploymentScriptAzureCliContainer)(nil)).Elem() } func (o ResourceDeploymentScriptAzureCliContainerOutput) ToResourceDeploymentScriptAzureCliContainerOutput() ResourceDeploymentScriptAzureCliContainerOutput { return o } func (o ResourceDeploymentScriptAzureCliContainerOutput) ToResourceDeploymentScriptAzureCliContainerOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliContainerOutput { return o } func (o ResourceDeploymentScriptAzureCliContainerOutput) ToResourceDeploymentScriptAzureCliContainerPtrOutput() ResourceDeploymentScriptAzureCliContainerPtrOutput { return o.ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(context.Background()) } func (o ResourceDeploymentScriptAzureCliContainerOutput) ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliContainerPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ResourceDeploymentScriptAzureCliContainer) *ResourceDeploymentScriptAzureCliContainer { return &v }).(ResourceDeploymentScriptAzureCliContainerPtrOutput) } // Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. func (o ResourceDeploymentScriptAzureCliContainerOutput) ContainerGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v ResourceDeploymentScriptAzureCliContainer) *string { return v.ContainerGroupName }).(pulumi.StringPtrOutput) } type ResourceDeploymentScriptAzureCliContainerPtrOutput struct{ *pulumi.OutputState } func (ResourceDeploymentScriptAzureCliContainerPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceDeploymentScriptAzureCliContainer)(nil)).Elem() } func (o ResourceDeploymentScriptAzureCliContainerPtrOutput) ToResourceDeploymentScriptAzureCliContainerPtrOutput() ResourceDeploymentScriptAzureCliContainerPtrOutput { return o } func (o ResourceDeploymentScriptAzureCliContainerPtrOutput) ToResourceDeploymentScriptAzureCliContainerPtrOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliContainerPtrOutput { return o } func (o ResourceDeploymentScriptAzureCliContainerPtrOutput) Elem() ResourceDeploymentScriptAzureCliContainerOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCliContainer) ResourceDeploymentScriptAzureCliContainer { if v != nil { return *v } var ret ResourceDeploymentScriptAzureCliContainer return ret }).(ResourceDeploymentScriptAzureCliContainerOutput) } // Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. func (o ResourceDeploymentScriptAzureCliContainerPtrOutput) ContainerGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCliContainer) *string { if v == nil { return nil } return v.ContainerGroupName }).(pulumi.StringPtrOutput) } type ResourceDeploymentScriptAzureCliEnvironmentVariable struct { // Specifies the name of the environment variable. Name string `pulumi:"name"` // Specifies the value of the secure environment variable. SecureValue *string `pulumi:"secureValue"` // Specifies the value of the environment variable. Value *string `pulumi:"value"` } // ResourceDeploymentScriptAzureCliEnvironmentVariableInput is an input type that accepts ResourceDeploymentScriptAzureCliEnvironmentVariableArgs and ResourceDeploymentScriptAzureCliEnvironmentVariableOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliEnvironmentVariableInput` via: // // ResourceDeploymentScriptAzureCliEnvironmentVariableArgs{...} type ResourceDeploymentScriptAzureCliEnvironmentVariableInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliEnvironmentVariableOutput() ResourceDeploymentScriptAzureCliEnvironmentVariableOutput ToResourceDeploymentScriptAzureCliEnvironmentVariableOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliEnvironmentVariableOutput } type ResourceDeploymentScriptAzureCliEnvironmentVariableArgs struct { // Specifies the name of the environment variable. Name pulumi.StringInput `pulumi:"name"` // Specifies the value of the secure environment variable. SecureValue pulumi.StringPtrInput `pulumi:"secureValue"` // Specifies the value of the environment variable. Value pulumi.StringPtrInput `pulumi:"value"` } func (ResourceDeploymentScriptAzureCliEnvironmentVariableArgs) ElementType() reflect.Type { return reflect.TypeOf((*ResourceDeploymentScriptAzureCliEnvironmentVariable)(nil)).Elem() } func (i ResourceDeploymentScriptAzureCliEnvironmentVariableArgs) ToResourceDeploymentScriptAzureCliEnvironmentVariableOutput() ResourceDeploymentScriptAzureCliEnvironmentVariableOutput { return i.ToResourceDeploymentScriptAzureCliEnvironmentVariableOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliEnvironmentVariableArgs) ToResourceDeploymentScriptAzureCliEnvironmentVariableOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliEnvironmentVariableOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) } // ResourceDeploymentScriptAzureCliEnvironmentVariableArrayInput is an input type that accepts ResourceDeploymentScriptAzureCliEnvironmentVariableArray and ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliEnvironmentVariableArrayInput` via: // // ResourceDeploymentScriptAzureCliEnvironmentVariableArray{ ResourceDeploymentScriptAzureCliEnvironmentVariableArgs{...} } type ResourceDeploymentScriptAzureCliEnvironmentVariableArrayInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput() ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput ToResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput } type ResourceDeploymentScriptAzureCliEnvironmentVariableArray []ResourceDeploymentScriptAzureCliEnvironmentVariableInput func (ResourceDeploymentScriptAzureCliEnvironmentVariableArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ResourceDeploymentScriptAzureCliEnvironmentVariable)(nil)).Elem() } func (i ResourceDeploymentScriptAzureCliEnvironmentVariableArray) ToResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput() ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput { return i.ToResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliEnvironmentVariableArray) ToResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput) } type ResourceDeploymentScriptAzureCliEnvironmentVariableOutput struct{ *pulumi.OutputState } func (ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) ElementType() reflect.Type { return reflect.TypeOf((*ResourceDeploymentScriptAzureCliEnvironmentVariable)(nil)).Elem() } func (o ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) ToResourceDeploymentScriptAzureCliEnvironmentVariableOutput() ResourceDeploymentScriptAzureCliEnvironmentVariableOutput { return o } func (o ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) ToResourceDeploymentScriptAzureCliEnvironmentVariableOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliEnvironmentVariableOutput { return o } // Specifies the name of the environment variable. func (o ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ResourceDeploymentScriptAzureCliEnvironmentVariable) string { return v.Name }).(pulumi.StringOutput) } // Specifies the value of the secure environment variable. func (o ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) SecureValue() pulumi.StringPtrOutput { return o.ApplyT(func(v ResourceDeploymentScriptAzureCliEnvironmentVariable) *string { return v.SecureValue }).(pulumi.StringPtrOutput) } // Specifies the value of the environment variable. func (o ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) Value() pulumi.StringPtrOutput { return o.ApplyT(func(v ResourceDeploymentScriptAzureCliEnvironmentVariable) *string { return v.Value }).(pulumi.StringPtrOutput) } type ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput struct{ *pulumi.OutputState } func (ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ResourceDeploymentScriptAzureCliEnvironmentVariable)(nil)).Elem() } func (o ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput) ToResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput() ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput { return o } func (o ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput) ToResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput { return o } func (o ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput) Index(i pulumi.IntInput) ResourceDeploymentScriptAzureCliEnvironmentVariableOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ResourceDeploymentScriptAzureCliEnvironmentVariable { return vs[0].([]ResourceDeploymentScriptAzureCliEnvironmentVariable)[vs[1].(int)] }).(ResourceDeploymentScriptAzureCliEnvironmentVariableOutput) } type ResourceDeploymentScriptAzureCliIdentity struct { // Specifies the list of user-assigned managed identity IDs associated with the resource. Changing this forces a new resource to be created. IdentityIds []string `pulumi:"identityIds"` // Type of the managed identity. The only possible value is `UserAssigned`. Changing this forces a new resource to be created. Type string `pulumi:"type"` } // ResourceDeploymentScriptAzureCliIdentityInput is an input type that accepts ResourceDeploymentScriptAzureCliIdentityArgs and ResourceDeploymentScriptAzureCliIdentityOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliIdentityInput` via: // // ResourceDeploymentScriptAzureCliIdentityArgs{...} type ResourceDeploymentScriptAzureCliIdentityInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliIdentityOutput() ResourceDeploymentScriptAzureCliIdentityOutput ToResourceDeploymentScriptAzureCliIdentityOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliIdentityOutput } type ResourceDeploymentScriptAzureCliIdentityArgs struct { // Specifies the list of user-assigned managed identity IDs associated with the resource. Changing this forces a new resource to be created. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // Type of the managed identity. The only possible value is `UserAssigned`. Changing this forces a new resource to be created. Type pulumi.StringInput `pulumi:"type"` } func (ResourceDeploymentScriptAzureCliIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*ResourceDeploymentScriptAzureCliIdentity)(nil)).Elem() } func (i ResourceDeploymentScriptAzureCliIdentityArgs) ToResourceDeploymentScriptAzureCliIdentityOutput() ResourceDeploymentScriptAzureCliIdentityOutput { return i.ToResourceDeploymentScriptAzureCliIdentityOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliIdentityArgs) ToResourceDeploymentScriptAzureCliIdentityOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliIdentityOutput) } func (i ResourceDeploymentScriptAzureCliIdentityArgs) ToResourceDeploymentScriptAzureCliIdentityPtrOutput() ResourceDeploymentScriptAzureCliIdentityPtrOutput { return i.ToResourceDeploymentScriptAzureCliIdentityPtrOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliIdentityArgs) ToResourceDeploymentScriptAzureCliIdentityPtrOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliIdentityOutput).ToResourceDeploymentScriptAzureCliIdentityPtrOutputWithContext(ctx) } // ResourceDeploymentScriptAzureCliIdentityPtrInput is an input type that accepts ResourceDeploymentScriptAzureCliIdentityArgs, ResourceDeploymentScriptAzureCliIdentityPtr and ResourceDeploymentScriptAzureCliIdentityPtrOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliIdentityPtrInput` via: // // ResourceDeploymentScriptAzureCliIdentityArgs{...} // // or: // // nil type ResourceDeploymentScriptAzureCliIdentityPtrInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliIdentityPtrOutput() ResourceDeploymentScriptAzureCliIdentityPtrOutput ToResourceDeploymentScriptAzureCliIdentityPtrOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliIdentityPtrOutput } type resourceDeploymentScriptAzureCliIdentityPtrType ResourceDeploymentScriptAzureCliIdentityArgs func ResourceDeploymentScriptAzureCliIdentityPtr(v *ResourceDeploymentScriptAzureCliIdentityArgs) ResourceDeploymentScriptAzureCliIdentityPtrInput { return (*resourceDeploymentScriptAzureCliIdentityPtrType)(v) } func (*resourceDeploymentScriptAzureCliIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ResourceDeploymentScriptAzureCliIdentity)(nil)).Elem() } func (i *resourceDeploymentScriptAzureCliIdentityPtrType) ToResourceDeploymentScriptAzureCliIdentityPtrOutput() ResourceDeploymentScriptAzureCliIdentityPtrOutput { return i.ToResourceDeploymentScriptAzureCliIdentityPtrOutputWithContext(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/core/tenantTemplateDeployment.go
sdk/go/azure/core/tenantTemplateDeployment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.GetTemplateSpecVersion(ctx, &core.GetTemplateSpecVersionArgs{ // Name: "myTemplateForTenant", // ResourceGroupName: "myResourceGroup", // Version: "v0.1", // }, nil) // if err != nil { // return err // } // _, err = core.NewTenantTemplateDeployment(ctx, "example", &core.TenantTemplateDeploymentArgs{ // Name: pulumi.String("example"), // Location: pulumi.String("West Europe"), // TemplateSpecVersionId: pulumi.String(example.Id), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Tenant Template Deployments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/tenantTemplateDeployment:TenantTemplateDeployment example /providers/Microsoft.Resources/deployments/deploy1 // ``` type TenantTemplateDeployment struct { pulumi.CustomResourceState // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrOutput `pulumi:"debugLevel"` // The Azure Region where the Template should exist. Changing this forces a new Template to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Template. Changing this forces a new Template to be created. Name pulumi.StringOutput `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent pulumi.StringOutput `pulumi:"outputContent"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent pulumi.StringOutput `pulumi:"parametersContent"` // A mapping of tags which should be assigned to the Template. Tags pulumi.StringMapOutput `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent pulumi.StringOutput `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrOutput `pulumi:"templateSpecVersionId"` } // NewTenantTemplateDeployment registers a new resource with the given unique name, arguments, and options. func NewTenantTemplateDeployment(ctx *pulumi.Context, name string, args *TenantTemplateDeploymentArgs, opts ...pulumi.ResourceOption) (*TenantTemplateDeployment, error) { if args == nil { args = &TenantTemplateDeploymentArgs{} } opts = internal.PkgResourceDefaultOpts(opts) var resource TenantTemplateDeployment err := ctx.RegisterResource("azure:core/tenantTemplateDeployment:TenantTemplateDeployment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetTenantTemplateDeployment gets an existing TenantTemplateDeployment resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetTenantTemplateDeployment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TenantTemplateDeploymentState, opts ...pulumi.ResourceOption) (*TenantTemplateDeployment, error) { var resource TenantTemplateDeployment err := ctx.ReadResource("azure:core/tenantTemplateDeployment:TenantTemplateDeployment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering TenantTemplateDeployment resources. type tenantTemplateDeploymentState struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel *string `pulumi:"debugLevel"` // The Azure Region where the Template should exist. Changing this forces a new Template to be created. Location *string `pulumi:"location"` // The name which should be used for this Template. Changing this forces a new Template to be created. Name *string `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent *string `pulumi:"outputContent"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent *string `pulumi:"parametersContent"` // A mapping of tags which should be assigned to the Template. Tags map[string]string `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent *string `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"` } type TenantTemplateDeploymentState struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrInput // The Azure Region where the Template should exist. Changing this forces a new Template to be created. Location pulumi.StringPtrInput // The name which should be used for this Template. Changing this forces a new Template to be created. Name pulumi.StringPtrInput // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent pulumi.StringPtrInput // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent pulumi.StringPtrInput // A mapping of tags which should be assigned to the Template. Tags pulumi.StringMapInput // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent pulumi.StringPtrInput // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrInput } func (TenantTemplateDeploymentState) ElementType() reflect.Type { return reflect.TypeOf((*tenantTemplateDeploymentState)(nil)).Elem() } type tenantTemplateDeploymentArgs struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel *string `pulumi:"debugLevel"` // The Azure Region where the Template should exist. Changing this forces a new Template to be created. Location *string `pulumi:"location"` // The name which should be used for this Template. Changing this forces a new Template to be created. Name *string `pulumi:"name"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent *string `pulumi:"parametersContent"` // A mapping of tags which should be assigned to the Template. Tags map[string]string `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent *string `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"` } // The set of arguments for constructing a TenantTemplateDeployment resource. type TenantTemplateDeploymentArgs struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrInput // The Azure Region where the Template should exist. Changing this forces a new Template to be created. Location pulumi.StringPtrInput // The name which should be used for this Template. Changing this forces a new Template to be created. Name pulumi.StringPtrInput // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent pulumi.StringPtrInput // A mapping of tags which should be assigned to the Template. Tags pulumi.StringMapInput // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent pulumi.StringPtrInput // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrInput } func (TenantTemplateDeploymentArgs) ElementType() reflect.Type { return reflect.TypeOf((*tenantTemplateDeploymentArgs)(nil)).Elem() } type TenantTemplateDeploymentInput interface { pulumi.Input ToTenantTemplateDeploymentOutput() TenantTemplateDeploymentOutput ToTenantTemplateDeploymentOutputWithContext(ctx context.Context) TenantTemplateDeploymentOutput } func (*TenantTemplateDeployment) ElementType() reflect.Type { return reflect.TypeOf((**TenantTemplateDeployment)(nil)).Elem() } func (i *TenantTemplateDeployment) ToTenantTemplateDeploymentOutput() TenantTemplateDeploymentOutput { return i.ToTenantTemplateDeploymentOutputWithContext(context.Background()) } func (i *TenantTemplateDeployment) ToTenantTemplateDeploymentOutputWithContext(ctx context.Context) TenantTemplateDeploymentOutput { return pulumi.ToOutputWithContext(ctx, i).(TenantTemplateDeploymentOutput) } // TenantTemplateDeploymentArrayInput is an input type that accepts TenantTemplateDeploymentArray and TenantTemplateDeploymentArrayOutput values. // You can construct a concrete instance of `TenantTemplateDeploymentArrayInput` via: // // TenantTemplateDeploymentArray{ TenantTemplateDeploymentArgs{...} } type TenantTemplateDeploymentArrayInput interface { pulumi.Input ToTenantTemplateDeploymentArrayOutput() TenantTemplateDeploymentArrayOutput ToTenantTemplateDeploymentArrayOutputWithContext(context.Context) TenantTemplateDeploymentArrayOutput } type TenantTemplateDeploymentArray []TenantTemplateDeploymentInput func (TenantTemplateDeploymentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*TenantTemplateDeployment)(nil)).Elem() } func (i TenantTemplateDeploymentArray) ToTenantTemplateDeploymentArrayOutput() TenantTemplateDeploymentArrayOutput { return i.ToTenantTemplateDeploymentArrayOutputWithContext(context.Background()) } func (i TenantTemplateDeploymentArray) ToTenantTemplateDeploymentArrayOutputWithContext(ctx context.Context) TenantTemplateDeploymentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TenantTemplateDeploymentArrayOutput) } // TenantTemplateDeploymentMapInput is an input type that accepts TenantTemplateDeploymentMap and TenantTemplateDeploymentMapOutput values. // You can construct a concrete instance of `TenantTemplateDeploymentMapInput` via: // // TenantTemplateDeploymentMap{ "key": TenantTemplateDeploymentArgs{...} } type TenantTemplateDeploymentMapInput interface { pulumi.Input ToTenantTemplateDeploymentMapOutput() TenantTemplateDeploymentMapOutput ToTenantTemplateDeploymentMapOutputWithContext(context.Context) TenantTemplateDeploymentMapOutput } type TenantTemplateDeploymentMap map[string]TenantTemplateDeploymentInput func (TenantTemplateDeploymentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TenantTemplateDeployment)(nil)).Elem() } func (i TenantTemplateDeploymentMap) ToTenantTemplateDeploymentMapOutput() TenantTemplateDeploymentMapOutput { return i.ToTenantTemplateDeploymentMapOutputWithContext(context.Background()) } func (i TenantTemplateDeploymentMap) ToTenantTemplateDeploymentMapOutputWithContext(ctx context.Context) TenantTemplateDeploymentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(TenantTemplateDeploymentMapOutput) } type TenantTemplateDeploymentOutput struct{ *pulumi.OutputState } func (TenantTemplateDeploymentOutput) ElementType() reflect.Type { return reflect.TypeOf((**TenantTemplateDeployment)(nil)).Elem() } func (o TenantTemplateDeploymentOutput) ToTenantTemplateDeploymentOutput() TenantTemplateDeploymentOutput { return o } func (o TenantTemplateDeploymentOutput) ToTenantTemplateDeploymentOutputWithContext(ctx context.Context) TenantTemplateDeploymentOutput { return o } // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. func (o TenantTemplateDeploymentOutput) DebugLevel() pulumi.StringPtrOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringPtrOutput { return v.DebugLevel }).(pulumi.StringPtrOutput) } // The Azure Region where the Template should exist. Changing this forces a new Template to be created. func (o TenantTemplateDeploymentOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Template. Changing this forces a new Template to be created. func (o TenantTemplateDeploymentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The JSON Content of the Outputs of the ARM Template Deployment. func (o TenantTemplateDeploymentOutput) OutputContent() pulumi.StringOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringOutput { return v.OutputContent }).(pulumi.StringOutput) } // The contents of the ARM Template parameters file - containing a JSON list of parameters. func (o TenantTemplateDeploymentOutput) ParametersContent() pulumi.StringOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringOutput { return v.ParametersContent }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Template. func (o TenantTemplateDeploymentOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. func (o TenantTemplateDeploymentOutput) TemplateContent() pulumi.StringOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringOutput { return v.TemplateContent }).(pulumi.StringOutput) } // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. func (o TenantTemplateDeploymentOutput) TemplateSpecVersionId() pulumi.StringPtrOutput { return o.ApplyT(func(v *TenantTemplateDeployment) pulumi.StringPtrOutput { return v.TemplateSpecVersionId }).(pulumi.StringPtrOutput) } type TenantTemplateDeploymentArrayOutput struct{ *pulumi.OutputState } func (TenantTemplateDeploymentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*TenantTemplateDeployment)(nil)).Elem() } func (o TenantTemplateDeploymentArrayOutput) ToTenantTemplateDeploymentArrayOutput() TenantTemplateDeploymentArrayOutput { return o } func (o TenantTemplateDeploymentArrayOutput) ToTenantTemplateDeploymentArrayOutputWithContext(ctx context.Context) TenantTemplateDeploymentArrayOutput { return o } func (o TenantTemplateDeploymentArrayOutput) Index(i pulumi.IntInput) TenantTemplateDeploymentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TenantTemplateDeployment { return vs[0].([]*TenantTemplateDeployment)[vs[1].(int)] }).(TenantTemplateDeploymentOutput) } type TenantTemplateDeploymentMapOutput struct{ *pulumi.OutputState } func (TenantTemplateDeploymentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TenantTemplateDeployment)(nil)).Elem() } func (o TenantTemplateDeploymentMapOutput) ToTenantTemplateDeploymentMapOutput() TenantTemplateDeploymentMapOutput { return o } func (o TenantTemplateDeploymentMapOutput) ToTenantTemplateDeploymentMapOutputWithContext(ctx context.Context) TenantTemplateDeploymentMapOutput { return o } func (o TenantTemplateDeploymentMapOutput) MapIndex(k pulumi.StringInput) TenantTemplateDeploymentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TenantTemplateDeployment { return vs[0].(map[string]*TenantTemplateDeployment)[vs[1].(string)] }).(TenantTemplateDeploymentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*TenantTemplateDeploymentInput)(nil)).Elem(), &TenantTemplateDeployment{}) pulumi.RegisterInputType(reflect.TypeOf((*TenantTemplateDeploymentArrayInput)(nil)).Elem(), TenantTemplateDeploymentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*TenantTemplateDeploymentMapInput)(nil)).Elem(), TenantTemplateDeploymentMap{}) pulumi.RegisterOutputType(TenantTemplateDeploymentOutput{}) pulumi.RegisterOutputType(TenantTemplateDeploymentArrayOutput{}) pulumi.RegisterOutputType(TenantTemplateDeploymentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/subscriptionPolicyRemediation.go
sdk/go/azure/core/subscriptionPolicyRemediation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Subscription Policy Remediation. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleGetPolicyDefintion, err := policy.GetPolicyDefintion(ctx, &policy.GetPolicyDefintionArgs{ // DisplayName: pulumi.StringRef("Allowed resource types"), // }, nil) // if err != nil { // return err // } // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "listOfAllowedLocations": map[string]interface{}{ // "value": []string{ // "West Europe", // "East US", // }, // }, // }) // if err != nil { // return err // } // json0 := string(tmpJSON0) // exampleSubscriptionPolicyAssignment, err := core.NewSubscriptionPolicyAssignment(ctx, "example", &core.SubscriptionPolicyAssignmentArgs{ // Name: pulumi.String("exampleAssignment"), // SubscriptionId: pulumi.String(example.Id), // PolicyDefinitionId: pulumi.String(exampleGetPolicyDefintion.Id), // Parameters: pulumi.String(json0), // }) // if err != nil { // return err // } // _, err = core.NewSubscriptionPolicyRemediation(ctx, "example", &core.SubscriptionPolicyRemediationArgs{ // Name: pulumi.String("example"), // SubscriptionId: pulumi.String(example.Id), // PolicyAssignmentId: exampleSubscriptionPolicyAssignment.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.PolicyInsights` - 2021-10-01 // // ## Import // // Policy Remediations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/subscriptionPolicyRemediation:SubscriptionPolicyRemediation example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/remediations/remediation1 // ``` type SubscriptionPolicyRemediation struct { pulumi.CustomResourceState // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrOutput `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayOutput `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrOutput `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrOutput `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrOutput `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrOutput `pulumi:"resourceDiscoveryMode"` // The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewSubscriptionPolicyRemediation registers a new resource with the given unique name, arguments, and options. func NewSubscriptionPolicyRemediation(ctx *pulumi.Context, name string, args *SubscriptionPolicyRemediationArgs, opts ...pulumi.ResourceOption) (*SubscriptionPolicyRemediation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyAssignmentId == nil { return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'") } if args.SubscriptionId == nil { return nil, errors.New("invalid value for required argument 'SubscriptionId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubscriptionPolicyRemediation err := ctx.RegisterResource("azure:core/subscriptionPolicyRemediation:SubscriptionPolicyRemediation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubscriptionPolicyRemediation gets an existing SubscriptionPolicyRemediation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubscriptionPolicyRemediation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionPolicyRemediationState, opts ...pulumi.ResourceOption) (*SubscriptionPolicyRemediation, error) { var resource SubscriptionPolicyRemediation err := ctx.ReadResource("azure:core/subscriptionPolicyRemediation:SubscriptionPolicyRemediation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubscriptionPolicyRemediation resources. type subscriptionPolicyRemediationState struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage *float64 `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters []string `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments *int `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId *string `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount *int `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"` // The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. SubscriptionId *string `pulumi:"subscriptionId"` } type SubscriptionPolicyRemediationState struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrInput // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayInput // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrInput // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringPtrInput // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrInput // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrInput // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrInput // The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. SubscriptionId pulumi.StringPtrInput } func (SubscriptionPolicyRemediationState) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionPolicyRemediationState)(nil)).Elem() } type subscriptionPolicyRemediationArgs struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage *float64 `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters []string `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments *int `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId string `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount *int `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"` // The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. SubscriptionId string `pulumi:"subscriptionId"` } // The set of arguments for constructing a SubscriptionPolicyRemediation resource. type SubscriptionPolicyRemediationArgs struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrInput // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayInput // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrInput // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringInput // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrInput // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrInput // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrInput // The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. SubscriptionId pulumi.StringInput } func (SubscriptionPolicyRemediationArgs) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionPolicyRemediationArgs)(nil)).Elem() } type SubscriptionPolicyRemediationInput interface { pulumi.Input ToSubscriptionPolicyRemediationOutput() SubscriptionPolicyRemediationOutput ToSubscriptionPolicyRemediationOutputWithContext(ctx context.Context) SubscriptionPolicyRemediationOutput } func (*SubscriptionPolicyRemediation) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionPolicyRemediation)(nil)).Elem() } func (i *SubscriptionPolicyRemediation) ToSubscriptionPolicyRemediationOutput() SubscriptionPolicyRemediationOutput { return i.ToSubscriptionPolicyRemediationOutputWithContext(context.Background()) } func (i *SubscriptionPolicyRemediation) ToSubscriptionPolicyRemediationOutputWithContext(ctx context.Context) SubscriptionPolicyRemediationOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyRemediationOutput) } // SubscriptionPolicyRemediationArrayInput is an input type that accepts SubscriptionPolicyRemediationArray and SubscriptionPolicyRemediationArrayOutput values. // You can construct a concrete instance of `SubscriptionPolicyRemediationArrayInput` via: // // SubscriptionPolicyRemediationArray{ SubscriptionPolicyRemediationArgs{...} } type SubscriptionPolicyRemediationArrayInput interface { pulumi.Input ToSubscriptionPolicyRemediationArrayOutput() SubscriptionPolicyRemediationArrayOutput ToSubscriptionPolicyRemediationArrayOutputWithContext(context.Context) SubscriptionPolicyRemediationArrayOutput } type SubscriptionPolicyRemediationArray []SubscriptionPolicyRemediationInput func (SubscriptionPolicyRemediationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionPolicyRemediation)(nil)).Elem() } func (i SubscriptionPolicyRemediationArray) ToSubscriptionPolicyRemediationArrayOutput() SubscriptionPolicyRemediationArrayOutput { return i.ToSubscriptionPolicyRemediationArrayOutputWithContext(context.Background()) } func (i SubscriptionPolicyRemediationArray) ToSubscriptionPolicyRemediationArrayOutputWithContext(ctx context.Context) SubscriptionPolicyRemediationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyRemediationArrayOutput) } // SubscriptionPolicyRemediationMapInput is an input type that accepts SubscriptionPolicyRemediationMap and SubscriptionPolicyRemediationMapOutput values. // You can construct a concrete instance of `SubscriptionPolicyRemediationMapInput` via: // // SubscriptionPolicyRemediationMap{ "key": SubscriptionPolicyRemediationArgs{...} } type SubscriptionPolicyRemediationMapInput interface { pulumi.Input ToSubscriptionPolicyRemediationMapOutput() SubscriptionPolicyRemediationMapOutput ToSubscriptionPolicyRemediationMapOutputWithContext(context.Context) SubscriptionPolicyRemediationMapOutput } type SubscriptionPolicyRemediationMap map[string]SubscriptionPolicyRemediationInput func (SubscriptionPolicyRemediationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionPolicyRemediation)(nil)).Elem() } func (i SubscriptionPolicyRemediationMap) ToSubscriptionPolicyRemediationMapOutput() SubscriptionPolicyRemediationMapOutput { return i.ToSubscriptionPolicyRemediationMapOutputWithContext(context.Background()) } func (i SubscriptionPolicyRemediationMap) ToSubscriptionPolicyRemediationMapOutputWithContext(ctx context.Context) SubscriptionPolicyRemediationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyRemediationMapOutput) } type SubscriptionPolicyRemediationOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyRemediationOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionPolicyRemediation)(nil)).Elem() } func (o SubscriptionPolicyRemediationOutput) ToSubscriptionPolicyRemediationOutput() SubscriptionPolicyRemediationOutput { return o } func (o SubscriptionPolicyRemediationOutput) ToSubscriptionPolicyRemediationOutputWithContext(ctx context.Context) SubscriptionPolicyRemediationOutput { return o } // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. func (o SubscriptionPolicyRemediationOutput) FailurePercentage() pulumi.Float64PtrOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.Float64PtrOutput { return v.FailurePercentage }).(pulumi.Float64PtrOutput) } // A list of the resource locations that will be remediated. func (o SubscriptionPolicyRemediationOutput) LocationFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.StringArrayOutput { return v.LocationFilters }).(pulumi.StringArrayOutput) } // The name of the Policy Remediation. Changing this forces a new resource to be created. func (o SubscriptionPolicyRemediationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. func (o SubscriptionPolicyRemediationOutput) ParallelDeployments() pulumi.IntPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.IntPtrOutput { return v.ParallelDeployments }).(pulumi.IntPtrOutput) } // The ID of the Policy Assignment that should be remediated. func (o SubscriptionPolicyRemediationOutput) PolicyAssignmentId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput) } // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. func (o SubscriptionPolicyRemediationOutput) PolicyDefinitionReferenceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.StringPtrOutput { return v.PolicyDefinitionReferenceId }).(pulumi.StringPtrOutput) } // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. func (o SubscriptionPolicyRemediationOutput) ResourceCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.IntPtrOutput { return v.ResourceCount }).(pulumi.IntPtrOutput) } // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. func (o SubscriptionPolicyRemediationOutput) ResourceDiscoveryMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.StringPtrOutput { return v.ResourceDiscoveryMode }).(pulumi.StringPtrOutput) } // The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. func (o SubscriptionPolicyRemediationOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyRemediation) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type SubscriptionPolicyRemediationArrayOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyRemediationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionPolicyRemediation)(nil)).Elem() } func (o SubscriptionPolicyRemediationArrayOutput) ToSubscriptionPolicyRemediationArrayOutput() SubscriptionPolicyRemediationArrayOutput { return o } func (o SubscriptionPolicyRemediationArrayOutput) ToSubscriptionPolicyRemediationArrayOutputWithContext(ctx context.Context) SubscriptionPolicyRemediationArrayOutput { return o } func (o SubscriptionPolicyRemediationArrayOutput) Index(i pulumi.IntInput) SubscriptionPolicyRemediationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionPolicyRemediation { return vs[0].([]*SubscriptionPolicyRemediation)[vs[1].(int)] }).(SubscriptionPolicyRemediationOutput) } type SubscriptionPolicyRemediationMapOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyRemediationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionPolicyRemediation)(nil)).Elem() } func (o SubscriptionPolicyRemediationMapOutput) ToSubscriptionPolicyRemediationMapOutput() SubscriptionPolicyRemediationMapOutput { return o } func (o SubscriptionPolicyRemediationMapOutput) ToSubscriptionPolicyRemediationMapOutputWithContext(ctx context.Context) SubscriptionPolicyRemediationMapOutput { return o } func (o SubscriptionPolicyRemediationMapOutput) MapIndex(k pulumi.StringInput) SubscriptionPolicyRemediationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionPolicyRemediation { return vs[0].(map[string]*SubscriptionPolicyRemediation)[vs[1].(string)] }).(SubscriptionPolicyRemediationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyRemediationInput)(nil)).Elem(), &SubscriptionPolicyRemediation{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyRemediationArrayInput)(nil)).Elem(), SubscriptionPolicyRemediationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyRemediationMapInput)(nil)).Elem(), SubscriptionPolicyRemediationMap{}) pulumi.RegisterOutputType(SubscriptionPolicyRemediationOutput{}) pulumi.RegisterOutputType(SubscriptionPolicyRemediationArrayOutput{}) pulumi.RegisterOutputType(SubscriptionPolicyRemediationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/portalTenantConfiguration.go
sdk/go/azure/core/portalTenantConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages Portal Tenant Configuration. // // > **Note:** User has to be `Contributor` or `Owner` at scope `/` for managing this resource. // // > **Note:** The Service Principal with Tenant Admin can be created by `az ad sp create-for-rbac --name "<sp name>" --role="Contributor" --scopes="/"`. // // > **Note:** The Service Principal can be granted Tenant Admin permission by `az role assignment create --assignee "<app id>" --role "Contributor" --scope "/"`. // // > **Note:** While assigning the role to the existing/new Service Principal at the Tenant Scope, the user assigning role must already have the `Owner` role assigned at the Tenant Scope. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // _, err := core.NewPortalTenantConfiguration(ctx, "example", &core.PortalTenantConfigurationArgs{ // PrivateMarkdownStorageEnforced: pulumi.Bool(true), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Portal` - 2019-01-01-preview // // ## Import // // Portal Tenant Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/portalTenantConfiguration:PortalTenantConfiguration example /providers/Microsoft.Portal/tenantConfigurations/default // ``` type PortalTenantConfiguration struct { pulumi.CustomResourceState // Is the private tile markdown storage which used to display custom dynamic and static content enabled? // // > **Note:** When `privateMarkdownStorageEnforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. PrivateMarkdownStorageEnforced pulumi.BoolOutput `pulumi:"privateMarkdownStorageEnforced"` } // NewPortalTenantConfiguration registers a new resource with the given unique name, arguments, and options. func NewPortalTenantConfiguration(ctx *pulumi.Context, name string, args *PortalTenantConfigurationArgs, opts ...pulumi.ResourceOption) (*PortalTenantConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrivateMarkdownStorageEnforced == nil { return nil, errors.New("invalid value for required argument 'PrivateMarkdownStorageEnforced'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PortalTenantConfiguration err := ctx.RegisterResource("azure:core/portalTenantConfiguration:PortalTenantConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPortalTenantConfiguration gets an existing PortalTenantConfiguration resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetPortalTenantConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PortalTenantConfigurationState, opts ...pulumi.ResourceOption) (*PortalTenantConfiguration, error) { var resource PortalTenantConfiguration err := ctx.ReadResource("azure:core/portalTenantConfiguration:PortalTenantConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PortalTenantConfiguration resources. type portalTenantConfigurationState struct { // Is the private tile markdown storage which used to display custom dynamic and static content enabled? // // > **Note:** When `privateMarkdownStorageEnforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. PrivateMarkdownStorageEnforced *bool `pulumi:"privateMarkdownStorageEnforced"` } type PortalTenantConfigurationState struct { // Is the private tile markdown storage which used to display custom dynamic and static content enabled? // // > **Note:** When `privateMarkdownStorageEnforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. PrivateMarkdownStorageEnforced pulumi.BoolPtrInput } func (PortalTenantConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*portalTenantConfigurationState)(nil)).Elem() } type portalTenantConfigurationArgs struct { // Is the private tile markdown storage which used to display custom dynamic and static content enabled? // // > **Note:** When `privateMarkdownStorageEnforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. PrivateMarkdownStorageEnforced bool `pulumi:"privateMarkdownStorageEnforced"` } // The set of arguments for constructing a PortalTenantConfiguration resource. type PortalTenantConfigurationArgs struct { // Is the private tile markdown storage which used to display custom dynamic and static content enabled? // // > **Note:** When `privateMarkdownStorageEnforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. PrivateMarkdownStorageEnforced pulumi.BoolInput } func (PortalTenantConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*portalTenantConfigurationArgs)(nil)).Elem() } type PortalTenantConfigurationInput interface { pulumi.Input ToPortalTenantConfigurationOutput() PortalTenantConfigurationOutput ToPortalTenantConfigurationOutputWithContext(ctx context.Context) PortalTenantConfigurationOutput } func (*PortalTenantConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**PortalTenantConfiguration)(nil)).Elem() } func (i *PortalTenantConfiguration) ToPortalTenantConfigurationOutput() PortalTenantConfigurationOutput { return i.ToPortalTenantConfigurationOutputWithContext(context.Background()) } func (i *PortalTenantConfiguration) ToPortalTenantConfigurationOutputWithContext(ctx context.Context) PortalTenantConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(PortalTenantConfigurationOutput) } // PortalTenantConfigurationArrayInput is an input type that accepts PortalTenantConfigurationArray and PortalTenantConfigurationArrayOutput values. // You can construct a concrete instance of `PortalTenantConfigurationArrayInput` via: // // PortalTenantConfigurationArray{ PortalTenantConfigurationArgs{...} } type PortalTenantConfigurationArrayInput interface { pulumi.Input ToPortalTenantConfigurationArrayOutput() PortalTenantConfigurationArrayOutput ToPortalTenantConfigurationArrayOutputWithContext(context.Context) PortalTenantConfigurationArrayOutput } type PortalTenantConfigurationArray []PortalTenantConfigurationInput func (PortalTenantConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PortalTenantConfiguration)(nil)).Elem() } func (i PortalTenantConfigurationArray) ToPortalTenantConfigurationArrayOutput() PortalTenantConfigurationArrayOutput { return i.ToPortalTenantConfigurationArrayOutputWithContext(context.Background()) } func (i PortalTenantConfigurationArray) ToPortalTenantConfigurationArrayOutputWithContext(ctx context.Context) PortalTenantConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PortalTenantConfigurationArrayOutput) } // PortalTenantConfigurationMapInput is an input type that accepts PortalTenantConfigurationMap and PortalTenantConfigurationMapOutput values. // You can construct a concrete instance of `PortalTenantConfigurationMapInput` via: // // PortalTenantConfigurationMap{ "key": PortalTenantConfigurationArgs{...} } type PortalTenantConfigurationMapInput interface { pulumi.Input ToPortalTenantConfigurationMapOutput() PortalTenantConfigurationMapOutput ToPortalTenantConfigurationMapOutputWithContext(context.Context) PortalTenantConfigurationMapOutput } type PortalTenantConfigurationMap map[string]PortalTenantConfigurationInput func (PortalTenantConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PortalTenantConfiguration)(nil)).Elem() } func (i PortalTenantConfigurationMap) ToPortalTenantConfigurationMapOutput() PortalTenantConfigurationMapOutput { return i.ToPortalTenantConfigurationMapOutputWithContext(context.Background()) } func (i PortalTenantConfigurationMap) ToPortalTenantConfigurationMapOutputWithContext(ctx context.Context) PortalTenantConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PortalTenantConfigurationMapOutput) } type PortalTenantConfigurationOutput struct{ *pulumi.OutputState } func (PortalTenantConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**PortalTenantConfiguration)(nil)).Elem() } func (o PortalTenantConfigurationOutput) ToPortalTenantConfigurationOutput() PortalTenantConfigurationOutput { return o } func (o PortalTenantConfigurationOutput) ToPortalTenantConfigurationOutputWithContext(ctx context.Context) PortalTenantConfigurationOutput { return o } // Is the private tile markdown storage which used to display custom dynamic and static content enabled? // // > **Note:** When `privateMarkdownStorageEnforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. func (o PortalTenantConfigurationOutput) PrivateMarkdownStorageEnforced() pulumi.BoolOutput { return o.ApplyT(func(v *PortalTenantConfiguration) pulumi.BoolOutput { return v.PrivateMarkdownStorageEnforced }).(pulumi.BoolOutput) } type PortalTenantConfigurationArrayOutput struct{ *pulumi.OutputState } func (PortalTenantConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PortalTenantConfiguration)(nil)).Elem() } func (o PortalTenantConfigurationArrayOutput) ToPortalTenantConfigurationArrayOutput() PortalTenantConfigurationArrayOutput { return o } func (o PortalTenantConfigurationArrayOutput) ToPortalTenantConfigurationArrayOutputWithContext(ctx context.Context) PortalTenantConfigurationArrayOutput { return o } func (o PortalTenantConfigurationArrayOutput) Index(i pulumi.IntInput) PortalTenantConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PortalTenantConfiguration { return vs[0].([]*PortalTenantConfiguration)[vs[1].(int)] }).(PortalTenantConfigurationOutput) } type PortalTenantConfigurationMapOutput struct{ *pulumi.OutputState } func (PortalTenantConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PortalTenantConfiguration)(nil)).Elem() } func (o PortalTenantConfigurationMapOutput) ToPortalTenantConfigurationMapOutput() PortalTenantConfigurationMapOutput { return o } func (o PortalTenantConfigurationMapOutput) ToPortalTenantConfigurationMapOutputWithContext(ctx context.Context) PortalTenantConfigurationMapOutput { return o } func (o PortalTenantConfigurationMapOutput) MapIndex(k pulumi.StringInput) PortalTenantConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PortalTenantConfiguration { return vs[0].(map[string]*PortalTenantConfiguration)[vs[1].(string)] }).(PortalTenantConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PortalTenantConfigurationInput)(nil)).Elem(), &PortalTenantConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*PortalTenantConfigurationArrayInput)(nil)).Elem(), PortalTenantConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PortalTenantConfigurationMapInput)(nil)).Elem(), PortalTenantConfigurationMap{}) pulumi.RegisterOutputType(PortalTenantConfigurationOutput{}) pulumi.RegisterOutputType(PortalTenantConfigurationArrayOutput{}) pulumi.RegisterOutputType(PortalTenantConfigurationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceGroupCostManagementExport.go
sdk/go/azure/core/resourceGroupCostManagementExport.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Cost Management Export for a Resource Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // 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("examplecontainer"), // StorageAccountName: exampleAccount.Name, // }) // if err != nil { // return err // } // _, err = core.NewResourceGroupCostManagementExport(ctx, "example", &core.ResourceGroupCostManagementExportArgs{ // Name: pulumi.String("example"), // ResourceGroupId: example.ID(), // RecurrenceType: pulumi.String("Monthly"), // RecurrencePeriodStartDate: pulumi.String("2020-08-18T00:00:00Z"), // RecurrencePeriodEndDate: pulumi.String("2020-09-18T00:00:00Z"), // FileFormat: pulumi.String("Csv"), // ExportDataStorageLocation: &core.ResourceGroupCostManagementExportExportDataStorageLocationArgs{ // ContainerId: exampleContainer.ID(), // RootFolderPath: pulumi.String("/root/updated"), // }, // ExportDataOptions: &core.ResourceGroupCostManagementExportExportDataOptionsArgs{ // Type: pulumi.String("Usage"), // TimeFrame: pulumi.String("WeekToDate"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.CostManagement` - 2023-08-01 // // ## Import // // Cost Management Export for a Resource Group can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceGroupCostManagementExport:ResourceGroupCostManagementExport example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.CostManagement/exports/export1 // ``` type ResourceGroupCostManagementExport struct { pulumi.CustomResourceState // Is the cost management export active? Default is `true`. Active pulumi.BoolPtrOutput `pulumi:"active"` // A `exportDataOptions` block as defined below. ExportDataOptions ResourceGroupCostManagementExportExportDataOptionsOutput `pulumi:"exportDataOptions"` // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation ResourceGroupCostManagementExportExportDataStorageLocationOutput `pulumi:"exportDataStorageLocation"` // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat pulumi.StringPtrOutput `pulumi:"fileFormat"` // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The date the export will stop capturing information. RecurrencePeriodEndDate pulumi.StringOutput `pulumi:"recurrencePeriodEndDate"` // The date the export will start capturing information. RecurrencePeriodStartDate pulumi.StringOutput `pulumi:"recurrencePeriodStartDate"` // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType pulumi.StringOutput `pulumi:"recurrenceType"` // The id of the resource group on which to create an export. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"` } // NewResourceGroupCostManagementExport registers a new resource with the given unique name, arguments, and options. func NewResourceGroupCostManagementExport(ctx *pulumi.Context, name string, args *ResourceGroupCostManagementExportArgs, opts ...pulumi.ResourceOption) (*ResourceGroupCostManagementExport, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExportDataOptions == nil { return nil, errors.New("invalid value for required argument 'ExportDataOptions'") } if args.ExportDataStorageLocation == nil { return nil, errors.New("invalid value for required argument 'ExportDataStorageLocation'") } if args.RecurrencePeriodEndDate == nil { return nil, errors.New("invalid value for required argument 'RecurrencePeriodEndDate'") } if args.RecurrencePeriodStartDate == nil { return nil, errors.New("invalid value for required argument 'RecurrencePeriodStartDate'") } if args.RecurrenceType == nil { return nil, errors.New("invalid value for required argument 'RecurrenceType'") } if args.ResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceGroupCostManagementExport err := ctx.RegisterResource("azure:core/resourceGroupCostManagementExport:ResourceGroupCostManagementExport", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceGroupCostManagementExport gets an existing ResourceGroupCostManagementExport resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceGroupCostManagementExport(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceGroupCostManagementExportState, opts ...pulumi.ResourceOption) (*ResourceGroupCostManagementExport, error) { var resource ResourceGroupCostManagementExport err := ctx.ReadResource("azure:core/resourceGroupCostManagementExport:ResourceGroupCostManagementExport", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceGroupCostManagementExport resources. type resourceGroupCostManagementExportState struct { // Is the cost management export active? Default is `true`. Active *bool `pulumi:"active"` // A `exportDataOptions` block as defined below. ExportDataOptions *ResourceGroupCostManagementExportExportDataOptions `pulumi:"exportDataOptions"` // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation *ResourceGroupCostManagementExportExportDataStorageLocation `pulumi:"exportDataStorageLocation"` // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat *string `pulumi:"fileFormat"` // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The date the export will stop capturing information. RecurrencePeriodEndDate *string `pulumi:"recurrencePeriodEndDate"` // The date the export will start capturing information. RecurrencePeriodStartDate *string `pulumi:"recurrencePeriodStartDate"` // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType *string `pulumi:"recurrenceType"` // The id of the resource group on which to create an export. Changing this forces a new resource to be created. ResourceGroupId *string `pulumi:"resourceGroupId"` } type ResourceGroupCostManagementExportState struct { // Is the cost management export active? Default is `true`. Active pulumi.BoolPtrInput // A `exportDataOptions` block as defined below. ExportDataOptions ResourceGroupCostManagementExportExportDataOptionsPtrInput // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation ResourceGroupCostManagementExportExportDataStorageLocationPtrInput // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat pulumi.StringPtrInput // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The date the export will stop capturing information. RecurrencePeriodEndDate pulumi.StringPtrInput // The date the export will start capturing information. RecurrencePeriodStartDate pulumi.StringPtrInput // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType pulumi.StringPtrInput // The id of the resource group on which to create an export. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringPtrInput } func (ResourceGroupCostManagementExportState) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupCostManagementExportState)(nil)).Elem() } type resourceGroupCostManagementExportArgs struct { // Is the cost management export active? Default is `true`. Active *bool `pulumi:"active"` // A `exportDataOptions` block as defined below. ExportDataOptions ResourceGroupCostManagementExportExportDataOptions `pulumi:"exportDataOptions"` // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation ResourceGroupCostManagementExportExportDataStorageLocation `pulumi:"exportDataStorageLocation"` // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat *string `pulumi:"fileFormat"` // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The date the export will stop capturing information. RecurrencePeriodEndDate string `pulumi:"recurrencePeriodEndDate"` // The date the export will start capturing information. RecurrencePeriodStartDate string `pulumi:"recurrencePeriodStartDate"` // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType string `pulumi:"recurrenceType"` // The id of the resource group on which to create an export. Changing this forces a new resource to be created. ResourceGroupId string `pulumi:"resourceGroupId"` } // The set of arguments for constructing a ResourceGroupCostManagementExport resource. type ResourceGroupCostManagementExportArgs struct { // Is the cost management export active? Default is `true`. Active pulumi.BoolPtrInput // A `exportDataOptions` block as defined below. ExportDataOptions ResourceGroupCostManagementExportExportDataOptionsInput // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation ResourceGroupCostManagementExportExportDataStorageLocationInput // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat pulumi.StringPtrInput // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The date the export will stop capturing information. RecurrencePeriodEndDate pulumi.StringInput // The date the export will start capturing information. RecurrencePeriodStartDate pulumi.StringInput // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType pulumi.StringInput // The id of the resource group on which to create an export. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringInput } func (ResourceGroupCostManagementExportArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupCostManagementExportArgs)(nil)).Elem() } type ResourceGroupCostManagementExportInput interface { pulumi.Input ToResourceGroupCostManagementExportOutput() ResourceGroupCostManagementExportOutput ToResourceGroupCostManagementExportOutputWithContext(ctx context.Context) ResourceGroupCostManagementExportOutput } func (*ResourceGroupCostManagementExport) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupCostManagementExport)(nil)).Elem() } func (i *ResourceGroupCostManagementExport) ToResourceGroupCostManagementExportOutput() ResourceGroupCostManagementExportOutput { return i.ToResourceGroupCostManagementExportOutputWithContext(context.Background()) } func (i *ResourceGroupCostManagementExport) ToResourceGroupCostManagementExportOutputWithContext(ctx context.Context) ResourceGroupCostManagementExportOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupCostManagementExportOutput) } // ResourceGroupCostManagementExportArrayInput is an input type that accepts ResourceGroupCostManagementExportArray and ResourceGroupCostManagementExportArrayOutput values. // You can construct a concrete instance of `ResourceGroupCostManagementExportArrayInput` via: // // ResourceGroupCostManagementExportArray{ ResourceGroupCostManagementExportArgs{...} } type ResourceGroupCostManagementExportArrayInput interface { pulumi.Input ToResourceGroupCostManagementExportArrayOutput() ResourceGroupCostManagementExportArrayOutput ToResourceGroupCostManagementExportArrayOutputWithContext(context.Context) ResourceGroupCostManagementExportArrayOutput } type ResourceGroupCostManagementExportArray []ResourceGroupCostManagementExportInput func (ResourceGroupCostManagementExportArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupCostManagementExport)(nil)).Elem() } func (i ResourceGroupCostManagementExportArray) ToResourceGroupCostManagementExportArrayOutput() ResourceGroupCostManagementExportArrayOutput { return i.ToResourceGroupCostManagementExportArrayOutputWithContext(context.Background()) } func (i ResourceGroupCostManagementExportArray) ToResourceGroupCostManagementExportArrayOutputWithContext(ctx context.Context) ResourceGroupCostManagementExportArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupCostManagementExportArrayOutput) } // ResourceGroupCostManagementExportMapInput is an input type that accepts ResourceGroupCostManagementExportMap and ResourceGroupCostManagementExportMapOutput values. // You can construct a concrete instance of `ResourceGroupCostManagementExportMapInput` via: // // ResourceGroupCostManagementExportMap{ "key": ResourceGroupCostManagementExportArgs{...} } type ResourceGroupCostManagementExportMapInput interface { pulumi.Input ToResourceGroupCostManagementExportMapOutput() ResourceGroupCostManagementExportMapOutput ToResourceGroupCostManagementExportMapOutputWithContext(context.Context) ResourceGroupCostManagementExportMapOutput } type ResourceGroupCostManagementExportMap map[string]ResourceGroupCostManagementExportInput func (ResourceGroupCostManagementExportMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupCostManagementExport)(nil)).Elem() } func (i ResourceGroupCostManagementExportMap) ToResourceGroupCostManagementExportMapOutput() ResourceGroupCostManagementExportMapOutput { return i.ToResourceGroupCostManagementExportMapOutputWithContext(context.Background()) } func (i ResourceGroupCostManagementExportMap) ToResourceGroupCostManagementExportMapOutputWithContext(ctx context.Context) ResourceGroupCostManagementExportMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupCostManagementExportMapOutput) } type ResourceGroupCostManagementExportOutput struct{ *pulumi.OutputState } func (ResourceGroupCostManagementExportOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupCostManagementExport)(nil)).Elem() } func (o ResourceGroupCostManagementExportOutput) ToResourceGroupCostManagementExportOutput() ResourceGroupCostManagementExportOutput { return o } func (o ResourceGroupCostManagementExportOutput) ToResourceGroupCostManagementExportOutputWithContext(ctx context.Context) ResourceGroupCostManagementExportOutput { return o } // Is the cost management export active? Default is `true`. func (o ResourceGroupCostManagementExportOutput) Active() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) pulumi.BoolPtrOutput { return v.Active }).(pulumi.BoolPtrOutput) } // A `exportDataOptions` block as defined below. func (o ResourceGroupCostManagementExportOutput) ExportDataOptions() ResourceGroupCostManagementExportExportDataOptionsOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) ResourceGroupCostManagementExportExportDataOptionsOutput { return v.ExportDataOptions }).(ResourceGroupCostManagementExportExportDataOptionsOutput) } // A `exportDataStorageLocation` block as defined below. func (o ResourceGroupCostManagementExportOutput) ExportDataStorageLocation() ResourceGroupCostManagementExportExportDataStorageLocationOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) ResourceGroupCostManagementExportExportDataStorageLocationOutput { return v.ExportDataStorageLocation }).(ResourceGroupCostManagementExportExportDataStorageLocationOutput) } // Format for export. Valid values are `Csv` only. Default is `Csv`. func (o ResourceGroupCostManagementExportOutput) FileFormat() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) pulumi.StringPtrOutput { return v.FileFormat }).(pulumi.StringPtrOutput) } // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. func (o ResourceGroupCostManagementExportOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The date the export will stop capturing information. func (o ResourceGroupCostManagementExportOutput) RecurrencePeriodEndDate() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) pulumi.StringOutput { return v.RecurrencePeriodEndDate }).(pulumi.StringOutput) } // The date the export will start capturing information. func (o ResourceGroupCostManagementExportOutput) RecurrencePeriodStartDate() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) pulumi.StringOutput { return v.RecurrencePeriodStartDate }).(pulumi.StringOutput) } // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. func (o ResourceGroupCostManagementExportOutput) RecurrenceType() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) pulumi.StringOutput { return v.RecurrenceType }).(pulumi.StringOutput) } // The id of the resource group on which to create an export. Changing this forces a new resource to be created. func (o ResourceGroupCostManagementExportOutput) ResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementExport) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput) } type ResourceGroupCostManagementExportArrayOutput struct{ *pulumi.OutputState } func (ResourceGroupCostManagementExportArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupCostManagementExport)(nil)).Elem() } func (o ResourceGroupCostManagementExportArrayOutput) ToResourceGroupCostManagementExportArrayOutput() ResourceGroupCostManagementExportArrayOutput { return o } func (o ResourceGroupCostManagementExportArrayOutput) ToResourceGroupCostManagementExportArrayOutputWithContext(ctx context.Context) ResourceGroupCostManagementExportArrayOutput { return o } func (o ResourceGroupCostManagementExportArrayOutput) Index(i pulumi.IntInput) ResourceGroupCostManagementExportOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGroupCostManagementExport { return vs[0].([]*ResourceGroupCostManagementExport)[vs[1].(int)] }).(ResourceGroupCostManagementExportOutput) } type ResourceGroupCostManagementExportMapOutput struct{ *pulumi.OutputState } func (ResourceGroupCostManagementExportMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupCostManagementExport)(nil)).Elem() } func (o ResourceGroupCostManagementExportMapOutput) ToResourceGroupCostManagementExportMapOutput() ResourceGroupCostManagementExportMapOutput { return o } func (o ResourceGroupCostManagementExportMapOutput) ToResourceGroupCostManagementExportMapOutputWithContext(ctx context.Context) ResourceGroupCostManagementExportMapOutput { return o } func (o ResourceGroupCostManagementExportMapOutput) MapIndex(k pulumi.StringInput) ResourceGroupCostManagementExportOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGroupCostManagementExport { return vs[0].(map[string]*ResourceGroupCostManagementExport)[vs[1].(string)] }).(ResourceGroupCostManagementExportOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupCostManagementExportInput)(nil)).Elem(), &ResourceGroupCostManagementExport{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupCostManagementExportArrayInput)(nil)).Elem(), ResourceGroupCostManagementExportArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupCostManagementExportMapInput)(nil)).Elem(), ResourceGroupCostManagementExportMap{}) pulumi.RegisterOutputType(ResourceGroupCostManagementExportOutput{}) pulumi.RegisterOutputType(ResourceGroupCostManagementExportArrayOutput{}) pulumi.RegisterOutputType(ResourceGroupCostManagementExportMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getTemplateSpecVersion.go
sdk/go/azure/core/getTemplateSpecVersion.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Template Spec Version. // // ## Example Usage // // ```go // package main // // import ( // // "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.GetTemplateSpecVersion(ctx, &core.GetTemplateSpecVersionArgs{ // Name: "exampleTemplateSpec", // ResourceGroupName: "MyResourceGroup", // Version: "v1.0.4", // }, 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.Resources` - 2022-02-01 func GetTemplateSpecVersion(ctx *pulumi.Context, args *GetTemplateSpecVersionArgs, opts ...pulumi.InvokeOption) (*GetTemplateSpecVersionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTemplateSpecVersionResult err := ctx.Invoke("azure:core/getTemplateSpecVersion:getTemplateSpecVersion", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getTemplateSpecVersion. type GetTemplateSpecVersionArgs struct { // The name of this Template Spec. Name string `pulumi:"name"` // The name of the Resource Group where the Template Spec exists. ResourceGroupName string `pulumi:"resourceGroupName"` // The Version Name of the Template Spec. Version string `pulumi:"version"` } // A collection of values returned by getTemplateSpecVersion. type GetTemplateSpecVersionResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Template. Tags map[string]string `pulumi:"tags"` // The ARM Template body of the Template Spec Version. TemplateBody string `pulumi:"templateBody"` Version string `pulumi:"version"` } func GetTemplateSpecVersionOutput(ctx *pulumi.Context, args GetTemplateSpecVersionOutputArgs, opts ...pulumi.InvokeOption) GetTemplateSpecVersionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetTemplateSpecVersionResultOutput, error) { args := v.(GetTemplateSpecVersionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getTemplateSpecVersion:getTemplateSpecVersion", args, GetTemplateSpecVersionResultOutput{}, options).(GetTemplateSpecVersionResultOutput), nil }).(GetTemplateSpecVersionResultOutput) } // A collection of arguments for invoking getTemplateSpecVersion. type GetTemplateSpecVersionOutputArgs struct { // The name of this Template Spec. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Template Spec exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // The Version Name of the Template Spec. Version pulumi.StringInput `pulumi:"version"` } func (GetTemplateSpecVersionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetTemplateSpecVersionArgs)(nil)).Elem() } // A collection of values returned by getTemplateSpecVersion. type GetTemplateSpecVersionResultOutput struct{ *pulumi.OutputState } func (GetTemplateSpecVersionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetTemplateSpecVersionResult)(nil)).Elem() } func (o GetTemplateSpecVersionResultOutput) ToGetTemplateSpecVersionResultOutput() GetTemplateSpecVersionResultOutput { return o } func (o GetTemplateSpecVersionResultOutput) ToGetTemplateSpecVersionResultOutputWithContext(ctx context.Context) GetTemplateSpecVersionResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetTemplateSpecVersionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTemplateSpecVersionResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetTemplateSpecVersionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetTemplateSpecVersionResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetTemplateSpecVersionResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetTemplateSpecVersionResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Template. func (o GetTemplateSpecVersionResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetTemplateSpecVersionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The ARM Template body of the Template Spec Version. func (o GetTemplateSpecVersionResultOutput) TemplateBody() pulumi.StringOutput { return o.ApplyT(func(v GetTemplateSpecVersionResult) string { return v.TemplateBody }).(pulumi.StringOutput) } func (o GetTemplateSpecVersionResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v GetTemplateSpecVersionResult) string { return v.Version }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetTemplateSpecVersionResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getSubscription.go
sdk/go/azure/core/getSubscription.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Subscription. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // ctx.Export("currentSubscriptionDisplayName", current.DisplayName) // return nil // }) // } // // ``` func LookupSubscription(ctx *pulumi.Context, args *LookupSubscriptionArgs, opts ...pulumi.InvokeOption) (*LookupSubscriptionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSubscriptionResult err := ctx.Invoke("azure:core/getSubscription:getSubscription", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSubscription. type LookupSubscriptionArgs struct { // Specifies the ID of the subscription. If this argument is omitted, the subscription ID of the current Azure Resource Manager provider is used. SubscriptionId *string `pulumi:"subscriptionId"` } // A collection of values returned by getSubscription. type LookupSubscriptionResult struct { // The subscription display name. DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The subscription location placement ID. LocationPlacementId string `pulumi:"locationPlacementId"` // The subscription quota ID. QuotaId string `pulumi:"quotaId"` // The subscription spending limit. SpendingLimit string `pulumi:"spendingLimit"` // The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. State string `pulumi:"state"` // The subscription GUID. SubscriptionId string `pulumi:"subscriptionId"` // A mapping of tags assigned to the Subscription. Tags map[string]string `pulumi:"tags"` // The subscription tenant ID. TenantId string `pulumi:"tenantId"` } func LookupSubscriptionOutput(ctx *pulumi.Context, args LookupSubscriptionOutputArgs, opts ...pulumi.InvokeOption) LookupSubscriptionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSubscriptionResultOutput, error) { args := v.(LookupSubscriptionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getSubscription:getSubscription", args, LookupSubscriptionResultOutput{}, options).(LookupSubscriptionResultOutput), nil }).(LookupSubscriptionResultOutput) } // A collection of arguments for invoking getSubscription. type LookupSubscriptionOutputArgs struct { // Specifies the ID of the subscription. If this argument is omitted, the subscription ID of the current Azure Resource Manager provider is used. SubscriptionId pulumi.StringPtrInput `pulumi:"subscriptionId"` } func (LookupSubscriptionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSubscriptionArgs)(nil)).Elem() } // A collection of values returned by getSubscription. type LookupSubscriptionResultOutput struct{ *pulumi.OutputState } func (LookupSubscriptionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSubscriptionResult)(nil)).Elem() } func (o LookupSubscriptionResultOutput) ToLookupSubscriptionResultOutput() LookupSubscriptionResultOutput { return o } func (o LookupSubscriptionResultOutput) ToLookupSubscriptionResultOutputWithContext(ctx context.Context) LookupSubscriptionResultOutput { return o } // The subscription display name. func (o LookupSubscriptionResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupSubscriptionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.Id }).(pulumi.StringOutput) } // The subscription location placement ID. func (o LookupSubscriptionResultOutput) LocationPlacementId() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.LocationPlacementId }).(pulumi.StringOutput) } // The subscription quota ID. func (o LookupSubscriptionResultOutput) QuotaId() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.QuotaId }).(pulumi.StringOutput) } // The subscription spending limit. func (o LookupSubscriptionResultOutput) SpendingLimit() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.SpendingLimit }).(pulumi.StringOutput) } // The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. func (o LookupSubscriptionResultOutput) State() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.State }).(pulumi.StringOutput) } // The subscription GUID. func (o LookupSubscriptionResultOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.SubscriptionId }).(pulumi.StringOutput) } // A mapping of tags assigned to the Subscription. func (o LookupSubscriptionResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupSubscriptionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The subscription tenant ID. func (o LookupSubscriptionResultOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionResult) string { return v.TenantId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupSubscriptionResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getLocation.go
sdk/go/azure/core/getLocation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 of a specific physical location. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // _, err := core.GetLocation(ctx, &core.GetLocationArgs{ // Location: "West Europe", // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` func GetLocation(ctx *pulumi.Context, args *GetLocationArgs, opts ...pulumi.InvokeOption) (*GetLocationResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetLocationResult err := ctx.Invoke("azure:core/getLocation:getLocation", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getLocation. type GetLocationArgs struct { // Specifies the supported Azure location where the resource exists. Location string `pulumi:"location"` } // A collection of values returned by getLocation. type GetLocationResult struct { // The display name of the location. DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Location string `pulumi:"location"` // A `zoneMappings` block as defined below. ZoneMappings []GetLocationZoneMapping `pulumi:"zoneMappings"` } func GetLocationOutput(ctx *pulumi.Context, args GetLocationOutputArgs, opts ...pulumi.InvokeOption) GetLocationResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetLocationResultOutput, error) { args := v.(GetLocationArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getLocation:getLocation", args, GetLocationResultOutput{}, options).(GetLocationResultOutput), nil }).(GetLocationResultOutput) } // A collection of arguments for invoking getLocation. type GetLocationOutputArgs struct { // Specifies the supported Azure location where the resource exists. Location pulumi.StringInput `pulumi:"location"` } func (GetLocationOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetLocationArgs)(nil)).Elem() } // A collection of values returned by getLocation. type GetLocationResultOutput struct{ *pulumi.OutputState } func (GetLocationResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetLocationResult)(nil)).Elem() } func (o GetLocationResultOutput) ToGetLocationResultOutput() GetLocationResultOutput { return o } func (o GetLocationResultOutput) ToGetLocationResultOutputWithContext(ctx context.Context) GetLocationResultOutput { return o } // The display name of the location. func (o GetLocationResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v GetLocationResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetLocationResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetLocationResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetLocationResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetLocationResult) string { return v.Location }).(pulumi.StringOutput) } // A `zoneMappings` block as defined below. func (o GetLocationResultOutput) ZoneMappings() GetLocationZoneMappingArrayOutput { return o.ApplyT(func(v GetLocationResult) []GetLocationZoneMapping { return v.ZoneMappings }).(GetLocationZoneMappingArrayOutput) } func init() { pulumi.RegisterOutputType(GetLocationResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getResourceGroupTemplateDeployment.go
sdk/go/azure/core/getResourceGroupTemplateDeployment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Resource Group Template Deployment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupResourceGroupTemplateDeployment(ctx, &core.LookupResourceGroupTemplateDeploymentArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // ctx.Export("exampleOutput", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{ // Input: example.OutputContent, // }, nil).Result.ExampleOutput.Value)) // return nil // }) // } // // ``` func LookupResourceGroupTemplateDeployment(ctx *pulumi.Context, args *LookupResourceGroupTemplateDeploymentArgs, opts ...pulumi.InvokeOption) (*LookupResourceGroupTemplateDeploymentResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupResourceGroupTemplateDeploymentResult err := ctx.Invoke("azure:core/getResourceGroupTemplateDeployment:getResourceGroupTemplateDeployment", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getResourceGroupTemplateDeployment. type LookupResourceGroupTemplateDeploymentArgs struct { // The name of this Resource Group Template Deployment. Name string `pulumi:"name"` // The name of the Resource Group to which the Resource Group Template Deployment was applied. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getResourceGroupTemplateDeployment. type LookupResourceGroupTemplateDeploymentResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent string `pulumi:"outputContent"` ResourceGroupName string `pulumi:"resourceGroupName"` } func LookupResourceGroupTemplateDeploymentOutput(ctx *pulumi.Context, args LookupResourceGroupTemplateDeploymentOutputArgs, opts ...pulumi.InvokeOption) LookupResourceGroupTemplateDeploymentResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupResourceGroupTemplateDeploymentResultOutput, error) { args := v.(LookupResourceGroupTemplateDeploymentArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getResourceGroupTemplateDeployment:getResourceGroupTemplateDeployment", args, LookupResourceGroupTemplateDeploymentResultOutput{}, options).(LookupResourceGroupTemplateDeploymentResultOutput), nil }).(LookupResourceGroupTemplateDeploymentResultOutput) } // A collection of arguments for invoking getResourceGroupTemplateDeployment. type LookupResourceGroupTemplateDeploymentOutputArgs struct { // The name of this Resource Group Template Deployment. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group to which the Resource Group Template Deployment was applied. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupResourceGroupTemplateDeploymentOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupResourceGroupTemplateDeploymentArgs)(nil)).Elem() } // A collection of values returned by getResourceGroupTemplateDeployment. type LookupResourceGroupTemplateDeploymentResultOutput struct{ *pulumi.OutputState } func (LookupResourceGroupTemplateDeploymentResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupResourceGroupTemplateDeploymentResult)(nil)).Elem() } func (o LookupResourceGroupTemplateDeploymentResultOutput) ToLookupResourceGroupTemplateDeploymentResultOutput() LookupResourceGroupTemplateDeploymentResultOutput { return o } func (o LookupResourceGroupTemplateDeploymentResultOutput) ToLookupResourceGroupTemplateDeploymentResultOutputWithContext(ctx context.Context) LookupResourceGroupTemplateDeploymentResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupResourceGroupTemplateDeploymentResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupTemplateDeploymentResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupResourceGroupTemplateDeploymentResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupTemplateDeploymentResult) string { return v.Name }).(pulumi.StringOutput) } // The JSON Content of the Outputs of the ARM Template Deployment. func (o LookupResourceGroupTemplateDeploymentResultOutput) OutputContent() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupTemplateDeploymentResult) string { return v.OutputContent }).(pulumi.StringOutput) } func (o LookupResourceGroupTemplateDeploymentResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupTemplateDeploymentResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupResourceGroupTemplateDeploymentResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/subscription.go
sdk/go/azure/core/subscription.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ### Creating A New Alias And Subscription For An Enrollment Account // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing" // "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 := billing.GetEnrollmentAccountScope(ctx, &billing.GetEnrollmentAccountScopeArgs{ // BillingAccountName: "1234567890", // EnrollmentAccountName: "0123456", // }, nil) // if err != nil { // return err // } // _, err = core.NewSubscription(ctx, "example", &core.SubscriptionArgs{ // SubscriptionName: pulumi.String("My Example EA Subscription"), // BillingScopeId: pulumi.String(example.Id), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Creating A New Alias And Subscription For A Microsoft Customer Account // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing" // "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 := billing.GetMcaAccountScope(ctx, &billing.GetMcaAccountScopeArgs{ // BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31", // BillingProfileName: "PE2Q-NOIT-BG7-TGB", // InvoiceSectionName: "MTT4-OBS7-PJA-TGB", // }, nil) // if err != nil { // return err // } // _, err = core.NewSubscription(ctx, "example", &core.SubscriptionArgs{ // SubscriptionName: pulumi.String("My Example MCA Subscription"), // BillingScopeId: pulumi.String(example.Id), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Creating A New Alias And Subscription For A Microsoft Partner Account // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing" // "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 := billing.GetMpaAccountScope(ctx, &billing.GetMpaAccountScopeArgs{ // BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31", // CustomerName: "2281f543-7321-4cf9-1e23-edb4Oc31a31c", // }, nil) // if err != nil { // return err // } // _, err = core.NewSubscription(ctx, "example", &core.SubscriptionArgs{ // SubscriptionName: pulumi.String("My Example MPA Subscription"), // BillingScopeId: pulumi.String(example.Id), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Adding An Alias To An Existing Subscription // // ```go // package main // // import ( // // "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 { // _, err := core.NewSubscription(ctx, "example", &core.SubscriptionArgs{ // Alias: pulumi.String("examplesub"), // SubscriptionName: pulumi.String("My Example Subscription"), // SubscriptionId: pulumi.String("12345678-12234-5678-9012-123456789012"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Resources` - 2023-07-01 // // ## Import // // Subscriptions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/subscription:Subscription example "/providers/Microsoft.Subscription/aliases/subscription1" // ``` type Subscription struct { pulumi.CustomResourceState // The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created. Alias pulumi.StringOutput `pulumi:"alias"` // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. BillingScopeId pulumi.StringPtrOutput `pulumi:"billingScopeId"` // The ID of the Subscription. Changing this forces a new Subscription to be created. // // > **NOTE:** This value can be specified only for adopting control of an existing Subscription, it cannot be used to provide a custom Subscription ID. // // > **NOTE:** Either `billingScopeId` or `subscriptionId` has to be specified. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` // The Name of the Subscription. This is the Display Name in the portal. SubscriptionName pulumi.StringOutput `pulumi:"subscriptionName"` // A mapping of tags to assign to the Subscription. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Tenant to which the subscription belongs. TenantId pulumi.StringOutput `pulumi:"tenantId"` // The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. Workload pulumi.StringPtrOutput `pulumi:"workload"` } // NewSubscription registers a new resource with the given unique name, arguments, and options. func NewSubscription(ctx *pulumi.Context, name string, args *SubscriptionArgs, opts ...pulumi.ResourceOption) (*Subscription, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SubscriptionName == nil { return nil, errors.New("invalid value for required argument 'SubscriptionName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Subscription err := ctx.RegisterResource("azure:core/subscription:Subscription", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubscription gets an existing Subscription resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubscription(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionState, opts ...pulumi.ResourceOption) (*Subscription, error) { var resource Subscription err := ctx.ReadResource("azure:core/subscription:Subscription", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Subscription resources. type subscriptionState struct { // The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created. Alias *string `pulumi:"alias"` // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. BillingScopeId *string `pulumi:"billingScopeId"` // The ID of the Subscription. Changing this forces a new Subscription to be created. // // > **NOTE:** This value can be specified only for adopting control of an existing Subscription, it cannot be used to provide a custom Subscription ID. // // > **NOTE:** Either `billingScopeId` or `subscriptionId` has to be specified. SubscriptionId *string `pulumi:"subscriptionId"` // The Name of the Subscription. This is the Display Name in the portal. SubscriptionName *string `pulumi:"subscriptionName"` // A mapping of tags to assign to the Subscription. Tags map[string]string `pulumi:"tags"` // The ID of the Tenant to which the subscription belongs. TenantId *string `pulumi:"tenantId"` // The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. Workload *string `pulumi:"workload"` } type SubscriptionState struct { // The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created. Alias pulumi.StringPtrInput // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. BillingScopeId pulumi.StringPtrInput // The ID of the Subscription. Changing this forces a new Subscription to be created. // // > **NOTE:** This value can be specified only for adopting control of an existing Subscription, it cannot be used to provide a custom Subscription ID. // // > **NOTE:** Either `billingScopeId` or `subscriptionId` has to be specified. SubscriptionId pulumi.StringPtrInput // The Name of the Subscription. This is the Display Name in the portal. SubscriptionName pulumi.StringPtrInput // A mapping of tags to assign to the Subscription. Tags pulumi.StringMapInput // The ID of the Tenant to which the subscription belongs. TenantId pulumi.StringPtrInput // The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. Workload pulumi.StringPtrInput } func (SubscriptionState) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionState)(nil)).Elem() } type subscriptionArgs struct { // The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created. Alias *string `pulumi:"alias"` // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. BillingScopeId *string `pulumi:"billingScopeId"` // The ID of the Subscription. Changing this forces a new Subscription to be created. // // > **NOTE:** This value can be specified only for adopting control of an existing Subscription, it cannot be used to provide a custom Subscription ID. // // > **NOTE:** Either `billingScopeId` or `subscriptionId` has to be specified. SubscriptionId *string `pulumi:"subscriptionId"` // The Name of the Subscription. This is the Display Name in the portal. SubscriptionName string `pulumi:"subscriptionName"` // A mapping of tags to assign to the Subscription. Tags map[string]string `pulumi:"tags"` // The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. Workload *string `pulumi:"workload"` } // The set of arguments for constructing a Subscription resource. type SubscriptionArgs struct { // The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created. Alias pulumi.StringPtrInput // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. BillingScopeId pulumi.StringPtrInput // The ID of the Subscription. Changing this forces a new Subscription to be created. // // > **NOTE:** This value can be specified only for adopting control of an existing Subscription, it cannot be used to provide a custom Subscription ID. // // > **NOTE:** Either `billingScopeId` or `subscriptionId` has to be specified. SubscriptionId pulumi.StringPtrInput // The Name of the Subscription. This is the Display Name in the portal. SubscriptionName pulumi.StringInput // A mapping of tags to assign to the Subscription. Tags pulumi.StringMapInput // The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. Workload pulumi.StringPtrInput } func (SubscriptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionArgs)(nil)).Elem() } type SubscriptionInput interface { pulumi.Input ToSubscriptionOutput() SubscriptionOutput ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput } func (*Subscription) ElementType() reflect.Type { return reflect.TypeOf((**Subscription)(nil)).Elem() } func (i *Subscription) ToSubscriptionOutput() SubscriptionOutput { return i.ToSubscriptionOutputWithContext(context.Background()) } func (i *Subscription) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionOutput) } // SubscriptionArrayInput is an input type that accepts SubscriptionArray and SubscriptionArrayOutput values. // You can construct a concrete instance of `SubscriptionArrayInput` via: // // SubscriptionArray{ SubscriptionArgs{...} } type SubscriptionArrayInput interface { pulumi.Input ToSubscriptionArrayOutput() SubscriptionArrayOutput ToSubscriptionArrayOutputWithContext(context.Context) SubscriptionArrayOutput } type SubscriptionArray []SubscriptionInput func (SubscriptionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Subscription)(nil)).Elem() } func (i SubscriptionArray) ToSubscriptionArrayOutput() SubscriptionArrayOutput { return i.ToSubscriptionArrayOutputWithContext(context.Background()) } func (i SubscriptionArray) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionArrayOutput) } // SubscriptionMapInput is an input type that accepts SubscriptionMap and SubscriptionMapOutput values. // You can construct a concrete instance of `SubscriptionMapInput` via: // // SubscriptionMap{ "key": SubscriptionArgs{...} } type SubscriptionMapInput interface { pulumi.Input ToSubscriptionMapOutput() SubscriptionMapOutput ToSubscriptionMapOutputWithContext(context.Context) SubscriptionMapOutput } type SubscriptionMap map[string]SubscriptionInput func (SubscriptionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem() } func (i SubscriptionMap) ToSubscriptionMapOutput() SubscriptionMapOutput { return i.ToSubscriptionMapOutputWithContext(context.Background()) } func (i SubscriptionMap) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionMapOutput) } type SubscriptionOutput struct{ *pulumi.OutputState } func (SubscriptionOutput) ElementType() reflect.Type { return reflect.TypeOf((**Subscription)(nil)).Elem() } func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput { return o } func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput { return o } // The Alias name for the subscription. This provider will generate a new GUID if this is not supplied. Changing this forces a new Subscription to be created. func (o SubscriptionOutput) Alias() pulumi.StringOutput { return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.Alias }).(pulumi.StringOutput) } // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. func (o SubscriptionOutput) BillingScopeId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.BillingScopeId }).(pulumi.StringPtrOutput) } // The ID of the Subscription. Changing this forces a new Subscription to be created. // // > **NOTE:** This value can be specified only for adopting control of an existing Subscription, it cannot be used to provide a custom Subscription ID. // // > **NOTE:** Either `billingScopeId` or `subscriptionId` has to be specified. func (o SubscriptionOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } // The Name of the Subscription. This is the Display Name in the portal. func (o SubscriptionOutput) SubscriptionName() pulumi.StringOutput { return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.SubscriptionName }).(pulumi.StringOutput) } // A mapping of tags to assign to the Subscription. func (o SubscriptionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Subscription) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Tenant to which the subscription belongs. func (o SubscriptionOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } // The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. func (o SubscriptionOutput) Workload() pulumi.StringPtrOutput { return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.Workload }).(pulumi.StringPtrOutput) } type SubscriptionArrayOutput struct{ *pulumi.OutputState } func (SubscriptionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Subscription)(nil)).Elem() } func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput { return o } func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput { return o } func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Subscription { return vs[0].([]*Subscription)[vs[1].(int)] }).(SubscriptionOutput) } type SubscriptionMapOutput struct{ *pulumi.OutputState } func (SubscriptionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem() } func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput { return o } func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput { return o } func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Subscription { return vs[0].(map[string]*Subscription)[vs[1].(string)] }).(SubscriptionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionInput)(nil)).Elem(), &Subscription{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionArrayInput)(nil)).Elem(), SubscriptionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionMapInput)(nil)).Elem(), SubscriptionMap{}) pulumi.RegisterOutputType(SubscriptionOutput{}) pulumi.RegisterOutputType(SubscriptionArrayOutput{}) pulumi.RegisterOutputType(SubscriptionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/subscriptionCostManagementView.go
sdk/go/azure/core/subscriptionCostManagementView.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Cost Management View for a Subscription. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // _, err := core.NewSubscriptionCostManagementView(ctx, "example", &core.SubscriptionCostManagementViewArgs{ // Name: pulumi.String("example"), // DisplayName: pulumi.String("Cost View per Month"), // ChartType: pulumi.String("StackedColumn"), // Accumulated: pulumi.Bool(false), // SubscriptionId: pulumi.String("/subscription/00000000-0000-0000-0000-000000000000"), // ReportType: pulumi.String("Usage"), // Timeframe: pulumi.String("MonthToDate"), // Dataset: &core.SubscriptionCostManagementViewDatasetArgs{ // Granularity: pulumi.String("Monthly"), // Aggregations: core.SubscriptionCostManagementViewDatasetAggregationArray{ // &core.SubscriptionCostManagementViewDatasetAggregationArgs{ // Name: pulumi.String("totalCost"), // ColumnName: pulumi.String("Cost"), // }, // }, // }, // Pivots: core.SubscriptionCostManagementViewPivotArray{ // &core.SubscriptionCostManagementViewPivotArgs{ // Type: pulumi.String("Dimension"), // Name: pulumi.String("ServiceName"), // }, // &core.SubscriptionCostManagementViewPivotArgs{ // Type: pulumi.String("Dimension"), // Name: pulumi.String("ResourceLocation"), // }, // &core.SubscriptionCostManagementViewPivotArgs{ // Type: pulumi.String("Dimension"), // Name: pulumi.String("ResourceGroupName"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.CostManagement` - 2023-08-01 // // ## Import // // Cost Management View for a Subscriptions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/subscriptionCostManagementView:SubscriptionCostManagementView example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/costmanagementview // ``` type SubscriptionCostManagementView struct { pulumi.CustomResourceState // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Subscription to be created. Accumulated pulumi.BoolOutput `pulumi:"accumulated"` // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType pulumi.StringOutput `pulumi:"chartType"` // A `dataset` block as defined below. Dataset SubscriptionCostManagementViewDatasetOutput `pulumi:"dataset"` // User visible input name of the Cost Management View. DisplayName pulumi.StringOutput `pulumi:"displayName"` // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis SubscriptionCostManagementViewKpiArrayOutput `pulumi:"kpis"` // The name which should be used for this Cost Management View for a Subscription. Changing this forces a new Cost Management View for a Subscription to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots SubscriptionCostManagementViewPivotArrayOutput `pulumi:"pivots"` // The type of the report. The only possible value is `Usage`. ReportType pulumi.StringOutput `pulumi:"reportType"` // The ID of the Subscription this View is scoped to. Changing this forces a new Cost Management View for a Subscription to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe pulumi.StringOutput `pulumi:"timeframe"` } // NewSubscriptionCostManagementView registers a new resource with the given unique name, arguments, and options. func NewSubscriptionCostManagementView(ctx *pulumi.Context, name string, args *SubscriptionCostManagementViewArgs, opts ...pulumi.ResourceOption) (*SubscriptionCostManagementView, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Accumulated == nil { return nil, errors.New("invalid value for required argument 'Accumulated'") } if args.ChartType == nil { return nil, errors.New("invalid value for required argument 'ChartType'") } if args.Dataset == nil { return nil, errors.New("invalid value for required argument 'Dataset'") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.ReportType == nil { return nil, errors.New("invalid value for required argument 'ReportType'") } if args.SubscriptionId == nil { return nil, errors.New("invalid value for required argument 'SubscriptionId'") } if args.Timeframe == nil { return nil, errors.New("invalid value for required argument 'Timeframe'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubscriptionCostManagementView err := ctx.RegisterResource("azure:core/subscriptionCostManagementView:SubscriptionCostManagementView", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubscriptionCostManagementView gets an existing SubscriptionCostManagementView resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubscriptionCostManagementView(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionCostManagementViewState, opts ...pulumi.ResourceOption) (*SubscriptionCostManagementView, error) { var resource SubscriptionCostManagementView err := ctx.ReadResource("azure:core/subscriptionCostManagementView:SubscriptionCostManagementView", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubscriptionCostManagementView resources. type subscriptionCostManagementViewState struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Subscription to be created. Accumulated *bool `pulumi:"accumulated"` // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType *string `pulumi:"chartType"` // A `dataset` block as defined below. Dataset *SubscriptionCostManagementViewDataset `pulumi:"dataset"` // User visible input name of the Cost Management View. DisplayName *string `pulumi:"displayName"` // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis []SubscriptionCostManagementViewKpi `pulumi:"kpis"` // The name which should be used for this Cost Management View for a Subscription. Changing this forces a new Cost Management View for a Subscription to be created. Name *string `pulumi:"name"` // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots []SubscriptionCostManagementViewPivot `pulumi:"pivots"` // The type of the report. The only possible value is `Usage`. ReportType *string `pulumi:"reportType"` // The ID of the Subscription this View is scoped to. Changing this forces a new Cost Management View for a Subscription to be created. SubscriptionId *string `pulumi:"subscriptionId"` // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe *string `pulumi:"timeframe"` } type SubscriptionCostManagementViewState struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Subscription to be created. Accumulated pulumi.BoolPtrInput // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType pulumi.StringPtrInput // A `dataset` block as defined below. Dataset SubscriptionCostManagementViewDatasetPtrInput // User visible input name of the Cost Management View. DisplayName pulumi.StringPtrInput // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis SubscriptionCostManagementViewKpiArrayInput // The name which should be used for this Cost Management View for a Subscription. Changing this forces a new Cost Management View for a Subscription to be created. Name pulumi.StringPtrInput // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots SubscriptionCostManagementViewPivotArrayInput // The type of the report. The only possible value is `Usage`. ReportType pulumi.StringPtrInput // The ID of the Subscription this View is scoped to. Changing this forces a new Cost Management View for a Subscription to be created. SubscriptionId pulumi.StringPtrInput // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe pulumi.StringPtrInput } func (SubscriptionCostManagementViewState) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionCostManagementViewState)(nil)).Elem() } type subscriptionCostManagementViewArgs struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Subscription to be created. Accumulated bool `pulumi:"accumulated"` // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType string `pulumi:"chartType"` // A `dataset` block as defined below. Dataset SubscriptionCostManagementViewDataset `pulumi:"dataset"` // User visible input name of the Cost Management View. DisplayName string `pulumi:"displayName"` // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis []SubscriptionCostManagementViewKpi `pulumi:"kpis"` // The name which should be used for this Cost Management View for a Subscription. Changing this forces a new Cost Management View for a Subscription to be created. Name *string `pulumi:"name"` // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots []SubscriptionCostManagementViewPivot `pulumi:"pivots"` // The type of the report. The only possible value is `Usage`. ReportType string `pulumi:"reportType"` // The ID of the Subscription this View is scoped to. Changing this forces a new Cost Management View for a Subscription to be created. SubscriptionId string `pulumi:"subscriptionId"` // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe string `pulumi:"timeframe"` } // The set of arguments for constructing a SubscriptionCostManagementView resource. type SubscriptionCostManagementViewArgs struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Subscription to be created. Accumulated pulumi.BoolInput // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType pulumi.StringInput // A `dataset` block as defined below. Dataset SubscriptionCostManagementViewDatasetInput // User visible input name of the Cost Management View. DisplayName pulumi.StringInput // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis SubscriptionCostManagementViewKpiArrayInput // The name which should be used for this Cost Management View for a Subscription. Changing this forces a new Cost Management View for a Subscription to be created. Name pulumi.StringPtrInput // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots SubscriptionCostManagementViewPivotArrayInput // The type of the report. The only possible value is `Usage`. ReportType pulumi.StringInput // The ID of the Subscription this View is scoped to. Changing this forces a new Cost Management View for a Subscription to be created. SubscriptionId pulumi.StringInput // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe pulumi.StringInput } func (SubscriptionCostManagementViewArgs) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionCostManagementViewArgs)(nil)).Elem() } type SubscriptionCostManagementViewInput interface { pulumi.Input ToSubscriptionCostManagementViewOutput() SubscriptionCostManagementViewOutput ToSubscriptionCostManagementViewOutputWithContext(ctx context.Context) SubscriptionCostManagementViewOutput } func (*SubscriptionCostManagementView) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionCostManagementView)(nil)).Elem() } func (i *SubscriptionCostManagementView) ToSubscriptionCostManagementViewOutput() SubscriptionCostManagementViewOutput { return i.ToSubscriptionCostManagementViewOutputWithContext(context.Background()) } func (i *SubscriptionCostManagementView) ToSubscriptionCostManagementViewOutputWithContext(ctx context.Context) SubscriptionCostManagementViewOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionCostManagementViewOutput) } // SubscriptionCostManagementViewArrayInput is an input type that accepts SubscriptionCostManagementViewArray and SubscriptionCostManagementViewArrayOutput values. // You can construct a concrete instance of `SubscriptionCostManagementViewArrayInput` via: // // SubscriptionCostManagementViewArray{ SubscriptionCostManagementViewArgs{...} } type SubscriptionCostManagementViewArrayInput interface { pulumi.Input ToSubscriptionCostManagementViewArrayOutput() SubscriptionCostManagementViewArrayOutput ToSubscriptionCostManagementViewArrayOutputWithContext(context.Context) SubscriptionCostManagementViewArrayOutput } type SubscriptionCostManagementViewArray []SubscriptionCostManagementViewInput func (SubscriptionCostManagementViewArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionCostManagementView)(nil)).Elem() } func (i SubscriptionCostManagementViewArray) ToSubscriptionCostManagementViewArrayOutput() SubscriptionCostManagementViewArrayOutput { return i.ToSubscriptionCostManagementViewArrayOutputWithContext(context.Background()) } func (i SubscriptionCostManagementViewArray) ToSubscriptionCostManagementViewArrayOutputWithContext(ctx context.Context) SubscriptionCostManagementViewArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionCostManagementViewArrayOutput) } // SubscriptionCostManagementViewMapInput is an input type that accepts SubscriptionCostManagementViewMap and SubscriptionCostManagementViewMapOutput values. // You can construct a concrete instance of `SubscriptionCostManagementViewMapInput` via: // // SubscriptionCostManagementViewMap{ "key": SubscriptionCostManagementViewArgs{...} } type SubscriptionCostManagementViewMapInput interface { pulumi.Input ToSubscriptionCostManagementViewMapOutput() SubscriptionCostManagementViewMapOutput ToSubscriptionCostManagementViewMapOutputWithContext(context.Context) SubscriptionCostManagementViewMapOutput } type SubscriptionCostManagementViewMap map[string]SubscriptionCostManagementViewInput func (SubscriptionCostManagementViewMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionCostManagementView)(nil)).Elem() } func (i SubscriptionCostManagementViewMap) ToSubscriptionCostManagementViewMapOutput() SubscriptionCostManagementViewMapOutput { return i.ToSubscriptionCostManagementViewMapOutputWithContext(context.Background()) } func (i SubscriptionCostManagementViewMap) ToSubscriptionCostManagementViewMapOutputWithContext(ctx context.Context) SubscriptionCostManagementViewMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionCostManagementViewMapOutput) } type SubscriptionCostManagementViewOutput struct{ *pulumi.OutputState } func (SubscriptionCostManagementViewOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionCostManagementView)(nil)).Elem() } func (o SubscriptionCostManagementViewOutput) ToSubscriptionCostManagementViewOutput() SubscriptionCostManagementViewOutput { return o } func (o SubscriptionCostManagementViewOutput) ToSubscriptionCostManagementViewOutputWithContext(ctx context.Context) SubscriptionCostManagementViewOutput { return o } // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Subscription to be created. func (o SubscriptionCostManagementViewOutput) Accumulated() pulumi.BoolOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) pulumi.BoolOutput { return v.Accumulated }).(pulumi.BoolOutput) } // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. func (o SubscriptionCostManagementViewOutput) ChartType() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) pulumi.StringOutput { return v.ChartType }).(pulumi.StringOutput) } // A `dataset` block as defined below. func (o SubscriptionCostManagementViewOutput) Dataset() SubscriptionCostManagementViewDatasetOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) SubscriptionCostManagementViewDatasetOutput { return v.Dataset }).(SubscriptionCostManagementViewDatasetOutput) } // User visible input name of the Cost Management View. func (o SubscriptionCostManagementViewOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. func (o SubscriptionCostManagementViewOutput) Kpis() SubscriptionCostManagementViewKpiArrayOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) SubscriptionCostManagementViewKpiArrayOutput { return v.Kpis }).(SubscriptionCostManagementViewKpiArrayOutput) } // The name which should be used for this Cost Management View for a Subscription. Changing this forces a new Cost Management View for a Subscription to be created. func (o SubscriptionCostManagementViewOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. func (o SubscriptionCostManagementViewOutput) Pivots() SubscriptionCostManagementViewPivotArrayOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) SubscriptionCostManagementViewPivotArrayOutput { return v.Pivots }).(SubscriptionCostManagementViewPivotArrayOutput) } // The type of the report. The only possible value is `Usage`. func (o SubscriptionCostManagementViewOutput) ReportType() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) pulumi.StringOutput { return v.ReportType }).(pulumi.StringOutput) } // The ID of the Subscription this View is scoped to. Changing this forces a new Cost Management View for a Subscription to be created. func (o SubscriptionCostManagementViewOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. func (o SubscriptionCostManagementViewOutput) Timeframe() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementView) pulumi.StringOutput { return v.Timeframe }).(pulumi.StringOutput) } type SubscriptionCostManagementViewArrayOutput struct{ *pulumi.OutputState } func (SubscriptionCostManagementViewArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionCostManagementView)(nil)).Elem() } func (o SubscriptionCostManagementViewArrayOutput) ToSubscriptionCostManagementViewArrayOutput() SubscriptionCostManagementViewArrayOutput { return o } func (o SubscriptionCostManagementViewArrayOutput) ToSubscriptionCostManagementViewArrayOutputWithContext(ctx context.Context) SubscriptionCostManagementViewArrayOutput { return o } func (o SubscriptionCostManagementViewArrayOutput) Index(i pulumi.IntInput) SubscriptionCostManagementViewOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionCostManagementView { return vs[0].([]*SubscriptionCostManagementView)[vs[1].(int)] }).(SubscriptionCostManagementViewOutput) } type SubscriptionCostManagementViewMapOutput struct{ *pulumi.OutputState } func (SubscriptionCostManagementViewMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionCostManagementView)(nil)).Elem() } func (o SubscriptionCostManagementViewMapOutput) ToSubscriptionCostManagementViewMapOutput() SubscriptionCostManagementViewMapOutput { return o } func (o SubscriptionCostManagementViewMapOutput) ToSubscriptionCostManagementViewMapOutputWithContext(ctx context.Context) SubscriptionCostManagementViewMapOutput { return o } func (o SubscriptionCostManagementViewMapOutput) MapIndex(k pulumi.StringInput) SubscriptionCostManagementViewOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionCostManagementView { return vs[0].(map[string]*SubscriptionCostManagementView)[vs[1].(string)] }).(SubscriptionCostManagementViewOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionCostManagementViewInput)(nil)).Elem(), &SubscriptionCostManagementView{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionCostManagementViewArrayInput)(nil)).Elem(), SubscriptionCostManagementViewArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionCostManagementViewMapInput)(nil)).Elem(), SubscriptionCostManagementViewMap{}) pulumi.RegisterOutputType(SubscriptionCostManagementViewOutput{}) pulumi.RegisterOutputType(SubscriptionCostManagementViewArrayOutput{}) pulumi.RegisterOutputType(SubscriptionCostManagementViewMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getSubscriptionTemplateDeployment.go
sdk/go/azure/core/getSubscriptionTemplateDeployment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Subscription Template Deployment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupSubscriptionTemplateDeployment(ctx, &core.LookupSubscriptionTemplateDeploymentArgs{ // Name: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // ctx.Export("exampleOutput", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{ // Input: example.OutputContent, // }, nil).Result.ExampleOutput.Value)) // return nil // }) // } // // ``` func LookupSubscriptionTemplateDeployment(ctx *pulumi.Context, args *LookupSubscriptionTemplateDeploymentArgs, opts ...pulumi.InvokeOption) (*LookupSubscriptionTemplateDeploymentResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSubscriptionTemplateDeploymentResult err := ctx.Invoke("azure:core/getSubscriptionTemplateDeployment:getSubscriptionTemplateDeployment", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSubscriptionTemplateDeployment. type LookupSubscriptionTemplateDeploymentArgs struct { // The name of this Subscription Template Deployment. Name string `pulumi:"name"` } // A collection of values returned by getSubscriptionTemplateDeployment. type LookupSubscriptionTemplateDeploymentResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent string `pulumi:"outputContent"` } func LookupSubscriptionTemplateDeploymentOutput(ctx *pulumi.Context, args LookupSubscriptionTemplateDeploymentOutputArgs, opts ...pulumi.InvokeOption) LookupSubscriptionTemplateDeploymentResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSubscriptionTemplateDeploymentResultOutput, error) { args := v.(LookupSubscriptionTemplateDeploymentArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getSubscriptionTemplateDeployment:getSubscriptionTemplateDeployment", args, LookupSubscriptionTemplateDeploymentResultOutput{}, options).(LookupSubscriptionTemplateDeploymentResultOutput), nil }).(LookupSubscriptionTemplateDeploymentResultOutput) } // A collection of arguments for invoking getSubscriptionTemplateDeployment. type LookupSubscriptionTemplateDeploymentOutputArgs struct { // The name of this Subscription Template Deployment. Name pulumi.StringInput `pulumi:"name"` } func (LookupSubscriptionTemplateDeploymentOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSubscriptionTemplateDeploymentArgs)(nil)).Elem() } // A collection of values returned by getSubscriptionTemplateDeployment. type LookupSubscriptionTemplateDeploymentResultOutput struct{ *pulumi.OutputState } func (LookupSubscriptionTemplateDeploymentResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSubscriptionTemplateDeploymentResult)(nil)).Elem() } func (o LookupSubscriptionTemplateDeploymentResultOutput) ToLookupSubscriptionTemplateDeploymentResultOutput() LookupSubscriptionTemplateDeploymentResultOutput { return o } func (o LookupSubscriptionTemplateDeploymentResultOutput) ToLookupSubscriptionTemplateDeploymentResultOutputWithContext(ctx context.Context) LookupSubscriptionTemplateDeploymentResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupSubscriptionTemplateDeploymentResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionTemplateDeploymentResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupSubscriptionTemplateDeploymentResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionTemplateDeploymentResult) string { return v.Name }).(pulumi.StringOutput) } // The JSON Content of the Outputs of the ARM Template Deployment. func (o LookupSubscriptionTemplateDeploymentResultOutput) OutputContent() pulumi.StringOutput { return o.ApplyT(func(v LookupSubscriptionTemplateDeploymentResult) string { return v.OutputContent }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupSubscriptionTemplateDeploymentResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceDeploymentScriptPowerShell.go
sdk/go/azure/core/resourceDeploymentScriptPowerShell.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Deployment Script of Azure PowerShell. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example-uai"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = core.NewResourceDeploymentScriptPowerShell(ctx, "example", &core.ResourceDeploymentScriptPowerShellArgs{ // Name: pulumi.String("example-rdsaps"), // ResourceGroupName: example.Name, // Location: pulumi.String("West Europe"), // Version: pulumi.String("8.3"), // RetentionInterval: pulumi.String("P1D"), // CommandLine: pulumi.String("-name \"John Dole\""), // CleanupPreference: pulumi.String("OnSuccess"), // ForceUpdateTag: pulumi.String("1"), // Timeout: pulumi.String("PT30M"), // ScriptContent: pulumi.String(` param([string] $name) // $output = 'Hello {0}.' -f $name // Write-Output $output // $DeploymentScriptOutputs = @{} // $DeploymentScriptOutputs['text'] = $output // // `), // // Identity: &core.ResourceDeploymentScriptPowerShellIdentityArgs{ // Type: pulumi.String("UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.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.Resources` - 2020-10-01 // // ## Import // // Resource Deployment Script can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceDeploymentScriptPowerShell:ResourceDeploymentScriptPowerShell example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Resources/deploymentScripts/script1 // ``` type ResourceDeploymentScriptPowerShell struct { pulumi.CustomResourceState // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference pulumi.StringPtrOutput `pulumi:"cleanupPreference"` // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine pulumi.StringPtrOutput `pulumi:"commandLine"` // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container ResourceDeploymentScriptPowerShellContainerPtrOutput `pulumi:"container"` // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables ResourceDeploymentScriptPowerShellEnvironmentVariableArrayOutput `pulumi:"environmentVariables"` // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag pulumi.StringPtrOutput `pulumi:"forceUpdateTag"` // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity ResourceDeploymentScriptPowerShellIdentityPtrOutput `pulumi:"identity"` // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name pulumi.StringOutput `pulumi:"name"` // List of script outputs. Outputs pulumi.StringOutput `pulumi:"outputs"` // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri pulumi.StringPtrOutput `pulumi:"primaryScriptUri"` // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval pulumi.StringOutput `pulumi:"retentionInterval"` // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent pulumi.StringPtrOutput `pulumi:"scriptContent"` // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount ResourceDeploymentScriptPowerShellStorageAccountPtrOutput `pulumi:"storageAccount"` // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris pulumi.StringArrayOutput `pulumi:"supportingScriptUris"` // A mapping of tags which should be assigned to the Resource Deployment Script. Tags pulumi.StringMapOutput `pulumi:"tags"` // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout pulumi.StringPtrOutput `pulumi:"timeout"` // Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. Version pulumi.StringOutput `pulumi:"version"` } // NewResourceDeploymentScriptPowerShell registers a new resource with the given unique name, arguments, and options. func NewResourceDeploymentScriptPowerShell(ctx *pulumi.Context, name string, args *ResourceDeploymentScriptPowerShellArgs, opts ...pulumi.ResourceOption) (*ResourceDeploymentScriptPowerShell, 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.RetentionInterval == nil { return nil, errors.New("invalid value for required argument 'RetentionInterval'") } if args.Version == nil { return nil, errors.New("invalid value for required argument 'Version'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceDeploymentScriptPowerShell err := ctx.RegisterResource("azure:core/resourceDeploymentScriptPowerShell:ResourceDeploymentScriptPowerShell", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceDeploymentScriptPowerShell gets an existing ResourceDeploymentScriptPowerShell resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceDeploymentScriptPowerShell(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceDeploymentScriptPowerShellState, opts ...pulumi.ResourceOption) (*ResourceDeploymentScriptPowerShell, error) { var resource ResourceDeploymentScriptPowerShell err := ctx.ReadResource("azure:core/resourceDeploymentScriptPowerShell:ResourceDeploymentScriptPowerShell", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceDeploymentScriptPowerShell resources. type resourceDeploymentScriptPowerShellState struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference *string `pulumi:"cleanupPreference"` // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine *string `pulumi:"commandLine"` // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container *ResourceDeploymentScriptPowerShellContainer `pulumi:"container"` // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables []ResourceDeploymentScriptPowerShellEnvironmentVariable `pulumi:"environmentVariables"` // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag *string `pulumi:"forceUpdateTag"` // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity *ResourceDeploymentScriptPowerShellIdentity `pulumi:"identity"` // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name *string `pulumi:"name"` // List of script outputs. Outputs *string `pulumi:"outputs"` // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri *string `pulumi:"primaryScriptUri"` // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval *string `pulumi:"retentionInterval"` // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent *string `pulumi:"scriptContent"` // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount *ResourceDeploymentScriptPowerShellStorageAccount `pulumi:"storageAccount"` // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris []string `pulumi:"supportingScriptUris"` // A mapping of tags which should be assigned to the Resource Deployment Script. Tags map[string]string `pulumi:"tags"` // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout *string `pulumi:"timeout"` // Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. Version *string `pulumi:"version"` } type ResourceDeploymentScriptPowerShellState struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference pulumi.StringPtrInput // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine pulumi.StringPtrInput // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container ResourceDeploymentScriptPowerShellContainerPtrInput // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables ResourceDeploymentScriptPowerShellEnvironmentVariableArrayInput // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag pulumi.StringPtrInput // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity ResourceDeploymentScriptPowerShellIdentityPtrInput // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name pulumi.StringPtrInput // List of script outputs. Outputs pulumi.StringPtrInput // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri pulumi.StringPtrInput // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName pulumi.StringPtrInput // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval pulumi.StringPtrInput // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent pulumi.StringPtrInput // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount ResourceDeploymentScriptPowerShellStorageAccountPtrInput // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris pulumi.StringArrayInput // A mapping of tags which should be assigned to the Resource Deployment Script. Tags pulumi.StringMapInput // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout pulumi.StringPtrInput // Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. Version pulumi.StringPtrInput } func (ResourceDeploymentScriptPowerShellState) ElementType() reflect.Type { return reflect.TypeOf((*resourceDeploymentScriptPowerShellState)(nil)).Elem() } type resourceDeploymentScriptPowerShellArgs struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference *string `pulumi:"cleanupPreference"` // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine *string `pulumi:"commandLine"` // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container *ResourceDeploymentScriptPowerShellContainer `pulumi:"container"` // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables []ResourceDeploymentScriptPowerShellEnvironmentVariable `pulumi:"environmentVariables"` // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag *string `pulumi:"forceUpdateTag"` // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity *ResourceDeploymentScriptPowerShellIdentity `pulumi:"identity"` // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name *string `pulumi:"name"` // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri *string `pulumi:"primaryScriptUri"` // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval string `pulumi:"retentionInterval"` // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent *string `pulumi:"scriptContent"` // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount *ResourceDeploymentScriptPowerShellStorageAccount `pulumi:"storageAccount"` // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris []string `pulumi:"supportingScriptUris"` // A mapping of tags which should be assigned to the Resource Deployment Script. Tags map[string]string `pulumi:"tags"` // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout *string `pulumi:"timeout"` // Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. Version string `pulumi:"version"` } // The set of arguments for constructing a ResourceDeploymentScriptPowerShell resource. type ResourceDeploymentScriptPowerShellArgs struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference pulumi.StringPtrInput // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine pulumi.StringPtrInput // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container ResourceDeploymentScriptPowerShellContainerPtrInput // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables ResourceDeploymentScriptPowerShellEnvironmentVariableArrayInput // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag pulumi.StringPtrInput // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity ResourceDeploymentScriptPowerShellIdentityPtrInput // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name pulumi.StringPtrInput // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri pulumi.StringPtrInput // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName pulumi.StringInput // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval pulumi.StringInput // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent pulumi.StringPtrInput // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount ResourceDeploymentScriptPowerShellStorageAccountPtrInput // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris pulumi.StringArrayInput // A mapping of tags which should be assigned to the Resource Deployment Script. Tags pulumi.StringMapInput // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout pulumi.StringPtrInput // Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. Version pulumi.StringInput } func (ResourceDeploymentScriptPowerShellArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceDeploymentScriptPowerShellArgs)(nil)).Elem() } type ResourceDeploymentScriptPowerShellInput interface { pulumi.Input ToResourceDeploymentScriptPowerShellOutput() ResourceDeploymentScriptPowerShellOutput ToResourceDeploymentScriptPowerShellOutputWithContext(ctx context.Context) ResourceDeploymentScriptPowerShellOutput } func (*ResourceDeploymentScriptPowerShell) ElementType() reflect.Type { return reflect.TypeOf((**ResourceDeploymentScriptPowerShell)(nil)).Elem() } func (i *ResourceDeploymentScriptPowerShell) ToResourceDeploymentScriptPowerShellOutput() ResourceDeploymentScriptPowerShellOutput { return i.ToResourceDeploymentScriptPowerShellOutputWithContext(context.Background()) } func (i *ResourceDeploymentScriptPowerShell) ToResourceDeploymentScriptPowerShellOutputWithContext(ctx context.Context) ResourceDeploymentScriptPowerShellOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptPowerShellOutput) } // ResourceDeploymentScriptPowerShellArrayInput is an input type that accepts ResourceDeploymentScriptPowerShellArray and ResourceDeploymentScriptPowerShellArrayOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptPowerShellArrayInput` via: // // ResourceDeploymentScriptPowerShellArray{ ResourceDeploymentScriptPowerShellArgs{...} } type ResourceDeploymentScriptPowerShellArrayInput interface { pulumi.Input ToResourceDeploymentScriptPowerShellArrayOutput() ResourceDeploymentScriptPowerShellArrayOutput ToResourceDeploymentScriptPowerShellArrayOutputWithContext(context.Context) ResourceDeploymentScriptPowerShellArrayOutput } type ResourceDeploymentScriptPowerShellArray []ResourceDeploymentScriptPowerShellInput func (ResourceDeploymentScriptPowerShellArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceDeploymentScriptPowerShell)(nil)).Elem() } func (i ResourceDeploymentScriptPowerShellArray) ToResourceDeploymentScriptPowerShellArrayOutput() ResourceDeploymentScriptPowerShellArrayOutput { return i.ToResourceDeploymentScriptPowerShellArrayOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptPowerShellArray) ToResourceDeploymentScriptPowerShellArrayOutputWithContext(ctx context.Context) ResourceDeploymentScriptPowerShellArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptPowerShellArrayOutput) } // ResourceDeploymentScriptPowerShellMapInput is an input type that accepts ResourceDeploymentScriptPowerShellMap and ResourceDeploymentScriptPowerShellMapOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptPowerShellMapInput` via: // // ResourceDeploymentScriptPowerShellMap{ "key": ResourceDeploymentScriptPowerShellArgs{...} } type ResourceDeploymentScriptPowerShellMapInput interface { pulumi.Input ToResourceDeploymentScriptPowerShellMapOutput() ResourceDeploymentScriptPowerShellMapOutput ToResourceDeploymentScriptPowerShellMapOutputWithContext(context.Context) ResourceDeploymentScriptPowerShellMapOutput } type ResourceDeploymentScriptPowerShellMap map[string]ResourceDeploymentScriptPowerShellInput func (ResourceDeploymentScriptPowerShellMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceDeploymentScriptPowerShell)(nil)).Elem() } func (i ResourceDeploymentScriptPowerShellMap) ToResourceDeploymentScriptPowerShellMapOutput() ResourceDeploymentScriptPowerShellMapOutput { return i.ToResourceDeploymentScriptPowerShellMapOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptPowerShellMap) ToResourceDeploymentScriptPowerShellMapOutputWithContext(ctx context.Context) ResourceDeploymentScriptPowerShellMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptPowerShellMapOutput) } type ResourceDeploymentScriptPowerShellOutput struct{ *pulumi.OutputState } func (ResourceDeploymentScriptPowerShellOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceDeploymentScriptPowerShell)(nil)).Elem() } func (o ResourceDeploymentScriptPowerShellOutput) ToResourceDeploymentScriptPowerShellOutput() ResourceDeploymentScriptPowerShellOutput { return o } func (o ResourceDeploymentScriptPowerShellOutput) ToResourceDeploymentScriptPowerShellOutputWithContext(ctx context.Context) ResourceDeploymentScriptPowerShellOutput { return o } // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptPowerShellOutput) CleanupPreference() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptPowerShell) pulumi.StringPtrOutput { return v.CleanupPreference }).(pulumi.StringPtrOutput) } // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptPowerShellOutput) CommandLine() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptPowerShell) pulumi.StringPtrOutput { return v.CommandLine }).(pulumi.StringPtrOutput) } // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptPowerShellOutput) Container() ResourceDeploymentScriptPowerShellContainerPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptPowerShell) ResourceDeploymentScriptPowerShellContainerPtrOutput { return v.Container }).(ResourceDeploymentScriptPowerShellContainerPtrOutput) } // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptPowerShellOutput) EnvironmentVariables() ResourceDeploymentScriptPowerShellEnvironmentVariableArrayOutput { return o.ApplyT(func(v *ResourceDeploymentScriptPowerShell) ResourceDeploymentScriptPowerShellEnvironmentVariableArrayOutput { return v.EnvironmentVariables }).(ResourceDeploymentScriptPowerShellEnvironmentVariableArrayOutput) } // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptPowerShellOutput) ForceUpdateTag() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptPowerShell) pulumi.StringPtrOutput { return v.ForceUpdateTag }).(pulumi.StringPtrOutput) } // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptPowerShellOutput) Identity() ResourceDeploymentScriptPowerShellIdentityPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptPowerShell) ResourceDeploymentScriptPowerShellIdentityPtrOutput { return v.Identity }).(ResourceDeploymentScriptPowerShellIdentityPtrOutput) } // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptPowerShellOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ResourceDeploymentScriptPowerShell) pulumi.StringOutput { return v.Location }).(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/core/resourceGroupPolicyRemediation.go
sdk/go/azure/core/resourceGroupPolicyRemediation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Resource Group Policy Remediation. // // ## 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/policy" // "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 // } // exampleDefinition, err := policy.NewDefinition(ctx, "example", &policy.DefinitionArgs{ // Name: pulumi.String("my-policy-definition"), // PolicyType: pulumi.String("Custom"), // Mode: pulumi.String("All"), // DisplayName: pulumi.String("my-policy-definition"), // PolicyRule: pulumi.String(` { // "if": { // "not": { // "field": "location", // "in": "[parameters('allowedLocations')]" // } // }, // "then": { // "effect": "audit" // } // } // // `), // // Parameters: pulumi.String(` { // \"allowedLocations\": { // \"type\": \"Array\", // \"metadata\": { // \"description\": \"The list of allowed locations for resources.\", // \"displayName\": \"Allowed locations\", // \"strongType\": \"location\" // } // } // } // // `), // // }) // if err != nil { // return err // } // exampleResourceGroupPolicyAssignment, err := core.NewResourceGroupPolicyAssignment(ctx, "example", &core.ResourceGroupPolicyAssignmentArgs{ // Name: pulumi.String("example"), // ResourceGroupId: example.ID(), // PolicyDefinitionId: exampleDefinition.ID(), // }) // if err != nil { // return err // } // _, err = core.NewResourceGroupPolicyRemediation(ctx, "example", &core.ResourceGroupPolicyRemediationArgs{ // Name: pulumi.String("example-policy-remediation"), // ResourceGroupId: example.ID(), // PolicyAssignmentId: exampleResourceGroupPolicyAssignment.ID(), // LocationFilters: pulumi.StringArray{ // pulumi.String("West Europe"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.PolicyInsights` - 2021-10-01 // // ## Import // // Policy Remediations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceGroupPolicyRemediation:ResourceGroupPolicyRemediation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.PolicyInsights/remediations/remediation1 // ``` type ResourceGroupPolicyRemediation struct { pulumi.CustomResourceState // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrOutput `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayOutput `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrOutput `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrOutput `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrOutput `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrOutput `pulumi:"resourceDiscoveryMode"` // The Resource Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"` } // NewResourceGroupPolicyRemediation registers a new resource with the given unique name, arguments, and options. func NewResourceGroupPolicyRemediation(ctx *pulumi.Context, name string, args *ResourceGroupPolicyRemediationArgs, opts ...pulumi.ResourceOption) (*ResourceGroupPolicyRemediation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyAssignmentId == nil { return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'") } if args.ResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceGroupPolicyRemediation err := ctx.RegisterResource("azure:core/resourceGroupPolicyRemediation:ResourceGroupPolicyRemediation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceGroupPolicyRemediation gets an existing ResourceGroupPolicyRemediation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceGroupPolicyRemediation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceGroupPolicyRemediationState, opts ...pulumi.ResourceOption) (*ResourceGroupPolicyRemediation, error) { var resource ResourceGroupPolicyRemediation err := ctx.ReadResource("azure:core/resourceGroupPolicyRemediation:ResourceGroupPolicyRemediation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceGroupPolicyRemediation resources. type resourceGroupPolicyRemediationState struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage *float64 `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters []string `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments *int `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId *string `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount *int `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"` // The Resource Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceGroupId *string `pulumi:"resourceGroupId"` } type ResourceGroupPolicyRemediationState struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrInput // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayInput // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrInput // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringPtrInput // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrInput // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrInput // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrInput // The Resource Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringPtrInput } func (ResourceGroupPolicyRemediationState) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupPolicyRemediationState)(nil)).Elem() } type resourceGroupPolicyRemediationArgs struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage *float64 `pulumi:"failurePercentage"` // A list of the resource locations that will be remediated. LocationFilters []string `pulumi:"locationFilters"` // The name of the Policy Remediation. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments *int `pulumi:"parallelDeployments"` // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId string `pulumi:"policyAssignmentId"` // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"` // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount *int `pulumi:"resourceCount"` // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode *string `pulumi:"resourceDiscoveryMode"` // The Resource Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceGroupId string `pulumi:"resourceGroupId"` } // The set of arguments for constructing a ResourceGroupPolicyRemediation resource. type ResourceGroupPolicyRemediationArgs struct { // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. FailurePercentage pulumi.Float64PtrInput // A list of the resource locations that will be remediated. LocationFilters pulumi.StringArrayInput // The name of the Policy Remediation. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. ParallelDeployments pulumi.IntPtrInput // The ID of the Policy Assignment that should be remediated. PolicyAssignmentId pulumi.StringInput // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceId pulumi.StringPtrInput // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. ResourceCount pulumi.IntPtrInput // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. ResourceDiscoveryMode pulumi.StringPtrInput // The Resource Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringInput } func (ResourceGroupPolicyRemediationArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupPolicyRemediationArgs)(nil)).Elem() } type ResourceGroupPolicyRemediationInput interface { pulumi.Input ToResourceGroupPolicyRemediationOutput() ResourceGroupPolicyRemediationOutput ToResourceGroupPolicyRemediationOutputWithContext(ctx context.Context) ResourceGroupPolicyRemediationOutput } func (*ResourceGroupPolicyRemediation) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupPolicyRemediation)(nil)).Elem() } func (i *ResourceGroupPolicyRemediation) ToResourceGroupPolicyRemediationOutput() ResourceGroupPolicyRemediationOutput { return i.ToResourceGroupPolicyRemediationOutputWithContext(context.Background()) } func (i *ResourceGroupPolicyRemediation) ToResourceGroupPolicyRemediationOutputWithContext(ctx context.Context) ResourceGroupPolicyRemediationOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyRemediationOutput) } // ResourceGroupPolicyRemediationArrayInput is an input type that accepts ResourceGroupPolicyRemediationArray and ResourceGroupPolicyRemediationArrayOutput values. // You can construct a concrete instance of `ResourceGroupPolicyRemediationArrayInput` via: // // ResourceGroupPolicyRemediationArray{ ResourceGroupPolicyRemediationArgs{...} } type ResourceGroupPolicyRemediationArrayInput interface { pulumi.Input ToResourceGroupPolicyRemediationArrayOutput() ResourceGroupPolicyRemediationArrayOutput ToResourceGroupPolicyRemediationArrayOutputWithContext(context.Context) ResourceGroupPolicyRemediationArrayOutput } type ResourceGroupPolicyRemediationArray []ResourceGroupPolicyRemediationInput func (ResourceGroupPolicyRemediationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupPolicyRemediation)(nil)).Elem() } func (i ResourceGroupPolicyRemediationArray) ToResourceGroupPolicyRemediationArrayOutput() ResourceGroupPolicyRemediationArrayOutput { return i.ToResourceGroupPolicyRemediationArrayOutputWithContext(context.Background()) } func (i ResourceGroupPolicyRemediationArray) ToResourceGroupPolicyRemediationArrayOutputWithContext(ctx context.Context) ResourceGroupPolicyRemediationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyRemediationArrayOutput) } // ResourceGroupPolicyRemediationMapInput is an input type that accepts ResourceGroupPolicyRemediationMap and ResourceGroupPolicyRemediationMapOutput values. // You can construct a concrete instance of `ResourceGroupPolicyRemediationMapInput` via: // // ResourceGroupPolicyRemediationMap{ "key": ResourceGroupPolicyRemediationArgs{...} } type ResourceGroupPolicyRemediationMapInput interface { pulumi.Input ToResourceGroupPolicyRemediationMapOutput() ResourceGroupPolicyRemediationMapOutput ToResourceGroupPolicyRemediationMapOutputWithContext(context.Context) ResourceGroupPolicyRemediationMapOutput } type ResourceGroupPolicyRemediationMap map[string]ResourceGroupPolicyRemediationInput func (ResourceGroupPolicyRemediationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupPolicyRemediation)(nil)).Elem() } func (i ResourceGroupPolicyRemediationMap) ToResourceGroupPolicyRemediationMapOutput() ResourceGroupPolicyRemediationMapOutput { return i.ToResourceGroupPolicyRemediationMapOutputWithContext(context.Background()) } func (i ResourceGroupPolicyRemediationMap) ToResourceGroupPolicyRemediationMapOutputWithContext(ctx context.Context) ResourceGroupPolicyRemediationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyRemediationMapOutput) } type ResourceGroupPolicyRemediationOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyRemediationOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupPolicyRemediation)(nil)).Elem() } func (o ResourceGroupPolicyRemediationOutput) ToResourceGroupPolicyRemediationOutput() ResourceGroupPolicyRemediationOutput { return o } func (o ResourceGroupPolicyRemediationOutput) ToResourceGroupPolicyRemediationOutputWithContext(ctx context.Context) ResourceGroupPolicyRemediationOutput { return o } // A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. func (o ResourceGroupPolicyRemediationOutput) FailurePercentage() pulumi.Float64PtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.Float64PtrOutput { return v.FailurePercentage }).(pulumi.Float64PtrOutput) } // A list of the resource locations that will be remediated. func (o ResourceGroupPolicyRemediationOutput) LocationFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.StringArrayOutput { return v.LocationFilters }).(pulumi.StringArrayOutput) } // The name of the Policy Remediation. Changing this forces a new resource to be created. func (o ResourceGroupPolicyRemediationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. func (o ResourceGroupPolicyRemediationOutput) ParallelDeployments() pulumi.IntPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.IntPtrOutput { return v.ParallelDeployments }).(pulumi.IntPtrOutput) } // The ID of the Policy Assignment that should be remediated. func (o ResourceGroupPolicyRemediationOutput) PolicyAssignmentId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput) } // The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. func (o ResourceGroupPolicyRemediationOutput) PolicyDefinitionReferenceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.StringPtrOutput { return v.PolicyDefinitionReferenceId }).(pulumi.StringPtrOutput) } // Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. func (o ResourceGroupPolicyRemediationOutput) ResourceCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.IntPtrOutput { return v.ResourceCount }).(pulumi.IntPtrOutput) } // The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. func (o ResourceGroupPolicyRemediationOutput) ResourceDiscoveryMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.StringPtrOutput { return v.ResourceDiscoveryMode }).(pulumi.StringPtrOutput) } // The Resource Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. func (o ResourceGroupPolicyRemediationOutput) ResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyRemediation) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput) } type ResourceGroupPolicyRemediationArrayOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyRemediationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupPolicyRemediation)(nil)).Elem() } func (o ResourceGroupPolicyRemediationArrayOutput) ToResourceGroupPolicyRemediationArrayOutput() ResourceGroupPolicyRemediationArrayOutput { return o } func (o ResourceGroupPolicyRemediationArrayOutput) ToResourceGroupPolicyRemediationArrayOutputWithContext(ctx context.Context) ResourceGroupPolicyRemediationArrayOutput { return o } func (o ResourceGroupPolicyRemediationArrayOutput) Index(i pulumi.IntInput) ResourceGroupPolicyRemediationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGroupPolicyRemediation { return vs[0].([]*ResourceGroupPolicyRemediation)[vs[1].(int)] }).(ResourceGroupPolicyRemediationOutput) } type ResourceGroupPolicyRemediationMapOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyRemediationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupPolicyRemediation)(nil)).Elem() } func (o ResourceGroupPolicyRemediationMapOutput) ToResourceGroupPolicyRemediationMapOutput() ResourceGroupPolicyRemediationMapOutput { return o } func (o ResourceGroupPolicyRemediationMapOutput) ToResourceGroupPolicyRemediationMapOutputWithContext(ctx context.Context) ResourceGroupPolicyRemediationMapOutput { return o } func (o ResourceGroupPolicyRemediationMapOutput) MapIndex(k pulumi.StringInput) ResourceGroupPolicyRemediationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGroupPolicyRemediation { return vs[0].(map[string]*ResourceGroupPolicyRemediation)[vs[1].(string)] }).(ResourceGroupPolicyRemediationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyRemediationInput)(nil)).Elem(), &ResourceGroupPolicyRemediation{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyRemediationArrayInput)(nil)).Elem(), ResourceGroupPolicyRemediationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyRemediationMapInput)(nil)).Elem(), ResourceGroupPolicyRemediationMap{}) pulumi.RegisterOutputType(ResourceGroupPolicyRemediationOutput{}) pulumi.RegisterOutputType(ResourceGroupPolicyRemediationArrayOutput{}) pulumi.RegisterOutputType(ResourceGroupPolicyRemediationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceDeploymentScriptAzureCli.go
sdk/go/azure/core/resourceDeploymentScriptAzureCli.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Deployment Script of Azure Cli. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example-uai"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = core.NewResourceDeploymentScriptAzureCli(ctx, "example", &core.ResourceDeploymentScriptAzureCliArgs{ // Name: pulumi.String("example-rdsac"), // ResourceGroupName: example.Name, // Location: pulumi.String("West Europe"), // Version: pulumi.String("2.40.0"), // RetentionInterval: pulumi.String("P1D"), // CommandLine: pulumi.String("'foo' 'bar'"), // CleanupPreference: pulumi.String("OnSuccess"), // ForceUpdateTag: pulumi.String("1"), // Timeout: pulumi.String("PT30M"), // ScriptContent: pulumi.String(" echo \\\"{\\\\\\\"name\\\\\\\":{\\\\\\\"displayName\\\\\\\":\\\\\\\"$1 $2\\\\\\\"}}\\\" > $AZ_SCRIPTS_OUTPUT_PATH\n"), // Identity: &core.ResourceDeploymentScriptAzureCliIdentityArgs{ // Type: pulumi.String("UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.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.Resources` - 2020-10-01 // // ## Import // // Resource Deployment Script can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceDeploymentScriptAzureCli:ResourceDeploymentScriptAzureCli example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Resources/deploymentScripts/script1 // ``` type ResourceDeploymentScriptAzureCli struct { pulumi.CustomResourceState // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference pulumi.StringPtrOutput `pulumi:"cleanupPreference"` // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine pulumi.StringPtrOutput `pulumi:"commandLine"` // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container ResourceDeploymentScriptAzureCliContainerPtrOutput `pulumi:"container"` // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput `pulumi:"environmentVariables"` // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag pulumi.StringPtrOutput `pulumi:"forceUpdateTag"` // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity ResourceDeploymentScriptAzureCliIdentityPtrOutput `pulumi:"identity"` // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name pulumi.StringOutput `pulumi:"name"` // List of script outputs. Outputs pulumi.StringOutput `pulumi:"outputs"` // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri pulumi.StringPtrOutput `pulumi:"primaryScriptUri"` // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval pulumi.StringOutput `pulumi:"retentionInterval"` // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent pulumi.StringPtrOutput `pulumi:"scriptContent"` // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount ResourceDeploymentScriptAzureCliStorageAccountPtrOutput `pulumi:"storageAccount"` // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris pulumi.StringArrayOutput `pulumi:"supportingScriptUris"` // A mapping of tags which should be assigned to the Resource Deployment Script. Tags pulumi.StringMapOutput `pulumi:"tags"` // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout pulumi.StringPtrOutput `pulumi:"timeout"` // Specifies the version of the Azure CLI that should be used in the format `X.Y.Z` (e.g. `2.30.0`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-cli/tags/list). Changing this forces a new Resource Deployment Script to be created. Version pulumi.StringOutput `pulumi:"version"` } // NewResourceDeploymentScriptAzureCli registers a new resource with the given unique name, arguments, and options. func NewResourceDeploymentScriptAzureCli(ctx *pulumi.Context, name string, args *ResourceDeploymentScriptAzureCliArgs, opts ...pulumi.ResourceOption) (*ResourceDeploymentScriptAzureCli, 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.RetentionInterval == nil { return nil, errors.New("invalid value for required argument 'RetentionInterval'") } if args.Version == nil { return nil, errors.New("invalid value for required argument 'Version'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceDeploymentScriptAzureCli err := ctx.RegisterResource("azure:core/resourceDeploymentScriptAzureCli:ResourceDeploymentScriptAzureCli", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceDeploymentScriptAzureCli gets an existing ResourceDeploymentScriptAzureCli resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceDeploymentScriptAzureCli(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceDeploymentScriptAzureCliState, opts ...pulumi.ResourceOption) (*ResourceDeploymentScriptAzureCli, error) { var resource ResourceDeploymentScriptAzureCli err := ctx.ReadResource("azure:core/resourceDeploymentScriptAzureCli:ResourceDeploymentScriptAzureCli", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceDeploymentScriptAzureCli resources. type resourceDeploymentScriptAzureCliState struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference *string `pulumi:"cleanupPreference"` // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine *string `pulumi:"commandLine"` // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container *ResourceDeploymentScriptAzureCliContainer `pulumi:"container"` // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables []ResourceDeploymentScriptAzureCliEnvironmentVariable `pulumi:"environmentVariables"` // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag *string `pulumi:"forceUpdateTag"` // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity *ResourceDeploymentScriptAzureCliIdentity `pulumi:"identity"` // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name *string `pulumi:"name"` // List of script outputs. Outputs *string `pulumi:"outputs"` // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri *string `pulumi:"primaryScriptUri"` // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval *string `pulumi:"retentionInterval"` // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent *string `pulumi:"scriptContent"` // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount *ResourceDeploymentScriptAzureCliStorageAccount `pulumi:"storageAccount"` // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris []string `pulumi:"supportingScriptUris"` // A mapping of tags which should be assigned to the Resource Deployment Script. Tags map[string]string `pulumi:"tags"` // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout *string `pulumi:"timeout"` // Specifies the version of the Azure CLI that should be used in the format `X.Y.Z` (e.g. `2.30.0`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-cli/tags/list). Changing this forces a new Resource Deployment Script to be created. Version *string `pulumi:"version"` } type ResourceDeploymentScriptAzureCliState struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference pulumi.StringPtrInput // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine pulumi.StringPtrInput // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container ResourceDeploymentScriptAzureCliContainerPtrInput // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables ResourceDeploymentScriptAzureCliEnvironmentVariableArrayInput // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag pulumi.StringPtrInput // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity ResourceDeploymentScriptAzureCliIdentityPtrInput // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name pulumi.StringPtrInput // List of script outputs. Outputs pulumi.StringPtrInput // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri pulumi.StringPtrInput // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName pulumi.StringPtrInput // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval pulumi.StringPtrInput // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent pulumi.StringPtrInput // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount ResourceDeploymentScriptAzureCliStorageAccountPtrInput // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris pulumi.StringArrayInput // A mapping of tags which should be assigned to the Resource Deployment Script. Tags pulumi.StringMapInput // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout pulumi.StringPtrInput // Specifies the version of the Azure CLI that should be used in the format `X.Y.Z` (e.g. `2.30.0`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-cli/tags/list). Changing this forces a new Resource Deployment Script to be created. Version pulumi.StringPtrInput } func (ResourceDeploymentScriptAzureCliState) ElementType() reflect.Type { return reflect.TypeOf((*resourceDeploymentScriptAzureCliState)(nil)).Elem() } type resourceDeploymentScriptAzureCliArgs struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference *string `pulumi:"cleanupPreference"` // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine *string `pulumi:"commandLine"` // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container *ResourceDeploymentScriptAzureCliContainer `pulumi:"container"` // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables []ResourceDeploymentScriptAzureCliEnvironmentVariable `pulumi:"environmentVariables"` // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag *string `pulumi:"forceUpdateTag"` // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity *ResourceDeploymentScriptAzureCliIdentity `pulumi:"identity"` // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name *string `pulumi:"name"` // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri *string `pulumi:"primaryScriptUri"` // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval string `pulumi:"retentionInterval"` // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent *string `pulumi:"scriptContent"` // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount *ResourceDeploymentScriptAzureCliStorageAccount `pulumi:"storageAccount"` // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris []string `pulumi:"supportingScriptUris"` // A mapping of tags which should be assigned to the Resource Deployment Script. Tags map[string]string `pulumi:"tags"` // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout *string `pulumi:"timeout"` // Specifies the version of the Azure CLI that should be used in the format `X.Y.Z` (e.g. `2.30.0`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-cli/tags/list). Changing this forces a new Resource Deployment Script to be created. Version string `pulumi:"version"` } // The set of arguments for constructing a ResourceDeploymentScriptAzureCli resource. type ResourceDeploymentScriptAzureCliArgs struct { // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. CleanupPreference pulumi.StringPtrInput // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. CommandLine pulumi.StringPtrInput // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. Container ResourceDeploymentScriptAzureCliContainerPtrInput // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. EnvironmentVariables ResourceDeploymentScriptAzureCliEnvironmentVariableArrayInput // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. ForceUpdateTag pulumi.StringPtrInput // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. Identity ResourceDeploymentScriptAzureCliIdentityPtrInput // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. Name pulumi.StringPtrInput // Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. PrimaryScriptUri pulumi.StringPtrInput // Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. ResourceGroupName pulumi.StringInput // Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created. RetentionInterval pulumi.StringInput // Script body. Changing this forces a new Resource Deployment Script to be created. ScriptContent pulumi.StringPtrInput // A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. StorageAccount ResourceDeploymentScriptAzureCliStorageAccountPtrInput // Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. SupportingScriptUris pulumi.StringArrayInput // A mapping of tags which should be assigned to the Resource Deployment Script. Tags pulumi.StringMapInput // Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. Timeout pulumi.StringPtrInput // Specifies the version of the Azure CLI that should be used in the format `X.Y.Z` (e.g. `2.30.0`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-cli/tags/list). Changing this forces a new Resource Deployment Script to be created. Version pulumi.StringInput } func (ResourceDeploymentScriptAzureCliArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceDeploymentScriptAzureCliArgs)(nil)).Elem() } type ResourceDeploymentScriptAzureCliInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliOutput() ResourceDeploymentScriptAzureCliOutput ToResourceDeploymentScriptAzureCliOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliOutput } func (*ResourceDeploymentScriptAzureCli) ElementType() reflect.Type { return reflect.TypeOf((**ResourceDeploymentScriptAzureCli)(nil)).Elem() } func (i *ResourceDeploymentScriptAzureCli) ToResourceDeploymentScriptAzureCliOutput() ResourceDeploymentScriptAzureCliOutput { return i.ToResourceDeploymentScriptAzureCliOutputWithContext(context.Background()) } func (i *ResourceDeploymentScriptAzureCli) ToResourceDeploymentScriptAzureCliOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliOutput) } // ResourceDeploymentScriptAzureCliArrayInput is an input type that accepts ResourceDeploymentScriptAzureCliArray and ResourceDeploymentScriptAzureCliArrayOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliArrayInput` via: // // ResourceDeploymentScriptAzureCliArray{ ResourceDeploymentScriptAzureCliArgs{...} } type ResourceDeploymentScriptAzureCliArrayInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliArrayOutput() ResourceDeploymentScriptAzureCliArrayOutput ToResourceDeploymentScriptAzureCliArrayOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliArrayOutput } type ResourceDeploymentScriptAzureCliArray []ResourceDeploymentScriptAzureCliInput func (ResourceDeploymentScriptAzureCliArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceDeploymentScriptAzureCli)(nil)).Elem() } func (i ResourceDeploymentScriptAzureCliArray) ToResourceDeploymentScriptAzureCliArrayOutput() ResourceDeploymentScriptAzureCliArrayOutput { return i.ToResourceDeploymentScriptAzureCliArrayOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliArray) ToResourceDeploymentScriptAzureCliArrayOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliArrayOutput) } // ResourceDeploymentScriptAzureCliMapInput is an input type that accepts ResourceDeploymentScriptAzureCliMap and ResourceDeploymentScriptAzureCliMapOutput values. // You can construct a concrete instance of `ResourceDeploymentScriptAzureCliMapInput` via: // // ResourceDeploymentScriptAzureCliMap{ "key": ResourceDeploymentScriptAzureCliArgs{...} } type ResourceDeploymentScriptAzureCliMapInput interface { pulumi.Input ToResourceDeploymentScriptAzureCliMapOutput() ResourceDeploymentScriptAzureCliMapOutput ToResourceDeploymentScriptAzureCliMapOutputWithContext(context.Context) ResourceDeploymentScriptAzureCliMapOutput } type ResourceDeploymentScriptAzureCliMap map[string]ResourceDeploymentScriptAzureCliInput func (ResourceDeploymentScriptAzureCliMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceDeploymentScriptAzureCli)(nil)).Elem() } func (i ResourceDeploymentScriptAzureCliMap) ToResourceDeploymentScriptAzureCliMapOutput() ResourceDeploymentScriptAzureCliMapOutput { return i.ToResourceDeploymentScriptAzureCliMapOutputWithContext(context.Background()) } func (i ResourceDeploymentScriptAzureCliMap) ToResourceDeploymentScriptAzureCliMapOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceDeploymentScriptAzureCliMapOutput) } type ResourceDeploymentScriptAzureCliOutput struct{ *pulumi.OutputState } func (ResourceDeploymentScriptAzureCliOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceDeploymentScriptAzureCli)(nil)).Elem() } func (o ResourceDeploymentScriptAzureCliOutput) ToResourceDeploymentScriptAzureCliOutput() ResourceDeploymentScriptAzureCliOutput { return o } func (o ResourceDeploymentScriptAzureCliOutput) ToResourceDeploymentScriptAzureCliOutputWithContext(ctx context.Context) ResourceDeploymentScriptAzureCliOutput { return o } // Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) CleanupPreference() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) pulumi.StringPtrOutput { return v.CleanupPreference }).(pulumi.StringPtrOutput) } // Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) CommandLine() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) pulumi.StringPtrOutput { return v.CommandLine }).(pulumi.StringPtrOutput) } // A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) Container() ResourceDeploymentScriptAzureCliContainerPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) ResourceDeploymentScriptAzureCliContainerPtrOutput { return v.Container }).(ResourceDeploymentScriptAzureCliContainerPtrOutput) } // An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) EnvironmentVariables() ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput { return v.EnvironmentVariables }).(ResourceDeploymentScriptAzureCliEnvironmentVariableArrayOutput) } // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) ForceUpdateTag() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) pulumi.StringPtrOutput { return v.ForceUpdateTag }).(pulumi.StringPtrOutput) } // An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) Identity() ResourceDeploymentScriptAzureCliIdentityPtrOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) ResourceDeploymentScriptAzureCliIdentityPtrOutput { return v.Identity }).(ResourceDeploymentScriptAzureCliIdentityPtrOutput) } // Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created. func (o ResourceDeploymentScriptAzureCliOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceDeploymentScriptAzureCli) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // List of script outputs. func (o ResourceDeploymentScriptAzureCliOutput) Outputs() 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/core/resourceGroupCostManagementView.go
sdk/go/azure/core/resourceGroupCostManagementView.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Cost Management View for a Resource Group. // // ## Example Usage // // ```go // package main // // import ( // // "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 = core.NewResourceGroupCostManagementView(ctx, "example", &core.ResourceGroupCostManagementViewArgs{ // Name: pulumi.String("example"), // DisplayName: pulumi.String("Cost View per Month"), // ChartType: pulumi.String("StackedColumn"), // Accumulated: pulumi.Bool(false), // ResourceGroupId: example.ID(), // ReportType: pulumi.String("Usage"), // Timeframe: pulumi.String("MonthToDate"), // Dataset: &core.ResourceGroupCostManagementViewDatasetArgs{ // Granularity: pulumi.String("Monthly"), // Aggregations: core.ResourceGroupCostManagementViewDatasetAggregationArray{ // &core.ResourceGroupCostManagementViewDatasetAggregationArgs{ // Name: pulumi.String("totalCost"), // ColumnName: pulumi.String("Cost"), // }, // }, // }, // Pivots: core.ResourceGroupCostManagementViewPivotArray{ // &core.ResourceGroupCostManagementViewPivotArgs{ // Type: pulumi.String("Dimension"), // Name: pulumi.String("ServiceName"), // }, // &core.ResourceGroupCostManagementViewPivotArgs{ // Type: pulumi.String("Dimension"), // Name: pulumi.String("ResourceLocation"), // }, // &core.ResourceGroupCostManagementViewPivotArgs{ // Type: pulumi.String("Dimension"), // Name: pulumi.String("ResourceGroupName"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.CostManagement` - 2023-08-01 // // ## Import // // Cost Management View for a Resource Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceGroupCostManagementView:ResourceGroupCostManagementView example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.CostManagement/views/costmanagementview // ``` type ResourceGroupCostManagementView struct { pulumi.CustomResourceState // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created. Accumulated pulumi.BoolOutput `pulumi:"accumulated"` // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType pulumi.StringOutput `pulumi:"chartType"` // A `dataset` block as defined below. Dataset ResourceGroupCostManagementViewDatasetOutput `pulumi:"dataset"` // User visible input name of the Cost Management View. DisplayName pulumi.StringOutput `pulumi:"displayName"` // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis ResourceGroupCostManagementViewKpiArrayOutput `pulumi:"kpis"` // The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots ResourceGroupCostManagementViewPivotArrayOutput `pulumi:"pivots"` // The type of the report. The only possible value is `Usage`. ReportType pulumi.StringOutput `pulumi:"reportType"` // The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created. ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"` // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe pulumi.StringOutput `pulumi:"timeframe"` } // NewResourceGroupCostManagementView registers a new resource with the given unique name, arguments, and options. func NewResourceGroupCostManagementView(ctx *pulumi.Context, name string, args *ResourceGroupCostManagementViewArgs, opts ...pulumi.ResourceOption) (*ResourceGroupCostManagementView, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Accumulated == nil { return nil, errors.New("invalid value for required argument 'Accumulated'") } if args.ChartType == nil { return nil, errors.New("invalid value for required argument 'ChartType'") } if args.Dataset == nil { return nil, errors.New("invalid value for required argument 'Dataset'") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.ReportType == nil { return nil, errors.New("invalid value for required argument 'ReportType'") } if args.ResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupId'") } if args.Timeframe == nil { return nil, errors.New("invalid value for required argument 'Timeframe'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceGroupCostManagementView err := ctx.RegisterResource("azure:core/resourceGroupCostManagementView:ResourceGroupCostManagementView", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceGroupCostManagementView gets an existing ResourceGroupCostManagementView resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceGroupCostManagementView(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceGroupCostManagementViewState, opts ...pulumi.ResourceOption) (*ResourceGroupCostManagementView, error) { var resource ResourceGroupCostManagementView err := ctx.ReadResource("azure:core/resourceGroupCostManagementView:ResourceGroupCostManagementView", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceGroupCostManagementView resources. type resourceGroupCostManagementViewState struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created. Accumulated *bool `pulumi:"accumulated"` // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType *string `pulumi:"chartType"` // A `dataset` block as defined below. Dataset *ResourceGroupCostManagementViewDataset `pulumi:"dataset"` // User visible input name of the Cost Management View. DisplayName *string `pulumi:"displayName"` // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis []ResourceGroupCostManagementViewKpi `pulumi:"kpis"` // The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created. Name *string `pulumi:"name"` // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots []ResourceGroupCostManagementViewPivot `pulumi:"pivots"` // The type of the report. The only possible value is `Usage`. ReportType *string `pulumi:"reportType"` // The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created. ResourceGroupId *string `pulumi:"resourceGroupId"` // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe *string `pulumi:"timeframe"` } type ResourceGroupCostManagementViewState struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created. Accumulated pulumi.BoolPtrInput // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType pulumi.StringPtrInput // A `dataset` block as defined below. Dataset ResourceGroupCostManagementViewDatasetPtrInput // User visible input name of the Cost Management View. DisplayName pulumi.StringPtrInput // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis ResourceGroupCostManagementViewKpiArrayInput // The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created. Name pulumi.StringPtrInput // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots ResourceGroupCostManagementViewPivotArrayInput // The type of the report. The only possible value is `Usage`. ReportType pulumi.StringPtrInput // The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created. ResourceGroupId pulumi.StringPtrInput // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe pulumi.StringPtrInput } func (ResourceGroupCostManagementViewState) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupCostManagementViewState)(nil)).Elem() } type resourceGroupCostManagementViewArgs struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created. Accumulated bool `pulumi:"accumulated"` // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType string `pulumi:"chartType"` // A `dataset` block as defined below. Dataset ResourceGroupCostManagementViewDataset `pulumi:"dataset"` // User visible input name of the Cost Management View. DisplayName string `pulumi:"displayName"` // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis []ResourceGroupCostManagementViewKpi `pulumi:"kpis"` // The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created. Name *string `pulumi:"name"` // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots []ResourceGroupCostManagementViewPivot `pulumi:"pivots"` // The type of the report. The only possible value is `Usage`. ReportType string `pulumi:"reportType"` // The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created. ResourceGroupId string `pulumi:"resourceGroupId"` // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe string `pulumi:"timeframe"` } // The set of arguments for constructing a ResourceGroupCostManagementView resource. type ResourceGroupCostManagementViewArgs struct { // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created. Accumulated pulumi.BoolInput // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. ChartType pulumi.StringInput // A `dataset` block as defined below. Dataset ResourceGroupCostManagementViewDatasetInput // User visible input name of the Cost Management View. DisplayName pulumi.StringInput // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. Kpis ResourceGroupCostManagementViewKpiArrayInput // The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created. Name pulumi.StringPtrInput // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. Pivots ResourceGroupCostManagementViewPivotArrayInput // The type of the report. The only possible value is `Usage`. ReportType pulumi.StringInput // The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created. ResourceGroupId pulumi.StringInput // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. Timeframe pulumi.StringInput } func (ResourceGroupCostManagementViewArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupCostManagementViewArgs)(nil)).Elem() } type ResourceGroupCostManagementViewInput interface { pulumi.Input ToResourceGroupCostManagementViewOutput() ResourceGroupCostManagementViewOutput ToResourceGroupCostManagementViewOutputWithContext(ctx context.Context) ResourceGroupCostManagementViewOutput } func (*ResourceGroupCostManagementView) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupCostManagementView)(nil)).Elem() } func (i *ResourceGroupCostManagementView) ToResourceGroupCostManagementViewOutput() ResourceGroupCostManagementViewOutput { return i.ToResourceGroupCostManagementViewOutputWithContext(context.Background()) } func (i *ResourceGroupCostManagementView) ToResourceGroupCostManagementViewOutputWithContext(ctx context.Context) ResourceGroupCostManagementViewOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupCostManagementViewOutput) } // ResourceGroupCostManagementViewArrayInput is an input type that accepts ResourceGroupCostManagementViewArray and ResourceGroupCostManagementViewArrayOutput values. // You can construct a concrete instance of `ResourceGroupCostManagementViewArrayInput` via: // // ResourceGroupCostManagementViewArray{ ResourceGroupCostManagementViewArgs{...} } type ResourceGroupCostManagementViewArrayInput interface { pulumi.Input ToResourceGroupCostManagementViewArrayOutput() ResourceGroupCostManagementViewArrayOutput ToResourceGroupCostManagementViewArrayOutputWithContext(context.Context) ResourceGroupCostManagementViewArrayOutput } type ResourceGroupCostManagementViewArray []ResourceGroupCostManagementViewInput func (ResourceGroupCostManagementViewArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupCostManagementView)(nil)).Elem() } func (i ResourceGroupCostManagementViewArray) ToResourceGroupCostManagementViewArrayOutput() ResourceGroupCostManagementViewArrayOutput { return i.ToResourceGroupCostManagementViewArrayOutputWithContext(context.Background()) } func (i ResourceGroupCostManagementViewArray) ToResourceGroupCostManagementViewArrayOutputWithContext(ctx context.Context) ResourceGroupCostManagementViewArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupCostManagementViewArrayOutput) } // ResourceGroupCostManagementViewMapInput is an input type that accepts ResourceGroupCostManagementViewMap and ResourceGroupCostManagementViewMapOutput values. // You can construct a concrete instance of `ResourceGroupCostManagementViewMapInput` via: // // ResourceGroupCostManagementViewMap{ "key": ResourceGroupCostManagementViewArgs{...} } type ResourceGroupCostManagementViewMapInput interface { pulumi.Input ToResourceGroupCostManagementViewMapOutput() ResourceGroupCostManagementViewMapOutput ToResourceGroupCostManagementViewMapOutputWithContext(context.Context) ResourceGroupCostManagementViewMapOutput } type ResourceGroupCostManagementViewMap map[string]ResourceGroupCostManagementViewInput func (ResourceGroupCostManagementViewMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupCostManagementView)(nil)).Elem() } func (i ResourceGroupCostManagementViewMap) ToResourceGroupCostManagementViewMapOutput() ResourceGroupCostManagementViewMapOutput { return i.ToResourceGroupCostManagementViewMapOutputWithContext(context.Background()) } func (i ResourceGroupCostManagementViewMap) ToResourceGroupCostManagementViewMapOutputWithContext(ctx context.Context) ResourceGroupCostManagementViewMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupCostManagementViewMapOutput) } type ResourceGroupCostManagementViewOutput struct{ *pulumi.OutputState } func (ResourceGroupCostManagementViewOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupCostManagementView)(nil)).Elem() } func (o ResourceGroupCostManagementViewOutput) ToResourceGroupCostManagementViewOutput() ResourceGroupCostManagementViewOutput { return o } func (o ResourceGroupCostManagementViewOutput) ToResourceGroupCostManagementViewOutputWithContext(ctx context.Context) ResourceGroupCostManagementViewOutput { return o } // Whether the costs data in the Cost Management View are accumulated over time. Changing this forces a new Cost Management View for a Resource Group to be created. func (o ResourceGroupCostManagementViewOutput) Accumulated() pulumi.BoolOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) pulumi.BoolOutput { return v.Accumulated }).(pulumi.BoolOutput) } // Chart type of the main view in Cost Analysis. Possible values are `Area`, `GroupedColumn`, `Line`, `StackedColumn` and `Table`. func (o ResourceGroupCostManagementViewOutput) ChartType() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) pulumi.StringOutput { return v.ChartType }).(pulumi.StringOutput) } // A `dataset` block as defined below. func (o ResourceGroupCostManagementViewOutput) Dataset() ResourceGroupCostManagementViewDatasetOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) ResourceGroupCostManagementViewDatasetOutput { return v.Dataset }).(ResourceGroupCostManagementViewDatasetOutput) } // User visible input name of the Cost Management View. func (o ResourceGroupCostManagementViewOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // One or more `kpi` blocks as defined below, to show in Cost Analysis UI. func (o ResourceGroupCostManagementViewOutput) Kpis() ResourceGroupCostManagementViewKpiArrayOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) ResourceGroupCostManagementViewKpiArrayOutput { return v.Kpis }).(ResourceGroupCostManagementViewKpiArrayOutput) } // The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created. func (o ResourceGroupCostManagementViewOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. func (o ResourceGroupCostManagementViewOutput) Pivots() ResourceGroupCostManagementViewPivotArrayOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) ResourceGroupCostManagementViewPivotArrayOutput { return v.Pivots }).(ResourceGroupCostManagementViewPivotArrayOutput) } // The type of the report. The only possible value is `Usage`. func (o ResourceGroupCostManagementViewOutput) ReportType() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) pulumi.StringOutput { return v.ReportType }).(pulumi.StringOutput) } // The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created. func (o ResourceGroupCostManagementViewOutput) ResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput) } // The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. func (o ResourceGroupCostManagementViewOutput) Timeframe() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupCostManagementView) pulumi.StringOutput { return v.Timeframe }).(pulumi.StringOutput) } type ResourceGroupCostManagementViewArrayOutput struct{ *pulumi.OutputState } func (ResourceGroupCostManagementViewArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupCostManagementView)(nil)).Elem() } func (o ResourceGroupCostManagementViewArrayOutput) ToResourceGroupCostManagementViewArrayOutput() ResourceGroupCostManagementViewArrayOutput { return o } func (o ResourceGroupCostManagementViewArrayOutput) ToResourceGroupCostManagementViewArrayOutputWithContext(ctx context.Context) ResourceGroupCostManagementViewArrayOutput { return o } func (o ResourceGroupCostManagementViewArrayOutput) Index(i pulumi.IntInput) ResourceGroupCostManagementViewOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGroupCostManagementView { return vs[0].([]*ResourceGroupCostManagementView)[vs[1].(int)] }).(ResourceGroupCostManagementViewOutput) } type ResourceGroupCostManagementViewMapOutput struct{ *pulumi.OutputState } func (ResourceGroupCostManagementViewMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupCostManagementView)(nil)).Elem() } func (o ResourceGroupCostManagementViewMapOutput) ToResourceGroupCostManagementViewMapOutput() ResourceGroupCostManagementViewMapOutput { return o } func (o ResourceGroupCostManagementViewMapOutput) ToResourceGroupCostManagementViewMapOutputWithContext(ctx context.Context) ResourceGroupCostManagementViewMapOutput { return o } func (o ResourceGroupCostManagementViewMapOutput) MapIndex(k pulumi.StringInput) ResourceGroupCostManagementViewOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGroupCostManagementView { return vs[0].(map[string]*ResourceGroupCostManagementView)[vs[1].(string)] }).(ResourceGroupCostManagementViewOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupCostManagementViewInput)(nil)).Elem(), &ResourceGroupCostManagementView{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupCostManagementViewArrayInput)(nil)).Elem(), ResourceGroupCostManagementViewArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupCostManagementViewMapInput)(nil)).Elem(), ResourceGroupCostManagementViewMap{}) pulumi.RegisterOutputType(ResourceGroupCostManagementViewOutput{}) pulumi.RegisterOutputType(ResourceGroupCostManagementViewArrayOutput{}) pulumi.RegisterOutputType(ResourceGroupCostManagementViewMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getClientConfig.go
sdk/go/azure/core/getClientConfig.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 configuration of the AzureRM provider. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // ctx.Export("accountId", current.ClientId) // return nil // }) // } // // ``` func GetClientConfig(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetClientConfigResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetClientConfigResult err := ctx.Invoke("azure:core/getClientConfig:getClientConfig", nil, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of values returned by getClientConfig. type GetClientConfigResult struct { // is set to the Azure Client ID (Application Object ID). ClientId string `pulumi:"clientId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // is set to the Azure Object ID. ObjectId string `pulumi:"objectId"` // is set to the Azure Subscription ID. SubscriptionId string `pulumi:"subscriptionId"` // is set to the Azure Tenant ID. TenantId string `pulumi:"tenantId"` } func GetClientConfigOutput(ctx *pulumi.Context, opts ...pulumi.InvokeOption) GetClientConfigResultOutput { return pulumi.ToOutput(0).ApplyT(func(int) (GetClientConfigResultOutput, error) { options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getClientConfig:getClientConfig", nil, GetClientConfigResultOutput{}, options).(GetClientConfigResultOutput), nil }).(GetClientConfigResultOutput) } // A collection of values returned by getClientConfig. type GetClientConfigResultOutput struct{ *pulumi.OutputState } func (GetClientConfigResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetClientConfigResult)(nil)).Elem() } func (o GetClientConfigResultOutput) ToGetClientConfigResultOutput() GetClientConfigResultOutput { return o } func (o GetClientConfigResultOutput) ToGetClientConfigResultOutputWithContext(ctx context.Context) GetClientConfigResultOutput { return o } // is set to the Azure Client ID (Application Object ID). func (o GetClientConfigResultOutput) ClientId() pulumi.StringOutput { return o.ApplyT(func(v GetClientConfigResult) string { return v.ClientId }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetClientConfigResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetClientConfigResult) string { return v.Id }).(pulumi.StringOutput) } // is set to the Azure Object ID. func (o GetClientConfigResultOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v GetClientConfigResult) string { return v.ObjectId }).(pulumi.StringOutput) } // is set to the Azure Subscription ID. func (o GetClientConfigResultOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v GetClientConfigResult) string { return v.SubscriptionId }).(pulumi.StringOutput) } // is set to the Azure Tenant ID. func (o GetClientConfigResultOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v GetClientConfigResult) string { return v.TenantId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetClientConfigResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/subscriptionTemplateDeployment.go
sdk/go/azure/core/subscriptionTemplateDeployment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Subscription Template Deployment. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // _, err := core.NewSubscriptionTemplateDeployment(ctx, "example", &core.SubscriptionTemplateDeploymentArgs{ // Name: pulumi.String("example-deployment"), // Location: pulumi.String("West Europe"), // TemplateContent: pulumi.String(` { // \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\", // \"contentVersion\": \"1.0.0.0\", // \"parameters\": {}, // \"variables\": {}, // \"resources\": [ // { // \"type\": \"Microsoft.Resources/resourceGroups\", // \"apiVersion\": \"2018-05-01\", // \"location\": \"West Europe\", // \"name\": \"some-resource-group\", // \"properties\": {} // } // ] // } // // `), // // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Subscription Template Deployments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deployments/template1 // ``` type SubscriptionTemplateDeployment struct { pulumi.CustomResourceState // The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrOutput `pulumi:"debugLevel"` // The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created. Name pulumi.StringOutput `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent pulumi.StringOutput `pulumi:"outputContent"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent pulumi.StringOutput `pulumi:"parametersContent"` // A mapping of tags which should be assigned to the Subscription Template Deployment. Tags pulumi.StringMapOutput `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Subscription. TemplateContent pulumi.StringOutput `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrOutput `pulumi:"templateSpecVersionId"` } // NewSubscriptionTemplateDeployment registers a new resource with the given unique name, arguments, and options. func NewSubscriptionTemplateDeployment(ctx *pulumi.Context, name string, args *SubscriptionTemplateDeploymentArgs, opts ...pulumi.ResourceOption) (*SubscriptionTemplateDeployment, error) { if args == nil { args = &SubscriptionTemplateDeploymentArgs{} } opts = internal.PkgResourceDefaultOpts(opts) var resource SubscriptionTemplateDeployment err := ctx.RegisterResource("azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubscriptionTemplateDeployment gets an existing SubscriptionTemplateDeployment resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubscriptionTemplateDeployment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionTemplateDeploymentState, opts ...pulumi.ResourceOption) (*SubscriptionTemplateDeployment, error) { var resource SubscriptionTemplateDeployment err := ctx.ReadResource("azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubscriptionTemplateDeployment resources. type subscriptionTemplateDeploymentState struct { // The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel *string `pulumi:"debugLevel"` // The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created. Location *string `pulumi:"location"` // The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created. Name *string `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent *string `pulumi:"outputContent"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent *string `pulumi:"parametersContent"` // A mapping of tags which should be assigned to the Subscription Template Deployment. Tags map[string]string `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Subscription. TemplateContent *string `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `templateContent`. TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"` } type SubscriptionTemplateDeploymentState struct { // The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrInput // The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created. Location pulumi.StringPtrInput // The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created. Name pulumi.StringPtrInput // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent pulumi.StringPtrInput // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent pulumi.StringPtrInput // A mapping of tags which should be assigned to the Subscription Template Deployment. Tags pulumi.StringMapInput // The contents of the ARM Template which should be deployed into this Subscription. TemplateContent pulumi.StringPtrInput // The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrInput } func (SubscriptionTemplateDeploymentState) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionTemplateDeploymentState)(nil)).Elem() } type subscriptionTemplateDeploymentArgs struct { // The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel *string `pulumi:"debugLevel"` // The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created. Location *string `pulumi:"location"` // The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created. Name *string `pulumi:"name"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent *string `pulumi:"parametersContent"` // A mapping of tags which should be assigned to the Subscription Template Deployment. Tags map[string]string `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Subscription. TemplateContent *string `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `templateContent`. TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"` } // The set of arguments for constructing a SubscriptionTemplateDeployment resource. type SubscriptionTemplateDeploymentArgs struct { // The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrInput // The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created. Location pulumi.StringPtrInput // The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created. Name pulumi.StringPtrInput // The contents of the ARM Template parameters file - containing a JSON list of parameters. ParametersContent pulumi.StringPtrInput // A mapping of tags which should be assigned to the Subscription Template Deployment. Tags pulumi.StringMapInput // The contents of the ARM Template which should be deployed into this Subscription. TemplateContent pulumi.StringPtrInput // The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrInput } func (SubscriptionTemplateDeploymentArgs) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionTemplateDeploymentArgs)(nil)).Elem() } type SubscriptionTemplateDeploymentInput interface { pulumi.Input ToSubscriptionTemplateDeploymentOutput() SubscriptionTemplateDeploymentOutput ToSubscriptionTemplateDeploymentOutputWithContext(ctx context.Context) SubscriptionTemplateDeploymentOutput } func (*SubscriptionTemplateDeployment) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionTemplateDeployment)(nil)).Elem() } func (i *SubscriptionTemplateDeployment) ToSubscriptionTemplateDeploymentOutput() SubscriptionTemplateDeploymentOutput { return i.ToSubscriptionTemplateDeploymentOutputWithContext(context.Background()) } func (i *SubscriptionTemplateDeployment) ToSubscriptionTemplateDeploymentOutputWithContext(ctx context.Context) SubscriptionTemplateDeploymentOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionTemplateDeploymentOutput) } // SubscriptionTemplateDeploymentArrayInput is an input type that accepts SubscriptionTemplateDeploymentArray and SubscriptionTemplateDeploymentArrayOutput values. // You can construct a concrete instance of `SubscriptionTemplateDeploymentArrayInput` via: // // SubscriptionTemplateDeploymentArray{ SubscriptionTemplateDeploymentArgs{...} } type SubscriptionTemplateDeploymentArrayInput interface { pulumi.Input ToSubscriptionTemplateDeploymentArrayOutput() SubscriptionTemplateDeploymentArrayOutput ToSubscriptionTemplateDeploymentArrayOutputWithContext(context.Context) SubscriptionTemplateDeploymentArrayOutput } type SubscriptionTemplateDeploymentArray []SubscriptionTemplateDeploymentInput func (SubscriptionTemplateDeploymentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionTemplateDeployment)(nil)).Elem() } func (i SubscriptionTemplateDeploymentArray) ToSubscriptionTemplateDeploymentArrayOutput() SubscriptionTemplateDeploymentArrayOutput { return i.ToSubscriptionTemplateDeploymentArrayOutputWithContext(context.Background()) } func (i SubscriptionTemplateDeploymentArray) ToSubscriptionTemplateDeploymentArrayOutputWithContext(ctx context.Context) SubscriptionTemplateDeploymentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionTemplateDeploymentArrayOutput) } // SubscriptionTemplateDeploymentMapInput is an input type that accepts SubscriptionTemplateDeploymentMap and SubscriptionTemplateDeploymentMapOutput values. // You can construct a concrete instance of `SubscriptionTemplateDeploymentMapInput` via: // // SubscriptionTemplateDeploymentMap{ "key": SubscriptionTemplateDeploymentArgs{...} } type SubscriptionTemplateDeploymentMapInput interface { pulumi.Input ToSubscriptionTemplateDeploymentMapOutput() SubscriptionTemplateDeploymentMapOutput ToSubscriptionTemplateDeploymentMapOutputWithContext(context.Context) SubscriptionTemplateDeploymentMapOutput } type SubscriptionTemplateDeploymentMap map[string]SubscriptionTemplateDeploymentInput func (SubscriptionTemplateDeploymentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionTemplateDeployment)(nil)).Elem() } func (i SubscriptionTemplateDeploymentMap) ToSubscriptionTemplateDeploymentMapOutput() SubscriptionTemplateDeploymentMapOutput { return i.ToSubscriptionTemplateDeploymentMapOutputWithContext(context.Background()) } func (i SubscriptionTemplateDeploymentMap) ToSubscriptionTemplateDeploymentMapOutputWithContext(ctx context.Context) SubscriptionTemplateDeploymentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionTemplateDeploymentMapOutput) } type SubscriptionTemplateDeploymentOutput struct{ *pulumi.OutputState } func (SubscriptionTemplateDeploymentOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionTemplateDeployment)(nil)).Elem() } func (o SubscriptionTemplateDeploymentOutput) ToSubscriptionTemplateDeploymentOutput() SubscriptionTemplateDeploymentOutput { return o } func (o SubscriptionTemplateDeploymentOutput) ToSubscriptionTemplateDeploymentOutputWithContext(ctx context.Context) SubscriptionTemplateDeploymentOutput { return o } // The Debug Level which should be used for this Subscription Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. func (o SubscriptionTemplateDeploymentOutput) DebugLevel() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringPtrOutput { return v.DebugLevel }).(pulumi.StringPtrOutput) } // The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created. func (o SubscriptionTemplateDeploymentOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment to be created. func (o SubscriptionTemplateDeploymentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The JSON Content of the Outputs of the ARM Template Deployment. func (o SubscriptionTemplateDeploymentOutput) OutputContent() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringOutput { return v.OutputContent }).(pulumi.StringOutput) } // The contents of the ARM Template parameters file - containing a JSON list of parameters. func (o SubscriptionTemplateDeploymentOutput) ParametersContent() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringOutput { return v.ParametersContent }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Subscription Template Deployment. func (o SubscriptionTemplateDeploymentOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The contents of the ARM Template which should be deployed into this Subscription. func (o SubscriptionTemplateDeploymentOutput) TemplateContent() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringOutput { return v.TemplateContent }).(pulumi.StringOutput) } // The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `templateContent`. func (o SubscriptionTemplateDeploymentOutput) TemplateSpecVersionId() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionTemplateDeployment) pulumi.StringPtrOutput { return v.TemplateSpecVersionId }).(pulumi.StringPtrOutput) } type SubscriptionTemplateDeploymentArrayOutput struct{ *pulumi.OutputState } func (SubscriptionTemplateDeploymentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionTemplateDeployment)(nil)).Elem() } func (o SubscriptionTemplateDeploymentArrayOutput) ToSubscriptionTemplateDeploymentArrayOutput() SubscriptionTemplateDeploymentArrayOutput { return o } func (o SubscriptionTemplateDeploymentArrayOutput) ToSubscriptionTemplateDeploymentArrayOutputWithContext(ctx context.Context) SubscriptionTemplateDeploymentArrayOutput { return o } func (o SubscriptionTemplateDeploymentArrayOutput) Index(i pulumi.IntInput) SubscriptionTemplateDeploymentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionTemplateDeployment { return vs[0].([]*SubscriptionTemplateDeployment)[vs[1].(int)] }).(SubscriptionTemplateDeploymentOutput) } type SubscriptionTemplateDeploymentMapOutput struct{ *pulumi.OutputState } func (SubscriptionTemplateDeploymentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionTemplateDeployment)(nil)).Elem() } func (o SubscriptionTemplateDeploymentMapOutput) ToSubscriptionTemplateDeploymentMapOutput() SubscriptionTemplateDeploymentMapOutput { return o } func (o SubscriptionTemplateDeploymentMapOutput) ToSubscriptionTemplateDeploymentMapOutputWithContext(ctx context.Context) SubscriptionTemplateDeploymentMapOutput { return o } func (o SubscriptionTemplateDeploymentMapOutput) MapIndex(k pulumi.StringInput) SubscriptionTemplateDeploymentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionTemplateDeployment { return vs[0].(map[string]*SubscriptionTemplateDeployment)[vs[1].(string)] }).(SubscriptionTemplateDeploymentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionTemplateDeploymentInput)(nil)).Elem(), &SubscriptionTemplateDeployment{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionTemplateDeploymentArrayInput)(nil)).Elem(), SubscriptionTemplateDeploymentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionTemplateDeploymentMapInput)(nil)).Elem(), SubscriptionTemplateDeploymentMap{}) pulumi.RegisterOutputType(SubscriptionTemplateDeploymentOutput{}) pulumi.RegisterOutputType(SubscriptionTemplateDeploymentArrayOutput{}) pulumi.RegisterOutputType(SubscriptionTemplateDeploymentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceProviderRegistration.go
sdk/go/azure/core/resourceProviderRegistration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the registration of a Resource Provider - which allows access to the API's supported by this Resource Provider. // // > **Note:** The Azure Provider will automatically register all of the Resource Providers which it supports on launch (unless opted-out using the `skipProviderRegistration` field within the provider block). // // !> **Note:** The errors returned from the Azure API when a Resource Provider is unregistered are unclear (example `API version '2019-01-01' was not found for 'Microsoft.Foo'`) - please ensure that all of the necessary Resource Providers you're using are registered - if in doubt **we strongly recommend letting the provider register these for you**. // // > **Note:** Adding or Removing a Preview Feature will re-register the Resource Provider. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // _, err := core.NewResourceProviderRegistration(ctx, "example", &core.ResourceProviderRegistrationArgs{ // Name: pulumi.String("Microsoft.PolicyInsights"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Registering A Preview Feature) // // ```go // package main // // import ( // // "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 { // _, err := core.NewResourceProviderRegistration(ctx, "example", &core.ResourceProviderRegistrationArgs{ // Name: pulumi.String("Microsoft.ContainerService"), // Features: core.ResourceProviderRegistrationFeatureArray{ // &core.ResourceProviderRegistrationFeatureArgs{ // Name: pulumi.String("AKS-DataPlaneAutoApprove"), // Registered: pulumi.Bool(true), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Features` - 2021-07-01 // // ## Import // // Resource Provider Registrations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceProviderRegistration:ResourceProviderRegistration example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights // ``` type ResourceProviderRegistration struct { pulumi.CustomResourceState Features ResourceProviderRegistrationFeatureArrayOutput `pulumi:"features"` // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` } // NewResourceProviderRegistration registers a new resource with the given unique name, arguments, and options. func NewResourceProviderRegistration(ctx *pulumi.Context, name string, args *ResourceProviderRegistrationArgs, opts ...pulumi.ResourceOption) (*ResourceProviderRegistration, error) { if args == nil { args = &ResourceProviderRegistrationArgs{} } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceProviderRegistration err := ctx.RegisterResource("azure:core/resourceProviderRegistration:ResourceProviderRegistration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceProviderRegistration gets an existing ResourceProviderRegistration resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceProviderRegistration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceProviderRegistrationState, opts ...pulumi.ResourceOption) (*ResourceProviderRegistration, error) { var resource ResourceProviderRegistration err := ctx.ReadResource("azure:core/resourceProviderRegistration:ResourceProviderRegistration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceProviderRegistration resources. type resourceProviderRegistrationState struct { Features []ResourceProviderRegistrationFeature `pulumi:"features"` // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. Name *string `pulumi:"name"` } type ResourceProviderRegistrationState struct { Features ResourceProviderRegistrationFeatureArrayInput // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. Name pulumi.StringPtrInput } func (ResourceProviderRegistrationState) ElementType() reflect.Type { return reflect.TypeOf((*resourceProviderRegistrationState)(nil)).Elem() } type resourceProviderRegistrationArgs struct { Features []ResourceProviderRegistrationFeature `pulumi:"features"` // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. Name *string `pulumi:"name"` } // The set of arguments for constructing a ResourceProviderRegistration resource. type ResourceProviderRegistrationArgs struct { Features ResourceProviderRegistrationFeatureArrayInput // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. Name pulumi.StringPtrInput } func (ResourceProviderRegistrationArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceProviderRegistrationArgs)(nil)).Elem() } type ResourceProviderRegistrationInput interface { pulumi.Input ToResourceProviderRegistrationOutput() ResourceProviderRegistrationOutput ToResourceProviderRegistrationOutputWithContext(ctx context.Context) ResourceProviderRegistrationOutput } func (*ResourceProviderRegistration) ElementType() reflect.Type { return reflect.TypeOf((**ResourceProviderRegistration)(nil)).Elem() } func (i *ResourceProviderRegistration) ToResourceProviderRegistrationOutput() ResourceProviderRegistrationOutput { return i.ToResourceProviderRegistrationOutputWithContext(context.Background()) } func (i *ResourceProviderRegistration) ToResourceProviderRegistrationOutputWithContext(ctx context.Context) ResourceProviderRegistrationOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceProviderRegistrationOutput) } // ResourceProviderRegistrationArrayInput is an input type that accepts ResourceProviderRegistrationArray and ResourceProviderRegistrationArrayOutput values. // You can construct a concrete instance of `ResourceProviderRegistrationArrayInput` via: // // ResourceProviderRegistrationArray{ ResourceProviderRegistrationArgs{...} } type ResourceProviderRegistrationArrayInput interface { pulumi.Input ToResourceProviderRegistrationArrayOutput() ResourceProviderRegistrationArrayOutput ToResourceProviderRegistrationArrayOutputWithContext(context.Context) ResourceProviderRegistrationArrayOutput } type ResourceProviderRegistrationArray []ResourceProviderRegistrationInput func (ResourceProviderRegistrationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceProviderRegistration)(nil)).Elem() } func (i ResourceProviderRegistrationArray) ToResourceProviderRegistrationArrayOutput() ResourceProviderRegistrationArrayOutput { return i.ToResourceProviderRegistrationArrayOutputWithContext(context.Background()) } func (i ResourceProviderRegistrationArray) ToResourceProviderRegistrationArrayOutputWithContext(ctx context.Context) ResourceProviderRegistrationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceProviderRegistrationArrayOutput) } // ResourceProviderRegistrationMapInput is an input type that accepts ResourceProviderRegistrationMap and ResourceProviderRegistrationMapOutput values. // You can construct a concrete instance of `ResourceProviderRegistrationMapInput` via: // // ResourceProviderRegistrationMap{ "key": ResourceProviderRegistrationArgs{...} } type ResourceProviderRegistrationMapInput interface { pulumi.Input ToResourceProviderRegistrationMapOutput() ResourceProviderRegistrationMapOutput ToResourceProviderRegistrationMapOutputWithContext(context.Context) ResourceProviderRegistrationMapOutput } type ResourceProviderRegistrationMap map[string]ResourceProviderRegistrationInput func (ResourceProviderRegistrationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceProviderRegistration)(nil)).Elem() } func (i ResourceProviderRegistrationMap) ToResourceProviderRegistrationMapOutput() ResourceProviderRegistrationMapOutput { return i.ToResourceProviderRegistrationMapOutputWithContext(context.Background()) } func (i ResourceProviderRegistrationMap) ToResourceProviderRegistrationMapOutputWithContext(ctx context.Context) ResourceProviderRegistrationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceProviderRegistrationMapOutput) } type ResourceProviderRegistrationOutput struct{ *pulumi.OutputState } func (ResourceProviderRegistrationOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceProviderRegistration)(nil)).Elem() } func (o ResourceProviderRegistrationOutput) ToResourceProviderRegistrationOutput() ResourceProviderRegistrationOutput { return o } func (o ResourceProviderRegistrationOutput) ToResourceProviderRegistrationOutputWithContext(ctx context.Context) ResourceProviderRegistrationOutput { return o } func (o ResourceProviderRegistrationOutput) Features() ResourceProviderRegistrationFeatureArrayOutput { return o.ApplyT(func(v *ResourceProviderRegistration) ResourceProviderRegistrationFeatureArrayOutput { return v.Features }).(ResourceProviderRegistrationFeatureArrayOutput) } // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. func (o ResourceProviderRegistrationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceProviderRegistration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } type ResourceProviderRegistrationArrayOutput struct{ *pulumi.OutputState } func (ResourceProviderRegistrationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceProviderRegistration)(nil)).Elem() } func (o ResourceProviderRegistrationArrayOutput) ToResourceProviderRegistrationArrayOutput() ResourceProviderRegistrationArrayOutput { return o } func (o ResourceProviderRegistrationArrayOutput) ToResourceProviderRegistrationArrayOutputWithContext(ctx context.Context) ResourceProviderRegistrationArrayOutput { return o } func (o ResourceProviderRegistrationArrayOutput) Index(i pulumi.IntInput) ResourceProviderRegistrationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceProviderRegistration { return vs[0].([]*ResourceProviderRegistration)[vs[1].(int)] }).(ResourceProviderRegistrationOutput) } type ResourceProviderRegistrationMapOutput struct{ *pulumi.OutputState } func (ResourceProviderRegistrationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceProviderRegistration)(nil)).Elem() } func (o ResourceProviderRegistrationMapOutput) ToResourceProviderRegistrationMapOutput() ResourceProviderRegistrationMapOutput { return o } func (o ResourceProviderRegistrationMapOutput) ToResourceProviderRegistrationMapOutputWithContext(ctx context.Context) ResourceProviderRegistrationMapOutput { return o } func (o ResourceProviderRegistrationMapOutput) MapIndex(k pulumi.StringInput) ResourceProviderRegistrationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceProviderRegistration { return vs[0].(map[string]*ResourceProviderRegistration)[vs[1].(string)] }).(ResourceProviderRegistrationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceProviderRegistrationInput)(nil)).Elem(), &ResourceProviderRegistration{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceProviderRegistrationArrayInput)(nil)).Elem(), ResourceProviderRegistrationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceProviderRegistrationMapInput)(nil)).Elem(), ResourceProviderRegistrationMap{}) pulumi.RegisterOutputType(ResourceProviderRegistrationOutput{}) pulumi.RegisterOutputType(ResourceProviderRegistrationArrayOutput{}) pulumi.RegisterOutputType(ResourceProviderRegistrationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getSubscriptions.go
sdk/go/azure/core/getSubscriptions.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 all the Subscriptions currently available. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // available, err := core.GetSubscriptions(ctx, &core.GetSubscriptionsArgs{}, nil) // if err != nil { // return err // } // ctx.Export("availableSubscriptions", available.Subscriptions) // ctx.Export("firstAvailableSubscriptionDisplayName", available.Subscriptions[0].DisplayName) // return nil // }) // } // // ``` func GetSubscriptions(ctx *pulumi.Context, args *GetSubscriptionsArgs, opts ...pulumi.InvokeOption) (*GetSubscriptionsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetSubscriptionsResult err := ctx.Invoke("azure:core/getSubscriptions:getSubscriptions", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSubscriptions. type GetSubscriptionsArgs struct { // A case-insensitive value which must be contained within the `displayName` field, used to filter the results DisplayNameContains *string `pulumi:"displayNameContains"` // A case-insensitive prefix which can be used to filter on the `displayName` field DisplayNamePrefix *string `pulumi:"displayNamePrefix"` } // A collection of values returned by getSubscriptions. type GetSubscriptionsResult struct { DisplayNameContains *string `pulumi:"displayNameContains"` DisplayNamePrefix *string `pulumi:"displayNamePrefix"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // One or more `subscription` blocks as defined below. Subscriptions []GetSubscriptionsSubscription `pulumi:"subscriptions"` } func GetSubscriptionsOutput(ctx *pulumi.Context, args GetSubscriptionsOutputArgs, opts ...pulumi.InvokeOption) GetSubscriptionsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetSubscriptionsResultOutput, error) { args := v.(GetSubscriptionsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getSubscriptions:getSubscriptions", args, GetSubscriptionsResultOutput{}, options).(GetSubscriptionsResultOutput), nil }).(GetSubscriptionsResultOutput) } // A collection of arguments for invoking getSubscriptions. type GetSubscriptionsOutputArgs struct { // A case-insensitive value which must be contained within the `displayName` field, used to filter the results DisplayNameContains pulumi.StringPtrInput `pulumi:"displayNameContains"` // A case-insensitive prefix which can be used to filter on the `displayName` field DisplayNamePrefix pulumi.StringPtrInput `pulumi:"displayNamePrefix"` } func (GetSubscriptionsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetSubscriptionsArgs)(nil)).Elem() } // A collection of values returned by getSubscriptions. type GetSubscriptionsResultOutput struct{ *pulumi.OutputState } func (GetSubscriptionsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetSubscriptionsResult)(nil)).Elem() } func (o GetSubscriptionsResultOutput) ToGetSubscriptionsResultOutput() GetSubscriptionsResultOutput { return o } func (o GetSubscriptionsResultOutput) ToGetSubscriptionsResultOutputWithContext(ctx context.Context) GetSubscriptionsResultOutput { return o } func (o GetSubscriptionsResultOutput) DisplayNameContains() pulumi.StringPtrOutput { return o.ApplyT(func(v GetSubscriptionsResult) *string { return v.DisplayNameContains }).(pulumi.StringPtrOutput) } func (o GetSubscriptionsResultOutput) DisplayNamePrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v GetSubscriptionsResult) *string { return v.DisplayNamePrefix }).(pulumi.StringPtrOutput) } // The provider-assigned unique ID for this managed resource. func (o GetSubscriptionsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetSubscriptionsResult) string { return v.Id }).(pulumi.StringOutput) } // One or more `subscription` blocks as defined below. func (o GetSubscriptionsResultOutput) Subscriptions() GetSubscriptionsSubscriptionArrayOutput { return o.ApplyT(func(v GetSubscriptionsResult) []GetSubscriptionsSubscription { return v.Subscriptions }).(GetSubscriptionsSubscriptionArrayOutput) } func init() { pulumi.RegisterOutputType(GetSubscriptionsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceGroupPolicyExemption.go
sdk/go/azure/core/resourceGroupPolicyExemption.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Group Policy Exemption. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "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("resourceGroup1"), // Location: pulumi.String("westus"), // }) // if err != nil { // return err // } // example, err := policy.GetPolicyDefintion(ctx, &policy.GetPolicyDefintionArgs{ // DisplayName: pulumi.StringRef("Allowed locations"), // }, nil) // if err != nil { // return err // } // exampleResourceGroupPolicyAssignment, err := core.NewResourceGroupPolicyAssignment(ctx, "example", &core.ResourceGroupPolicyAssignmentArgs{ // Name: pulumi.String("exampleAssignment"), // ResourceGroupId: exampleResourceGroup.ID(), // PolicyDefinitionId: pulumi.String(example.Id), // Parameters: exampleResourceGroup.Location.ApplyT(func(location string) (pulumi.String, error) { // var _zero pulumi.String // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "listOfAllowedLocations": map[string]interface{}{ // "value": []string{ // location, // }, // }, // }) // if err != nil { // return _zero, err // } // json0 := string(tmpJSON0) // return pulumi.String(json0), nil // }).(pulumi.StringOutput), // }) // if err != nil { // return err // } // _, err = core.NewResourceGroupPolicyExemption(ctx, "example", &core.ResourceGroupPolicyExemptionArgs{ // Name: pulumi.String("exampleExemption"), // ResourceGroupId: exampleResourceGroup.ID(), // PolicyAssignmentId: exampleResourceGroupPolicyAssignment.ID(), // ExemptionCategory: pulumi.String("Mitigated"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Policy Exemptions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceGroupPolicyExemption:ResourceGroupPolicyExemption exemption1 /subscriptions/00000000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Authorization/policyExemptions/exemption1 // ``` type ResourceGroupPolicyExemption struct { pulumi.CustomResourceState // A description to use for this Policy Exemption. Description pulumi.StringPtrOutput `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringOutput `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrOutput `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringOutput `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayOutput `pulumi:"policyDefinitionReferenceIds"` // The Resource Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"` } // NewResourceGroupPolicyExemption registers a new resource with the given unique name, arguments, and options. func NewResourceGroupPolicyExemption(ctx *pulumi.Context, name string, args *ResourceGroupPolicyExemptionArgs, opts ...pulumi.ResourceOption) (*ResourceGroupPolicyExemption, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExemptionCategory == nil { return nil, errors.New("invalid value for required argument 'ExemptionCategory'") } if args.PolicyAssignmentId == nil { return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'") } if args.ResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceGroupPolicyExemption err := ctx.RegisterResource("azure:core/resourceGroupPolicyExemption:ResourceGroupPolicyExemption", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceGroupPolicyExemption gets an existing ResourceGroupPolicyExemption resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceGroupPolicyExemption(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceGroupPolicyExemptionState, opts ...pulumi.ResourceOption) (*ResourceGroupPolicyExemption, error) { var resource ResourceGroupPolicyExemption err := ctx.ReadResource("azure:core/resourceGroupPolicyExemption:ResourceGroupPolicyExemption", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceGroupPolicyExemption resources. type resourceGroupPolicyExemptionState struct { // A description to use for this Policy Exemption. Description *string `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName *string `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory *string `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn *string `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata *string `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId *string `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"` // The Resource Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceGroupId *string `pulumi:"resourceGroupId"` } type ResourceGroupPolicyExemptionState struct { // A description to use for this Policy Exemption. Description pulumi.StringPtrInput // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrInput // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringPtrInput // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrInput // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringPtrInput // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringPtrInput // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayInput // The Resource Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringPtrInput } func (ResourceGroupPolicyExemptionState) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupPolicyExemptionState)(nil)).Elem() } type resourceGroupPolicyExemptionArgs struct { // A description to use for this Policy Exemption. Description *string `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName *string `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory string `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn *string `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata *string `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId string `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"` // The Resource Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceGroupId string `pulumi:"resourceGroupId"` } // The set of arguments for constructing a ResourceGroupPolicyExemption resource. type ResourceGroupPolicyExemptionArgs struct { // A description to use for this Policy Exemption. Description pulumi.StringPtrInput // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrInput // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringInput // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrInput // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringPtrInput // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringInput // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayInput // The Resource Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceGroupId pulumi.StringInput } func (ResourceGroupPolicyExemptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupPolicyExemptionArgs)(nil)).Elem() } type ResourceGroupPolicyExemptionInput interface { pulumi.Input ToResourceGroupPolicyExemptionOutput() ResourceGroupPolicyExemptionOutput ToResourceGroupPolicyExemptionOutputWithContext(ctx context.Context) ResourceGroupPolicyExemptionOutput } func (*ResourceGroupPolicyExemption) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupPolicyExemption)(nil)).Elem() } func (i *ResourceGroupPolicyExemption) ToResourceGroupPolicyExemptionOutput() ResourceGroupPolicyExemptionOutput { return i.ToResourceGroupPolicyExemptionOutputWithContext(context.Background()) } func (i *ResourceGroupPolicyExemption) ToResourceGroupPolicyExemptionOutputWithContext(ctx context.Context) ResourceGroupPolicyExemptionOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyExemptionOutput) } // ResourceGroupPolicyExemptionArrayInput is an input type that accepts ResourceGroupPolicyExemptionArray and ResourceGroupPolicyExemptionArrayOutput values. // You can construct a concrete instance of `ResourceGroupPolicyExemptionArrayInput` via: // // ResourceGroupPolicyExemptionArray{ ResourceGroupPolicyExemptionArgs{...} } type ResourceGroupPolicyExemptionArrayInput interface { pulumi.Input ToResourceGroupPolicyExemptionArrayOutput() ResourceGroupPolicyExemptionArrayOutput ToResourceGroupPolicyExemptionArrayOutputWithContext(context.Context) ResourceGroupPolicyExemptionArrayOutput } type ResourceGroupPolicyExemptionArray []ResourceGroupPolicyExemptionInput func (ResourceGroupPolicyExemptionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupPolicyExemption)(nil)).Elem() } func (i ResourceGroupPolicyExemptionArray) ToResourceGroupPolicyExemptionArrayOutput() ResourceGroupPolicyExemptionArrayOutput { return i.ToResourceGroupPolicyExemptionArrayOutputWithContext(context.Background()) } func (i ResourceGroupPolicyExemptionArray) ToResourceGroupPolicyExemptionArrayOutputWithContext(ctx context.Context) ResourceGroupPolicyExemptionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyExemptionArrayOutput) } // ResourceGroupPolicyExemptionMapInput is an input type that accepts ResourceGroupPolicyExemptionMap and ResourceGroupPolicyExemptionMapOutput values. // You can construct a concrete instance of `ResourceGroupPolicyExemptionMapInput` via: // // ResourceGroupPolicyExemptionMap{ "key": ResourceGroupPolicyExemptionArgs{...} } type ResourceGroupPolicyExemptionMapInput interface { pulumi.Input ToResourceGroupPolicyExemptionMapOutput() ResourceGroupPolicyExemptionMapOutput ToResourceGroupPolicyExemptionMapOutputWithContext(context.Context) ResourceGroupPolicyExemptionMapOutput } type ResourceGroupPolicyExemptionMap map[string]ResourceGroupPolicyExemptionInput func (ResourceGroupPolicyExemptionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupPolicyExemption)(nil)).Elem() } func (i ResourceGroupPolicyExemptionMap) ToResourceGroupPolicyExemptionMapOutput() ResourceGroupPolicyExemptionMapOutput { return i.ToResourceGroupPolicyExemptionMapOutputWithContext(context.Background()) } func (i ResourceGroupPolicyExemptionMap) ToResourceGroupPolicyExemptionMapOutputWithContext(ctx context.Context) ResourceGroupPolicyExemptionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyExemptionMapOutput) } type ResourceGroupPolicyExemptionOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyExemptionOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupPolicyExemption)(nil)).Elem() } func (o ResourceGroupPolicyExemptionOutput) ToResourceGroupPolicyExemptionOutput() ResourceGroupPolicyExemptionOutput { return o } func (o ResourceGroupPolicyExemptionOutput) ToResourceGroupPolicyExemptionOutputWithContext(ctx context.Context) ResourceGroupPolicyExemptionOutput { return o } // A description to use for this Policy Exemption. func (o ResourceGroupPolicyExemptionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A friendly display name to use for this Policy Exemption. func (o ResourceGroupPolicyExemptionOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) } // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. func (o ResourceGroupPolicyExemptionOutput) ExemptionCategory() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringOutput { return v.ExemptionCategory }).(pulumi.StringOutput) } // The expiration date and time in UTC ISO 8601 format of this policy exemption. func (o ResourceGroupPolicyExemptionOutput) ExpiresOn() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringPtrOutput { return v.ExpiresOn }).(pulumi.StringPtrOutput) } // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. func (o ResourceGroupPolicyExemptionOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The name of the Policy Exemption. Changing this forces a new resource to be created. func (o ResourceGroupPolicyExemptionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. func (o ResourceGroupPolicyExemptionOutput) PolicyAssignmentId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput) } // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. func (o ResourceGroupPolicyExemptionOutput) PolicyDefinitionReferenceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringArrayOutput { return v.PolicyDefinitionReferenceIds }).(pulumi.StringArrayOutput) } // The Resource Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. func (o ResourceGroupPolicyExemptionOutput) ResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyExemption) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput) } type ResourceGroupPolicyExemptionArrayOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyExemptionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupPolicyExemption)(nil)).Elem() } func (o ResourceGroupPolicyExemptionArrayOutput) ToResourceGroupPolicyExemptionArrayOutput() ResourceGroupPolicyExemptionArrayOutput { return o } func (o ResourceGroupPolicyExemptionArrayOutput) ToResourceGroupPolicyExemptionArrayOutputWithContext(ctx context.Context) ResourceGroupPolicyExemptionArrayOutput { return o } func (o ResourceGroupPolicyExemptionArrayOutput) Index(i pulumi.IntInput) ResourceGroupPolicyExemptionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGroupPolicyExemption { return vs[0].([]*ResourceGroupPolicyExemption)[vs[1].(int)] }).(ResourceGroupPolicyExemptionOutput) } type ResourceGroupPolicyExemptionMapOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyExemptionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupPolicyExemption)(nil)).Elem() } func (o ResourceGroupPolicyExemptionMapOutput) ToResourceGroupPolicyExemptionMapOutput() ResourceGroupPolicyExemptionMapOutput { return o } func (o ResourceGroupPolicyExemptionMapOutput) ToResourceGroupPolicyExemptionMapOutputWithContext(ctx context.Context) ResourceGroupPolicyExemptionMapOutput { return o } func (o ResourceGroupPolicyExemptionMapOutput) MapIndex(k pulumi.StringInput) ResourceGroupPolicyExemptionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGroupPolicyExemption { return vs[0].(map[string]*ResourceGroupPolicyExemption)[vs[1].(string)] }).(ResourceGroupPolicyExemptionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyExemptionInput)(nil)).Elem(), &ResourceGroupPolicyExemption{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyExemptionArrayInput)(nil)).Elem(), ResourceGroupPolicyExemptionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyExemptionMapInput)(nil)).Elem(), ResourceGroupPolicyExemptionMap{}) pulumi.RegisterOutputType(ResourceGroupPolicyExemptionOutput{}) pulumi.RegisterOutputType(ResourceGroupPolicyExemptionArrayOutput{}) pulumi.RegisterOutputType(ResourceGroupPolicyExemptionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/subscriptionPolicyExemption.go
sdk/go/azure/core/subscriptionPolicyExemption.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Subscription Policy Exemption. // // ## 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/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleGetPolicySetDefinition, err := policy.LookupPolicySetDefinition(ctx, &policy.LookupPolicySetDefinitionArgs{ // DisplayName: pulumi.StringRef("Audit machines with insecure password security settings"), // }, nil) // if err != nil { // return err // } // exampleSubscriptionPolicyAssignment, err := core.NewSubscriptionPolicyAssignment(ctx, "example", &core.SubscriptionPolicyAssignmentArgs{ // Name: pulumi.String("exampleAssignment"), // SubscriptionId: pulumi.String(example.Id), // PolicyDefinitionId: pulumi.String(exampleGetPolicySetDefinition.Id), // Location: pulumi.String("westus"), // Identity: &core.SubscriptionPolicyAssignmentIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = core.NewSubscriptionPolicyExemption(ctx, "example", &core.SubscriptionPolicyExemptionArgs{ // Name: pulumi.String("exampleExemption"), // SubscriptionId: pulumi.String(example.Id), // PolicyAssignmentId: exampleSubscriptionPolicyAssignment.ID(), // ExemptionCategory: pulumi.String("Mitigated"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Policy Exemptions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/subscriptionPolicyExemption:SubscriptionPolicyExemption exemption1 /subscriptions/00000000-0000-0000-000000000000/providers/Microsoft.Authorization/policyExemptions/exemption1 // ``` type SubscriptionPolicyExemption struct { pulumi.CustomResourceState // A description to use for this Policy Exemption. Description pulumi.StringPtrOutput `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringOutput `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrOutput `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringOutput `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayOutput `pulumi:"policyDefinitionReferenceIds"` // The Subscription ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewSubscriptionPolicyExemption registers a new resource with the given unique name, arguments, and options. func NewSubscriptionPolicyExemption(ctx *pulumi.Context, name string, args *SubscriptionPolicyExemptionArgs, opts ...pulumi.ResourceOption) (*SubscriptionPolicyExemption, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExemptionCategory == nil { return nil, errors.New("invalid value for required argument 'ExemptionCategory'") } if args.PolicyAssignmentId == nil { return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'") } if args.SubscriptionId == nil { return nil, errors.New("invalid value for required argument 'SubscriptionId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubscriptionPolicyExemption err := ctx.RegisterResource("azure:core/subscriptionPolicyExemption:SubscriptionPolicyExemption", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubscriptionPolicyExemption gets an existing SubscriptionPolicyExemption resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubscriptionPolicyExemption(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionPolicyExemptionState, opts ...pulumi.ResourceOption) (*SubscriptionPolicyExemption, error) { var resource SubscriptionPolicyExemption err := ctx.ReadResource("azure:core/subscriptionPolicyExemption:SubscriptionPolicyExemption", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubscriptionPolicyExemption resources. type subscriptionPolicyExemptionState struct { // A description to use for this Policy Exemption. Description *string `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName *string `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory *string `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn *string `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata *string `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId *string `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"` // The Subscription ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. SubscriptionId *string `pulumi:"subscriptionId"` } type SubscriptionPolicyExemptionState struct { // A description to use for this Policy Exemption. Description pulumi.StringPtrInput // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrInput // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringPtrInput // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrInput // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringPtrInput // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringPtrInput // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayInput // The Subscription ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. SubscriptionId pulumi.StringPtrInput } func (SubscriptionPolicyExemptionState) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionPolicyExemptionState)(nil)).Elem() } type subscriptionPolicyExemptionArgs struct { // A description to use for this Policy Exemption. Description *string `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName *string `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory string `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn *string `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata *string `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId string `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"` // The Subscription ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. SubscriptionId string `pulumi:"subscriptionId"` } // The set of arguments for constructing a SubscriptionPolicyExemption resource. type SubscriptionPolicyExemptionArgs struct { // A description to use for this Policy Exemption. Description pulumi.StringPtrInput // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrInput // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringInput // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrInput // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringPtrInput // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringInput // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayInput // The Subscription ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. SubscriptionId pulumi.StringInput } func (SubscriptionPolicyExemptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionPolicyExemptionArgs)(nil)).Elem() } type SubscriptionPolicyExemptionInput interface { pulumi.Input ToSubscriptionPolicyExemptionOutput() SubscriptionPolicyExemptionOutput ToSubscriptionPolicyExemptionOutputWithContext(ctx context.Context) SubscriptionPolicyExemptionOutput } func (*SubscriptionPolicyExemption) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionPolicyExemption)(nil)).Elem() } func (i *SubscriptionPolicyExemption) ToSubscriptionPolicyExemptionOutput() SubscriptionPolicyExemptionOutput { return i.ToSubscriptionPolicyExemptionOutputWithContext(context.Background()) } func (i *SubscriptionPolicyExemption) ToSubscriptionPolicyExemptionOutputWithContext(ctx context.Context) SubscriptionPolicyExemptionOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyExemptionOutput) } // SubscriptionPolicyExemptionArrayInput is an input type that accepts SubscriptionPolicyExemptionArray and SubscriptionPolicyExemptionArrayOutput values. // You can construct a concrete instance of `SubscriptionPolicyExemptionArrayInput` via: // // SubscriptionPolicyExemptionArray{ SubscriptionPolicyExemptionArgs{...} } type SubscriptionPolicyExemptionArrayInput interface { pulumi.Input ToSubscriptionPolicyExemptionArrayOutput() SubscriptionPolicyExemptionArrayOutput ToSubscriptionPolicyExemptionArrayOutputWithContext(context.Context) SubscriptionPolicyExemptionArrayOutput } type SubscriptionPolicyExemptionArray []SubscriptionPolicyExemptionInput func (SubscriptionPolicyExemptionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionPolicyExemption)(nil)).Elem() } func (i SubscriptionPolicyExemptionArray) ToSubscriptionPolicyExemptionArrayOutput() SubscriptionPolicyExemptionArrayOutput { return i.ToSubscriptionPolicyExemptionArrayOutputWithContext(context.Background()) } func (i SubscriptionPolicyExemptionArray) ToSubscriptionPolicyExemptionArrayOutputWithContext(ctx context.Context) SubscriptionPolicyExemptionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyExemptionArrayOutput) } // SubscriptionPolicyExemptionMapInput is an input type that accepts SubscriptionPolicyExemptionMap and SubscriptionPolicyExemptionMapOutput values. // You can construct a concrete instance of `SubscriptionPolicyExemptionMapInput` via: // // SubscriptionPolicyExemptionMap{ "key": SubscriptionPolicyExemptionArgs{...} } type SubscriptionPolicyExemptionMapInput interface { pulumi.Input ToSubscriptionPolicyExemptionMapOutput() SubscriptionPolicyExemptionMapOutput ToSubscriptionPolicyExemptionMapOutputWithContext(context.Context) SubscriptionPolicyExemptionMapOutput } type SubscriptionPolicyExemptionMap map[string]SubscriptionPolicyExemptionInput func (SubscriptionPolicyExemptionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionPolicyExemption)(nil)).Elem() } func (i SubscriptionPolicyExemptionMap) ToSubscriptionPolicyExemptionMapOutput() SubscriptionPolicyExemptionMapOutput { return i.ToSubscriptionPolicyExemptionMapOutputWithContext(context.Background()) } func (i SubscriptionPolicyExemptionMap) ToSubscriptionPolicyExemptionMapOutputWithContext(ctx context.Context) SubscriptionPolicyExemptionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPolicyExemptionMapOutput) } type SubscriptionPolicyExemptionOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyExemptionOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionPolicyExemption)(nil)).Elem() } func (o SubscriptionPolicyExemptionOutput) ToSubscriptionPolicyExemptionOutput() SubscriptionPolicyExemptionOutput { return o } func (o SubscriptionPolicyExemptionOutput) ToSubscriptionPolicyExemptionOutputWithContext(ctx context.Context) SubscriptionPolicyExemptionOutput { return o } // A description to use for this Policy Exemption. func (o SubscriptionPolicyExemptionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A friendly display name to use for this Policy Exemption. func (o SubscriptionPolicyExemptionOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) } // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. func (o SubscriptionPolicyExemptionOutput) ExemptionCategory() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringOutput { return v.ExemptionCategory }).(pulumi.StringOutput) } // The expiration date and time in UTC ISO 8601 format of this policy exemption. func (o SubscriptionPolicyExemptionOutput) ExpiresOn() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringPtrOutput { return v.ExpiresOn }).(pulumi.StringPtrOutput) } // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. func (o SubscriptionPolicyExemptionOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The name of the Policy Exemption. Changing this forces a new resource to be created. func (o SubscriptionPolicyExemptionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. func (o SubscriptionPolicyExemptionOutput) PolicyAssignmentId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput) } // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. func (o SubscriptionPolicyExemptionOutput) PolicyDefinitionReferenceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringArrayOutput { return v.PolicyDefinitionReferenceIds }).(pulumi.StringArrayOutput) } // The Subscription ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. func (o SubscriptionPolicyExemptionOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionPolicyExemption) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type SubscriptionPolicyExemptionArrayOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyExemptionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionPolicyExemption)(nil)).Elem() } func (o SubscriptionPolicyExemptionArrayOutput) ToSubscriptionPolicyExemptionArrayOutput() SubscriptionPolicyExemptionArrayOutput { return o } func (o SubscriptionPolicyExemptionArrayOutput) ToSubscriptionPolicyExemptionArrayOutputWithContext(ctx context.Context) SubscriptionPolicyExemptionArrayOutput { return o } func (o SubscriptionPolicyExemptionArrayOutput) Index(i pulumi.IntInput) SubscriptionPolicyExemptionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionPolicyExemption { return vs[0].([]*SubscriptionPolicyExemption)[vs[1].(int)] }).(SubscriptionPolicyExemptionOutput) } type SubscriptionPolicyExemptionMapOutput struct{ *pulumi.OutputState } func (SubscriptionPolicyExemptionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionPolicyExemption)(nil)).Elem() } func (o SubscriptionPolicyExemptionMapOutput) ToSubscriptionPolicyExemptionMapOutput() SubscriptionPolicyExemptionMapOutput { return o } func (o SubscriptionPolicyExemptionMapOutput) ToSubscriptionPolicyExemptionMapOutputWithContext(ctx context.Context) SubscriptionPolicyExemptionMapOutput { return o } func (o SubscriptionPolicyExemptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionPolicyExemptionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionPolicyExemption { return vs[0].(map[string]*SubscriptionPolicyExemption)[vs[1].(string)] }).(SubscriptionPolicyExemptionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyExemptionInput)(nil)).Elem(), &SubscriptionPolicyExemption{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyExemptionArrayInput)(nil)).Elem(), SubscriptionPolicyExemptionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPolicyExemptionMapInput)(nil)).Elem(), SubscriptionPolicyExemptionMap{}) pulumi.RegisterOutputType(SubscriptionPolicyExemptionOutput{}) pulumi.RegisterOutputType(SubscriptionPolicyExemptionArrayOutput{}) pulumi.RegisterOutputType(SubscriptionPolicyExemptionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourcePolicyExemption.go
sdk/go/azure/core/resourcePolicyExemption.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Policy Exemption. // // ## 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/policy" // "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("group1"), // Location: pulumi.String("westus"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("network1"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // example, err := policy.LookupPolicySetDefinition(ctx, &policy.LookupPolicySetDefinitionArgs{ // DisplayName: pulumi.StringRef("Audit machines with insecure password security settings"), // }, nil) // if err != nil { // return err // } // exampleResourcePolicyAssignment, err := core.NewResourcePolicyAssignment(ctx, "example", &core.ResourcePolicyAssignmentArgs{ // Name: pulumi.String("assignment1"), // ResourceId: exampleVirtualNetwork.ID(), // PolicyDefinitionId: pulumi.String(example.Id), // Location: exampleResourceGroup.Location, // Identity: &core.ResourcePolicyAssignmentIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = core.NewResourcePolicyExemption(ctx, "example", &core.ResourcePolicyExemptionArgs{ // Name: pulumi.String("exemption1"), // ResourceId: exampleResourcePolicyAssignment.ResourceId, // PolicyAssignmentId: exampleResourcePolicyAssignment.ID(), // ExemptionCategory: pulumi.String("Mitigated"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Policy Exemptions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourcePolicyExemption:ResourcePolicyExemption exemption1 /subscriptions/00000000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Authorization/policyExemptions/exemption1 // ``` type ResourcePolicyExemption struct { pulumi.CustomResourceState // A description to use for this Policy Exemption. Description pulumi.StringPtrOutput `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringOutput `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrOutput `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringOutput `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayOutput `pulumi:"policyDefinitionReferenceIds"` // The Resource ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceId pulumi.StringOutput `pulumi:"resourceId"` } // NewResourcePolicyExemption registers a new resource with the given unique name, arguments, and options. func NewResourcePolicyExemption(ctx *pulumi.Context, name string, args *ResourcePolicyExemptionArgs, opts ...pulumi.ResourceOption) (*ResourcePolicyExemption, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExemptionCategory == nil { return nil, errors.New("invalid value for required argument 'ExemptionCategory'") } if args.PolicyAssignmentId == nil { return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'") } if args.ResourceId == nil { return nil, errors.New("invalid value for required argument 'ResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourcePolicyExemption err := ctx.RegisterResource("azure:core/resourcePolicyExemption:ResourcePolicyExemption", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourcePolicyExemption gets an existing ResourcePolicyExemption resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourcePolicyExemption(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourcePolicyExemptionState, opts ...pulumi.ResourceOption) (*ResourcePolicyExemption, error) { var resource ResourcePolicyExemption err := ctx.ReadResource("azure:core/resourcePolicyExemption:ResourcePolicyExemption", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourcePolicyExemption resources. type resourcePolicyExemptionState struct { // A description to use for this Policy Exemption. Description *string `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName *string `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory *string `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn *string `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata *string `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId *string `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"` // The Resource ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceId *string `pulumi:"resourceId"` } type ResourcePolicyExemptionState struct { // A description to use for this Policy Exemption. Description pulumi.StringPtrInput // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrInput // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringPtrInput // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrInput // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringPtrInput // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringPtrInput // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayInput // The Resource ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceId pulumi.StringPtrInput } func (ResourcePolicyExemptionState) ElementType() reflect.Type { return reflect.TypeOf((*resourcePolicyExemptionState)(nil)).Elem() } type resourcePolicyExemptionArgs struct { // A description to use for this Policy Exemption. Description *string `pulumi:"description"` // A friendly display name to use for this Policy Exemption. DisplayName *string `pulumi:"displayName"` // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory string `pulumi:"exemptionCategory"` // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn *string `pulumi:"expiresOn"` // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata *string `pulumi:"metadata"` // The name of the Policy Exemption. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId string `pulumi:"policyAssignmentId"` // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"` // The Resource ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceId string `pulumi:"resourceId"` } // The set of arguments for constructing a ResourcePolicyExemption resource. type ResourcePolicyExemptionArgs struct { // A description to use for this Policy Exemption. Description pulumi.StringPtrInput // A friendly display name to use for this Policy Exemption. DisplayName pulumi.StringPtrInput // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. ExemptionCategory pulumi.StringInput // The expiration date and time in UTC ISO 8601 format of this policy exemption. ExpiresOn pulumi.StringPtrInput // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. Metadata pulumi.StringPtrInput // The name of the Policy Exemption. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. PolicyAssignmentId pulumi.StringInput // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. PolicyDefinitionReferenceIds pulumi.StringArrayInput // The Resource ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. ResourceId pulumi.StringInput } func (ResourcePolicyExemptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourcePolicyExemptionArgs)(nil)).Elem() } type ResourcePolicyExemptionInput interface { pulumi.Input ToResourcePolicyExemptionOutput() ResourcePolicyExemptionOutput ToResourcePolicyExemptionOutputWithContext(ctx context.Context) ResourcePolicyExemptionOutput } func (*ResourcePolicyExemption) ElementType() reflect.Type { return reflect.TypeOf((**ResourcePolicyExemption)(nil)).Elem() } func (i *ResourcePolicyExemption) ToResourcePolicyExemptionOutput() ResourcePolicyExemptionOutput { return i.ToResourcePolicyExemptionOutputWithContext(context.Background()) } func (i *ResourcePolicyExemption) ToResourcePolicyExemptionOutputWithContext(ctx context.Context) ResourcePolicyExemptionOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyExemptionOutput) } // ResourcePolicyExemptionArrayInput is an input type that accepts ResourcePolicyExemptionArray and ResourcePolicyExemptionArrayOutput values. // You can construct a concrete instance of `ResourcePolicyExemptionArrayInput` via: // // ResourcePolicyExemptionArray{ ResourcePolicyExemptionArgs{...} } type ResourcePolicyExemptionArrayInput interface { pulumi.Input ToResourcePolicyExemptionArrayOutput() ResourcePolicyExemptionArrayOutput ToResourcePolicyExemptionArrayOutputWithContext(context.Context) ResourcePolicyExemptionArrayOutput } type ResourcePolicyExemptionArray []ResourcePolicyExemptionInput func (ResourcePolicyExemptionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourcePolicyExemption)(nil)).Elem() } func (i ResourcePolicyExemptionArray) ToResourcePolicyExemptionArrayOutput() ResourcePolicyExemptionArrayOutput { return i.ToResourcePolicyExemptionArrayOutputWithContext(context.Background()) } func (i ResourcePolicyExemptionArray) ToResourcePolicyExemptionArrayOutputWithContext(ctx context.Context) ResourcePolicyExemptionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyExemptionArrayOutput) } // ResourcePolicyExemptionMapInput is an input type that accepts ResourcePolicyExemptionMap and ResourcePolicyExemptionMapOutput values. // You can construct a concrete instance of `ResourcePolicyExemptionMapInput` via: // // ResourcePolicyExemptionMap{ "key": ResourcePolicyExemptionArgs{...} } type ResourcePolicyExemptionMapInput interface { pulumi.Input ToResourcePolicyExemptionMapOutput() ResourcePolicyExemptionMapOutput ToResourcePolicyExemptionMapOutputWithContext(context.Context) ResourcePolicyExemptionMapOutput } type ResourcePolicyExemptionMap map[string]ResourcePolicyExemptionInput func (ResourcePolicyExemptionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourcePolicyExemption)(nil)).Elem() } func (i ResourcePolicyExemptionMap) ToResourcePolicyExemptionMapOutput() ResourcePolicyExemptionMapOutput { return i.ToResourcePolicyExemptionMapOutputWithContext(context.Background()) } func (i ResourcePolicyExemptionMap) ToResourcePolicyExemptionMapOutputWithContext(ctx context.Context) ResourcePolicyExemptionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyExemptionMapOutput) } type ResourcePolicyExemptionOutput struct{ *pulumi.OutputState } func (ResourcePolicyExemptionOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourcePolicyExemption)(nil)).Elem() } func (o ResourcePolicyExemptionOutput) ToResourcePolicyExemptionOutput() ResourcePolicyExemptionOutput { return o } func (o ResourcePolicyExemptionOutput) ToResourcePolicyExemptionOutputWithContext(ctx context.Context) ResourcePolicyExemptionOutput { return o } // A description to use for this Policy Exemption. func (o ResourcePolicyExemptionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A friendly display name to use for this Policy Exemption. func (o ResourcePolicyExemptionOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) } // The category of this policy exemption. Possible values are `Waiver` and `Mitigated`. func (o ResourcePolicyExemptionOutput) ExemptionCategory() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringOutput { return v.ExemptionCategory }).(pulumi.StringOutput) } // The expiration date and time in UTC ISO 8601 format of this policy exemption. func (o ResourcePolicyExemptionOutput) ExpiresOn() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringPtrOutput { return v.ExpiresOn }).(pulumi.StringPtrOutput) } // The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption. func (o ResourcePolicyExemptionOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The name of the Policy Exemption. Changing this forces a new resource to be created. func (o ResourcePolicyExemptionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Policy Assignment to be exempted at the specified Scope. Changing this forces a new resource to be created. func (o ResourcePolicyExemptionOutput) PolicyAssignmentId() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput) } // The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. func (o ResourcePolicyExemptionOutput) PolicyDefinitionReferenceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringArrayOutput { return v.PolicyDefinitionReferenceIds }).(pulumi.StringArrayOutput) } // The Resource ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. func (o ResourcePolicyExemptionOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyExemption) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) } type ResourcePolicyExemptionArrayOutput struct{ *pulumi.OutputState } func (ResourcePolicyExemptionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourcePolicyExemption)(nil)).Elem() } func (o ResourcePolicyExemptionArrayOutput) ToResourcePolicyExemptionArrayOutput() ResourcePolicyExemptionArrayOutput { return o } func (o ResourcePolicyExemptionArrayOutput) ToResourcePolicyExemptionArrayOutputWithContext(ctx context.Context) ResourcePolicyExemptionArrayOutput { return o } func (o ResourcePolicyExemptionArrayOutput) Index(i pulumi.IntInput) ResourcePolicyExemptionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourcePolicyExemption { return vs[0].([]*ResourcePolicyExemption)[vs[1].(int)] }).(ResourcePolicyExemptionOutput) } type ResourcePolicyExemptionMapOutput struct{ *pulumi.OutputState } func (ResourcePolicyExemptionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourcePolicyExemption)(nil)).Elem() } func (o ResourcePolicyExemptionMapOutput) ToResourcePolicyExemptionMapOutput() ResourcePolicyExemptionMapOutput { return o } func (o ResourcePolicyExemptionMapOutput) ToResourcePolicyExemptionMapOutputWithContext(ctx context.Context) ResourcePolicyExemptionMapOutput { return o } func (o ResourcePolicyExemptionMapOutput) MapIndex(k pulumi.StringInput) ResourcePolicyExemptionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourcePolicyExemption { return vs[0].(map[string]*ResourcePolicyExemption)[vs[1].(string)] }).(ResourcePolicyExemptionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyExemptionInput)(nil)).Elem(), &ResourcePolicyExemption{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyExemptionArrayInput)(nil)).Elem(), ResourcePolicyExemptionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyExemptionMapInput)(nil)).Elem(), ResourcePolicyExemptionMap{}) pulumi.RegisterOutputType(ResourcePolicyExemptionOutput{}) pulumi.RegisterOutputType(ResourcePolicyExemptionArrayOutput{}) pulumi.RegisterOutputType(ResourcePolicyExemptionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/customProvider.go
sdk/go/azure/core/customProvider.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Custom Provider. // // ## Example Usage // // ```go // package main // // import ( // // "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 = core.NewCustomProvider(ctx, "example", &core.CustomProviderArgs{ // Name: pulumi.String("example_provider"), // Location: example.Location, // ResourceGroupName: example.Name, // ResourceTypes: core.CustomProviderResourceTypeArray{ // &core.CustomProviderResourceTypeArgs{ // Name: pulumi.String("dEf1"), // Endpoint: pulumi.String("https://testendpoint.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.CustomProviders` - 2018-09-01-preview // // ## Import // // Custom Provider can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/customProvider:CustomProvider example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.CustomProviders/resourceProviders/example // ``` type CustomProvider struct { pulumi.CustomResourceState // Any number of `action` block as defined below. One of `resourceType` or `action` must be specified. Actions CustomProviderActionArrayOutput `pulumi:"actions"` // 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 Custom Provider. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the Custom Provider. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Any number of `resourceType` block as defined below. One of `resourceType` or `action` must be specified. ResourceTypes CustomProviderResourceTypeArrayOutput `pulumi:"resourceTypes"` // A mapping of tags to assign to the resource. Changing this forces a new resource to be created. Tags pulumi.StringMapOutput `pulumi:"tags"` // Any number of `validation` block as defined below. Validations CustomProviderValidationArrayOutput `pulumi:"validations"` } // NewCustomProvider registers a new resource with the given unique name, arguments, and options. func NewCustomProvider(ctx *pulumi.Context, name string, args *CustomProviderArgs, opts ...pulumi.ResourceOption) (*CustomProvider, 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 CustomProvider err := ctx.RegisterResource("azure:core/customProvider:CustomProvider", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCustomProvider gets an existing CustomProvider resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetCustomProvider(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CustomProviderState, opts ...pulumi.ResourceOption) (*CustomProvider, error) { var resource CustomProvider err := ctx.ReadResource("azure:core/customProvider:CustomProvider", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CustomProvider resources. type customProviderState struct { // Any number of `action` block as defined below. One of `resourceType` or `action` must be specified. Actions []CustomProviderAction `pulumi:"actions"` // 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 Custom Provider. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Custom Provider. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Any number of `resourceType` block as defined below. One of `resourceType` or `action` must be specified. ResourceTypes []CustomProviderResourceType `pulumi:"resourceTypes"` // A mapping of tags to assign to the resource. Changing this forces a new resource to be created. Tags map[string]string `pulumi:"tags"` // Any number of `validation` block as defined below. Validations []CustomProviderValidation `pulumi:"validations"` } type CustomProviderState struct { // Any number of `action` block as defined below. One of `resourceType` or `action` must be specified. Actions CustomProviderActionArrayInput // 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 Custom Provider. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Custom Provider. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Any number of `resourceType` block as defined below. One of `resourceType` or `action` must be specified. ResourceTypes CustomProviderResourceTypeArrayInput // A mapping of tags to assign to the resource. Changing this forces a new resource to be created. Tags pulumi.StringMapInput // Any number of `validation` block as defined below. Validations CustomProviderValidationArrayInput } func (CustomProviderState) ElementType() reflect.Type { return reflect.TypeOf((*customProviderState)(nil)).Elem() } type customProviderArgs struct { // Any number of `action` block as defined below. One of `resourceType` or `action` must be specified. Actions []CustomProviderAction `pulumi:"actions"` // 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 Custom Provider. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Custom Provider. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Any number of `resourceType` block as defined below. One of `resourceType` or `action` must be specified. ResourceTypes []CustomProviderResourceType `pulumi:"resourceTypes"` // A mapping of tags to assign to the resource. Changing this forces a new resource to be created. Tags map[string]string `pulumi:"tags"` // Any number of `validation` block as defined below. Validations []CustomProviderValidation `pulumi:"validations"` } // The set of arguments for constructing a CustomProvider resource. type CustomProviderArgs struct { // Any number of `action` block as defined below. One of `resourceType` or `action` must be specified. Actions CustomProviderActionArrayInput // 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 Custom Provider. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Custom Provider. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Any number of `resourceType` block as defined below. One of `resourceType` or `action` must be specified. ResourceTypes CustomProviderResourceTypeArrayInput // A mapping of tags to assign to the resource. Changing this forces a new resource to be created. Tags pulumi.StringMapInput // Any number of `validation` block as defined below. Validations CustomProviderValidationArrayInput } func (CustomProviderArgs) ElementType() reflect.Type { return reflect.TypeOf((*customProviderArgs)(nil)).Elem() } type CustomProviderInput interface { pulumi.Input ToCustomProviderOutput() CustomProviderOutput ToCustomProviderOutputWithContext(ctx context.Context) CustomProviderOutput } func (*CustomProvider) ElementType() reflect.Type { return reflect.TypeOf((**CustomProvider)(nil)).Elem() } func (i *CustomProvider) ToCustomProviderOutput() CustomProviderOutput { return i.ToCustomProviderOutputWithContext(context.Background()) } func (i *CustomProvider) ToCustomProviderOutputWithContext(ctx context.Context) CustomProviderOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderOutput) } // CustomProviderArrayInput is an input type that accepts CustomProviderArray and CustomProviderArrayOutput values. // You can construct a concrete instance of `CustomProviderArrayInput` via: // // CustomProviderArray{ CustomProviderArgs{...} } type CustomProviderArrayInput interface { pulumi.Input ToCustomProviderArrayOutput() CustomProviderArrayOutput ToCustomProviderArrayOutputWithContext(context.Context) CustomProviderArrayOutput } type CustomProviderArray []CustomProviderInput func (CustomProviderArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CustomProvider)(nil)).Elem() } func (i CustomProviderArray) ToCustomProviderArrayOutput() CustomProviderArrayOutput { return i.ToCustomProviderArrayOutputWithContext(context.Background()) } func (i CustomProviderArray) ToCustomProviderArrayOutputWithContext(ctx context.Context) CustomProviderArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderArrayOutput) } // CustomProviderMapInput is an input type that accepts CustomProviderMap and CustomProviderMapOutput values. // You can construct a concrete instance of `CustomProviderMapInput` via: // // CustomProviderMap{ "key": CustomProviderArgs{...} } type CustomProviderMapInput interface { pulumi.Input ToCustomProviderMapOutput() CustomProviderMapOutput ToCustomProviderMapOutputWithContext(context.Context) CustomProviderMapOutput } type CustomProviderMap map[string]CustomProviderInput func (CustomProviderMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CustomProvider)(nil)).Elem() } func (i CustomProviderMap) ToCustomProviderMapOutput() CustomProviderMapOutput { return i.ToCustomProviderMapOutputWithContext(context.Background()) } func (i CustomProviderMap) ToCustomProviderMapOutputWithContext(ctx context.Context) CustomProviderMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomProviderMapOutput) } type CustomProviderOutput struct{ *pulumi.OutputState } func (CustomProviderOutput) ElementType() reflect.Type { return reflect.TypeOf((**CustomProvider)(nil)).Elem() } func (o CustomProviderOutput) ToCustomProviderOutput() CustomProviderOutput { return o } func (o CustomProviderOutput) ToCustomProviderOutputWithContext(ctx context.Context) CustomProviderOutput { return o } // Any number of `action` block as defined below. One of `resourceType` or `action` must be specified. func (o CustomProviderOutput) Actions() CustomProviderActionArrayOutput { return o.ApplyT(func(v *CustomProvider) CustomProviderActionArrayOutput { return v.Actions }).(CustomProviderActionArrayOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o CustomProviderOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *CustomProvider) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Custom Provider. Changing this forces a new resource to be created. func (o CustomProviderOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CustomProvider) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Custom Provider. Changing this forces a new resource to be created. func (o CustomProviderOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *CustomProvider) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Any number of `resourceType` block as defined below. One of `resourceType` or `action` must be specified. func (o CustomProviderOutput) ResourceTypes() CustomProviderResourceTypeArrayOutput { return o.ApplyT(func(v *CustomProvider) CustomProviderResourceTypeArrayOutput { return v.ResourceTypes }).(CustomProviderResourceTypeArrayOutput) } // A mapping of tags to assign to the resource. Changing this forces a new resource to be created. func (o CustomProviderOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *CustomProvider) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Any number of `validation` block as defined below. func (o CustomProviderOutput) Validations() CustomProviderValidationArrayOutput { return o.ApplyT(func(v *CustomProvider) CustomProviderValidationArrayOutput { return v.Validations }).(CustomProviderValidationArrayOutput) } type CustomProviderArrayOutput struct{ *pulumi.OutputState } func (CustomProviderArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CustomProvider)(nil)).Elem() } func (o CustomProviderArrayOutput) ToCustomProviderArrayOutput() CustomProviderArrayOutput { return o } func (o CustomProviderArrayOutput) ToCustomProviderArrayOutputWithContext(ctx context.Context) CustomProviderArrayOutput { return o } func (o CustomProviderArrayOutput) Index(i pulumi.IntInput) CustomProviderOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CustomProvider { return vs[0].([]*CustomProvider)[vs[1].(int)] }).(CustomProviderOutput) } type CustomProviderMapOutput struct{ *pulumi.OutputState } func (CustomProviderMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CustomProvider)(nil)).Elem() } func (o CustomProviderMapOutput) ToCustomProviderMapOutput() CustomProviderMapOutput { return o } func (o CustomProviderMapOutput) ToCustomProviderMapOutputWithContext(ctx context.Context) CustomProviderMapOutput { return o } func (o CustomProviderMapOutput) MapIndex(k pulumi.StringInput) CustomProviderOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CustomProvider { return vs[0].(map[string]*CustomProvider)[vs[1].(string)] }).(CustomProviderOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CustomProviderInput)(nil)).Elem(), &CustomProvider{}) pulumi.RegisterInputType(reflect.TypeOf((*CustomProviderArrayInput)(nil)).Elem(), CustomProviderArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CustomProviderMapInput)(nil)).Elem(), CustomProviderMap{}) pulumi.RegisterOutputType(CustomProviderOutput{}) pulumi.RegisterOutputType(CustomProviderArrayOutput{}) pulumi.RegisterOutputType(CustomProviderMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceGroupPolicyAssignment.go
sdk/go/azure/core/resourceGroupPolicyAssignment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Group Policy Assignment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "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 // } // exampleDefinition, err := policy.NewDefinition(ctx, "example", &policy.DefinitionArgs{ // Name: pulumi.String("only-deploy-in-westeurope"), // PolicyType: pulumi.String("Custom"), // Mode: pulumi.String("All"), // DisplayName: pulumi.String("my-policy-definition"), // PolicyRule: pulumi.String(` { // "if": { // "not": { // "field": "location", // "equals": "westeurope" // } // }, // "then": { // "effect": "Deny" // } // } // // `), // // }) // if err != nil { // return err // } // _, err = core.NewResourceGroupPolicyAssignment(ctx, "example", &core.ResourceGroupPolicyAssignmentArgs{ // Name: pulumi.String("example"), // ResourceGroupId: example.ID(), // PolicyDefinitionId: exampleDefinition.ID(), // Parameters: pulumi.String(` { // \"tagName\": { // \"value\": \"Business Unit\" // }, // \"tagValue\": { // \"value\": \"BU\" // } // } // // `), // // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2022-06-01 // // ## Import // // Resource Group Policy Assignments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceGroupPolicyAssignment:ResourceGroupPolicyAssignment example /subscriptions/00000000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Authorization/policyAssignments/assignment1 // ``` type ResourceGroupPolicyAssignment struct { pulumi.CustomResourceState // A description which should be used for this Policy Assignment. Description pulumi.StringPtrOutput `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrOutput `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity ResourceGroupPolicyAssignmentIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringOutput `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringOutput `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringOutput `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages ResourceGroupPolicyAssignmentNonComplianceMessageArrayOutput `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayOutput `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides ResourceGroupPolicyAssignmentOverrideArrayOutput `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrOutput `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringOutput `pulumi:"policyDefinitionId"` // The ID of the Resource Group where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors ResourceGroupPolicyAssignmentResourceSelectorArrayOutput `pulumi:"resourceSelectors"` } // NewResourceGroupPolicyAssignment registers a new resource with the given unique name, arguments, and options. func NewResourceGroupPolicyAssignment(ctx *pulumi.Context, name string, args *ResourceGroupPolicyAssignmentArgs, opts ...pulumi.ResourceOption) (*ResourceGroupPolicyAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyDefinitionId == nil { return nil, errors.New("invalid value for required argument 'PolicyDefinitionId'") } if args.ResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceGroupPolicyAssignment err := ctx.RegisterResource("azure:core/resourceGroupPolicyAssignment:ResourceGroupPolicyAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceGroupPolicyAssignment gets an existing ResourceGroupPolicyAssignment resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceGroupPolicyAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceGroupPolicyAssignmentState, opts ...pulumi.ResourceOption) (*ResourceGroupPolicyAssignment, error) { var resource ResourceGroupPolicyAssignment err := ctx.ReadResource("azure:core/resourceGroupPolicyAssignment:ResourceGroupPolicyAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceGroupPolicyAssignment resources. type resourceGroupPolicyAssignmentState struct { // A description which should be used for this Policy Assignment. Description *string `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName *string `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce *bool `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity *ResourceGroupPolicyAssignmentIdentity `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location *string `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name *string `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages []ResourceGroupPolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes []string `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides []ResourceGroupPolicyAssignmentOverride `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters *string `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId *string `pulumi:"policyDefinitionId"` // The ID of the Resource Group where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. ResourceGroupId *string `pulumi:"resourceGroupId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors []ResourceGroupPolicyAssignmentResourceSelector `pulumi:"resourceSelectors"` } type ResourceGroupPolicyAssignmentState struct { // A description which should be used for this Policy Assignment. Description pulumi.StringPtrInput // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrInput // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrInput // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity ResourceGroupPolicyAssignmentIdentityPtrInput // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringPtrInput // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringPtrInput // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages ResourceGroupPolicyAssignmentNonComplianceMessageArrayInput // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayInput // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides ResourceGroupPolicyAssignmentOverrideArrayInput // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrInput // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringPtrInput // The ID of the Resource Group where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. ResourceGroupId pulumi.StringPtrInput // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors ResourceGroupPolicyAssignmentResourceSelectorArrayInput } func (ResourceGroupPolicyAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupPolicyAssignmentState)(nil)).Elem() } type resourceGroupPolicyAssignmentArgs struct { // A description which should be used for this Policy Assignment. Description *string `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName *string `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce *bool `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity *ResourceGroupPolicyAssignmentIdentity `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location *string `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name *string `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages []ResourceGroupPolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes []string `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides []ResourceGroupPolicyAssignmentOverride `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters *string `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId string `pulumi:"policyDefinitionId"` // The ID of the Resource Group where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. ResourceGroupId string `pulumi:"resourceGroupId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors []ResourceGroupPolicyAssignmentResourceSelector `pulumi:"resourceSelectors"` } // The set of arguments for constructing a ResourceGroupPolicyAssignment resource. type ResourceGroupPolicyAssignmentArgs struct { // A description which should be used for this Policy Assignment. Description pulumi.StringPtrInput // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrInput // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrInput // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity ResourceGroupPolicyAssignmentIdentityPtrInput // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringPtrInput // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringPtrInput // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages ResourceGroupPolicyAssignmentNonComplianceMessageArrayInput // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayInput // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides ResourceGroupPolicyAssignmentOverrideArrayInput // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrInput // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringInput // The ID of the Resource Group where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. ResourceGroupId pulumi.StringInput // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors ResourceGroupPolicyAssignmentResourceSelectorArrayInput } func (ResourceGroupPolicyAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupPolicyAssignmentArgs)(nil)).Elem() } type ResourceGroupPolicyAssignmentInput interface { pulumi.Input ToResourceGroupPolicyAssignmentOutput() ResourceGroupPolicyAssignmentOutput ToResourceGroupPolicyAssignmentOutputWithContext(ctx context.Context) ResourceGroupPolicyAssignmentOutput } func (*ResourceGroupPolicyAssignment) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupPolicyAssignment)(nil)).Elem() } func (i *ResourceGroupPolicyAssignment) ToResourceGroupPolicyAssignmentOutput() ResourceGroupPolicyAssignmentOutput { return i.ToResourceGroupPolicyAssignmentOutputWithContext(context.Background()) } func (i *ResourceGroupPolicyAssignment) ToResourceGroupPolicyAssignmentOutputWithContext(ctx context.Context) ResourceGroupPolicyAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyAssignmentOutput) } // ResourceGroupPolicyAssignmentArrayInput is an input type that accepts ResourceGroupPolicyAssignmentArray and ResourceGroupPolicyAssignmentArrayOutput values. // You can construct a concrete instance of `ResourceGroupPolicyAssignmentArrayInput` via: // // ResourceGroupPolicyAssignmentArray{ ResourceGroupPolicyAssignmentArgs{...} } type ResourceGroupPolicyAssignmentArrayInput interface { pulumi.Input ToResourceGroupPolicyAssignmentArrayOutput() ResourceGroupPolicyAssignmentArrayOutput ToResourceGroupPolicyAssignmentArrayOutputWithContext(context.Context) ResourceGroupPolicyAssignmentArrayOutput } type ResourceGroupPolicyAssignmentArray []ResourceGroupPolicyAssignmentInput func (ResourceGroupPolicyAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupPolicyAssignment)(nil)).Elem() } func (i ResourceGroupPolicyAssignmentArray) ToResourceGroupPolicyAssignmentArrayOutput() ResourceGroupPolicyAssignmentArrayOutput { return i.ToResourceGroupPolicyAssignmentArrayOutputWithContext(context.Background()) } func (i ResourceGroupPolicyAssignmentArray) ToResourceGroupPolicyAssignmentArrayOutputWithContext(ctx context.Context) ResourceGroupPolicyAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyAssignmentArrayOutput) } // ResourceGroupPolicyAssignmentMapInput is an input type that accepts ResourceGroupPolicyAssignmentMap and ResourceGroupPolicyAssignmentMapOutput values. // You can construct a concrete instance of `ResourceGroupPolicyAssignmentMapInput` via: // // ResourceGroupPolicyAssignmentMap{ "key": ResourceGroupPolicyAssignmentArgs{...} } type ResourceGroupPolicyAssignmentMapInput interface { pulumi.Input ToResourceGroupPolicyAssignmentMapOutput() ResourceGroupPolicyAssignmentMapOutput ToResourceGroupPolicyAssignmentMapOutputWithContext(context.Context) ResourceGroupPolicyAssignmentMapOutput } type ResourceGroupPolicyAssignmentMap map[string]ResourceGroupPolicyAssignmentInput func (ResourceGroupPolicyAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupPolicyAssignment)(nil)).Elem() } func (i ResourceGroupPolicyAssignmentMap) ToResourceGroupPolicyAssignmentMapOutput() ResourceGroupPolicyAssignmentMapOutput { return i.ToResourceGroupPolicyAssignmentMapOutputWithContext(context.Background()) } func (i ResourceGroupPolicyAssignmentMap) ToResourceGroupPolicyAssignmentMapOutputWithContext(ctx context.Context) ResourceGroupPolicyAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupPolicyAssignmentMapOutput) } type ResourceGroupPolicyAssignmentOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupPolicyAssignment)(nil)).Elem() } func (o ResourceGroupPolicyAssignmentOutput) ToResourceGroupPolicyAssignmentOutput() ResourceGroupPolicyAssignmentOutput { return o } func (o ResourceGroupPolicyAssignmentOutput) ToResourceGroupPolicyAssignmentOutputWithContext(ctx context.Context) ResourceGroupPolicyAssignmentOutput { return o } // A description which should be used for this Policy Assignment. func (o ResourceGroupPolicyAssignmentOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The Display Name for this Policy Assignment. func (o ResourceGroupPolicyAssignmentOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) } // Specifies if this Policy should be enforced or not? Defaults to `true`. func (o ResourceGroupPolicyAssignmentOutput) Enforce() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.BoolPtrOutput { return v.Enforce }).(pulumi.BoolPtrOutput) } // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. func (o ResourceGroupPolicyAssignmentOutput) Identity() ResourceGroupPolicyAssignmentIdentityPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) ResourceGroupPolicyAssignmentIdentityPtrOutput { return v.Identity }).(ResourceGroupPolicyAssignmentIdentityPtrOutput) } // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. func (o ResourceGroupPolicyAssignmentOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A JSON mapping of any Metadata for this Policy. func (o ResourceGroupPolicyAssignmentOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The name which should be used for this Policy Assignment. Changing this forces a new Policy Assignment to be created. Cannot exceed 64 characters in length. func (o ResourceGroupPolicyAssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `nonComplianceMessage` blocks as defined below. func (o ResourceGroupPolicyAssignmentOutput) NonComplianceMessages() ResourceGroupPolicyAssignmentNonComplianceMessageArrayOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) ResourceGroupPolicyAssignmentNonComplianceMessageArrayOutput { return v.NonComplianceMessages }).(ResourceGroupPolicyAssignmentNonComplianceMessageArrayOutput) } // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. func (o ResourceGroupPolicyAssignmentOutput) NotScopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringArrayOutput { return v.NotScopes }).(pulumi.StringArrayOutput) } // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) func (o ResourceGroupPolicyAssignmentOutput) Overrides() ResourceGroupPolicyAssignmentOverrideArrayOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) ResourceGroupPolicyAssignmentOverrideArrayOutput { return v.Overrides }).(ResourceGroupPolicyAssignmentOverrideArrayOutput) } // A JSON mapping of any Parameters for this Policy. func (o ResourceGroupPolicyAssignmentOutput) Parameters() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringPtrOutput { return v.Parameters }).(pulumi.StringPtrOutput) } // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. func (o ResourceGroupPolicyAssignmentOutput) PolicyDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringOutput { return v.PolicyDefinitionId }).(pulumi.StringOutput) } // The ID of the Resource Group where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. func (o ResourceGroupPolicyAssignmentOutput) ResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) pulumi.StringOutput { return v.ResourceGroupId }).(pulumi.StringOutput) } // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. func (o ResourceGroupPolicyAssignmentOutput) ResourceSelectors() ResourceGroupPolicyAssignmentResourceSelectorArrayOutput { return o.ApplyT(func(v *ResourceGroupPolicyAssignment) ResourceGroupPolicyAssignmentResourceSelectorArrayOutput { return v.ResourceSelectors }).(ResourceGroupPolicyAssignmentResourceSelectorArrayOutput) } type ResourceGroupPolicyAssignmentArrayOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupPolicyAssignment)(nil)).Elem() } func (o ResourceGroupPolicyAssignmentArrayOutput) ToResourceGroupPolicyAssignmentArrayOutput() ResourceGroupPolicyAssignmentArrayOutput { return o } func (o ResourceGroupPolicyAssignmentArrayOutput) ToResourceGroupPolicyAssignmentArrayOutputWithContext(ctx context.Context) ResourceGroupPolicyAssignmentArrayOutput { return o } func (o ResourceGroupPolicyAssignmentArrayOutput) Index(i pulumi.IntInput) ResourceGroupPolicyAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGroupPolicyAssignment { return vs[0].([]*ResourceGroupPolicyAssignment)[vs[1].(int)] }).(ResourceGroupPolicyAssignmentOutput) } type ResourceGroupPolicyAssignmentMapOutput struct{ *pulumi.OutputState } func (ResourceGroupPolicyAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupPolicyAssignment)(nil)).Elem() } func (o ResourceGroupPolicyAssignmentMapOutput) ToResourceGroupPolicyAssignmentMapOutput() ResourceGroupPolicyAssignmentMapOutput { return o } func (o ResourceGroupPolicyAssignmentMapOutput) ToResourceGroupPolicyAssignmentMapOutputWithContext(ctx context.Context) ResourceGroupPolicyAssignmentMapOutput { return o } func (o ResourceGroupPolicyAssignmentMapOutput) MapIndex(k pulumi.StringInput) ResourceGroupPolicyAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGroupPolicyAssignment { return vs[0].(map[string]*ResourceGroupPolicyAssignment)[vs[1].(string)] }).(ResourceGroupPolicyAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyAssignmentInput)(nil)).Elem(), &ResourceGroupPolicyAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyAssignmentArrayInput)(nil)).Elem(), ResourceGroupPolicyAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupPolicyAssignmentMapInput)(nil)).Elem(), ResourceGroupPolicyAssignmentMap{}) pulumi.RegisterOutputType(ResourceGroupPolicyAssignmentOutput{}) pulumi.RegisterOutputType(ResourceGroupPolicyAssignmentArrayOutput{}) pulumi.RegisterOutputType(ResourceGroupPolicyAssignmentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/subscriptionCostManagementExport.go
sdk/go/azure/core/subscriptionCostManagementExport.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Cost Management Export for a Subscription. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("examplecontainer"), // StorageAccountName: exampleAccount.Name, // }) // if err != nil { // return err // } // _, err = core.NewSubscriptionCostManagementExport(ctx, "example", &core.SubscriptionCostManagementExportArgs{ // Name: pulumi.String("example"), // SubscriptionId: pulumi.String(example.Id), // RecurrenceType: pulumi.String("Monthly"), // RecurrencePeriodStartDate: pulumi.String("2020-08-18T00:00:00Z"), // RecurrencePeriodEndDate: pulumi.String("2020-09-18T00:00:00Z"), // FileFormat: pulumi.String("Csv"), // ExportDataStorageLocation: &core.SubscriptionCostManagementExportExportDataStorageLocationArgs{ // ContainerId: exampleContainer.ID(), // RootFolderPath: pulumi.String("/root/updated"), // }, // ExportDataOptions: &core.SubscriptionCostManagementExportExportDataOptionsArgs{ // Type: pulumi.String("Usage"), // TimeFrame: pulumi.String("WeekToDate"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.CostManagement` - 2023-08-01 // // ## Import // // Subscription Cost Management Exports can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/subscriptionCostManagementExport:SubscriptionCostManagementExport example /subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.CostManagement/exports/export1 // ``` type SubscriptionCostManagementExport struct { pulumi.CustomResourceState // Is the cost management export active? Default is `true`. Active pulumi.BoolPtrOutput `pulumi:"active"` // A `exportDataOptions` block as defined below. ExportDataOptions SubscriptionCostManagementExportExportDataOptionsOutput `pulumi:"exportDataOptions"` // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation SubscriptionCostManagementExportExportDataStorageLocationOutput `pulumi:"exportDataStorageLocation"` // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat pulumi.StringPtrOutput `pulumi:"fileFormat"` // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The date the export will stop capturing information. RecurrencePeriodEndDate pulumi.StringOutput `pulumi:"recurrencePeriodEndDate"` // The date the export will start capturing information. RecurrencePeriodStartDate pulumi.StringOutput `pulumi:"recurrencePeriodStartDate"` // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType pulumi.StringOutput `pulumi:"recurrenceType"` // The id of the subscription on which to create an export. Changing this forces a new resource to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewSubscriptionCostManagementExport registers a new resource with the given unique name, arguments, and options. func NewSubscriptionCostManagementExport(ctx *pulumi.Context, name string, args *SubscriptionCostManagementExportArgs, opts ...pulumi.ResourceOption) (*SubscriptionCostManagementExport, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExportDataOptions == nil { return nil, errors.New("invalid value for required argument 'ExportDataOptions'") } if args.ExportDataStorageLocation == nil { return nil, errors.New("invalid value for required argument 'ExportDataStorageLocation'") } if args.RecurrencePeriodEndDate == nil { return nil, errors.New("invalid value for required argument 'RecurrencePeriodEndDate'") } if args.RecurrencePeriodStartDate == nil { return nil, errors.New("invalid value for required argument 'RecurrencePeriodStartDate'") } if args.RecurrenceType == nil { return nil, errors.New("invalid value for required argument 'RecurrenceType'") } if args.SubscriptionId == nil { return nil, errors.New("invalid value for required argument 'SubscriptionId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubscriptionCostManagementExport err := ctx.RegisterResource("azure:core/subscriptionCostManagementExport:SubscriptionCostManagementExport", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubscriptionCostManagementExport gets an existing SubscriptionCostManagementExport resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubscriptionCostManagementExport(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubscriptionCostManagementExportState, opts ...pulumi.ResourceOption) (*SubscriptionCostManagementExport, error) { var resource SubscriptionCostManagementExport err := ctx.ReadResource("azure:core/subscriptionCostManagementExport:SubscriptionCostManagementExport", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubscriptionCostManagementExport resources. type subscriptionCostManagementExportState struct { // Is the cost management export active? Default is `true`. Active *bool `pulumi:"active"` // A `exportDataOptions` block as defined below. ExportDataOptions *SubscriptionCostManagementExportExportDataOptions `pulumi:"exportDataOptions"` // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation *SubscriptionCostManagementExportExportDataStorageLocation `pulumi:"exportDataStorageLocation"` // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat *string `pulumi:"fileFormat"` // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The date the export will stop capturing information. RecurrencePeriodEndDate *string `pulumi:"recurrencePeriodEndDate"` // The date the export will start capturing information. RecurrencePeriodStartDate *string `pulumi:"recurrencePeriodStartDate"` // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType *string `pulumi:"recurrenceType"` // The id of the subscription on which to create an export. Changing this forces a new resource to be created. SubscriptionId *string `pulumi:"subscriptionId"` } type SubscriptionCostManagementExportState struct { // Is the cost management export active? Default is `true`. Active pulumi.BoolPtrInput // A `exportDataOptions` block as defined below. ExportDataOptions SubscriptionCostManagementExportExportDataOptionsPtrInput // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation SubscriptionCostManagementExportExportDataStorageLocationPtrInput // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat pulumi.StringPtrInput // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The date the export will stop capturing information. RecurrencePeriodEndDate pulumi.StringPtrInput // The date the export will start capturing information. RecurrencePeriodStartDate pulumi.StringPtrInput // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType pulumi.StringPtrInput // The id of the subscription on which to create an export. Changing this forces a new resource to be created. SubscriptionId pulumi.StringPtrInput } func (SubscriptionCostManagementExportState) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionCostManagementExportState)(nil)).Elem() } type subscriptionCostManagementExportArgs struct { // Is the cost management export active? Default is `true`. Active *bool `pulumi:"active"` // A `exportDataOptions` block as defined below. ExportDataOptions SubscriptionCostManagementExportExportDataOptions `pulumi:"exportDataOptions"` // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation SubscriptionCostManagementExportExportDataStorageLocation `pulumi:"exportDataStorageLocation"` // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat *string `pulumi:"fileFormat"` // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The date the export will stop capturing information. RecurrencePeriodEndDate string `pulumi:"recurrencePeriodEndDate"` // The date the export will start capturing information. RecurrencePeriodStartDate string `pulumi:"recurrencePeriodStartDate"` // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType string `pulumi:"recurrenceType"` // The id of the subscription on which to create an export. Changing this forces a new resource to be created. SubscriptionId string `pulumi:"subscriptionId"` } // The set of arguments for constructing a SubscriptionCostManagementExport resource. type SubscriptionCostManagementExportArgs struct { // Is the cost management export active? Default is `true`. Active pulumi.BoolPtrInput // A `exportDataOptions` block as defined below. ExportDataOptions SubscriptionCostManagementExportExportDataOptionsInput // A `exportDataStorageLocation` block as defined below. ExportDataStorageLocation SubscriptionCostManagementExportExportDataStorageLocationInput // Format for export. Valid values are `Csv` only. Default is `Csv`. FileFormat pulumi.StringPtrInput // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The date the export will stop capturing information. RecurrencePeriodEndDate pulumi.StringInput // The date the export will start capturing information. RecurrencePeriodStartDate pulumi.StringInput // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. RecurrenceType pulumi.StringInput // The id of the subscription on which to create an export. Changing this forces a new resource to be created. SubscriptionId pulumi.StringInput } func (SubscriptionCostManagementExportArgs) ElementType() reflect.Type { return reflect.TypeOf((*subscriptionCostManagementExportArgs)(nil)).Elem() } type SubscriptionCostManagementExportInput interface { pulumi.Input ToSubscriptionCostManagementExportOutput() SubscriptionCostManagementExportOutput ToSubscriptionCostManagementExportOutputWithContext(ctx context.Context) SubscriptionCostManagementExportOutput } func (*SubscriptionCostManagementExport) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionCostManagementExport)(nil)).Elem() } func (i *SubscriptionCostManagementExport) ToSubscriptionCostManagementExportOutput() SubscriptionCostManagementExportOutput { return i.ToSubscriptionCostManagementExportOutputWithContext(context.Background()) } func (i *SubscriptionCostManagementExport) ToSubscriptionCostManagementExportOutputWithContext(ctx context.Context) SubscriptionCostManagementExportOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionCostManagementExportOutput) } // SubscriptionCostManagementExportArrayInput is an input type that accepts SubscriptionCostManagementExportArray and SubscriptionCostManagementExportArrayOutput values. // You can construct a concrete instance of `SubscriptionCostManagementExportArrayInput` via: // // SubscriptionCostManagementExportArray{ SubscriptionCostManagementExportArgs{...} } type SubscriptionCostManagementExportArrayInput interface { pulumi.Input ToSubscriptionCostManagementExportArrayOutput() SubscriptionCostManagementExportArrayOutput ToSubscriptionCostManagementExportArrayOutputWithContext(context.Context) SubscriptionCostManagementExportArrayOutput } type SubscriptionCostManagementExportArray []SubscriptionCostManagementExportInput func (SubscriptionCostManagementExportArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionCostManagementExport)(nil)).Elem() } func (i SubscriptionCostManagementExportArray) ToSubscriptionCostManagementExportArrayOutput() SubscriptionCostManagementExportArrayOutput { return i.ToSubscriptionCostManagementExportArrayOutputWithContext(context.Background()) } func (i SubscriptionCostManagementExportArray) ToSubscriptionCostManagementExportArrayOutputWithContext(ctx context.Context) SubscriptionCostManagementExportArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionCostManagementExportArrayOutput) } // SubscriptionCostManagementExportMapInput is an input type that accepts SubscriptionCostManagementExportMap and SubscriptionCostManagementExportMapOutput values. // You can construct a concrete instance of `SubscriptionCostManagementExportMapInput` via: // // SubscriptionCostManagementExportMap{ "key": SubscriptionCostManagementExportArgs{...} } type SubscriptionCostManagementExportMapInput interface { pulumi.Input ToSubscriptionCostManagementExportMapOutput() SubscriptionCostManagementExportMapOutput ToSubscriptionCostManagementExportMapOutputWithContext(context.Context) SubscriptionCostManagementExportMapOutput } type SubscriptionCostManagementExportMap map[string]SubscriptionCostManagementExportInput func (SubscriptionCostManagementExportMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionCostManagementExport)(nil)).Elem() } func (i SubscriptionCostManagementExportMap) ToSubscriptionCostManagementExportMapOutput() SubscriptionCostManagementExportMapOutput { return i.ToSubscriptionCostManagementExportMapOutputWithContext(context.Background()) } func (i SubscriptionCostManagementExportMap) ToSubscriptionCostManagementExportMapOutputWithContext(ctx context.Context) SubscriptionCostManagementExportMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubscriptionCostManagementExportMapOutput) } type SubscriptionCostManagementExportOutput struct{ *pulumi.OutputState } func (SubscriptionCostManagementExportOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubscriptionCostManagementExport)(nil)).Elem() } func (o SubscriptionCostManagementExportOutput) ToSubscriptionCostManagementExportOutput() SubscriptionCostManagementExportOutput { return o } func (o SubscriptionCostManagementExportOutput) ToSubscriptionCostManagementExportOutputWithContext(ctx context.Context) SubscriptionCostManagementExportOutput { return o } // Is the cost management export active? Default is `true`. func (o SubscriptionCostManagementExportOutput) Active() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) pulumi.BoolPtrOutput { return v.Active }).(pulumi.BoolPtrOutput) } // A `exportDataOptions` block as defined below. func (o SubscriptionCostManagementExportOutput) ExportDataOptions() SubscriptionCostManagementExportExportDataOptionsOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) SubscriptionCostManagementExportExportDataOptionsOutput { return v.ExportDataOptions }).(SubscriptionCostManagementExportExportDataOptionsOutput) } // A `exportDataStorageLocation` block as defined below. func (o SubscriptionCostManagementExportOutput) ExportDataStorageLocation() SubscriptionCostManagementExportExportDataStorageLocationOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) SubscriptionCostManagementExportExportDataStorageLocationOutput { return v.ExportDataStorageLocation }).(SubscriptionCostManagementExportExportDataStorageLocationOutput) } // Format for export. Valid values are `Csv` only. Default is `Csv`. func (o SubscriptionCostManagementExportOutput) FileFormat() pulumi.StringPtrOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) pulumi.StringPtrOutput { return v.FileFormat }).(pulumi.StringPtrOutput) } // Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. func (o SubscriptionCostManagementExportOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The date the export will stop capturing information. func (o SubscriptionCostManagementExportOutput) RecurrencePeriodEndDate() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) pulumi.StringOutput { return v.RecurrencePeriodEndDate }).(pulumi.StringOutput) } // The date the export will start capturing information. func (o SubscriptionCostManagementExportOutput) RecurrencePeriodStartDate() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) pulumi.StringOutput { return v.RecurrencePeriodStartDate }).(pulumi.StringOutput) } // How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. func (o SubscriptionCostManagementExportOutput) RecurrenceType() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) pulumi.StringOutput { return v.RecurrenceType }).(pulumi.StringOutput) } // The id of the subscription on which to create an export. Changing this forces a new resource to be created. func (o SubscriptionCostManagementExportOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *SubscriptionCostManagementExport) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type SubscriptionCostManagementExportArrayOutput struct{ *pulumi.OutputState } func (SubscriptionCostManagementExportArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubscriptionCostManagementExport)(nil)).Elem() } func (o SubscriptionCostManagementExportArrayOutput) ToSubscriptionCostManagementExportArrayOutput() SubscriptionCostManagementExportArrayOutput { return o } func (o SubscriptionCostManagementExportArrayOutput) ToSubscriptionCostManagementExportArrayOutputWithContext(ctx context.Context) SubscriptionCostManagementExportArrayOutput { return o } func (o SubscriptionCostManagementExportArrayOutput) Index(i pulumi.IntInput) SubscriptionCostManagementExportOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionCostManagementExport { return vs[0].([]*SubscriptionCostManagementExport)[vs[1].(int)] }).(SubscriptionCostManagementExportOutput) } type SubscriptionCostManagementExportMapOutput struct{ *pulumi.OutputState } func (SubscriptionCostManagementExportMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubscriptionCostManagementExport)(nil)).Elem() } func (o SubscriptionCostManagementExportMapOutput) ToSubscriptionCostManagementExportMapOutput() SubscriptionCostManagementExportMapOutput { return o } func (o SubscriptionCostManagementExportMapOutput) ToSubscriptionCostManagementExportMapOutputWithContext(ctx context.Context) SubscriptionCostManagementExportMapOutput { return o } func (o SubscriptionCostManagementExportMapOutput) MapIndex(k pulumi.StringInput) SubscriptionCostManagementExportOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionCostManagementExport { return vs[0].(map[string]*SubscriptionCostManagementExport)[vs[1].(string)] }).(SubscriptionCostManagementExportOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionCostManagementExportInput)(nil)).Elem(), &SubscriptionCostManagementExport{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionCostManagementExportArrayInput)(nil)).Elem(), SubscriptionCostManagementExportArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionCostManagementExportMapInput)(nil)).Elem(), SubscriptionCostManagementExportMap{}) pulumi.RegisterOutputType(SubscriptionCostManagementExportOutput{}) pulumi.RegisterOutputType(SubscriptionCostManagementExportArrayOutput{}) pulumi.RegisterOutputType(SubscriptionCostManagementExportMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getResourceGroup.go
sdk/go/azure/core/getResourceGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Resource Group. // // ## Example Usage // // ```go // package main // // import ( // // "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.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{ // Name: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` func LookupResourceGroup(ctx *pulumi.Context, args *LookupResourceGroupArgs, opts ...pulumi.InvokeOption) (*LookupResourceGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupResourceGroupResult err := ctx.Invoke("azure:core/getResourceGroup:getResourceGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getResourceGroup. type LookupResourceGroupArgs struct { // The Name of this Resource Group. Name string `pulumi:"name"` } // A collection of values returned by getResourceGroup. type LookupResourceGroupResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Resource Group exists. Location string `pulumi:"location"` ManagedBy string `pulumi:"managedBy"` Name string `pulumi:"name"` // A mapping of tags assigned to the Resource Group. Tags map[string]string `pulumi:"tags"` } func LookupResourceGroupOutput(ctx *pulumi.Context, args LookupResourceGroupOutputArgs, opts ...pulumi.InvokeOption) LookupResourceGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupResourceGroupResultOutput, error) { args := v.(LookupResourceGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getResourceGroup:getResourceGroup", args, LookupResourceGroupResultOutput{}, options).(LookupResourceGroupResultOutput), nil }).(LookupResourceGroupResultOutput) } // A collection of arguments for invoking getResourceGroup. type LookupResourceGroupOutputArgs struct { // The Name of this Resource Group. Name pulumi.StringInput `pulumi:"name"` } func (LookupResourceGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupResourceGroupArgs)(nil)).Elem() } // A collection of values returned by getResourceGroup. type LookupResourceGroupResultOutput struct{ *pulumi.OutputState } func (LookupResourceGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupResourceGroupResult)(nil)).Elem() } func (o LookupResourceGroupResultOutput) ToLookupResourceGroupResultOutput() LookupResourceGroupResultOutput { return o } func (o LookupResourceGroupResultOutput) ToLookupResourceGroupResultOutputWithContext(ctx context.Context) LookupResourceGroupResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupResourceGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Resource Group exists. func (o LookupResourceGroupResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupResourceGroupResultOutput) ManagedBy() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupResult) string { return v.ManagedBy }).(pulumi.StringOutput) } func (o LookupResourceGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceGroupResult) string { return v.Name }).(pulumi.StringOutput) } // A mapping of tags assigned to the Resource Group. func (o LookupResourceGroupResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupResourceGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupResourceGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getUserAssignedIdentity.go
sdk/go/azure/core/getUserAssignedIdentity.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 User Assigned Identity. // // ## Example Usage // // ### Reference An Existing) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := authorization.LookupUserAssignedIdentity(ctx, &authorization.LookupUserAssignedIdentityArgs{ // Name: "name_of_user_assigned_identity", // ResourceGroupName: "name_of_resource_group", // }, nil) // if err != nil { // return err // } // ctx.Export("uaiClientId", example.ClientId) // ctx.Export("uaiPrincipalId", example.PrincipalId) // ctx.Export("uaiTenantId", example.TenantId) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.ManagedIdentity` - 2024-11-30 // // Deprecated: azure.core.getUserAssignedIdentity has been deprecated in favor of azure.authorization.getUserAssignedIdentity func GetUserAssignedIdentity(ctx *pulumi.Context, args *GetUserAssignedIdentityArgs, opts ...pulumi.InvokeOption) (*GetUserAssignedIdentityResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetUserAssignedIdentityResult err := ctx.Invoke("azure:core/getUserAssignedIdentity:getUserAssignedIdentity", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getUserAssignedIdentity. type GetUserAssignedIdentityArgs struct { // The name of the User Assigned Identity. Name string `pulumi:"name"` // The name of the Resource Group in which the User Assigned Identity exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getUserAssignedIdentity. type GetUserAssignedIdentityResult struct { // The Client ID of the User Assigned Identity. ClientId string `pulumi:"clientId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure location where the User Assigned Identity exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // The Service Principal ID of the User Assigned Identity. PrincipalId string `pulumi:"principalId"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the User Assigned Identity. Tags map[string]string `pulumi:"tags"` // The Tenant ID of the User Assigned Identity. TenantId string `pulumi:"tenantId"` } func GetUserAssignedIdentityOutput(ctx *pulumi.Context, args GetUserAssignedIdentityOutputArgs, opts ...pulumi.InvokeOption) GetUserAssignedIdentityResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetUserAssignedIdentityResultOutput, error) { args := v.(GetUserAssignedIdentityArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getUserAssignedIdentity:getUserAssignedIdentity", args, GetUserAssignedIdentityResultOutput{}, options).(GetUserAssignedIdentityResultOutput), nil }).(GetUserAssignedIdentityResultOutput) } // A collection of arguments for invoking getUserAssignedIdentity. type GetUserAssignedIdentityOutputArgs struct { // The name of the User Assigned Identity. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the User Assigned Identity exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetUserAssignedIdentityOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetUserAssignedIdentityArgs)(nil)).Elem() } // A collection of values returned by getUserAssignedIdentity. type GetUserAssignedIdentityResultOutput struct{ *pulumi.OutputState } func (GetUserAssignedIdentityResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetUserAssignedIdentityResult)(nil)).Elem() } func (o GetUserAssignedIdentityResultOutput) ToGetUserAssignedIdentityResultOutput() GetUserAssignedIdentityResultOutput { return o } func (o GetUserAssignedIdentityResultOutput) ToGetUserAssignedIdentityResultOutputWithContext(ctx context.Context) GetUserAssignedIdentityResultOutput { return o } // The Client ID of the User Assigned Identity. func (o GetUserAssignedIdentityResultOutput) ClientId() pulumi.StringOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) string { return v.ClientId }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetUserAssignedIdentityResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure location where the User Assigned Identity exists. func (o GetUserAssignedIdentityResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetUserAssignedIdentityResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) string { return v.Name }).(pulumi.StringOutput) } // The Service Principal ID of the User Assigned Identity. func (o GetUserAssignedIdentityResultOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) string { return v.PrincipalId }).(pulumi.StringOutput) } func (o GetUserAssignedIdentityResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the User Assigned Identity. func (o GetUserAssignedIdentityResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Tenant ID of the User Assigned Identity. func (o GetUserAssignedIdentityResultOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v GetUserAssignedIdentityResult) string { return v.TenantId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetUserAssignedIdentityResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getExtendedLocations.go
sdk/go/azure/core/getExtendedLocations.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // This data source return the available Extended Locations for a specific Azure Region. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // _, err := core.GetExtendedLocations(ctx, &core.GetExtendedLocationsArgs{ // Location: "West Europe", // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` func GetExtendedLocations(ctx *pulumi.Context, args *GetExtendedLocationsArgs, opts ...pulumi.InvokeOption) (*GetExtendedLocationsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetExtendedLocationsResult err := ctx.Invoke("azure:core/getExtendedLocations:getExtendedLocations", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getExtendedLocations. type GetExtendedLocationsArgs struct { // The Azure location to retrieve the Extended Locations for. Location string `pulumi:"location"` } // A collection of values returned by getExtendedLocations. type GetExtendedLocationsResult struct { // The available extended locations for the Azure Location. ExtendedLocations []string `pulumi:"extendedLocations"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Location string `pulumi:"location"` } func GetExtendedLocationsOutput(ctx *pulumi.Context, args GetExtendedLocationsOutputArgs, opts ...pulumi.InvokeOption) GetExtendedLocationsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetExtendedLocationsResultOutput, error) { args := v.(GetExtendedLocationsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getExtendedLocations:getExtendedLocations", args, GetExtendedLocationsResultOutput{}, options).(GetExtendedLocationsResultOutput), nil }).(GetExtendedLocationsResultOutput) } // A collection of arguments for invoking getExtendedLocations. type GetExtendedLocationsOutputArgs struct { // The Azure location to retrieve the Extended Locations for. Location pulumi.StringInput `pulumi:"location"` } func (GetExtendedLocationsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetExtendedLocationsArgs)(nil)).Elem() } // A collection of values returned by getExtendedLocations. type GetExtendedLocationsResultOutput struct{ *pulumi.OutputState } func (GetExtendedLocationsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetExtendedLocationsResult)(nil)).Elem() } func (o GetExtendedLocationsResultOutput) ToGetExtendedLocationsResultOutput() GetExtendedLocationsResultOutput { return o } func (o GetExtendedLocationsResultOutput) ToGetExtendedLocationsResultOutputWithContext(ctx context.Context) GetExtendedLocationsResultOutput { return o } // The available extended locations for the Azure Location. func (o GetExtendedLocationsResultOutput) ExtendedLocations() pulumi.StringArrayOutput { return o.ApplyT(func(v GetExtendedLocationsResult) []string { return v.ExtendedLocations }).(pulumi.StringArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetExtendedLocationsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetExtendedLocationsResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetExtendedLocationsResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetExtendedLocationsResult) string { return v.Location }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetExtendedLocationsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceGroupTemplateDeployment.go
sdk/go/azure/core/resourceGroupTemplateDeployment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core 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 Group Template Deployment. // // > **Note:** This resource will automatically attempt to delete resources deployed by the ARM Template when it is deleted. This behavior can be disabled in the provider `features` block by setting the `deleteNestedItemsDuringDeletion` field to `false` within the `templateDeployment` block. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // vnetName := "example-vnet"; // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "vnetName": map[string]interface{}{ // "value": vnetName, // }, // }) // if err != nil { // return err // } // json0 := string(tmpJSON0) // example, err := core.NewResourceGroupTemplateDeployment(ctx, "example", &core.ResourceGroupTemplateDeploymentArgs{ // Name: pulumi.String("example-deploy"), // ResourceGroupName: pulumi.String("example-group"), // DeploymentMode: pulumi.String("Incremental"), // ParametersContent: pulumi.String(json0), // // TemplateContent: pulumi.String(`{ // \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\", // \"contentVersion\": \"1.0.0.0\", // \"parameters\": { // \"vnetName\": { // \"type\": \"string\", // \"metadata\": { // \"description\": \"Name of the VNET\" // } // } // }, // \"variables\": {}, // \"resources\": [ // { // \"type\": \"Microsoft.Network/virtualNetworks\", // \"apiVersion\": \"2020-05-01\", // \"name\": \"[parameters('vnetName')]\", // \"location\": \"[resourceGroup().location]\", // \"properties\": { // \"addressSpace\": { // \"addressPrefixes\": [ // \"10.0.0.0/16\" // ] // } // } // } // ], // \"outputs\": { // \"exampleOutput\": { // \"type\": \"string\", // \"value\": \"someoutput\" // } // } // } // // `), // }) // if err != nil { // return err // } // ctx.Export("armExampleOutput", std.JsondecodeOutput(ctx, std.JsondecodeOutputArgs{ // Input: example.OutputContent, // }, nil).ApplyT(func(invoke std.JsondecodeResult) (*interface{}, error) { // return invoke.Result.ExampleOutput.Value, nil // }).(pulumi.Interface{}PtrOutput)) // return nil // }) // } // ``` // // ```go // package main // // import ( // // "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.GetTemplateSpecVersion(ctx, &core.GetTemplateSpecVersionArgs{ // Name: "myTemplateForResourceGroup", // ResourceGroupName: "myResourceGroup", // Version: "v3.4.0", // }, nil) // if err != nil { // return err // } // _, err = core.NewResourceGroupTemplateDeployment(ctx, "example", &core.ResourceGroupTemplateDeploymentArgs{ // Name: pulumi.String("example-deploy"), // ResourceGroupName: pulumi.String("example-group"), // DeploymentMode: pulumi.String("Incremental"), // TemplateSpecVersionId: pulumi.String(example.Id), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Resource Group Template Deployments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceGroupTemplateDeployment:ResourceGroupTemplateDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Resources/deployments/template1 // ``` type ResourceGroupTemplateDeployment struct { pulumi.CustomResourceState // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrOutput `pulumi:"debugLevel"` // The Deployment Mode for this Resource Group Template Deployment. Possible values are `Complete` (where resources in the Resource Group not specified in the ARM Template will be destroyed) and `Incremental` (where resources are additive only). // // > **Note:** If `deploymentMode` is set to `Complete` then resources within this Resource Group which are not defined in the ARM Template will be deleted. DeploymentMode pulumi.StringOutput `pulumi:"deploymentMode"` // The name which should be used for this Resource Group Template Deployment. Changing this forces a new Resource Group Template Deployment to be created. Name pulumi.StringOutput `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent pulumi.StringOutput `pulumi:"outputContent"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. // // > An example of how to pass variables into an ARM Template can be seen in the example. ParametersContent pulumi.StringOutput `pulumi:"parametersContent"` // The name of the Resource Group where the Resource Group Template Deployment should exist. Changing this forces a new Resource Group Template Deployment to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Resource Group Template Deployment. Tags pulumi.StringMapOutput `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent pulumi.StringOutput `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrOutput `pulumi:"templateSpecVersionId"` } // NewResourceGroupTemplateDeployment registers a new resource with the given unique name, arguments, and options. func NewResourceGroupTemplateDeployment(ctx *pulumi.Context, name string, args *ResourceGroupTemplateDeploymentArgs, opts ...pulumi.ResourceOption) (*ResourceGroupTemplateDeployment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DeploymentMode == nil { return nil, errors.New("invalid value for required argument 'DeploymentMode'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:core/templateDeployment:TemplateDeployment"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceGroupTemplateDeployment err := ctx.RegisterResource("azure:core/resourceGroupTemplateDeployment:ResourceGroupTemplateDeployment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceGroupTemplateDeployment gets an existing ResourceGroupTemplateDeployment resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceGroupTemplateDeployment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceGroupTemplateDeploymentState, opts ...pulumi.ResourceOption) (*ResourceGroupTemplateDeployment, error) { var resource ResourceGroupTemplateDeployment err := ctx.ReadResource("azure:core/resourceGroupTemplateDeployment:ResourceGroupTemplateDeployment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceGroupTemplateDeployment resources. type resourceGroupTemplateDeploymentState struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel *string `pulumi:"debugLevel"` // The Deployment Mode for this Resource Group Template Deployment. Possible values are `Complete` (where resources in the Resource Group not specified in the ARM Template will be destroyed) and `Incremental` (where resources are additive only). // // > **Note:** If `deploymentMode` is set to `Complete` then resources within this Resource Group which are not defined in the ARM Template will be deleted. DeploymentMode *string `pulumi:"deploymentMode"` // The name which should be used for this Resource Group Template Deployment. Changing this forces a new Resource Group Template Deployment to be created. Name *string `pulumi:"name"` // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent *string `pulumi:"outputContent"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. // // > An example of how to pass variables into an ARM Template can be seen in the example. ParametersContent *string `pulumi:"parametersContent"` // The name of the Resource Group where the Resource Group Template Deployment should exist. Changing this forces a new Resource Group Template Deployment to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Resource Group Template Deployment. Tags map[string]string `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent *string `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"` } type ResourceGroupTemplateDeploymentState struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrInput // The Deployment Mode for this Resource Group Template Deployment. Possible values are `Complete` (where resources in the Resource Group not specified in the ARM Template will be destroyed) and `Incremental` (where resources are additive only). // // > **Note:** If `deploymentMode` is set to `Complete` then resources within this Resource Group which are not defined in the ARM Template will be deleted. DeploymentMode pulumi.StringPtrInput // The name which should be used for this Resource Group Template Deployment. Changing this forces a new Resource Group Template Deployment to be created. Name pulumi.StringPtrInput // The JSON Content of the Outputs of the ARM Template Deployment. OutputContent pulumi.StringPtrInput // The contents of the ARM Template parameters file - containing a JSON list of parameters. // // > An example of how to pass variables into an ARM Template can be seen in the example. ParametersContent pulumi.StringPtrInput // The name of the Resource Group where the Resource Group Template Deployment should exist. Changing this forces a new Resource Group Template Deployment to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Resource Group Template Deployment. Tags pulumi.StringMapInput // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent pulumi.StringPtrInput // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrInput } func (ResourceGroupTemplateDeploymentState) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupTemplateDeploymentState)(nil)).Elem() } type resourceGroupTemplateDeploymentArgs struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel *string `pulumi:"debugLevel"` // The Deployment Mode for this Resource Group Template Deployment. Possible values are `Complete` (where resources in the Resource Group not specified in the ARM Template will be destroyed) and `Incremental` (where resources are additive only). // // > **Note:** If `deploymentMode` is set to `Complete` then resources within this Resource Group which are not defined in the ARM Template will be deleted. DeploymentMode string `pulumi:"deploymentMode"` // The name which should be used for this Resource Group Template Deployment. Changing this forces a new Resource Group Template Deployment to be created. Name *string `pulumi:"name"` // The contents of the ARM Template parameters file - containing a JSON list of parameters. // // > An example of how to pass variables into an ARM Template can be seen in the example. ParametersContent *string `pulumi:"parametersContent"` // The name of the Resource Group where the Resource Group Template Deployment should exist. Changing this forces a new Resource Group Template Deployment to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Resource Group Template Deployment. Tags map[string]string `pulumi:"tags"` // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent *string `pulumi:"templateContent"` // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"` } // The set of arguments for constructing a ResourceGroupTemplateDeployment resource. type ResourceGroupTemplateDeploymentArgs struct { // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. DebugLevel pulumi.StringPtrInput // The Deployment Mode for this Resource Group Template Deployment. Possible values are `Complete` (where resources in the Resource Group not specified in the ARM Template will be destroyed) and `Incremental` (where resources are additive only). // // > **Note:** If `deploymentMode` is set to `Complete` then resources within this Resource Group which are not defined in the ARM Template will be deleted. DeploymentMode pulumi.StringInput // The name which should be used for this Resource Group Template Deployment. Changing this forces a new Resource Group Template Deployment to be created. Name pulumi.StringPtrInput // The contents of the ARM Template parameters file - containing a JSON list of parameters. // // > An example of how to pass variables into an ARM Template can be seen in the example. ParametersContent pulumi.StringPtrInput // The name of the Resource Group where the Resource Group Template Deployment should exist. Changing this forces a new Resource Group Template Deployment to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Resource Group Template Deployment. Tags pulumi.StringMapInput // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. TemplateContent pulumi.StringPtrInput // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. TemplateSpecVersionId pulumi.StringPtrInput } func (ResourceGroupTemplateDeploymentArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupTemplateDeploymentArgs)(nil)).Elem() } type ResourceGroupTemplateDeploymentInput interface { pulumi.Input ToResourceGroupTemplateDeploymentOutput() ResourceGroupTemplateDeploymentOutput ToResourceGroupTemplateDeploymentOutputWithContext(ctx context.Context) ResourceGroupTemplateDeploymentOutput } func (*ResourceGroupTemplateDeployment) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupTemplateDeployment)(nil)).Elem() } func (i *ResourceGroupTemplateDeployment) ToResourceGroupTemplateDeploymentOutput() ResourceGroupTemplateDeploymentOutput { return i.ToResourceGroupTemplateDeploymentOutputWithContext(context.Background()) } func (i *ResourceGroupTemplateDeployment) ToResourceGroupTemplateDeploymentOutputWithContext(ctx context.Context) ResourceGroupTemplateDeploymentOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupTemplateDeploymentOutput) } // ResourceGroupTemplateDeploymentArrayInput is an input type that accepts ResourceGroupTemplateDeploymentArray and ResourceGroupTemplateDeploymentArrayOutput values. // You can construct a concrete instance of `ResourceGroupTemplateDeploymentArrayInput` via: // // ResourceGroupTemplateDeploymentArray{ ResourceGroupTemplateDeploymentArgs{...} } type ResourceGroupTemplateDeploymentArrayInput interface { pulumi.Input ToResourceGroupTemplateDeploymentArrayOutput() ResourceGroupTemplateDeploymentArrayOutput ToResourceGroupTemplateDeploymentArrayOutputWithContext(context.Context) ResourceGroupTemplateDeploymentArrayOutput } type ResourceGroupTemplateDeploymentArray []ResourceGroupTemplateDeploymentInput func (ResourceGroupTemplateDeploymentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupTemplateDeployment)(nil)).Elem() } func (i ResourceGroupTemplateDeploymentArray) ToResourceGroupTemplateDeploymentArrayOutput() ResourceGroupTemplateDeploymentArrayOutput { return i.ToResourceGroupTemplateDeploymentArrayOutputWithContext(context.Background()) } func (i ResourceGroupTemplateDeploymentArray) ToResourceGroupTemplateDeploymentArrayOutputWithContext(ctx context.Context) ResourceGroupTemplateDeploymentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupTemplateDeploymentArrayOutput) } // ResourceGroupTemplateDeploymentMapInput is an input type that accepts ResourceGroupTemplateDeploymentMap and ResourceGroupTemplateDeploymentMapOutput values. // You can construct a concrete instance of `ResourceGroupTemplateDeploymentMapInput` via: // // ResourceGroupTemplateDeploymentMap{ "key": ResourceGroupTemplateDeploymentArgs{...} } type ResourceGroupTemplateDeploymentMapInput interface { pulumi.Input ToResourceGroupTemplateDeploymentMapOutput() ResourceGroupTemplateDeploymentMapOutput ToResourceGroupTemplateDeploymentMapOutputWithContext(context.Context) ResourceGroupTemplateDeploymentMapOutput } type ResourceGroupTemplateDeploymentMap map[string]ResourceGroupTemplateDeploymentInput func (ResourceGroupTemplateDeploymentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupTemplateDeployment)(nil)).Elem() } func (i ResourceGroupTemplateDeploymentMap) ToResourceGroupTemplateDeploymentMapOutput() ResourceGroupTemplateDeploymentMapOutput { return i.ToResourceGroupTemplateDeploymentMapOutputWithContext(context.Background()) } func (i ResourceGroupTemplateDeploymentMap) ToResourceGroupTemplateDeploymentMapOutputWithContext(ctx context.Context) ResourceGroupTemplateDeploymentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupTemplateDeploymentMapOutput) } type ResourceGroupTemplateDeploymentOutput struct{ *pulumi.OutputState } func (ResourceGroupTemplateDeploymentOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroupTemplateDeployment)(nil)).Elem() } func (o ResourceGroupTemplateDeploymentOutput) ToResourceGroupTemplateDeploymentOutput() ResourceGroupTemplateDeploymentOutput { return o } func (o ResourceGroupTemplateDeploymentOutput) ToResourceGroupTemplateDeploymentOutputWithContext(ctx context.Context) ResourceGroupTemplateDeploymentOutput { return o } // The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`. func (o ResourceGroupTemplateDeploymentOutput) DebugLevel() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringPtrOutput { return v.DebugLevel }).(pulumi.StringPtrOutput) } // The Deployment Mode for this Resource Group Template Deployment. Possible values are `Complete` (where resources in the Resource Group not specified in the ARM Template will be destroyed) and `Incremental` (where resources are additive only). // // > **Note:** If `deploymentMode` is set to `Complete` then resources within this Resource Group which are not defined in the ARM Template will be deleted. func (o ResourceGroupTemplateDeploymentOutput) DeploymentMode() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringOutput { return v.DeploymentMode }).(pulumi.StringOutput) } // The name which should be used for this Resource Group Template Deployment. Changing this forces a new Resource Group Template Deployment to be created. func (o ResourceGroupTemplateDeploymentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The JSON Content of the Outputs of the ARM Template Deployment. func (o ResourceGroupTemplateDeploymentOutput) OutputContent() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringOutput { return v.OutputContent }).(pulumi.StringOutput) } // The contents of the ARM Template parameters file - containing a JSON list of parameters. // // > An example of how to pass variables into an ARM Template can be seen in the example. func (o ResourceGroupTemplateDeploymentOutput) ParametersContent() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringOutput { return v.ParametersContent }).(pulumi.StringOutput) } // The name of the Resource Group where the Resource Group Template Deployment should exist. Changing this forces a new Resource Group Template Deployment to be created. func (o ResourceGroupTemplateDeploymentOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Resource Group Template Deployment. func (o ResourceGroupTemplateDeploymentOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`. func (o ResourceGroupTemplateDeploymentOutput) TemplateContent() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringOutput { return v.TemplateContent }).(pulumi.StringOutput) } // The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`. func (o ResourceGroupTemplateDeploymentOutput) TemplateSpecVersionId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroupTemplateDeployment) pulumi.StringPtrOutput { return v.TemplateSpecVersionId }).(pulumi.StringPtrOutput) } type ResourceGroupTemplateDeploymentArrayOutput struct{ *pulumi.OutputState } func (ResourceGroupTemplateDeploymentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroupTemplateDeployment)(nil)).Elem() } func (o ResourceGroupTemplateDeploymentArrayOutput) ToResourceGroupTemplateDeploymentArrayOutput() ResourceGroupTemplateDeploymentArrayOutput { return o } func (o ResourceGroupTemplateDeploymentArrayOutput) ToResourceGroupTemplateDeploymentArrayOutputWithContext(ctx context.Context) ResourceGroupTemplateDeploymentArrayOutput { return o } func (o ResourceGroupTemplateDeploymentArrayOutput) Index(i pulumi.IntInput) ResourceGroupTemplateDeploymentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGroupTemplateDeployment { return vs[0].([]*ResourceGroupTemplateDeployment)[vs[1].(int)] }).(ResourceGroupTemplateDeploymentOutput) } type ResourceGroupTemplateDeploymentMapOutput struct{ *pulumi.OutputState } func (ResourceGroupTemplateDeploymentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroupTemplateDeployment)(nil)).Elem() } func (o ResourceGroupTemplateDeploymentMapOutput) ToResourceGroupTemplateDeploymentMapOutput() ResourceGroupTemplateDeploymentMapOutput { return o } func (o ResourceGroupTemplateDeploymentMapOutput) ToResourceGroupTemplateDeploymentMapOutputWithContext(ctx context.Context) ResourceGroupTemplateDeploymentMapOutput { return o } func (o ResourceGroupTemplateDeploymentMapOutput) MapIndex(k pulumi.StringInput) ResourceGroupTemplateDeploymentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGroupTemplateDeployment { return vs[0].(map[string]*ResourceGroupTemplateDeployment)[vs[1].(string)] }).(ResourceGroupTemplateDeploymentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupTemplateDeploymentInput)(nil)).Elem(), &ResourceGroupTemplateDeployment{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupTemplateDeploymentArrayInput)(nil)).Elem(), ResourceGroupTemplateDeploymentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupTemplateDeploymentMapInput)(nil)).Elem(), ResourceGroupTemplateDeploymentMap{}) pulumi.RegisterOutputType(ResourceGroupTemplateDeploymentOutput{}) pulumi.RegisterOutputType(ResourceGroupTemplateDeploymentArrayOutput{}) pulumi.RegisterOutputType(ResourceGroupTemplateDeploymentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/getResources.go
sdk/go/azure/core/getResources.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about existing resources. func GetResources(ctx *pulumi.Context, args *GetResourcesArgs, opts ...pulumi.InvokeOption) (*GetResourcesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetResourcesResult err := ctx.Invoke("azure:core/getResources:getResources", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getResources. type GetResourcesArgs struct { // The name of the Resource. Name *string `pulumi:"name"` // A mapping of tags which the resource has to have in order to be included in the result. RequiredTags map[string]string `pulumi:"requiredTags"` // The name of the Resource group where the Resources are located. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Resource Type of the Resources you want to list (e.g. `Microsoft.Network/virtualNetworks`). A resource type's name follows the format: `{resource-provider}/{resource-type}`. The resource type for a key vault is `Microsoft.KeyVault/vaults`. A full list of available Resource Providers can be found [here](https://docs.microsoft.com/azure/azure-resource-manager/azure-services-resource-providers). A full list of Resources Types can be found [here](https://learn.microsoft.com/en-us/azure/templates/#find-resources). Type *string `pulumi:"type"` } // A collection of values returned by getResources. type GetResourcesResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The name of this Resource. Name string `pulumi:"name"` RequiredTags map[string]string `pulumi:"requiredTags"` // The name of the Resource Group in which this Resource exists. ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `resource` blocks as defined below. Resources []GetResourcesResource `pulumi:"resources"` // The type of this Resource. (e.g. `Microsoft.Network/virtualNetworks`). Type string `pulumi:"type"` } func GetResourcesOutput(ctx *pulumi.Context, args GetResourcesOutputArgs, opts ...pulumi.InvokeOption) GetResourcesResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetResourcesResultOutput, error) { args := v.(GetResourcesArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:core/getResources:getResources", args, GetResourcesResultOutput{}, options).(GetResourcesResultOutput), nil }).(GetResourcesResultOutput) } // A collection of arguments for invoking getResources. type GetResourcesOutputArgs struct { // The name of the Resource. Name pulumi.StringPtrInput `pulumi:"name"` // A mapping of tags which the resource has to have in order to be included in the result. RequiredTags pulumi.StringMapInput `pulumi:"requiredTags"` // The name of the Resource group where the Resources are located. ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"` // The Resource Type of the Resources you want to list (e.g. `Microsoft.Network/virtualNetworks`). A resource type's name follows the format: `{resource-provider}/{resource-type}`. The resource type for a key vault is `Microsoft.KeyVault/vaults`. A full list of available Resource Providers can be found [here](https://docs.microsoft.com/azure/azure-resource-manager/azure-services-resource-providers). A full list of Resources Types can be found [here](https://learn.microsoft.com/en-us/azure/templates/#find-resources). Type pulumi.StringPtrInput `pulumi:"type"` } func (GetResourcesOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetResourcesArgs)(nil)).Elem() } // A collection of values returned by getResources. type GetResourcesResultOutput struct{ *pulumi.OutputState } func (GetResourcesResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetResourcesResult)(nil)).Elem() } func (o GetResourcesResultOutput) ToGetResourcesResultOutput() GetResourcesResultOutput { return o } func (o GetResourcesResultOutput) ToGetResourcesResultOutputWithContext(ctx context.Context) GetResourcesResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetResourcesResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetResourcesResult) string { return v.Id }).(pulumi.StringOutput) } // The name of this Resource. func (o GetResourcesResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetResourcesResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetResourcesResultOutput) RequiredTags() pulumi.StringMapOutput { return o.ApplyT(func(v GetResourcesResult) map[string]string { return v.RequiredTags }).(pulumi.StringMapOutput) } // The name of the Resource Group in which this Resource exists. func (o GetResourcesResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetResourcesResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `resource` blocks as defined below. func (o GetResourcesResultOutput) Resources() GetResourcesResourceArrayOutput { return o.ApplyT(func(v GetResourcesResult) []GetResourcesResource { return v.Resources }).(GetResourcesResourceArrayOutput) } // The type of this Resource. (e.g. `Microsoft.Network/virtualNetworks`). func (o GetResourcesResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetResourcesResult) string { return v.Type }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetResourcesResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourcePolicyAssignment.go
sdk/go/azure/core/resourcePolicyAssignment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Policy Assignment to a Resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualNetwork(ctx, &network.LookupVirtualNetworkArgs{ // Name: "production", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // exampleDefinition, err := policy.NewDefinition(ctx, "example", &policy.DefinitionArgs{ // Name: pulumi.String("only-deploy-in-westeurope"), // PolicyType: pulumi.String("Custom"), // Mode: pulumi.String("All"), // DisplayName: pulumi.String("my-policy-definition"), // PolicyRule: pulumi.String(` { // "if": { // "not": { // "field": "location", // "equals": "westeurope" // } // }, // "then": { // "effect": "Deny" // } // } // // `), // // }) // if err != nil { // return err // } // _, err = core.NewResourcePolicyAssignment(ctx, "example", &core.ResourcePolicyAssignmentArgs{ // Name: pulumi.String("example-policy-assignment"), // ResourceId: pulumi.String(example.Id), // PolicyDefinitionId: exampleDefinition.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2022-06-01 // // ## Import // // Resource Policy Assignments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourcePolicyAssignment:ResourcePolicyAssignment example "{resource}/providers/Microsoft.Authorization/policyAssignments/assignment1" // ``` // // where `{resource}` is a Resource ID in the form `/subscriptions/00000000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/network1`. type ResourcePolicyAssignment struct { pulumi.CustomResourceState // A description which should be used for this Policy Assignment. Description pulumi.StringPtrOutput `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrOutput `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity ResourcePolicyAssignmentIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringOutput `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringOutput `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Resource Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringOutput `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages ResourcePolicyAssignmentNonComplianceMessageArrayOutput `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayOutput `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides ResourcePolicyAssignmentOverrideArrayOutput `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrOutput `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringOutput `pulumi:"policyDefinitionId"` // The ID of the Resource (or Resource Scope) where this should be applied. Changing this forces a new Resource Policy Assignment to be created. // // > **Note:** To create a Policy Assignment at a Management Group use the `management.GroupPolicyAssignment` resource, for a Resource Group use the `core.ResourceGroupPolicyAssignment` and for a Subscription use the `core.SubscriptionPolicyAssignment` resource. ResourceId pulumi.StringOutput `pulumi:"resourceId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors ResourcePolicyAssignmentResourceSelectorArrayOutput `pulumi:"resourceSelectors"` } // NewResourcePolicyAssignment registers a new resource with the given unique name, arguments, and options. func NewResourcePolicyAssignment(ctx *pulumi.Context, name string, args *ResourcePolicyAssignmentArgs, opts ...pulumi.ResourceOption) (*ResourcePolicyAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyDefinitionId == nil { return nil, errors.New("invalid value for required argument 'PolicyDefinitionId'") } if args.ResourceId == nil { return nil, errors.New("invalid value for required argument 'ResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourcePolicyAssignment err := ctx.RegisterResource("azure:core/resourcePolicyAssignment:ResourcePolicyAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourcePolicyAssignment gets an existing ResourcePolicyAssignment resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourcePolicyAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourcePolicyAssignmentState, opts ...pulumi.ResourceOption) (*ResourcePolicyAssignment, error) { var resource ResourcePolicyAssignment err := ctx.ReadResource("azure:core/resourcePolicyAssignment:ResourcePolicyAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourcePolicyAssignment resources. type resourcePolicyAssignmentState struct { // A description which should be used for this Policy Assignment. Description *string `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName *string `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce *bool `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity *ResourcePolicyAssignmentIdentity `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location *string `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Resource Policy Assignment to be created. Cannot exceed 64 characters in length. Name *string `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages []ResourcePolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes []string `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides []ResourcePolicyAssignmentOverride `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters *string `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId *string `pulumi:"policyDefinitionId"` // The ID of the Resource (or Resource Scope) where this should be applied. Changing this forces a new Resource Policy Assignment to be created. // // > **Note:** To create a Policy Assignment at a Management Group use the `management.GroupPolicyAssignment` resource, for a Resource Group use the `core.ResourceGroupPolicyAssignment` and for a Subscription use the `core.SubscriptionPolicyAssignment` resource. ResourceId *string `pulumi:"resourceId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors []ResourcePolicyAssignmentResourceSelector `pulumi:"resourceSelectors"` } type ResourcePolicyAssignmentState struct { // A description which should be used for this Policy Assignment. Description pulumi.StringPtrInput // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrInput // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrInput // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity ResourcePolicyAssignmentIdentityPtrInput // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringPtrInput // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Assignment. Changing this forces a new Resource Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringPtrInput // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages ResourcePolicyAssignmentNonComplianceMessageArrayInput // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayInput // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides ResourcePolicyAssignmentOverrideArrayInput // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrInput // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringPtrInput // The ID of the Resource (or Resource Scope) where this should be applied. Changing this forces a new Resource Policy Assignment to be created. // // > **Note:** To create a Policy Assignment at a Management Group use the `management.GroupPolicyAssignment` resource, for a Resource Group use the `core.ResourceGroupPolicyAssignment` and for a Subscription use the `core.SubscriptionPolicyAssignment` resource. ResourceId pulumi.StringPtrInput // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors ResourcePolicyAssignmentResourceSelectorArrayInput } func (ResourcePolicyAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*resourcePolicyAssignmentState)(nil)).Elem() } type resourcePolicyAssignmentArgs struct { // A description which should be used for this Policy Assignment. Description *string `pulumi:"description"` // The Display Name for this Policy Assignment. DisplayName *string `pulumi:"displayName"` // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce *bool `pulumi:"enforce"` // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity *ResourcePolicyAssignmentIdentity `pulumi:"identity"` // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location *string `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Assignment. Changing this forces a new Resource Policy Assignment to be created. Cannot exceed 64 characters in length. Name *string `pulumi:"name"` // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages []ResourcePolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"` // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes []string `pulumi:"notScopes"` // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides []ResourcePolicyAssignmentOverride `pulumi:"overrides"` // A JSON mapping of any Parameters for this Policy. Parameters *string `pulumi:"parameters"` // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId string `pulumi:"policyDefinitionId"` // The ID of the Resource (or Resource Scope) where this should be applied. Changing this forces a new Resource Policy Assignment to be created. // // > **Note:** To create a Policy Assignment at a Management Group use the `management.GroupPolicyAssignment` resource, for a Resource Group use the `core.ResourceGroupPolicyAssignment` and for a Subscription use the `core.SubscriptionPolicyAssignment` resource. ResourceId string `pulumi:"resourceId"` // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors []ResourcePolicyAssignmentResourceSelector `pulumi:"resourceSelectors"` } // The set of arguments for constructing a ResourcePolicyAssignment resource. type ResourcePolicyAssignmentArgs struct { // A description which should be used for this Policy Assignment. Description pulumi.StringPtrInput // The Display Name for this Policy Assignment. DisplayName pulumi.StringPtrInput // Specifies if this Policy should be enforced or not? Defaults to `true`. Enforce pulumi.BoolPtrInput // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. Identity ResourcePolicyAssignmentIdentityPtrInput // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. Location pulumi.StringPtrInput // A JSON mapping of any Metadata for this Policy. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Assignment. Changing this forces a new Resource Policy Assignment to be created. Cannot exceed 64 characters in length. Name pulumi.StringPtrInput // One or more `nonComplianceMessage` blocks as defined below. NonComplianceMessages ResourcePolicyAssignmentNonComplianceMessageArrayInput // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. NotScopes pulumi.StringArrayInput // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) Overrides ResourcePolicyAssignmentOverrideArrayInput // A JSON mapping of any Parameters for this Policy. Parameters pulumi.StringPtrInput // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. PolicyDefinitionId pulumi.StringInput // The ID of the Resource (or Resource Scope) where this should be applied. Changing this forces a new Resource Policy Assignment to be created. // // > **Note:** To create a Policy Assignment at a Management Group use the `management.GroupPolicyAssignment` resource, for a Resource Group use the `core.ResourceGroupPolicyAssignment` and for a Subscription use the `core.SubscriptionPolicyAssignment` resource. ResourceId pulumi.StringInput // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. ResourceSelectors ResourcePolicyAssignmentResourceSelectorArrayInput } func (ResourcePolicyAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourcePolicyAssignmentArgs)(nil)).Elem() } type ResourcePolicyAssignmentInput interface { pulumi.Input ToResourcePolicyAssignmentOutput() ResourcePolicyAssignmentOutput ToResourcePolicyAssignmentOutputWithContext(ctx context.Context) ResourcePolicyAssignmentOutput } func (*ResourcePolicyAssignment) ElementType() reflect.Type { return reflect.TypeOf((**ResourcePolicyAssignment)(nil)).Elem() } func (i *ResourcePolicyAssignment) ToResourcePolicyAssignmentOutput() ResourcePolicyAssignmentOutput { return i.ToResourcePolicyAssignmentOutputWithContext(context.Background()) } func (i *ResourcePolicyAssignment) ToResourcePolicyAssignmentOutputWithContext(ctx context.Context) ResourcePolicyAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyAssignmentOutput) } // ResourcePolicyAssignmentArrayInput is an input type that accepts ResourcePolicyAssignmentArray and ResourcePolicyAssignmentArrayOutput values. // You can construct a concrete instance of `ResourcePolicyAssignmentArrayInput` via: // // ResourcePolicyAssignmentArray{ ResourcePolicyAssignmentArgs{...} } type ResourcePolicyAssignmentArrayInput interface { pulumi.Input ToResourcePolicyAssignmentArrayOutput() ResourcePolicyAssignmentArrayOutput ToResourcePolicyAssignmentArrayOutputWithContext(context.Context) ResourcePolicyAssignmentArrayOutput } type ResourcePolicyAssignmentArray []ResourcePolicyAssignmentInput func (ResourcePolicyAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourcePolicyAssignment)(nil)).Elem() } func (i ResourcePolicyAssignmentArray) ToResourcePolicyAssignmentArrayOutput() ResourcePolicyAssignmentArrayOutput { return i.ToResourcePolicyAssignmentArrayOutputWithContext(context.Background()) } func (i ResourcePolicyAssignmentArray) ToResourcePolicyAssignmentArrayOutputWithContext(ctx context.Context) ResourcePolicyAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyAssignmentArrayOutput) } // ResourcePolicyAssignmentMapInput is an input type that accepts ResourcePolicyAssignmentMap and ResourcePolicyAssignmentMapOutput values. // You can construct a concrete instance of `ResourcePolicyAssignmentMapInput` via: // // ResourcePolicyAssignmentMap{ "key": ResourcePolicyAssignmentArgs{...} } type ResourcePolicyAssignmentMapInput interface { pulumi.Input ToResourcePolicyAssignmentMapOutput() ResourcePolicyAssignmentMapOutput ToResourcePolicyAssignmentMapOutputWithContext(context.Context) ResourcePolicyAssignmentMapOutput } type ResourcePolicyAssignmentMap map[string]ResourcePolicyAssignmentInput func (ResourcePolicyAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourcePolicyAssignment)(nil)).Elem() } func (i ResourcePolicyAssignmentMap) ToResourcePolicyAssignmentMapOutput() ResourcePolicyAssignmentMapOutput { return i.ToResourcePolicyAssignmentMapOutputWithContext(context.Background()) } func (i ResourcePolicyAssignmentMap) ToResourcePolicyAssignmentMapOutputWithContext(ctx context.Context) ResourcePolicyAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourcePolicyAssignmentMapOutput) } type ResourcePolicyAssignmentOutput struct{ *pulumi.OutputState } func (ResourcePolicyAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourcePolicyAssignment)(nil)).Elem() } func (o ResourcePolicyAssignmentOutput) ToResourcePolicyAssignmentOutput() ResourcePolicyAssignmentOutput { return o } func (o ResourcePolicyAssignmentOutput) ToResourcePolicyAssignmentOutputWithContext(ctx context.Context) ResourcePolicyAssignmentOutput { return o } // A description which should be used for this Policy Assignment. func (o ResourcePolicyAssignmentOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The Display Name for this Policy Assignment. func (o ResourcePolicyAssignmentOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) } // Specifies if this Policy should be enforced or not? Defaults to `true`. func (o ResourcePolicyAssignmentOutput) Enforce() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.BoolPtrOutput { return v.Enforce }).(pulumi.BoolPtrOutput) } // An `identity` block as defined below. // // > **Note:** The `location` field must also be specified when `identity` is specified. func (o ResourcePolicyAssignmentOutput) Identity() ResourcePolicyAssignmentIdentityPtrOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) ResourcePolicyAssignmentIdentityPtrOutput { return v.Identity }).(ResourcePolicyAssignmentIdentityPtrOutput) } // The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created. func (o ResourcePolicyAssignmentOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A JSON mapping of any Metadata for this Policy. func (o ResourcePolicyAssignmentOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The name which should be used for this Policy Assignment. Changing this forces a new Resource Policy Assignment to be created. Cannot exceed 64 characters in length. func (o ResourcePolicyAssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `nonComplianceMessage` blocks as defined below. func (o ResourcePolicyAssignmentOutput) NonComplianceMessages() ResourcePolicyAssignmentNonComplianceMessageArrayOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) ResourcePolicyAssignmentNonComplianceMessageArrayOutput { return v.NonComplianceMessages }).(ResourcePolicyAssignmentNonComplianceMessageArrayOutput) } // Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy. func (o ResourcePolicyAssignmentOutput) NotScopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringArrayOutput { return v.NotScopes }).(pulumi.StringArrayOutput) } // One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure) func (o ResourcePolicyAssignmentOutput) Overrides() ResourcePolicyAssignmentOverrideArrayOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) ResourcePolicyAssignmentOverrideArrayOutput { return v.Overrides }).(ResourcePolicyAssignmentOverrideArrayOutput) } // A JSON mapping of any Parameters for this Policy. func (o ResourcePolicyAssignmentOutput) Parameters() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringPtrOutput { return v.Parameters }).(pulumi.StringPtrOutput) } // The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. func (o ResourcePolicyAssignmentOutput) PolicyDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringOutput { return v.PolicyDefinitionId }).(pulumi.StringOutput) } // The ID of the Resource (or Resource Scope) where this should be applied. Changing this forces a new Resource Policy Assignment to be created. // // > **Note:** To create a Policy Assignment at a Management Group use the `management.GroupPolicyAssignment` resource, for a Resource Group use the `core.ResourceGroupPolicyAssignment` and for a Subscription use the `core.SubscriptionPolicyAssignment` resource. func (o ResourcePolicyAssignmentOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) } // One or more `resourceSelectors` blocks as defined below to filter polices by resource properties. func (o ResourcePolicyAssignmentOutput) ResourceSelectors() ResourcePolicyAssignmentResourceSelectorArrayOutput { return o.ApplyT(func(v *ResourcePolicyAssignment) ResourcePolicyAssignmentResourceSelectorArrayOutput { return v.ResourceSelectors }).(ResourcePolicyAssignmentResourceSelectorArrayOutput) } type ResourcePolicyAssignmentArrayOutput struct{ *pulumi.OutputState } func (ResourcePolicyAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourcePolicyAssignment)(nil)).Elem() } func (o ResourcePolicyAssignmentArrayOutput) ToResourcePolicyAssignmentArrayOutput() ResourcePolicyAssignmentArrayOutput { return o } func (o ResourcePolicyAssignmentArrayOutput) ToResourcePolicyAssignmentArrayOutputWithContext(ctx context.Context) ResourcePolicyAssignmentArrayOutput { return o } func (o ResourcePolicyAssignmentArrayOutput) Index(i pulumi.IntInput) ResourcePolicyAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourcePolicyAssignment { return vs[0].([]*ResourcePolicyAssignment)[vs[1].(int)] }).(ResourcePolicyAssignmentOutput) } type ResourcePolicyAssignmentMapOutput struct{ *pulumi.OutputState } func (ResourcePolicyAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourcePolicyAssignment)(nil)).Elem() } func (o ResourcePolicyAssignmentMapOutput) ToResourcePolicyAssignmentMapOutput() ResourcePolicyAssignmentMapOutput { return o } func (o ResourcePolicyAssignmentMapOutput) ToResourcePolicyAssignmentMapOutputWithContext(ctx context.Context) ResourcePolicyAssignmentMapOutput { return o } func (o ResourcePolicyAssignmentMapOutput) MapIndex(k pulumi.StringInput) ResourcePolicyAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourcePolicyAssignment { return vs[0].(map[string]*ResourcePolicyAssignment)[vs[1].(string)] }).(ResourcePolicyAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyAssignmentInput)(nil)).Elem(), &ResourcePolicyAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyAssignmentArrayInput)(nil)).Elem(), ResourcePolicyAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourcePolicyAssignmentMapInput)(nil)).Elem(), ResourcePolicyAssignmentMap{}) pulumi.RegisterOutputType(ResourcePolicyAssignmentOutput{}) pulumi.RegisterOutputType(ResourcePolicyAssignmentArrayOutput{}) pulumi.RegisterOutputType(ResourcePolicyAssignmentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/core/resourceGroup.go
sdk/go/azure/core/resourceGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package core import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Resource Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:core/resourceGroup:ResourceGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1 // ``` type ResourceGroup struct { pulumi.CustomResourceState // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location pulumi.StringOutput `pulumi:"location"` // The ID of the resource or application that manages this Resource Group. ManagedBy pulumi.StringPtrOutput `pulumi:"managedBy"` // The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name pulumi.StringOutput `pulumi:"name"` // A mapping of tags which should be assigned to the Resource Group. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewResourceGroup registers a new resource with the given unique name, arguments, and options. func NewResourceGroup(ctx *pulumi.Context, name string, args *ResourceGroupArgs, opts ...pulumi.ResourceOption) (*ResourceGroup, error) { if args == nil { args = &ResourceGroupArgs{} } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceGroup err := ctx.RegisterResource("azure:core/resourceGroup:ResourceGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceGroup gets an existing ResourceGroup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetResourceGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceGroupState, opts ...pulumi.ResourceOption) (*ResourceGroup, error) { var resource ResourceGroup err := ctx.ReadResource("azure:core/resourceGroup:ResourceGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceGroup resources. type resourceGroupState struct { // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location *string `pulumi:"location"` // The ID of the resource or application that manages this Resource Group. ManagedBy *string `pulumi:"managedBy"` // The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name *string `pulumi:"name"` // A mapping of tags which should be assigned to the Resource Group. Tags map[string]string `pulumi:"tags"` } type ResourceGroupState struct { // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location pulumi.StringPtrInput // The ID of the resource or application that manages this Resource Group. ManagedBy pulumi.StringPtrInput // The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name pulumi.StringPtrInput // A mapping of tags which should be assigned to the Resource Group. Tags pulumi.StringMapInput } func (ResourceGroupState) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupState)(nil)).Elem() } type resourceGroupArgs struct { // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location *string `pulumi:"location"` // The ID of the resource or application that manages this Resource Group. ManagedBy *string `pulumi:"managedBy"` // The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name *string `pulumi:"name"` // A mapping of tags which should be assigned to the Resource Group. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ResourceGroup resource. type ResourceGroupArgs struct { // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location pulumi.StringPtrInput // The ID of the resource or application that manages this Resource Group. ManagedBy pulumi.StringPtrInput // The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name pulumi.StringPtrInput // A mapping of tags which should be assigned to the Resource Group. Tags pulumi.StringMapInput } func (ResourceGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceGroupArgs)(nil)).Elem() } type ResourceGroupInput interface { pulumi.Input ToResourceGroupOutput() ResourceGroupOutput ToResourceGroupOutputWithContext(ctx context.Context) ResourceGroupOutput } func (*ResourceGroup) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroup)(nil)).Elem() } func (i *ResourceGroup) ToResourceGroupOutput() ResourceGroupOutput { return i.ToResourceGroupOutputWithContext(context.Background()) } func (i *ResourceGroup) ToResourceGroupOutputWithContext(ctx context.Context) ResourceGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupOutput) } // ResourceGroupArrayInput is an input type that accepts ResourceGroupArray and ResourceGroupArrayOutput values. // You can construct a concrete instance of `ResourceGroupArrayInput` via: // // ResourceGroupArray{ ResourceGroupArgs{...} } type ResourceGroupArrayInput interface { pulumi.Input ToResourceGroupArrayOutput() ResourceGroupArrayOutput ToResourceGroupArrayOutputWithContext(context.Context) ResourceGroupArrayOutput } type ResourceGroupArray []ResourceGroupInput func (ResourceGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroup)(nil)).Elem() } func (i ResourceGroupArray) ToResourceGroupArrayOutput() ResourceGroupArrayOutput { return i.ToResourceGroupArrayOutputWithContext(context.Background()) } func (i ResourceGroupArray) ToResourceGroupArrayOutputWithContext(ctx context.Context) ResourceGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupArrayOutput) } // ResourceGroupMapInput is an input type that accepts ResourceGroupMap and ResourceGroupMapOutput values. // You can construct a concrete instance of `ResourceGroupMapInput` via: // // ResourceGroupMap{ "key": ResourceGroupArgs{...} } type ResourceGroupMapInput interface { pulumi.Input ToResourceGroupMapOutput() ResourceGroupMapOutput ToResourceGroupMapOutputWithContext(context.Context) ResourceGroupMapOutput } type ResourceGroupMap map[string]ResourceGroupInput func (ResourceGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroup)(nil)).Elem() } func (i ResourceGroupMap) ToResourceGroupMapOutput() ResourceGroupMapOutput { return i.ToResourceGroupMapOutputWithContext(context.Background()) } func (i ResourceGroupMap) ToResourceGroupMapOutputWithContext(ctx context.Context) ResourceGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceGroupMapOutput) } type ResourceGroupOutput struct{ *pulumi.OutputState } func (ResourceGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceGroup)(nil)).Elem() } func (o ResourceGroupOutput) ToResourceGroupOutput() ResourceGroupOutput { return o } func (o ResourceGroupOutput) ToResourceGroupOutputWithContext(ctx context.Context) ResourceGroupOutput { return o } // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. func (o ResourceGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The ID of the resource or application that manages this Resource Group. func (o ResourceGroupOutput) ManagedBy() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceGroup) pulumi.StringPtrOutput { return v.ManagedBy }).(pulumi.StringPtrOutput) } // The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. func (o ResourceGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Resource Group. func (o ResourceGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ResourceGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ResourceGroupArrayOutput struct{ *pulumi.OutputState } func (ResourceGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceGroup)(nil)).Elem() } func (o ResourceGroupArrayOutput) ToResourceGroupArrayOutput() ResourceGroupArrayOutput { return o } func (o ResourceGroupArrayOutput) ToResourceGroupArrayOutputWithContext(ctx context.Context) ResourceGroupArrayOutput { return o } func (o ResourceGroupArrayOutput) Index(i pulumi.IntInput) ResourceGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceGroup { return vs[0].([]*ResourceGroup)[vs[1].(int)] }).(ResourceGroupOutput) } type ResourceGroupMapOutput struct{ *pulumi.OutputState } func (ResourceGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceGroup)(nil)).Elem() } func (o ResourceGroupMapOutput) ToResourceGroupMapOutput() ResourceGroupMapOutput { return o } func (o ResourceGroupMapOutput) ToResourceGroupMapOutputWithContext(ctx context.Context) ResourceGroupMapOutput { return o } func (o ResourceGroupMapOutput) MapIndex(k pulumi.StringInput) ResourceGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceGroup { return vs[0].(map[string]*ResourceGroup)[vs[1].(string)] }).(ResourceGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupInput)(nil)).Elem(), &ResourceGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupArrayInput)(nil)).Elem(), ResourceGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceGroupMapInput)(nil)).Elem(), ResourceGroupMap{}) pulumi.RegisterOutputType(ResourceGroupOutput{}) pulumi.RegisterOutputType(ResourceGroupArrayOutput{}) pulumi.RegisterOutputType(ResourceGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/proximity/placementGroup.go
sdk/go/azure/proximity/placementGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package proximity import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a proximity placement group for virtual machines, virtual machine scale sets and availability sets. // // ## 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/proximity" // "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 = proximity.NewPlacementGroup(ctx, "example", &proximity.PlacementGroupArgs{ // Name: pulumi.String("exampleProximityPlacementGroup"), // Location: example.Location, // ResourceGroupName: example.Name, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Compute` - 2022-03-01 // // ## Import // // Proximity Placement Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:proximity/placementGroup:PlacementGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Compute/proximityPlacementGroups/example-ppg // ``` type PlacementGroup struct { pulumi.CustomResourceState // Specifies the supported sizes of Virtual Machines that can be created in the Proximity Placement Group. // // > **Note:** Removing `allowedVmSizes` after it is set forces a new resource to be created. AllowedVmSizes pulumi.StringArrayOutput `pulumi:"allowedVmSizes"` // 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 proximity placement group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the availability set. 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"` // Specifies the supported zone of the Proximity Placement Group. Changing this forces a new resource to be created. // // > **Note:** `allowedVmSizes` must be set when `zone` is specified. Zone pulumi.StringPtrOutput `pulumi:"zone"` } // NewPlacementGroup registers a new resource with the given unique name, arguments, and options. func NewPlacementGroup(ctx *pulumi.Context, name string, args *PlacementGroupArgs, opts ...pulumi.ResourceOption) (*PlacementGroup, 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 PlacementGroup err := ctx.RegisterResource("azure:proximity/placementGroup:PlacementGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPlacementGroup gets an existing PlacementGroup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetPlacementGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PlacementGroupState, opts ...pulumi.ResourceOption) (*PlacementGroup, error) { var resource PlacementGroup err := ctx.ReadResource("azure:proximity/placementGroup:PlacementGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PlacementGroup resources. type placementGroupState struct { // Specifies the supported sizes of Virtual Machines that can be created in the Proximity Placement Group. // // > **Note:** Removing `allowedVmSizes` after it is set forces a new resource to be created. AllowedVmSizes []string `pulumi:"allowedVmSizes"` // 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 proximity placement group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the availability set. 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"` // Specifies the supported zone of the Proximity Placement Group. Changing this forces a new resource to be created. // // > **Note:** `allowedVmSizes` must be set when `zone` is specified. Zone *string `pulumi:"zone"` } type PlacementGroupState struct { // Specifies the supported sizes of Virtual Machines that can be created in the Proximity Placement Group. // // > **Note:** Removing `allowedVmSizes` after it is set forces a new resource to be created. AllowedVmSizes 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 the proximity placement group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the availability set. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the supported zone of the Proximity Placement Group. Changing this forces a new resource to be created. // // > **Note:** `allowedVmSizes` must be set when `zone` is specified. Zone pulumi.StringPtrInput } func (PlacementGroupState) ElementType() reflect.Type { return reflect.TypeOf((*placementGroupState)(nil)).Elem() } type placementGroupArgs struct { // Specifies the supported sizes of Virtual Machines that can be created in the Proximity Placement Group. // // > **Note:** Removing `allowedVmSizes` after it is set forces a new resource to be created. AllowedVmSizes []string `pulumi:"allowedVmSizes"` // 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 proximity placement group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the availability set. 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"` // Specifies the supported zone of the Proximity Placement Group. Changing this forces a new resource to be created. // // > **Note:** `allowedVmSizes` must be set when `zone` is specified. Zone *string `pulumi:"zone"` } // The set of arguments for constructing a PlacementGroup resource. type PlacementGroupArgs struct { // Specifies the supported sizes of Virtual Machines that can be created in the Proximity Placement Group. // // > **Note:** Removing `allowedVmSizes` after it is set forces a new resource to be created. AllowedVmSizes 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 the proximity placement group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the availability set. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the supported zone of the Proximity Placement Group. Changing this forces a new resource to be created. // // > **Note:** `allowedVmSizes` must be set when `zone` is specified. Zone pulumi.StringPtrInput } func (PlacementGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*placementGroupArgs)(nil)).Elem() } type PlacementGroupInput interface { pulumi.Input ToPlacementGroupOutput() PlacementGroupOutput ToPlacementGroupOutputWithContext(ctx context.Context) PlacementGroupOutput } func (*PlacementGroup) ElementType() reflect.Type { return reflect.TypeOf((**PlacementGroup)(nil)).Elem() } func (i *PlacementGroup) ToPlacementGroupOutput() PlacementGroupOutput { return i.ToPlacementGroupOutputWithContext(context.Background()) } func (i *PlacementGroup) ToPlacementGroupOutputWithContext(ctx context.Context) PlacementGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(PlacementGroupOutput) } // PlacementGroupArrayInput is an input type that accepts PlacementGroupArray and PlacementGroupArrayOutput values. // You can construct a concrete instance of `PlacementGroupArrayInput` via: // // PlacementGroupArray{ PlacementGroupArgs{...} } type PlacementGroupArrayInput interface { pulumi.Input ToPlacementGroupArrayOutput() PlacementGroupArrayOutput ToPlacementGroupArrayOutputWithContext(context.Context) PlacementGroupArrayOutput } type PlacementGroupArray []PlacementGroupInput func (PlacementGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PlacementGroup)(nil)).Elem() } func (i PlacementGroupArray) ToPlacementGroupArrayOutput() PlacementGroupArrayOutput { return i.ToPlacementGroupArrayOutputWithContext(context.Background()) } func (i PlacementGroupArray) ToPlacementGroupArrayOutputWithContext(ctx context.Context) PlacementGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PlacementGroupArrayOutput) } // PlacementGroupMapInput is an input type that accepts PlacementGroupMap and PlacementGroupMapOutput values. // You can construct a concrete instance of `PlacementGroupMapInput` via: // // PlacementGroupMap{ "key": PlacementGroupArgs{...} } type PlacementGroupMapInput interface { pulumi.Input ToPlacementGroupMapOutput() PlacementGroupMapOutput ToPlacementGroupMapOutputWithContext(context.Context) PlacementGroupMapOutput } type PlacementGroupMap map[string]PlacementGroupInput func (PlacementGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PlacementGroup)(nil)).Elem() } func (i PlacementGroupMap) ToPlacementGroupMapOutput() PlacementGroupMapOutput { return i.ToPlacementGroupMapOutputWithContext(context.Background()) } func (i PlacementGroupMap) ToPlacementGroupMapOutputWithContext(ctx context.Context) PlacementGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PlacementGroupMapOutput) } type PlacementGroupOutput struct{ *pulumi.OutputState } func (PlacementGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**PlacementGroup)(nil)).Elem() } func (o PlacementGroupOutput) ToPlacementGroupOutput() PlacementGroupOutput { return o } func (o PlacementGroupOutput) ToPlacementGroupOutputWithContext(ctx context.Context) PlacementGroupOutput { return o } // Specifies the supported sizes of Virtual Machines that can be created in the Proximity Placement Group. // // > **Note:** Removing `allowedVmSizes` after it is set forces a new resource to be created. func (o PlacementGroupOutput) AllowedVmSizes() pulumi.StringArrayOutput { return o.ApplyT(func(v *PlacementGroup) pulumi.StringArrayOutput { return v.AllowedVmSizes }).(pulumi.StringArrayOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o PlacementGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *PlacementGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the proximity placement group. Changing this forces a new resource to be created. func (o PlacementGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PlacementGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the availability set. Changing this forces a new resource to be created. func (o PlacementGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PlacementGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o PlacementGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PlacementGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the supported zone of the Proximity Placement Group. Changing this forces a new resource to be created. // // > **Note:** `allowedVmSizes` must be set when `zone` is specified. func (o PlacementGroupOutput) Zone() pulumi.StringPtrOutput { return o.ApplyT(func(v *PlacementGroup) pulumi.StringPtrOutput { return v.Zone }).(pulumi.StringPtrOutput) } type PlacementGroupArrayOutput struct{ *pulumi.OutputState } func (PlacementGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PlacementGroup)(nil)).Elem() } func (o PlacementGroupArrayOutput) ToPlacementGroupArrayOutput() PlacementGroupArrayOutput { return o } func (o PlacementGroupArrayOutput) ToPlacementGroupArrayOutputWithContext(ctx context.Context) PlacementGroupArrayOutput { return o } func (o PlacementGroupArrayOutput) Index(i pulumi.IntInput) PlacementGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PlacementGroup { return vs[0].([]*PlacementGroup)[vs[1].(int)] }).(PlacementGroupOutput) } type PlacementGroupMapOutput struct{ *pulumi.OutputState } func (PlacementGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PlacementGroup)(nil)).Elem() } func (o PlacementGroupMapOutput) ToPlacementGroupMapOutput() PlacementGroupMapOutput { return o } func (o PlacementGroupMapOutput) ToPlacementGroupMapOutputWithContext(ctx context.Context) PlacementGroupMapOutput { return o } func (o PlacementGroupMapOutput) MapIndex(k pulumi.StringInput) PlacementGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PlacementGroup { return vs[0].(map[string]*PlacementGroup)[vs[1].(string)] }).(PlacementGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PlacementGroupInput)(nil)).Elem(), &PlacementGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*PlacementGroupArrayInput)(nil)).Elem(), PlacementGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PlacementGroupMapInput)(nil)).Elem(), PlacementGroupMap{}) pulumi.RegisterOutputType(PlacementGroupOutput{}) pulumi.RegisterOutputType(PlacementGroupArrayOutput{}) pulumi.RegisterOutputType(PlacementGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/proximity/init.go
sdk/go/azure/proximity/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 proximity 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:proximity/placementGroup:PlacementGroup": r = &PlacementGroup{} 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", "proximity/placementGroup", &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/proximity/getPlacementGroup.go
sdk/go/azure/proximity/getPlacementGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package proximity 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 Proximity Placement Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/proximity" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := proximity.LookupPlacementGroup(ctx, &proximity.LookupPlacementGroupArgs{ // Name: "tf-appsecuritygroup", // ResourceGroupName: "my-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("proximityPlacementGroupId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Compute` - 2022-03-01 func LookupPlacementGroup(ctx *pulumi.Context, args *LookupPlacementGroupArgs, opts ...pulumi.InvokeOption) (*LookupPlacementGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupPlacementGroupResult err := ctx.Invoke("azure:proximity/getPlacementGroup:getPlacementGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPlacementGroup. type LookupPlacementGroupArgs struct { // The name of the Proximity Placement Group. Name string `pulumi:"name"` // The name of the resource group in which the Proximity Placement Group exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getPlacementGroup. type LookupPlacementGroupResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` Tags map[string]string `pulumi:"tags"` } func LookupPlacementGroupOutput(ctx *pulumi.Context, args LookupPlacementGroupOutputArgs, opts ...pulumi.InvokeOption) LookupPlacementGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupPlacementGroupResultOutput, error) { args := v.(LookupPlacementGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:proximity/getPlacementGroup:getPlacementGroup", args, LookupPlacementGroupResultOutput{}, options).(LookupPlacementGroupResultOutput), nil }).(LookupPlacementGroupResultOutput) } // A collection of arguments for invoking getPlacementGroup. type LookupPlacementGroupOutputArgs struct { // The name of the Proximity Placement Group. Name pulumi.StringInput `pulumi:"name"` // The name of the resource group in which the Proximity Placement Group exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupPlacementGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupPlacementGroupArgs)(nil)).Elem() } // A collection of values returned by getPlacementGroup. type LookupPlacementGroupResultOutput struct{ *pulumi.OutputState } func (LookupPlacementGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupPlacementGroupResult)(nil)).Elem() } func (o LookupPlacementGroupResultOutput) ToLookupPlacementGroupResultOutput() LookupPlacementGroupResultOutput { return o } func (o LookupPlacementGroupResultOutput) ToLookupPlacementGroupResultOutputWithContext(ctx context.Context) LookupPlacementGroupResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupPlacementGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupPlacementGroupResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupPlacementGroupResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupPlacementGroupResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupPlacementGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupPlacementGroupResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupPlacementGroupResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupPlacementGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupPlacementGroupResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupPlacementGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupPlacementGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getManagedHardwareSecurityModuleKey.go
sdk/go/azure/keyvault/getManagedHardwareSecurityModuleKey.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 Managed Hardware Security Module Key. // // > **Note:** All arguments including the secret value will be stored in the raw state as plain-text. // [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html). // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.LookupManagedHardwareSecurityModuleKey(ctx, &keyvault.LookupManagedHardwareSecurityModuleKeyArgs{ // ManagedHsmId: exampleAzurermKeyVaultManagedHardwareSecurityModule.Id, // Name: exampleAzurermKeyVaultManagedHardwareSecurityModuleKey.Name, // }, nil) // if err != nil { // return err // } // ctx.Export("hsm-key-vesrion", example.Version) // return nil // }) // } // // ``` func LookupManagedHardwareSecurityModuleKey(ctx *pulumi.Context, args *LookupManagedHardwareSecurityModuleKeyArgs, opts ...pulumi.InvokeOption) (*LookupManagedHardwareSecurityModuleKeyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupManagedHardwareSecurityModuleKeyResult err := ctx.Invoke("azure:keyvault/getManagedHardwareSecurityModuleKey:getManagedHardwareSecurityModuleKey", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getManagedHardwareSecurityModuleKey. type LookupManagedHardwareSecurityModuleKeyArgs struct { // Specifies the ID of the Managed Hardware Security Module instance where the Secret resides, available on the `keyvault.ManagedHardwareSecurityModuleKey` Data Source / Resource. // // > **Note:** The Managed Hardware Security Module must be in the same subscription as the provider. If the Managed Hardware Security Module is in another subscription, you must create an aliased provider for that subscription. ManagedHsmId string `pulumi:"managedHsmId"` // Specifies the name of the Managed Hardware Security Module Key. Name string `pulumi:"name"` } // A collection of values returned by getManagedHardwareSecurityModuleKey. type LookupManagedHardwareSecurityModuleKeyResult struct { // The EC Curve name of this Managed Hardware Security Module Key. Curve string `pulumi:"curve"` ExpirationDate string `pulumi:"expirationDate"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A list of JSON web key operations assigned to this Managed Hardware Security Module Key KeyOpts []string `pulumi:"keyOpts"` // Specifies the Size of this Managed Hardware Security Module Key. KeySize int `pulumi:"keySize"` // Specifies the Key Type of this Managed Hardware Security Module Key KeyType string `pulumi:"keyType"` ManagedHsmId string `pulumi:"managedHsmId"` Name string `pulumi:"name"` NotBeforeDate string `pulumi:"notBeforeDate"` // A mapping of tags assigned to this Managed Hardware Security Module Key. Tags map[string]string `pulumi:"tags"` // The current version of the Managed Hardware Security Module Key. Version string `pulumi:"version"` // The versioned ID of the Managed Hardware Security Module Key. VersionedId string `pulumi:"versionedId"` } func LookupManagedHardwareSecurityModuleKeyOutput(ctx *pulumi.Context, args LookupManagedHardwareSecurityModuleKeyOutputArgs, opts ...pulumi.InvokeOption) LookupManagedHardwareSecurityModuleKeyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupManagedHardwareSecurityModuleKeyResultOutput, error) { args := v.(LookupManagedHardwareSecurityModuleKeyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getManagedHardwareSecurityModuleKey:getManagedHardwareSecurityModuleKey", args, LookupManagedHardwareSecurityModuleKeyResultOutput{}, options).(LookupManagedHardwareSecurityModuleKeyResultOutput), nil }).(LookupManagedHardwareSecurityModuleKeyResultOutput) } // A collection of arguments for invoking getManagedHardwareSecurityModuleKey. type LookupManagedHardwareSecurityModuleKeyOutputArgs struct { // Specifies the ID of the Managed Hardware Security Module instance where the Secret resides, available on the `keyvault.ManagedHardwareSecurityModuleKey` Data Source / Resource. // // > **Note:** The Managed Hardware Security Module must be in the same subscription as the provider. If the Managed Hardware Security Module is in another subscription, you must create an aliased provider for that subscription. ManagedHsmId pulumi.StringInput `pulumi:"managedHsmId"` // Specifies the name of the Managed Hardware Security Module Key. Name pulumi.StringInput `pulumi:"name"` } func (LookupManagedHardwareSecurityModuleKeyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedHardwareSecurityModuleKeyArgs)(nil)).Elem() } // A collection of values returned by getManagedHardwareSecurityModuleKey. type LookupManagedHardwareSecurityModuleKeyResultOutput struct{ *pulumi.OutputState } func (LookupManagedHardwareSecurityModuleKeyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedHardwareSecurityModuleKeyResult)(nil)).Elem() } func (o LookupManagedHardwareSecurityModuleKeyResultOutput) ToLookupManagedHardwareSecurityModuleKeyResultOutput() LookupManagedHardwareSecurityModuleKeyResultOutput { return o } func (o LookupManagedHardwareSecurityModuleKeyResultOutput) ToLookupManagedHardwareSecurityModuleKeyResultOutputWithContext(ctx context.Context) LookupManagedHardwareSecurityModuleKeyResultOutput { return o } // The EC Curve name of this Managed Hardware Security Module Key. func (o LookupManagedHardwareSecurityModuleKeyResultOutput) Curve() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.Curve }).(pulumi.StringOutput) } func (o LookupManagedHardwareSecurityModuleKeyResultOutput) ExpirationDate() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.ExpirationDate }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupManagedHardwareSecurityModuleKeyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.Id }).(pulumi.StringOutput) } // A list of JSON web key operations assigned to this Managed Hardware Security Module Key func (o LookupManagedHardwareSecurityModuleKeyResultOutput) KeyOpts() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) []string { return v.KeyOpts }).(pulumi.StringArrayOutput) } // Specifies the Size of this Managed Hardware Security Module Key. func (o LookupManagedHardwareSecurityModuleKeyResultOutput) KeySize() pulumi.IntOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) int { return v.KeySize }).(pulumi.IntOutput) } // Specifies the Key Type of this Managed Hardware Security Module Key func (o LookupManagedHardwareSecurityModuleKeyResultOutput) KeyType() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.KeyType }).(pulumi.StringOutput) } func (o LookupManagedHardwareSecurityModuleKeyResultOutput) ManagedHsmId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.ManagedHsmId }).(pulumi.StringOutput) } func (o LookupManagedHardwareSecurityModuleKeyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupManagedHardwareSecurityModuleKeyResultOutput) NotBeforeDate() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.NotBeforeDate }).(pulumi.StringOutput) } // A mapping of tags assigned to this Managed Hardware Security Module Key. func (o LookupManagedHardwareSecurityModuleKeyResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The current version of the Managed Hardware Security Module Key. func (o LookupManagedHardwareSecurityModuleKeyResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.Version }).(pulumi.StringOutput) } // The versioned ID of the Managed Hardware Security Module Key. func (o LookupManagedHardwareSecurityModuleKeyResultOutput) VersionedId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleKeyResult) string { return v.VersionedId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupManagedHardwareSecurityModuleKeyResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/managedStorageAccount.go
sdk/go/azure/keyvault/managedStorageAccount.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Managed Storage Account. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // 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 // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("keyvaultname"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("Delete"), // }, // StoragePermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Set"), // pulumi.String("SetSAS"), // pulumi.String("GetSAS"), // pulumi.String("DeleteSAS"), // pulumi.String("Update"), // pulumi.String("RegenerateKey"), // }, // }, // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewManagedStorageAccount(ctx, "example", &keyvault.ManagedStorageAccountArgs{ // Name: pulumi.String("examplemanagedstorage"), // KeyVaultId: exampleKeyVault.ID(), // StorageAccountId: exampleAccount.ID(), // StorageAccountKey: pulumi.String("key1"), // RegenerateKeyAutomatically: pulumi.Bool(false), // RegenerationPeriod: pulumi.String("P1D"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Managed Storage Accounts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/managedStorageAccount:ManagedStorageAccount example https://example-keyvault.vault.azure.net/storage/exampleStorageAcc01 // ``` type ManagedStorageAccount struct { pulumi.CustomResourceState // The ID of the Key Vault where the Managed Storage Account should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // The name which should be used for this Key Vault Managed Storage Account. Changing this forces a new Key Vault Managed Storage Account to be created. Name pulumi.StringOutput `pulumi:"name"` // Should Storage Account access key be regenerated periodically? // // > **Note:** Azure Key Vault application needs to have access to Storage Account for auto regeneration to work. Example can be found above. RegenerateKeyAutomatically pulumi.BoolPtrOutput `pulumi:"regenerateKeyAutomatically"` // How often Storage Account access key should be regenerated. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). RegenerationPeriod pulumi.StringPtrOutput `pulumi:"regenerationPeriod"` // The ID of the Storage Account. StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"` // Which Storage Account access key that is managed by Key Vault. Possible values are `key1` and `key2`. StorageAccountKey pulumi.StringOutput `pulumi:"storageAccountKey"` // A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewManagedStorageAccount registers a new resource with the given unique name, arguments, and options. func NewManagedStorageAccount(ctx *pulumi.Context, name string, args *ManagedStorageAccountArgs, opts ...pulumi.ResourceOption) (*ManagedStorageAccount, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } if args.StorageAccountId == nil { return nil, errors.New("invalid value for required argument 'StorageAccountId'") } if args.StorageAccountKey == nil { return nil, errors.New("invalid value for required argument 'StorageAccountKey'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedStorageAccount err := ctx.RegisterResource("azure:keyvault/managedStorageAccount:ManagedStorageAccount", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedStorageAccount gets an existing ManagedStorageAccount resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedStorageAccount(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedStorageAccountState, opts ...pulumi.ResourceOption) (*ManagedStorageAccount, error) { var resource ManagedStorageAccount err := ctx.ReadResource("azure:keyvault/managedStorageAccount:ManagedStorageAccount", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedStorageAccount resources. type managedStorageAccountState struct { // The ID of the Key Vault where the Managed Storage Account should be created. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` // The name which should be used for this Key Vault Managed Storage Account. Changing this forces a new Key Vault Managed Storage Account to be created. Name *string `pulumi:"name"` // Should Storage Account access key be regenerated periodically? // // > **Note:** Azure Key Vault application needs to have access to Storage Account for auto regeneration to work. Example can be found above. RegenerateKeyAutomatically *bool `pulumi:"regenerateKeyAutomatically"` // How often Storage Account access key should be regenerated. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). RegenerationPeriod *string `pulumi:"regenerationPeriod"` // The ID of the Storage Account. StorageAccountId *string `pulumi:"storageAccountId"` // Which Storage Account access key that is managed by Key Vault. Possible values are `key1` and `key2`. StorageAccountKey *string `pulumi:"storageAccountKey"` // A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. Tags map[string]string `pulumi:"tags"` } type ManagedStorageAccountState struct { // The ID of the Key Vault where the Managed Storage Account should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput // The name which should be used for this Key Vault Managed Storage Account. Changing this forces a new Key Vault Managed Storage Account to be created. Name pulumi.StringPtrInput // Should Storage Account access key be regenerated periodically? // // > **Note:** Azure Key Vault application needs to have access to Storage Account for auto regeneration to work. Example can be found above. RegenerateKeyAutomatically pulumi.BoolPtrInput // How often Storage Account access key should be regenerated. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). RegenerationPeriod pulumi.StringPtrInput // The ID of the Storage Account. StorageAccountId pulumi.StringPtrInput // Which Storage Account access key that is managed by Key Vault. Possible values are `key1` and `key2`. StorageAccountKey pulumi.StringPtrInput // A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. Tags pulumi.StringMapInput } func (ManagedStorageAccountState) ElementType() reflect.Type { return reflect.TypeOf((*managedStorageAccountState)(nil)).Elem() } type managedStorageAccountArgs struct { // The ID of the Key Vault where the Managed Storage Account should be created. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` // The name which should be used for this Key Vault Managed Storage Account. Changing this forces a new Key Vault Managed Storage Account to be created. Name *string `pulumi:"name"` // Should Storage Account access key be regenerated periodically? // // > **Note:** Azure Key Vault application needs to have access to Storage Account for auto regeneration to work. Example can be found above. RegenerateKeyAutomatically *bool `pulumi:"regenerateKeyAutomatically"` // How often Storage Account access key should be regenerated. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). RegenerationPeriod *string `pulumi:"regenerationPeriod"` // The ID of the Storage Account. StorageAccountId string `pulumi:"storageAccountId"` // Which Storage Account access key that is managed by Key Vault. Possible values are `key1` and `key2`. StorageAccountKey string `pulumi:"storageAccountKey"` // A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ManagedStorageAccount resource. type ManagedStorageAccountArgs struct { // The ID of the Key Vault where the Managed Storage Account should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput // The name which should be used for this Key Vault Managed Storage Account. Changing this forces a new Key Vault Managed Storage Account to be created. Name pulumi.StringPtrInput // Should Storage Account access key be regenerated periodically? // // > **Note:** Azure Key Vault application needs to have access to Storage Account for auto regeneration to work. Example can be found above. RegenerateKeyAutomatically pulumi.BoolPtrInput // How often Storage Account access key should be regenerated. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). RegenerationPeriod pulumi.StringPtrInput // The ID of the Storage Account. StorageAccountId pulumi.StringInput // Which Storage Account access key that is managed by Key Vault. Possible values are `key1` and `key2`. StorageAccountKey pulumi.StringInput // A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. Tags pulumi.StringMapInput } func (ManagedStorageAccountArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedStorageAccountArgs)(nil)).Elem() } type ManagedStorageAccountInput interface { pulumi.Input ToManagedStorageAccountOutput() ManagedStorageAccountOutput ToManagedStorageAccountOutputWithContext(ctx context.Context) ManagedStorageAccountOutput } func (*ManagedStorageAccount) ElementType() reflect.Type { return reflect.TypeOf((**ManagedStorageAccount)(nil)).Elem() } func (i *ManagedStorageAccount) ToManagedStorageAccountOutput() ManagedStorageAccountOutput { return i.ToManagedStorageAccountOutputWithContext(context.Background()) } func (i *ManagedStorageAccount) ToManagedStorageAccountOutputWithContext(ctx context.Context) ManagedStorageAccountOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedStorageAccountOutput) } // ManagedStorageAccountArrayInput is an input type that accepts ManagedStorageAccountArray and ManagedStorageAccountArrayOutput values. // You can construct a concrete instance of `ManagedStorageAccountArrayInput` via: // // ManagedStorageAccountArray{ ManagedStorageAccountArgs{...} } type ManagedStorageAccountArrayInput interface { pulumi.Input ToManagedStorageAccountArrayOutput() ManagedStorageAccountArrayOutput ToManagedStorageAccountArrayOutputWithContext(context.Context) ManagedStorageAccountArrayOutput } type ManagedStorageAccountArray []ManagedStorageAccountInput func (ManagedStorageAccountArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedStorageAccount)(nil)).Elem() } func (i ManagedStorageAccountArray) ToManagedStorageAccountArrayOutput() ManagedStorageAccountArrayOutput { return i.ToManagedStorageAccountArrayOutputWithContext(context.Background()) } func (i ManagedStorageAccountArray) ToManagedStorageAccountArrayOutputWithContext(ctx context.Context) ManagedStorageAccountArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedStorageAccountArrayOutput) } // ManagedStorageAccountMapInput is an input type that accepts ManagedStorageAccountMap and ManagedStorageAccountMapOutput values. // You can construct a concrete instance of `ManagedStorageAccountMapInput` via: // // ManagedStorageAccountMap{ "key": ManagedStorageAccountArgs{...} } type ManagedStorageAccountMapInput interface { pulumi.Input ToManagedStorageAccountMapOutput() ManagedStorageAccountMapOutput ToManagedStorageAccountMapOutputWithContext(context.Context) ManagedStorageAccountMapOutput } type ManagedStorageAccountMap map[string]ManagedStorageAccountInput func (ManagedStorageAccountMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedStorageAccount)(nil)).Elem() } func (i ManagedStorageAccountMap) ToManagedStorageAccountMapOutput() ManagedStorageAccountMapOutput { return i.ToManagedStorageAccountMapOutputWithContext(context.Background()) } func (i ManagedStorageAccountMap) ToManagedStorageAccountMapOutputWithContext(ctx context.Context) ManagedStorageAccountMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedStorageAccountMapOutput) } type ManagedStorageAccountOutput struct{ *pulumi.OutputState } func (ManagedStorageAccountOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedStorageAccount)(nil)).Elem() } func (o ManagedStorageAccountOutput) ToManagedStorageAccountOutput() ManagedStorageAccountOutput { return o } func (o ManagedStorageAccountOutput) ToManagedStorageAccountOutputWithContext(ctx context.Context) ManagedStorageAccountOutput { return o } // The ID of the Key Vault where the Managed Storage Account should be created. Changing this forces a new resource to be created. func (o ManagedStorageAccountOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccount) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // The name which should be used for this Key Vault Managed Storage Account. Changing this forces a new Key Vault Managed Storage Account to be created. func (o ManagedStorageAccountOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccount) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Should Storage Account access key be regenerated periodically? // // > **Note:** Azure Key Vault application needs to have access to Storage Account for auto regeneration to work. Example can be found above. func (o ManagedStorageAccountOutput) RegenerateKeyAutomatically() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ManagedStorageAccount) pulumi.BoolPtrOutput { return v.RegenerateKeyAutomatically }).(pulumi.BoolPtrOutput) } // How often Storage Account access key should be regenerated. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). func (o ManagedStorageAccountOutput) RegenerationPeriod() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedStorageAccount) pulumi.StringPtrOutput { return v.RegenerationPeriod }).(pulumi.StringPtrOutput) } // The ID of the Storage Account. func (o ManagedStorageAccountOutput) StorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccount) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput) } // Which Storage Account access key that is managed by Key Vault. Possible values are `key1` and `key2`. func (o ManagedStorageAccountOutput) StorageAccountKey() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccount) pulumi.StringOutput { return v.StorageAccountKey }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. func (o ManagedStorageAccountOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ManagedStorageAccount) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ManagedStorageAccountArrayOutput struct{ *pulumi.OutputState } func (ManagedStorageAccountArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedStorageAccount)(nil)).Elem() } func (o ManagedStorageAccountArrayOutput) ToManagedStorageAccountArrayOutput() ManagedStorageAccountArrayOutput { return o } func (o ManagedStorageAccountArrayOutput) ToManagedStorageAccountArrayOutputWithContext(ctx context.Context) ManagedStorageAccountArrayOutput { return o } func (o ManagedStorageAccountArrayOutput) Index(i pulumi.IntInput) ManagedStorageAccountOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedStorageAccount { return vs[0].([]*ManagedStorageAccount)[vs[1].(int)] }).(ManagedStorageAccountOutput) } type ManagedStorageAccountMapOutput struct{ *pulumi.OutputState } func (ManagedStorageAccountMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedStorageAccount)(nil)).Elem() } func (o ManagedStorageAccountMapOutput) ToManagedStorageAccountMapOutput() ManagedStorageAccountMapOutput { return o } func (o ManagedStorageAccountMapOutput) ToManagedStorageAccountMapOutputWithContext(ctx context.Context) ManagedStorageAccountMapOutput { return o } func (o ManagedStorageAccountMapOutput) MapIndex(k pulumi.StringInput) ManagedStorageAccountOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedStorageAccount { return vs[0].(map[string]*ManagedStorageAccount)[vs[1].(string)] }).(ManagedStorageAccountOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedStorageAccountInput)(nil)).Elem(), &ManagedStorageAccount{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedStorageAccountArrayInput)(nil)).Elem(), ManagedStorageAccountArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedStorageAccountMapInput)(nil)).Elem(), ManagedStorageAccountMap{}) pulumi.RegisterOutputType(ManagedStorageAccountOutput{}) pulumi.RegisterOutputType(ManagedStorageAccountArrayOutput{}) pulumi.RegisterOutputType(ManagedStorageAccountMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getKey.go
sdk/go/azure/keyvault/getKey.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 Key Vault Key. // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.LookupKey(ctx, &keyvault.LookupKeyArgs{ // Name: "secret-sauce", // KeyVaultId: existing.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("keyType", example.KeyType) // return nil // }) // } // // ``` func LookupKey(ctx *pulumi.Context, args *LookupKeyArgs, opts ...pulumi.InvokeOption) (*LookupKeyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupKeyResult err := ctx.Invoke("azure:keyvault/getKey:getKey", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getKey. type LookupKeyArgs struct { // Specifies the ID of the Key Vault instance where the Secret resides, available on the `keyvault.KeyVault` Data Source / Resource. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Key. Name string `pulumi:"name"` } // A collection of values returned by getKey. type LookupKeyResult struct { // The EC Curve name of this Key Vault Key. Curve string `pulumi:"curve"` // The RSA public exponent of this Key Vault Key. E string `pulumi:"e"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A list of JSON web key operations assigned to this Key Vault Key KeyOpts []string `pulumi:"keyOpts"` // Specifies the Size of this Key Vault Key. KeySize int `pulumi:"keySize"` // Specifies the Key Type of this Key Vault Key KeyType string `pulumi:"keyType"` KeyVaultId string `pulumi:"keyVaultId"` // The RSA modulus of this Key Vault Key. N string `pulumi:"n"` Name string `pulumi:"name"` // The OpenSSH encoded public key of this Key Vault Key. PublicKeyOpenssh string `pulumi:"publicKeyOpenssh"` // The PEM encoded public key of this Key Vault Key. PublicKeyPem string `pulumi:"publicKeyPem"` // The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. ResourceId string `pulumi:"resourceId"` // The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. ResourceVersionlessId string `pulumi:"resourceVersionlessId"` // A mapping of tags assigned to this Key Vault Key. Tags map[string]string `pulumi:"tags"` // The current version of the Key Vault Key. Version string `pulumi:"version"` // The Base ID of the Key Vault Key. VersionlessId string `pulumi:"versionlessId"` // The EC X component of this Key Vault Key. X string `pulumi:"x"` // The EC Y component of this Key Vault Key. Y string `pulumi:"y"` } func LookupKeyOutput(ctx *pulumi.Context, args LookupKeyOutputArgs, opts ...pulumi.InvokeOption) LookupKeyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupKeyResultOutput, error) { args := v.(LookupKeyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getKey:getKey", args, LookupKeyResultOutput{}, options).(LookupKeyResultOutput), nil }).(LookupKeyResultOutput) } // A collection of arguments for invoking getKey. type LookupKeyOutputArgs struct { // Specifies the ID of the Key Vault instance where the Secret resides, available on the `keyvault.KeyVault` Data Source / Resource. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Key. Name pulumi.StringInput `pulumi:"name"` } func (LookupKeyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupKeyArgs)(nil)).Elem() } // A collection of values returned by getKey. type LookupKeyResultOutput struct{ *pulumi.OutputState } func (LookupKeyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupKeyResult)(nil)).Elem() } func (o LookupKeyResultOutput) ToLookupKeyResultOutput() LookupKeyResultOutput { return o } func (o LookupKeyResultOutput) ToLookupKeyResultOutputWithContext(ctx context.Context) LookupKeyResultOutput { return o } // The EC Curve name of this Key Vault Key. func (o LookupKeyResultOutput) Curve() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.Curve }).(pulumi.StringOutput) } // The RSA public exponent of this Key Vault Key. func (o LookupKeyResultOutput) E() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.E }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupKeyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.Id }).(pulumi.StringOutput) } // A list of JSON web key operations assigned to this Key Vault Key func (o LookupKeyResultOutput) KeyOpts() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupKeyResult) []string { return v.KeyOpts }).(pulumi.StringArrayOutput) } // Specifies the Size of this Key Vault Key. func (o LookupKeyResultOutput) KeySize() pulumi.IntOutput { return o.ApplyT(func(v LookupKeyResult) int { return v.KeySize }).(pulumi.IntOutput) } // Specifies the Key Type of this Key Vault Key func (o LookupKeyResultOutput) KeyType() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.KeyType }).(pulumi.StringOutput) } func (o LookupKeyResultOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.KeyVaultId }).(pulumi.StringOutput) } // The RSA modulus of this Key Vault Key. func (o LookupKeyResultOutput) N() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.N }).(pulumi.StringOutput) } func (o LookupKeyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.Name }).(pulumi.StringOutput) } // The OpenSSH encoded public key of this Key Vault Key. func (o LookupKeyResultOutput) PublicKeyOpenssh() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.PublicKeyOpenssh }).(pulumi.StringOutput) } // The PEM encoded public key of this Key Vault Key. func (o LookupKeyResultOutput) PublicKeyPem() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.PublicKeyPem }).(pulumi.StringOutput) } // The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. func (o LookupKeyResultOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.ResourceId }).(pulumi.StringOutput) } // The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. func (o LookupKeyResultOutput) ResourceVersionlessId() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.ResourceVersionlessId }).(pulumi.StringOutput) } // A mapping of tags assigned to this Key Vault Key. func (o LookupKeyResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupKeyResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The current version of the Key Vault Key. func (o LookupKeyResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.Version }).(pulumi.StringOutput) } // The Base ID of the Key Vault Key. func (o LookupKeyResultOutput) VersionlessId() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.VersionlessId }).(pulumi.StringOutput) } // The EC X component of this Key Vault Key. func (o LookupKeyResultOutput) X() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.X }).(pulumi.StringOutput) } // The EC Y component of this Key Vault Key. func (o LookupKeyResultOutput) Y() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyResult) string { return v.Y }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupKeyResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/managedHardwareSecurityModuleKeyRotationPolicy.go
sdk/go/azure/keyvault/managedHardwareSecurityModuleKeyRotationPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Managed HSM Key rotation policy. // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.NewManagedHardwareSecurityModuleKey(ctx, "example", &keyvault.ManagedHardwareSecurityModuleKeyArgs{ // Name: pulumi.String("example-key"), // ManagedHsmId: pulumi.Any(exampleAzurermKeyVaultManagedHardwareSecurityModule.Id), // KeyType: pulumi.String("EC-HSM"), // Curve: pulumi.String("P-521"), // KeyOpts: pulumi.StringArray{ // pulumi.String("sign"), // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewManagedHardwareSecurityModuleKeyRotationPolicy(ctx, "example", &keyvault.ManagedHardwareSecurityModuleKeyRotationPolicyArgs{ // ManagedHsmKeyId: example.ID(), // ExpireAfter: pulumi.String("P60D"), // TimeBeforeExpiry: pulumi.String("P30D"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Managed HSM Key rotation policy can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/managedHardwareSecurityModuleKeyRotationPolicy:ManagedHardwareSecurityModuleKeyRotationPolicy example https://example-hsm.managedhsm.azure.net/keys/example // ``` type ManagedHardwareSecurityModuleKeyRotationPolicy struct { pulumi.CustomResourceState // Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`. ExpireAfter pulumi.StringOutput `pulumi:"expireAfter"` // The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created. ManagedHsmKeyId pulumi.StringOutput `pulumi:"managedHsmKeyId"` // Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeAfterCreation pulumi.StringPtrOutput `pulumi:"timeAfterCreation"` // Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeBeforeExpiry pulumi.StringPtrOutput `pulumi:"timeBeforeExpiry"` } // NewManagedHardwareSecurityModuleKeyRotationPolicy registers a new resource with the given unique name, arguments, and options. func NewManagedHardwareSecurityModuleKeyRotationPolicy(ctx *pulumi.Context, name string, args *ManagedHardwareSecurityModuleKeyRotationPolicyArgs, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleKeyRotationPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExpireAfter == nil { return nil, errors.New("invalid value for required argument 'ExpireAfter'") } if args.ManagedHsmKeyId == nil { return nil, errors.New("invalid value for required argument 'ManagedHsmKeyId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedHardwareSecurityModuleKeyRotationPolicy err := ctx.RegisterResource("azure:keyvault/managedHardwareSecurityModuleKeyRotationPolicy:ManagedHardwareSecurityModuleKeyRotationPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedHardwareSecurityModuleKeyRotationPolicy gets an existing ManagedHardwareSecurityModuleKeyRotationPolicy resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedHardwareSecurityModuleKeyRotationPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedHardwareSecurityModuleKeyRotationPolicyState, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleKeyRotationPolicy, error) { var resource ManagedHardwareSecurityModuleKeyRotationPolicy err := ctx.ReadResource("azure:keyvault/managedHardwareSecurityModuleKeyRotationPolicy:ManagedHardwareSecurityModuleKeyRotationPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedHardwareSecurityModuleKeyRotationPolicy resources. type managedHardwareSecurityModuleKeyRotationPolicyState struct { // Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`. ExpireAfter *string `pulumi:"expireAfter"` // The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created. ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"` // Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeAfterCreation *string `pulumi:"timeAfterCreation"` // Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeBeforeExpiry *string `pulumi:"timeBeforeExpiry"` } type ManagedHardwareSecurityModuleKeyRotationPolicyState struct { // Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`. ExpireAfter pulumi.StringPtrInput // The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created. ManagedHsmKeyId pulumi.StringPtrInput // Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeAfterCreation pulumi.StringPtrInput // Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeBeforeExpiry pulumi.StringPtrInput } func (ManagedHardwareSecurityModuleKeyRotationPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleKeyRotationPolicyState)(nil)).Elem() } type managedHardwareSecurityModuleKeyRotationPolicyArgs struct { // Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`. ExpireAfter string `pulumi:"expireAfter"` // The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created. ManagedHsmKeyId string `pulumi:"managedHsmKeyId"` // Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeAfterCreation *string `pulumi:"timeAfterCreation"` // Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeBeforeExpiry *string `pulumi:"timeBeforeExpiry"` } // The set of arguments for constructing a ManagedHardwareSecurityModuleKeyRotationPolicy resource. type ManagedHardwareSecurityModuleKeyRotationPolicyArgs struct { // Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`. ExpireAfter pulumi.StringInput // The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created. ManagedHsmKeyId pulumi.StringInput // Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeAfterCreation pulumi.StringPtrInput // Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. TimeBeforeExpiry pulumi.StringPtrInput } func (ManagedHardwareSecurityModuleKeyRotationPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleKeyRotationPolicyArgs)(nil)).Elem() } type ManagedHardwareSecurityModuleKeyRotationPolicyInput interface { pulumi.Input ToManagedHardwareSecurityModuleKeyRotationPolicyOutput() ManagedHardwareSecurityModuleKeyRotationPolicyOutput ToManagedHardwareSecurityModuleKeyRotationPolicyOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyOutput } func (*ManagedHardwareSecurityModuleKeyRotationPolicy) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleKeyRotationPolicy)(nil)).Elem() } func (i *ManagedHardwareSecurityModuleKeyRotationPolicy) ToManagedHardwareSecurityModuleKeyRotationPolicyOutput() ManagedHardwareSecurityModuleKeyRotationPolicyOutput { return i.ToManagedHardwareSecurityModuleKeyRotationPolicyOutputWithContext(context.Background()) } func (i *ManagedHardwareSecurityModuleKeyRotationPolicy) ToManagedHardwareSecurityModuleKeyRotationPolicyOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleKeyRotationPolicyOutput) } // ManagedHardwareSecurityModuleKeyRotationPolicyArrayInput is an input type that accepts ManagedHardwareSecurityModuleKeyRotationPolicyArray and ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleKeyRotationPolicyArrayInput` via: // // ManagedHardwareSecurityModuleKeyRotationPolicyArray{ ManagedHardwareSecurityModuleKeyRotationPolicyArgs{...} } type ManagedHardwareSecurityModuleKeyRotationPolicyArrayInput interface { pulumi.Input ToManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput() ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput ToManagedHardwareSecurityModuleKeyRotationPolicyArrayOutputWithContext(context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput } type ManagedHardwareSecurityModuleKeyRotationPolicyArray []ManagedHardwareSecurityModuleKeyRotationPolicyInput func (ManagedHardwareSecurityModuleKeyRotationPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleKeyRotationPolicy)(nil)).Elem() } func (i ManagedHardwareSecurityModuleKeyRotationPolicyArray) ToManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput() ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput { return i.ToManagedHardwareSecurityModuleKeyRotationPolicyArrayOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleKeyRotationPolicyArray) ToManagedHardwareSecurityModuleKeyRotationPolicyArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput) } // ManagedHardwareSecurityModuleKeyRotationPolicyMapInput is an input type that accepts ManagedHardwareSecurityModuleKeyRotationPolicyMap and ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleKeyRotationPolicyMapInput` via: // // ManagedHardwareSecurityModuleKeyRotationPolicyMap{ "key": ManagedHardwareSecurityModuleKeyRotationPolicyArgs{...} } type ManagedHardwareSecurityModuleKeyRotationPolicyMapInput interface { pulumi.Input ToManagedHardwareSecurityModuleKeyRotationPolicyMapOutput() ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput ToManagedHardwareSecurityModuleKeyRotationPolicyMapOutputWithContext(context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput } type ManagedHardwareSecurityModuleKeyRotationPolicyMap map[string]ManagedHardwareSecurityModuleKeyRotationPolicyInput func (ManagedHardwareSecurityModuleKeyRotationPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleKeyRotationPolicy)(nil)).Elem() } func (i ManagedHardwareSecurityModuleKeyRotationPolicyMap) ToManagedHardwareSecurityModuleKeyRotationPolicyMapOutput() ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput { return i.ToManagedHardwareSecurityModuleKeyRotationPolicyMapOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleKeyRotationPolicyMap) ToManagedHardwareSecurityModuleKeyRotationPolicyMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput) } type ManagedHardwareSecurityModuleKeyRotationPolicyOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleKeyRotationPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleKeyRotationPolicy)(nil)).Elem() } func (o ManagedHardwareSecurityModuleKeyRotationPolicyOutput) ToManagedHardwareSecurityModuleKeyRotationPolicyOutput() ManagedHardwareSecurityModuleKeyRotationPolicyOutput { return o } func (o ManagedHardwareSecurityModuleKeyRotationPolicyOutput) ToManagedHardwareSecurityModuleKeyRotationPolicyOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyOutput { return o } // Specify the expiration duration on a newly rotated key as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `P28D`. func (o ManagedHardwareSecurityModuleKeyRotationPolicyOutput) ExpireAfter() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKeyRotationPolicy) pulumi.StringOutput { return v.ExpireAfter }).(pulumi.StringOutput) } // The ID of the Managed HSM Key. Changing this forces a new Managed HSM Key rotation policy to be created. func (o ManagedHardwareSecurityModuleKeyRotationPolicyOutput) ManagedHsmKeyId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKeyRotationPolicy) pulumi.StringOutput { return v.ManagedHsmKeyId }).(pulumi.StringOutput) } // Rotate automatically at a duration after key creation as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. func (o ManagedHardwareSecurityModuleKeyRotationPolicyOutput) TimeAfterCreation() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKeyRotationPolicy) pulumi.StringPtrOutput { return v.TimeAfterCreation }).(pulumi.StringPtrOutput) } // Rotate automatically at a duration before key expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Exactly one of `timeAfterCreation` or `timeBeforeExpiry` should be specified. func (o ManagedHardwareSecurityModuleKeyRotationPolicyOutput) TimeBeforeExpiry() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKeyRotationPolicy) pulumi.StringPtrOutput { return v.TimeBeforeExpiry }).(pulumi.StringPtrOutput) } type ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleKeyRotationPolicy)(nil)).Elem() } func (o ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput) ToManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput() ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput { return o } func (o ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput) ToManagedHardwareSecurityModuleKeyRotationPolicyArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput { return o } func (o ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput) Index(i pulumi.IntInput) ManagedHardwareSecurityModuleKeyRotationPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleKeyRotationPolicy { return vs[0].([]*ManagedHardwareSecurityModuleKeyRotationPolicy)[vs[1].(int)] }).(ManagedHardwareSecurityModuleKeyRotationPolicyOutput) } type ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleKeyRotationPolicy)(nil)).Elem() } func (o ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput) ToManagedHardwareSecurityModuleKeyRotationPolicyMapOutput() ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput { return o } func (o ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput) ToManagedHardwareSecurityModuleKeyRotationPolicyMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput { return o } func (o ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput) MapIndex(k pulumi.StringInput) ManagedHardwareSecurityModuleKeyRotationPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleKeyRotationPolicy { return vs[0].(map[string]*ManagedHardwareSecurityModuleKeyRotationPolicy)[vs[1].(string)] }).(ManagedHardwareSecurityModuleKeyRotationPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleKeyRotationPolicyInput)(nil)).Elem(), &ManagedHardwareSecurityModuleKeyRotationPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleKeyRotationPolicyArrayInput)(nil)).Elem(), ManagedHardwareSecurityModuleKeyRotationPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleKeyRotationPolicyMapInput)(nil)).Elem(), ManagedHardwareSecurityModuleKeyRotationPolicyMap{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleKeyRotationPolicyOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleKeyRotationPolicyArrayOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleKeyRotationPolicyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/init.go
sdk/go/azure/keyvault/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 keyvault 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:keyvault/accessPolicy:AccessPolicy": r = &AccessPolicy{} case "azure:keyvault/certifiate:Certifiate": r = &Certifiate{} case "azure:keyvault/certificate:Certificate": r = &Certificate{} case "azure:keyvault/certificateContacts:CertificateContacts": r = &CertificateContacts{} case "azure:keyvault/certificateIssuer:CertificateIssuer": r = &CertificateIssuer{} case "azure:keyvault/key:Key": r = &Key{} case "azure:keyvault/keyVault:KeyVault": r = &KeyVault{} case "azure:keyvault/managedHardwareSecurityModule:ManagedHardwareSecurityModule": r = &ManagedHardwareSecurityModule{} case "azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey": r = &ManagedHardwareSecurityModuleKey{} case "azure:keyvault/managedHardwareSecurityModuleKeyRotationPolicy:ManagedHardwareSecurityModuleKeyRotationPolicy": r = &ManagedHardwareSecurityModuleKeyRotationPolicy{} case "azure:keyvault/managedHardwareSecurityModuleRoleAssignment:ManagedHardwareSecurityModuleRoleAssignment": r = &ManagedHardwareSecurityModuleRoleAssignment{} case "azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition": r = &ManagedHardwareSecurityModuleRoleDefinition{} case "azure:keyvault/managedStorageAccount:ManagedStorageAccount": r = &ManagedStorageAccount{} case "azure:keyvault/managedStorageAccountSasTokenDefinition:ManagedStorageAccountSasTokenDefinition": r = &ManagedStorageAccountSasTokenDefinition{} case "azure:keyvault/secret:Secret": r = &Secret{} 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", "keyvault/accessPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/certifiate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/certificate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/certificateContacts", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/certificateIssuer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/key", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/keyVault", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/managedHardwareSecurityModule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/managedHardwareSecurityModuleKey", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/managedHardwareSecurityModuleKeyRotationPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/managedHardwareSecurityModuleRoleAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/managedHardwareSecurityModuleRoleDefinition", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/managedStorageAccount", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/managedStorageAccountSasTokenDefinition", &module{version}, ) pulumi.RegisterResourceModule( "azure", "keyvault/secret", &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/keyvault/pulumiTypes.go
sdk/go/azure/keyvault/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 keyvault 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 CertifiateCertificate struct { // The base64-encoded certificate contents. Contents string `pulumi:"contents"` // The password associated with the certificate. // // > **NOTE:** A PEM certificate is already base64 encoded. To successfully import, the `contents` property should include a PEM encoded X509 certificate and a privateKey in pkcs8 format. There should only be linux style `\n` line endings and the whole block should have the PEM begin/end blocks around the certificate data and the private key data. // // To convert a private key to pkcs8 format with openssl use: // // The PEM content should look something like: Password *string `pulumi:"password"` } // CertifiateCertificateInput is an input type that accepts CertifiateCertificateArgs and CertifiateCertificateOutput values. // You can construct a concrete instance of `CertifiateCertificateInput` via: // // CertifiateCertificateArgs{...} type CertifiateCertificateInput interface { pulumi.Input ToCertifiateCertificateOutput() CertifiateCertificateOutput ToCertifiateCertificateOutputWithContext(context.Context) CertifiateCertificateOutput } type CertifiateCertificateArgs struct { // The base64-encoded certificate contents. Contents pulumi.StringInput `pulumi:"contents"` // The password associated with the certificate. // // > **NOTE:** A PEM certificate is already base64 encoded. To successfully import, the `contents` property should include a PEM encoded X509 certificate and a privateKey in pkcs8 format. There should only be linux style `\n` line endings and the whole block should have the PEM begin/end blocks around the certificate data and the private key data. // // To convert a private key to pkcs8 format with openssl use: // // The PEM content should look something like: Password pulumi.StringPtrInput `pulumi:"password"` } func (CertifiateCertificateArgs) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificate)(nil)).Elem() } func (i CertifiateCertificateArgs) ToCertifiateCertificateOutput() CertifiateCertificateOutput { return i.ToCertifiateCertificateOutputWithContext(context.Background()) } func (i CertifiateCertificateArgs) ToCertifiateCertificateOutputWithContext(ctx context.Context) CertifiateCertificateOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificateOutput) } func (i CertifiateCertificateArgs) ToCertifiateCertificatePtrOutput() CertifiateCertificatePtrOutput { return i.ToCertifiateCertificatePtrOutputWithContext(context.Background()) } func (i CertifiateCertificateArgs) ToCertifiateCertificatePtrOutputWithContext(ctx context.Context) CertifiateCertificatePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificateOutput).ToCertifiateCertificatePtrOutputWithContext(ctx) } // CertifiateCertificatePtrInput is an input type that accepts CertifiateCertificateArgs, CertifiateCertificatePtr and CertifiateCertificatePtrOutput values. // You can construct a concrete instance of `CertifiateCertificatePtrInput` via: // // CertifiateCertificateArgs{...} // // or: // // nil type CertifiateCertificatePtrInput interface { pulumi.Input ToCertifiateCertificatePtrOutput() CertifiateCertificatePtrOutput ToCertifiateCertificatePtrOutputWithContext(context.Context) CertifiateCertificatePtrOutput } type certifiateCertificatePtrType CertifiateCertificateArgs func CertifiateCertificatePtr(v *CertifiateCertificateArgs) CertifiateCertificatePtrInput { return (*certifiateCertificatePtrType)(v) } func (*certifiateCertificatePtrType) ElementType() reflect.Type { return reflect.TypeOf((**CertifiateCertificate)(nil)).Elem() } func (i *certifiateCertificatePtrType) ToCertifiateCertificatePtrOutput() CertifiateCertificatePtrOutput { return i.ToCertifiateCertificatePtrOutputWithContext(context.Background()) } func (i *certifiateCertificatePtrType) ToCertifiateCertificatePtrOutputWithContext(ctx context.Context) CertifiateCertificatePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificatePtrOutput) } type CertifiateCertificateOutput struct{ *pulumi.OutputState } func (CertifiateCertificateOutput) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificate)(nil)).Elem() } func (o CertifiateCertificateOutput) ToCertifiateCertificateOutput() CertifiateCertificateOutput { return o } func (o CertifiateCertificateOutput) ToCertifiateCertificateOutputWithContext(ctx context.Context) CertifiateCertificateOutput { return o } func (o CertifiateCertificateOutput) ToCertifiateCertificatePtrOutput() CertifiateCertificatePtrOutput { return o.ToCertifiateCertificatePtrOutputWithContext(context.Background()) } func (o CertifiateCertificateOutput) ToCertifiateCertificatePtrOutputWithContext(ctx context.Context) CertifiateCertificatePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v CertifiateCertificate) *CertifiateCertificate { return &v }).(CertifiateCertificatePtrOutput) } // The base64-encoded certificate contents. func (o CertifiateCertificateOutput) Contents() pulumi.StringOutput { return o.ApplyT(func(v CertifiateCertificate) string { return v.Contents }).(pulumi.StringOutput) } // The password associated with the certificate. // // > **NOTE:** A PEM certificate is already base64 encoded. To successfully import, the `contents` property should include a PEM encoded X509 certificate and a privateKey in pkcs8 format. There should only be linux style `\n` line endings and the whole block should have the PEM begin/end blocks around the certificate data and the private key data. // // To convert a private key to pkcs8 format with openssl use: // // The PEM content should look something like: func (o CertifiateCertificateOutput) Password() pulumi.StringPtrOutput { return o.ApplyT(func(v CertifiateCertificate) *string { return v.Password }).(pulumi.StringPtrOutput) } type CertifiateCertificatePtrOutput struct{ *pulumi.OutputState } func (CertifiateCertificatePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**CertifiateCertificate)(nil)).Elem() } func (o CertifiateCertificatePtrOutput) ToCertifiateCertificatePtrOutput() CertifiateCertificatePtrOutput { return o } func (o CertifiateCertificatePtrOutput) ToCertifiateCertificatePtrOutputWithContext(ctx context.Context) CertifiateCertificatePtrOutput { return o } func (o CertifiateCertificatePtrOutput) Elem() CertifiateCertificateOutput { return o.ApplyT(func(v *CertifiateCertificate) CertifiateCertificate { if v != nil { return *v } var ret CertifiateCertificate return ret }).(CertifiateCertificateOutput) } // The base64-encoded certificate contents. func (o CertifiateCertificatePtrOutput) Contents() pulumi.StringPtrOutput { return o.ApplyT(func(v *CertifiateCertificate) *string { if v == nil { return nil } return &v.Contents }).(pulumi.StringPtrOutput) } // The password associated with the certificate. // // > **NOTE:** A PEM certificate is already base64 encoded. To successfully import, the `contents` property should include a PEM encoded X509 certificate and a privateKey in pkcs8 format. There should only be linux style `\n` line endings and the whole block should have the PEM begin/end blocks around the certificate data and the private key data. // // To convert a private key to pkcs8 format with openssl use: // // The PEM content should look something like: func (o CertifiateCertificatePtrOutput) Password() pulumi.StringPtrOutput { return o.ApplyT(func(v *CertifiateCertificate) *string { if v == nil { return nil } return v.Password }).(pulumi.StringPtrOutput) } type CertifiateCertificateAttribute struct { // The create time of the Key Vault Certificate. Created *string `pulumi:"created"` // whether the Key Vault Certificate is enabled. Enabled *bool `pulumi:"enabled"` // The expires time of the Key Vault Certificate. Expires *string `pulumi:"expires"` // The not before valid time of the Key Vault Certificate. NotBefore *string `pulumi:"notBefore"` // The deletion recovery level of the Key Vault Certificate. RecoveryLevel *string `pulumi:"recoveryLevel"` // The recent update time of the Key Vault Certificate. Updated *string `pulumi:"updated"` } // CertifiateCertificateAttributeInput is an input type that accepts CertifiateCertificateAttributeArgs and CertifiateCertificateAttributeOutput values. // You can construct a concrete instance of `CertifiateCertificateAttributeInput` via: // // CertifiateCertificateAttributeArgs{...} type CertifiateCertificateAttributeInput interface { pulumi.Input ToCertifiateCertificateAttributeOutput() CertifiateCertificateAttributeOutput ToCertifiateCertificateAttributeOutputWithContext(context.Context) CertifiateCertificateAttributeOutput } type CertifiateCertificateAttributeArgs struct { // The create time of the Key Vault Certificate. Created pulumi.StringPtrInput `pulumi:"created"` // whether the Key Vault Certificate is enabled. Enabled pulumi.BoolPtrInput `pulumi:"enabled"` // The expires time of the Key Vault Certificate. Expires pulumi.StringPtrInput `pulumi:"expires"` // The not before valid time of the Key Vault Certificate. NotBefore pulumi.StringPtrInput `pulumi:"notBefore"` // The deletion recovery level of the Key Vault Certificate. RecoveryLevel pulumi.StringPtrInput `pulumi:"recoveryLevel"` // The recent update time of the Key Vault Certificate. Updated pulumi.StringPtrInput `pulumi:"updated"` } func (CertifiateCertificateAttributeArgs) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificateAttribute)(nil)).Elem() } func (i CertifiateCertificateAttributeArgs) ToCertifiateCertificateAttributeOutput() CertifiateCertificateAttributeOutput { return i.ToCertifiateCertificateAttributeOutputWithContext(context.Background()) } func (i CertifiateCertificateAttributeArgs) ToCertifiateCertificateAttributeOutputWithContext(ctx context.Context) CertifiateCertificateAttributeOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificateAttributeOutput) } // CertifiateCertificateAttributeArrayInput is an input type that accepts CertifiateCertificateAttributeArray and CertifiateCertificateAttributeArrayOutput values. // You can construct a concrete instance of `CertifiateCertificateAttributeArrayInput` via: // // CertifiateCertificateAttributeArray{ CertifiateCertificateAttributeArgs{...} } type CertifiateCertificateAttributeArrayInput interface { pulumi.Input ToCertifiateCertificateAttributeArrayOutput() CertifiateCertificateAttributeArrayOutput ToCertifiateCertificateAttributeArrayOutputWithContext(context.Context) CertifiateCertificateAttributeArrayOutput } type CertifiateCertificateAttributeArray []CertifiateCertificateAttributeInput func (CertifiateCertificateAttributeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]CertifiateCertificateAttribute)(nil)).Elem() } func (i CertifiateCertificateAttributeArray) ToCertifiateCertificateAttributeArrayOutput() CertifiateCertificateAttributeArrayOutput { return i.ToCertifiateCertificateAttributeArrayOutputWithContext(context.Background()) } func (i CertifiateCertificateAttributeArray) ToCertifiateCertificateAttributeArrayOutputWithContext(ctx context.Context) CertifiateCertificateAttributeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificateAttributeArrayOutput) } type CertifiateCertificateAttributeOutput struct{ *pulumi.OutputState } func (CertifiateCertificateAttributeOutput) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificateAttribute)(nil)).Elem() } func (o CertifiateCertificateAttributeOutput) ToCertifiateCertificateAttributeOutput() CertifiateCertificateAttributeOutput { return o } func (o CertifiateCertificateAttributeOutput) ToCertifiateCertificateAttributeOutputWithContext(ctx context.Context) CertifiateCertificateAttributeOutput { return o } // The create time of the Key Vault Certificate. func (o CertifiateCertificateAttributeOutput) Created() pulumi.StringPtrOutput { return o.ApplyT(func(v CertifiateCertificateAttribute) *string { return v.Created }).(pulumi.StringPtrOutput) } // whether the Key Vault Certificate is enabled. func (o CertifiateCertificateAttributeOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v CertifiateCertificateAttribute) *bool { return v.Enabled }).(pulumi.BoolPtrOutput) } // The expires time of the Key Vault Certificate. func (o CertifiateCertificateAttributeOutput) Expires() pulumi.StringPtrOutput { return o.ApplyT(func(v CertifiateCertificateAttribute) *string { return v.Expires }).(pulumi.StringPtrOutput) } // The not before valid time of the Key Vault Certificate. func (o CertifiateCertificateAttributeOutput) NotBefore() pulumi.StringPtrOutput { return o.ApplyT(func(v CertifiateCertificateAttribute) *string { return v.NotBefore }).(pulumi.StringPtrOutput) } // The deletion recovery level of the Key Vault Certificate. func (o CertifiateCertificateAttributeOutput) RecoveryLevel() pulumi.StringPtrOutput { return o.ApplyT(func(v CertifiateCertificateAttribute) *string { return v.RecoveryLevel }).(pulumi.StringPtrOutput) } // The recent update time of the Key Vault Certificate. func (o CertifiateCertificateAttributeOutput) Updated() pulumi.StringPtrOutput { return o.ApplyT(func(v CertifiateCertificateAttribute) *string { return v.Updated }).(pulumi.StringPtrOutput) } type CertifiateCertificateAttributeArrayOutput struct{ *pulumi.OutputState } func (CertifiateCertificateAttributeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]CertifiateCertificateAttribute)(nil)).Elem() } func (o CertifiateCertificateAttributeArrayOutput) ToCertifiateCertificateAttributeArrayOutput() CertifiateCertificateAttributeArrayOutput { return o } func (o CertifiateCertificateAttributeArrayOutput) ToCertifiateCertificateAttributeArrayOutputWithContext(ctx context.Context) CertifiateCertificateAttributeArrayOutput { return o } func (o CertifiateCertificateAttributeArrayOutput) Index(i pulumi.IntInput) CertifiateCertificateAttributeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) CertifiateCertificateAttribute { return vs[0].([]CertifiateCertificateAttribute)[vs[1].(int)] }).(CertifiateCertificateAttributeOutput) } type CertifiateCertificatePolicy struct { // A `issuerParameters` block as defined below. IssuerParameters CertifiateCertificatePolicyIssuerParameters `pulumi:"issuerParameters"` // A `keyProperties` block as defined below. KeyProperties CertifiateCertificatePolicyKeyProperties `pulumi:"keyProperties"` // A `lifetimeAction` block as defined below. LifetimeActions []CertifiateCertificatePolicyLifetimeAction `pulumi:"lifetimeActions"` // A `secretProperties` block as defined below. SecretProperties CertifiateCertificatePolicySecretProperties `pulumi:"secretProperties"` // A `x509CertificateProperties` block as defined below. Required when `certificate` block is not specified. X509CertificateProperties *CertifiateCertificatePolicyX509CertificateProperties `pulumi:"x509CertificateProperties"` } // CertifiateCertificatePolicyInput is an input type that accepts CertifiateCertificatePolicyArgs and CertifiateCertificatePolicyOutput values. // You can construct a concrete instance of `CertifiateCertificatePolicyInput` via: // // CertifiateCertificatePolicyArgs{...} type CertifiateCertificatePolicyInput interface { pulumi.Input ToCertifiateCertificatePolicyOutput() CertifiateCertificatePolicyOutput ToCertifiateCertificatePolicyOutputWithContext(context.Context) CertifiateCertificatePolicyOutput } type CertifiateCertificatePolicyArgs struct { // A `issuerParameters` block as defined below. IssuerParameters CertifiateCertificatePolicyIssuerParametersInput `pulumi:"issuerParameters"` // A `keyProperties` block as defined below. KeyProperties CertifiateCertificatePolicyKeyPropertiesInput `pulumi:"keyProperties"` // A `lifetimeAction` block as defined below. LifetimeActions CertifiateCertificatePolicyLifetimeActionArrayInput `pulumi:"lifetimeActions"` // A `secretProperties` block as defined below. SecretProperties CertifiateCertificatePolicySecretPropertiesInput `pulumi:"secretProperties"` // A `x509CertificateProperties` block as defined below. Required when `certificate` block is not specified. X509CertificateProperties CertifiateCertificatePolicyX509CertificatePropertiesPtrInput `pulumi:"x509CertificateProperties"` } func (CertifiateCertificatePolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificatePolicy)(nil)).Elem() } func (i CertifiateCertificatePolicyArgs) ToCertifiateCertificatePolicyOutput() CertifiateCertificatePolicyOutput { return i.ToCertifiateCertificatePolicyOutputWithContext(context.Background()) } func (i CertifiateCertificatePolicyArgs) ToCertifiateCertificatePolicyOutputWithContext(ctx context.Context) CertifiateCertificatePolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificatePolicyOutput) } func (i CertifiateCertificatePolicyArgs) ToCertifiateCertificatePolicyPtrOutput() CertifiateCertificatePolicyPtrOutput { return i.ToCertifiateCertificatePolicyPtrOutputWithContext(context.Background()) } func (i CertifiateCertificatePolicyArgs) ToCertifiateCertificatePolicyPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificatePolicyOutput).ToCertifiateCertificatePolicyPtrOutputWithContext(ctx) } // CertifiateCertificatePolicyPtrInput is an input type that accepts CertifiateCertificatePolicyArgs, CertifiateCertificatePolicyPtr and CertifiateCertificatePolicyPtrOutput values. // You can construct a concrete instance of `CertifiateCertificatePolicyPtrInput` via: // // CertifiateCertificatePolicyArgs{...} // // or: // // nil type CertifiateCertificatePolicyPtrInput interface { pulumi.Input ToCertifiateCertificatePolicyPtrOutput() CertifiateCertificatePolicyPtrOutput ToCertifiateCertificatePolicyPtrOutputWithContext(context.Context) CertifiateCertificatePolicyPtrOutput } type certifiateCertificatePolicyPtrType CertifiateCertificatePolicyArgs func CertifiateCertificatePolicyPtr(v *CertifiateCertificatePolicyArgs) CertifiateCertificatePolicyPtrInput { return (*certifiateCertificatePolicyPtrType)(v) } func (*certifiateCertificatePolicyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**CertifiateCertificatePolicy)(nil)).Elem() } func (i *certifiateCertificatePolicyPtrType) ToCertifiateCertificatePolicyPtrOutput() CertifiateCertificatePolicyPtrOutput { return i.ToCertifiateCertificatePolicyPtrOutputWithContext(context.Background()) } func (i *certifiateCertificatePolicyPtrType) ToCertifiateCertificatePolicyPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificatePolicyPtrOutput) } type CertifiateCertificatePolicyOutput struct{ *pulumi.OutputState } func (CertifiateCertificatePolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificatePolicy)(nil)).Elem() } func (o CertifiateCertificatePolicyOutput) ToCertifiateCertificatePolicyOutput() CertifiateCertificatePolicyOutput { return o } func (o CertifiateCertificatePolicyOutput) ToCertifiateCertificatePolicyOutputWithContext(ctx context.Context) CertifiateCertificatePolicyOutput { return o } func (o CertifiateCertificatePolicyOutput) ToCertifiateCertificatePolicyPtrOutput() CertifiateCertificatePolicyPtrOutput { return o.ToCertifiateCertificatePolicyPtrOutputWithContext(context.Background()) } func (o CertifiateCertificatePolicyOutput) ToCertifiateCertificatePolicyPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v CertifiateCertificatePolicy) *CertifiateCertificatePolicy { return &v }).(CertifiateCertificatePolicyPtrOutput) } // A `issuerParameters` block as defined below. func (o CertifiateCertificatePolicyOutput) IssuerParameters() CertifiateCertificatePolicyIssuerParametersOutput { return o.ApplyT(func(v CertifiateCertificatePolicy) CertifiateCertificatePolicyIssuerParameters { return v.IssuerParameters }).(CertifiateCertificatePolicyIssuerParametersOutput) } // A `keyProperties` block as defined below. func (o CertifiateCertificatePolicyOutput) KeyProperties() CertifiateCertificatePolicyKeyPropertiesOutput { return o.ApplyT(func(v CertifiateCertificatePolicy) CertifiateCertificatePolicyKeyProperties { return v.KeyProperties }).(CertifiateCertificatePolicyKeyPropertiesOutput) } // A `lifetimeAction` block as defined below. func (o CertifiateCertificatePolicyOutput) LifetimeActions() CertifiateCertificatePolicyLifetimeActionArrayOutput { return o.ApplyT(func(v CertifiateCertificatePolicy) []CertifiateCertificatePolicyLifetimeAction { return v.LifetimeActions }).(CertifiateCertificatePolicyLifetimeActionArrayOutput) } // A `secretProperties` block as defined below. func (o CertifiateCertificatePolicyOutput) SecretProperties() CertifiateCertificatePolicySecretPropertiesOutput { return o.ApplyT(func(v CertifiateCertificatePolicy) CertifiateCertificatePolicySecretProperties { return v.SecretProperties }).(CertifiateCertificatePolicySecretPropertiesOutput) } // A `x509CertificateProperties` block as defined below. Required when `certificate` block is not specified. func (o CertifiateCertificatePolicyOutput) X509CertificateProperties() CertifiateCertificatePolicyX509CertificatePropertiesPtrOutput { return o.ApplyT(func(v CertifiateCertificatePolicy) *CertifiateCertificatePolicyX509CertificateProperties { return v.X509CertificateProperties }).(CertifiateCertificatePolicyX509CertificatePropertiesPtrOutput) } type CertifiateCertificatePolicyPtrOutput struct{ *pulumi.OutputState } func (CertifiateCertificatePolicyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**CertifiateCertificatePolicy)(nil)).Elem() } func (o CertifiateCertificatePolicyPtrOutput) ToCertifiateCertificatePolicyPtrOutput() CertifiateCertificatePolicyPtrOutput { return o } func (o CertifiateCertificatePolicyPtrOutput) ToCertifiateCertificatePolicyPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyPtrOutput { return o } func (o CertifiateCertificatePolicyPtrOutput) Elem() CertifiateCertificatePolicyOutput { return o.ApplyT(func(v *CertifiateCertificatePolicy) CertifiateCertificatePolicy { if v != nil { return *v } var ret CertifiateCertificatePolicy return ret }).(CertifiateCertificatePolicyOutput) } // A `issuerParameters` block as defined below. func (o CertifiateCertificatePolicyPtrOutput) IssuerParameters() CertifiateCertificatePolicyIssuerParametersPtrOutput { return o.ApplyT(func(v *CertifiateCertificatePolicy) *CertifiateCertificatePolicyIssuerParameters { if v == nil { return nil } return &v.IssuerParameters }).(CertifiateCertificatePolicyIssuerParametersPtrOutput) } // A `keyProperties` block as defined below. func (o CertifiateCertificatePolicyPtrOutput) KeyProperties() CertifiateCertificatePolicyKeyPropertiesPtrOutput { return o.ApplyT(func(v *CertifiateCertificatePolicy) *CertifiateCertificatePolicyKeyProperties { if v == nil { return nil } return &v.KeyProperties }).(CertifiateCertificatePolicyKeyPropertiesPtrOutput) } // A `lifetimeAction` block as defined below. func (o CertifiateCertificatePolicyPtrOutput) LifetimeActions() CertifiateCertificatePolicyLifetimeActionArrayOutput { return o.ApplyT(func(v *CertifiateCertificatePolicy) []CertifiateCertificatePolicyLifetimeAction { if v == nil { return nil } return v.LifetimeActions }).(CertifiateCertificatePolicyLifetimeActionArrayOutput) } // A `secretProperties` block as defined below. func (o CertifiateCertificatePolicyPtrOutput) SecretProperties() CertifiateCertificatePolicySecretPropertiesPtrOutput { return o.ApplyT(func(v *CertifiateCertificatePolicy) *CertifiateCertificatePolicySecretProperties { if v == nil { return nil } return &v.SecretProperties }).(CertifiateCertificatePolicySecretPropertiesPtrOutput) } // A `x509CertificateProperties` block as defined below. Required when `certificate` block is not specified. func (o CertifiateCertificatePolicyPtrOutput) X509CertificateProperties() CertifiateCertificatePolicyX509CertificatePropertiesPtrOutput { return o.ApplyT(func(v *CertifiateCertificatePolicy) *CertifiateCertificatePolicyX509CertificateProperties { if v == nil { return nil } return v.X509CertificateProperties }).(CertifiateCertificatePolicyX509CertificatePropertiesPtrOutput) } type CertifiateCertificatePolicyIssuerParameters struct { // The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). Name string `pulumi:"name"` } // CertifiateCertificatePolicyIssuerParametersInput is an input type that accepts CertifiateCertificatePolicyIssuerParametersArgs and CertifiateCertificatePolicyIssuerParametersOutput values. // You can construct a concrete instance of `CertifiateCertificatePolicyIssuerParametersInput` via: // // CertifiateCertificatePolicyIssuerParametersArgs{...} type CertifiateCertificatePolicyIssuerParametersInput interface { pulumi.Input ToCertifiateCertificatePolicyIssuerParametersOutput() CertifiateCertificatePolicyIssuerParametersOutput ToCertifiateCertificatePolicyIssuerParametersOutputWithContext(context.Context) CertifiateCertificatePolicyIssuerParametersOutput } type CertifiateCertificatePolicyIssuerParametersArgs struct { // The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). Name pulumi.StringInput `pulumi:"name"` } func (CertifiateCertificatePolicyIssuerParametersArgs) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificatePolicyIssuerParameters)(nil)).Elem() } func (i CertifiateCertificatePolicyIssuerParametersArgs) ToCertifiateCertificatePolicyIssuerParametersOutput() CertifiateCertificatePolicyIssuerParametersOutput { return i.ToCertifiateCertificatePolicyIssuerParametersOutputWithContext(context.Background()) } func (i CertifiateCertificatePolicyIssuerParametersArgs) ToCertifiateCertificatePolicyIssuerParametersOutputWithContext(ctx context.Context) CertifiateCertificatePolicyIssuerParametersOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificatePolicyIssuerParametersOutput) } func (i CertifiateCertificatePolicyIssuerParametersArgs) ToCertifiateCertificatePolicyIssuerParametersPtrOutput() CertifiateCertificatePolicyIssuerParametersPtrOutput { return i.ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(context.Background()) } func (i CertifiateCertificatePolicyIssuerParametersArgs) ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyIssuerParametersPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificatePolicyIssuerParametersOutput).ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(ctx) } // CertifiateCertificatePolicyIssuerParametersPtrInput is an input type that accepts CertifiateCertificatePolicyIssuerParametersArgs, CertifiateCertificatePolicyIssuerParametersPtr and CertifiateCertificatePolicyIssuerParametersPtrOutput values. // You can construct a concrete instance of `CertifiateCertificatePolicyIssuerParametersPtrInput` via: // // CertifiateCertificatePolicyIssuerParametersArgs{...} // // or: // // nil type CertifiateCertificatePolicyIssuerParametersPtrInput interface { pulumi.Input ToCertifiateCertificatePolicyIssuerParametersPtrOutput() CertifiateCertificatePolicyIssuerParametersPtrOutput ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(context.Context) CertifiateCertificatePolicyIssuerParametersPtrOutput } type certifiateCertificatePolicyIssuerParametersPtrType CertifiateCertificatePolicyIssuerParametersArgs func CertifiateCertificatePolicyIssuerParametersPtr(v *CertifiateCertificatePolicyIssuerParametersArgs) CertifiateCertificatePolicyIssuerParametersPtrInput { return (*certifiateCertificatePolicyIssuerParametersPtrType)(v) } func (*certifiateCertificatePolicyIssuerParametersPtrType) ElementType() reflect.Type { return reflect.TypeOf((**CertifiateCertificatePolicyIssuerParameters)(nil)).Elem() } func (i *certifiateCertificatePolicyIssuerParametersPtrType) ToCertifiateCertificatePolicyIssuerParametersPtrOutput() CertifiateCertificatePolicyIssuerParametersPtrOutput { return i.ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(context.Background()) } func (i *certifiateCertificatePolicyIssuerParametersPtrType) ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyIssuerParametersPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateCertificatePolicyIssuerParametersPtrOutput) } type CertifiateCertificatePolicyIssuerParametersOutput struct{ *pulumi.OutputState } func (CertifiateCertificatePolicyIssuerParametersOutput) ElementType() reflect.Type { return reflect.TypeOf((*CertifiateCertificatePolicyIssuerParameters)(nil)).Elem() } func (o CertifiateCertificatePolicyIssuerParametersOutput) ToCertifiateCertificatePolicyIssuerParametersOutput() CertifiateCertificatePolicyIssuerParametersOutput { return o } func (o CertifiateCertificatePolicyIssuerParametersOutput) ToCertifiateCertificatePolicyIssuerParametersOutputWithContext(ctx context.Context) CertifiateCertificatePolicyIssuerParametersOutput { return o } func (o CertifiateCertificatePolicyIssuerParametersOutput) ToCertifiateCertificatePolicyIssuerParametersPtrOutput() CertifiateCertificatePolicyIssuerParametersPtrOutput { return o.ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(context.Background()) } func (o CertifiateCertificatePolicyIssuerParametersOutput) ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyIssuerParametersPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v CertifiateCertificatePolicyIssuerParameters) *CertifiateCertificatePolicyIssuerParameters { return &v }).(CertifiateCertificatePolicyIssuerParametersPtrOutput) } // The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). func (o CertifiateCertificatePolicyIssuerParametersOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v CertifiateCertificatePolicyIssuerParameters) string { return v.Name }).(pulumi.StringOutput) } type CertifiateCertificatePolicyIssuerParametersPtrOutput struct{ *pulumi.OutputState } func (CertifiateCertificatePolicyIssuerParametersPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**CertifiateCertificatePolicyIssuerParameters)(nil)).Elem() } func (o CertifiateCertificatePolicyIssuerParametersPtrOutput) ToCertifiateCertificatePolicyIssuerParametersPtrOutput() CertifiateCertificatePolicyIssuerParametersPtrOutput { return o } func (o CertifiateCertificatePolicyIssuerParametersPtrOutput) ToCertifiateCertificatePolicyIssuerParametersPtrOutputWithContext(ctx context.Context) CertifiateCertificatePolicyIssuerParametersPtrOutput { return o } func (o CertifiateCertificatePolicyIssuerParametersPtrOutput) Elem() CertifiateCertificatePolicyIssuerParametersOutput { return o.ApplyT(func(v *CertifiateCertificatePolicyIssuerParameters) CertifiateCertificatePolicyIssuerParameters { if v != nil { return *v } var ret CertifiateCertificatePolicyIssuerParameters return ret }).(CertifiateCertificatePolicyIssuerParametersOutput) } // The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). func (o CertifiateCertificatePolicyIssuerParametersPtrOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v *CertifiateCertificatePolicyIssuerParameters) *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/keyvault/getSecrets.go
sdk/go/azure/keyvault/getSecrets.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 retrieve a list of secret names from an existing Key Vault Secret. // // ## Example Usage func GetSecrets(ctx *pulumi.Context, args *GetSecretsArgs, opts ...pulumi.InvokeOption) (*GetSecretsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetSecretsResult err := ctx.Invoke("azure:keyvault/getSecrets:getSecrets", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSecrets. type GetSecretsArgs struct { // Specifies the ID of the Key Vault instance to fetch secret names from, available on the `keyvault.KeyVault` Data Source / Resource. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. KeyVaultId string `pulumi:"keyVaultId"` } // A collection of values returned by getSecrets. type GetSecretsResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` KeyVaultId string `pulumi:"keyVaultId"` // List containing names of secrets that exist in this Key Vault. Names []string `pulumi:"names"` // One or more `secrets` blocks as defined below. Secrets []GetSecretsSecret `pulumi:"secrets"` } func GetSecretsOutput(ctx *pulumi.Context, args GetSecretsOutputArgs, opts ...pulumi.InvokeOption) GetSecretsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetSecretsResultOutput, error) { args := v.(GetSecretsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getSecrets:getSecrets", args, GetSecretsResultOutput{}, options).(GetSecretsResultOutput), nil }).(GetSecretsResultOutput) } // A collection of arguments for invoking getSecrets. type GetSecretsOutputArgs struct { // Specifies the ID of the Key Vault instance to fetch secret names from, available on the `keyvault.KeyVault` Data Source / Resource. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` } func (GetSecretsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetSecretsArgs)(nil)).Elem() } // A collection of values returned by getSecrets. type GetSecretsResultOutput struct{ *pulumi.OutputState } func (GetSecretsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetSecretsResult)(nil)).Elem() } func (o GetSecretsResultOutput) ToGetSecretsResultOutput() GetSecretsResultOutput { return o } func (o GetSecretsResultOutput) ToGetSecretsResultOutputWithContext(ctx context.Context) GetSecretsResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetSecretsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetSecretsResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetSecretsResultOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v GetSecretsResult) string { return v.KeyVaultId }).(pulumi.StringOutput) } // List containing names of secrets that exist in this Key Vault. func (o GetSecretsResultOutput) Names() pulumi.StringArrayOutput { return o.ApplyT(func(v GetSecretsResult) []string { return v.Names }).(pulumi.StringArrayOutput) } // One or more `secrets` blocks as defined below. func (o GetSecretsResultOutput) Secrets() GetSecretsSecretArrayOutput { return o.ApplyT(func(v GetSecretsResult) []GetSecretsSecret { return v.Secrets }).(GetSecretsSecretArrayOutput) } func init() { pulumi.RegisterOutputType(GetSecretsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/keyVault.go
sdk/go/azure/keyvault/keyVault.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault. // // ## Disclaimers // // > **Note:** It's possible to define Key Vault Access Policies both within the `keyvault.KeyVault` resource via the `accessPolicy` block and by using the `keyvault.AccessPolicy` resource. However it's not possible to use both methods to manage Access Policies within a KeyVault, since there'll be conflicts. // // > **Note:** It's possible to define Key Vault Certificate Contacts both within the `keyvault.KeyVault` resource via the `contact` block and by using the `keyvault.CertificateContacts` resource. However it's not possible to use both methods to manage Certificate Contacts within a KeyVault, since there'll be conflicts. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // EnabledForDiskEncryption: pulumi.Bool(true), // TenantId: pulumi.String(current.TenantId), // SoftDeleteRetentionDays: pulumi.Int(7), // PurgeProtectionEnabled: pulumi.Bool(false), // SkuName: pulumi.String("standard"), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // StoragePermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/keyVault:KeyVault example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.KeyVault/vaults/vault1 // ``` type KeyVault struct { pulumi.CustomResourceState // A list of up to 1024 objects describing access policies, as described below. // // > **Note:** Since `accessPolicy` can be configured both inline and via the separate `keyvault.AccessPolicy` resource, we have to explicitly set it to empty slice (`[]`) to remove it. AccessPolicies KeyVaultAccessPolicyArrayOutput `pulumi:"accessPolicies"` // Deprecated: As the `contact` property uses a data plane API, to better support private endpoints and key vaults with public network access disabled, new key vaults with the `contact` field defined in the configuration file will now be required to use the `keyvault.CertificateContacts` resource instead of the exposed `contact` field in the key vault resource itself. This field will be removed in v5.0 of the provider. Contacts KeyVaultContactArrayOutput `pulumi:"contacts"` // Deprecated: This property has been renamed to `rbacAuthorizationEnabled` and will be removed in v5.0 of the provider EnableRbacAuthorization pulumi.BoolOutput `pulumi:"enableRbacAuthorization"` // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. EnabledForDeployment pulumi.BoolPtrOutput `pulumi:"enabledForDeployment"` // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. EnabledForDiskEncryption pulumi.BoolPtrOutput `pulumi:"enabledForDiskEncryption"` // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. EnabledForTemplateDeployment pulumi.BoolPtrOutput `pulumi:"enabledForTemplateDeployment"` // 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 Key Vault. Changing this forces a new resource to be created. The name must be globally unique. If the vault is in a recoverable state then the vault will need to be purged before reusing the name. Name pulumi.StringOutput `pulumi:"name"` // A `networkAcls` block as defined below. NetworkAcls KeyVaultNetworkAclsOutput `pulumi:"networkAcls"` // Whether public network access is allowed for this Key Vault. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // Is Purge Protection enabled for this Key Vault? // // !> **Note:** Once Purge Protection has been Enabled it's not possible to Disable it. Support for [disabling purge protection is being tracked in this Azure API issue](https://github.com/Azure/azure-rest-api-specs/issues/8075). Deleting the Key Vault with Purge Protection Enabled will schedule the Key Vault to be deleted (which will happen by Azure in the configured number of days, currently 90 days). PurgeProtectionEnabled pulumi.BoolPtrOutput `pulumi:"purgeProtectionEnabled"` // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. // // > **Note:** Changing the permission model requires unrestricted (no conditions on the role assignment) `Microsoft.Authorization/roleAssignments/write` permission, which is part of the `Owner` and `User Access Administrator` roles. Classic subscription administrator roles like `Service Administrator` and `Co-Administrator`, or restricted `Key Vault Data Access Administrator` cannot be used to change the permission model. For more information, please see the [product documentation](https://learn.microsoft.com/azure/key-vault/general/rbac-guide?tabs=azure-cli#using-azure-rbac-secret-key-and-certificate-permissions-with-key-vault:~:text=Enable%20Azure%20RBAC,change%20permission%20model). RbacAuthorizationEnabled pulumi.BoolOutput `pulumi:"rbacAuthorizationEnabled"` // The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The Name of the SKU used for this Key Vault. Possible values are `standard` and `premium`. SkuName pulumi.StringOutput `pulumi:"skuName"` // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` (the default) days. // // > **Note:** This field can only be configured one time and cannot be updated. SoftDeleteRetentionDays pulumi.IntPtrOutput `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. TenantId pulumi.StringOutput `pulumi:"tenantId"` // The URI of the Key Vault, used for performing operations on keys and secrets. VaultUri pulumi.StringOutput `pulumi:"vaultUri"` } // NewKeyVault registers a new resource with the given unique name, arguments, and options. func NewKeyVault(ctx *pulumi.Context, name string, args *KeyVaultArgs, opts ...pulumi.ResourceOption) (*KeyVault, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource KeyVault err := ctx.RegisterResource("azure:keyvault/keyVault:KeyVault", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetKeyVault gets an existing KeyVault resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetKeyVault(ctx *pulumi.Context, name string, id pulumi.IDInput, state *KeyVaultState, opts ...pulumi.ResourceOption) (*KeyVault, error) { var resource KeyVault err := ctx.ReadResource("azure:keyvault/keyVault:KeyVault", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering KeyVault resources. type keyVaultState struct { // A list of up to 1024 objects describing access policies, as described below. // // > **Note:** Since `accessPolicy` can be configured both inline and via the separate `keyvault.AccessPolicy` resource, we have to explicitly set it to empty slice (`[]`) to remove it. AccessPolicies []KeyVaultAccessPolicy `pulumi:"accessPolicies"` // Deprecated: As the `contact` property uses a data plane API, to better support private endpoints and key vaults with public network access disabled, new key vaults with the `contact` field defined in the configuration file will now be required to use the `keyvault.CertificateContacts` resource instead of the exposed `contact` field in the key vault resource itself. This field will be removed in v5.0 of the provider. Contacts []KeyVaultContact `pulumi:"contacts"` // Deprecated: This property has been renamed to `rbacAuthorizationEnabled` and will be removed in v5.0 of the provider EnableRbacAuthorization *bool `pulumi:"enableRbacAuthorization"` // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. EnabledForDeployment *bool `pulumi:"enabledForDeployment"` // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. EnabledForDiskEncryption *bool `pulumi:"enabledForDiskEncryption"` // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. EnabledForTemplateDeployment *bool `pulumi:"enabledForTemplateDeployment"` // 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 Key Vault. Changing this forces a new resource to be created. The name must be globally unique. If the vault is in a recoverable state then the vault will need to be purged before reusing the name. Name *string `pulumi:"name"` // A `networkAcls` block as defined below. NetworkAcls *KeyVaultNetworkAcls `pulumi:"networkAcls"` // Whether public network access is allowed for this Key Vault. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Is Purge Protection enabled for this Key Vault? // // !> **Note:** Once Purge Protection has been Enabled it's not possible to Disable it. Support for [disabling purge protection is being tracked in this Azure API issue](https://github.com/Azure/azure-rest-api-specs/issues/8075). Deleting the Key Vault with Purge Protection Enabled will schedule the Key Vault to be deleted (which will happen by Azure in the configured number of days, currently 90 days). PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"` // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. // // > **Note:** Changing the permission model requires unrestricted (no conditions on the role assignment) `Microsoft.Authorization/roleAssignments/write` permission, which is part of the `Owner` and `User Access Administrator` roles. Classic subscription administrator roles like `Service Administrator` and `Co-Administrator`, or restricted `Key Vault Data Access Administrator` cannot be used to change the permission model. For more information, please see the [product documentation](https://learn.microsoft.com/azure/key-vault/general/rbac-guide?tabs=azure-cli#using-azure-rbac-secret-key-and-certificate-permissions-with-key-vault:~:text=Enable%20Azure%20RBAC,change%20permission%20model). RbacAuthorizationEnabled *bool `pulumi:"rbacAuthorizationEnabled"` // The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Name of the SKU used for this Key Vault. Possible values are `standard` and `premium`. SkuName *string `pulumi:"skuName"` // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` (the default) days. // // > **Note:** This field can only be configured one time and cannot be updated. SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. TenantId *string `pulumi:"tenantId"` // The URI of the Key Vault, used for performing operations on keys and secrets. VaultUri *string `pulumi:"vaultUri"` } type KeyVaultState struct { // A list of up to 1024 objects describing access policies, as described below. // // > **Note:** Since `accessPolicy` can be configured both inline and via the separate `keyvault.AccessPolicy` resource, we have to explicitly set it to empty slice (`[]`) to remove it. AccessPolicies KeyVaultAccessPolicyArrayInput // Deprecated: As the `contact` property uses a data plane API, to better support private endpoints and key vaults with public network access disabled, new key vaults with the `contact` field defined in the configuration file will now be required to use the `keyvault.CertificateContacts` resource instead of the exposed `contact` field in the key vault resource itself. This field will be removed in v5.0 of the provider. Contacts KeyVaultContactArrayInput // Deprecated: This property has been renamed to `rbacAuthorizationEnabled` and will be removed in v5.0 of the provider EnableRbacAuthorization pulumi.BoolPtrInput // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. EnabledForDeployment pulumi.BoolPtrInput // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. EnabledForDiskEncryption pulumi.BoolPtrInput // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. EnabledForTemplateDeployment 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 Key Vault. Changing this forces a new resource to be created. The name must be globally unique. If the vault is in a recoverable state then the vault will need to be purged before reusing the name. Name pulumi.StringPtrInput // A `networkAcls` block as defined below. NetworkAcls KeyVaultNetworkAclsPtrInput // Whether public network access is allowed for this Key Vault. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Is Purge Protection enabled for this Key Vault? // // !> **Note:** Once Purge Protection has been Enabled it's not possible to Disable it. Support for [disabling purge protection is being tracked in this Azure API issue](https://github.com/Azure/azure-rest-api-specs/issues/8075). Deleting the Key Vault with Purge Protection Enabled will schedule the Key Vault to be deleted (which will happen by Azure in the configured number of days, currently 90 days). PurgeProtectionEnabled pulumi.BoolPtrInput // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. // // > **Note:** Changing the permission model requires unrestricted (no conditions on the role assignment) `Microsoft.Authorization/roleAssignments/write` permission, which is part of the `Owner` and `User Access Administrator` roles. Classic subscription administrator roles like `Service Administrator` and `Co-Administrator`, or restricted `Key Vault Data Access Administrator` cannot be used to change the permission model. For more information, please see the [product documentation](https://learn.microsoft.com/azure/key-vault/general/rbac-guide?tabs=azure-cli#using-azure-rbac-secret-key-and-certificate-permissions-with-key-vault:~:text=Enable%20Azure%20RBAC,change%20permission%20model). RbacAuthorizationEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The Name of the SKU used for this Key Vault. Possible values are `standard` and `premium`. SkuName pulumi.StringPtrInput // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` (the default) days. // // > **Note:** This field can only be configured one time and cannot be updated. SoftDeleteRetentionDays pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. TenantId pulumi.StringPtrInput // The URI of the Key Vault, used for performing operations on keys and secrets. VaultUri pulumi.StringPtrInput } func (KeyVaultState) ElementType() reflect.Type { return reflect.TypeOf((*keyVaultState)(nil)).Elem() } type keyVaultArgs struct { // A list of up to 1024 objects describing access policies, as described below. // // > **Note:** Since `accessPolicy` can be configured both inline and via the separate `keyvault.AccessPolicy` resource, we have to explicitly set it to empty slice (`[]`) to remove it. AccessPolicies []KeyVaultAccessPolicy `pulumi:"accessPolicies"` // Deprecated: As the `contact` property uses a data plane API, to better support private endpoints and key vaults with public network access disabled, new key vaults with the `contact` field defined in the configuration file will now be required to use the `keyvault.CertificateContacts` resource instead of the exposed `contact` field in the key vault resource itself. This field will be removed in v5.0 of the provider. Contacts []KeyVaultContact `pulumi:"contacts"` // Deprecated: This property has been renamed to `rbacAuthorizationEnabled` and will be removed in v5.0 of the provider EnableRbacAuthorization *bool `pulumi:"enableRbacAuthorization"` // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. EnabledForDeployment *bool `pulumi:"enabledForDeployment"` // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. EnabledForDiskEncryption *bool `pulumi:"enabledForDiskEncryption"` // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. EnabledForTemplateDeployment *bool `pulumi:"enabledForTemplateDeployment"` // 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 Key Vault. Changing this forces a new resource to be created. The name must be globally unique. If the vault is in a recoverable state then the vault will need to be purged before reusing the name. Name *string `pulumi:"name"` // A `networkAcls` block as defined below. NetworkAcls *KeyVaultNetworkAcls `pulumi:"networkAcls"` // Whether public network access is allowed for this Key Vault. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Is Purge Protection enabled for this Key Vault? // // !> **Note:** Once Purge Protection has been Enabled it's not possible to Disable it. Support for [disabling purge protection is being tracked in this Azure API issue](https://github.com/Azure/azure-rest-api-specs/issues/8075). Deleting the Key Vault with Purge Protection Enabled will schedule the Key Vault to be deleted (which will happen by Azure in the configured number of days, currently 90 days). PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"` // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. // // > **Note:** Changing the permission model requires unrestricted (no conditions on the role assignment) `Microsoft.Authorization/roleAssignments/write` permission, which is part of the `Owner` and `User Access Administrator` roles. Classic subscription administrator roles like `Service Administrator` and `Co-Administrator`, or restricted `Key Vault Data Access Administrator` cannot be used to change the permission model. For more information, please see the [product documentation](https://learn.microsoft.com/azure/key-vault/general/rbac-guide?tabs=azure-cli#using-azure-rbac-secret-key-and-certificate-permissions-with-key-vault:~:text=Enable%20Azure%20RBAC,change%20permission%20model). RbacAuthorizationEnabled *bool `pulumi:"rbacAuthorizationEnabled"` // The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The Name of the SKU used for this Key Vault. Possible values are `standard` and `premium`. SkuName string `pulumi:"skuName"` // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` (the default) days. // // > **Note:** This field can only be configured one time and cannot be updated. SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a KeyVault resource. type KeyVaultArgs struct { // A list of up to 1024 objects describing access policies, as described below. // // > **Note:** Since `accessPolicy` can be configured both inline and via the separate `keyvault.AccessPolicy` resource, we have to explicitly set it to empty slice (`[]`) to remove it. AccessPolicies KeyVaultAccessPolicyArrayInput // Deprecated: As the `contact` property uses a data plane API, to better support private endpoints and key vaults with public network access disabled, new key vaults with the `contact` field defined in the configuration file will now be required to use the `keyvault.CertificateContacts` resource instead of the exposed `contact` field in the key vault resource itself. This field will be removed in v5.0 of the provider. Contacts KeyVaultContactArrayInput // Deprecated: This property has been renamed to `rbacAuthorizationEnabled` and will be removed in v5.0 of the provider EnableRbacAuthorization pulumi.BoolPtrInput // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. EnabledForDeployment pulumi.BoolPtrInput // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. EnabledForDiskEncryption pulumi.BoolPtrInput // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. EnabledForTemplateDeployment 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 Key Vault. Changing this forces a new resource to be created. The name must be globally unique. If the vault is in a recoverable state then the vault will need to be purged before reusing the name. Name pulumi.StringPtrInput // A `networkAcls` block as defined below. NetworkAcls KeyVaultNetworkAclsPtrInput // Whether public network access is allowed for this Key Vault. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Is Purge Protection enabled for this Key Vault? // // !> **Note:** Once Purge Protection has been Enabled it's not possible to Disable it. Support for [disabling purge protection is being tracked in this Azure API issue](https://github.com/Azure/azure-rest-api-specs/issues/8075). Deleting the Key Vault with Purge Protection Enabled will schedule the Key Vault to be deleted (which will happen by Azure in the configured number of days, currently 90 days). PurgeProtectionEnabled pulumi.BoolPtrInput // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. // // > **Note:** Changing the permission model requires unrestricted (no conditions on the role assignment) `Microsoft.Authorization/roleAssignments/write` permission, which is part of the `Owner` and `User Access Administrator` roles. Classic subscription administrator roles like `Service Administrator` and `Co-Administrator`, or restricted `Key Vault Data Access Administrator` cannot be used to change the permission model. For more information, please see the [product documentation](https://learn.microsoft.com/azure/key-vault/general/rbac-guide?tabs=azure-cli#using-azure-rbac-secret-key-and-certificate-permissions-with-key-vault:~:text=Enable%20Azure%20RBAC,change%20permission%20model). RbacAuthorizationEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The Name of the SKU used for this Key Vault. Possible values are `standard` and `premium`. SkuName pulumi.StringInput // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` (the default) days. // // > **Note:** This field can only be configured one time and cannot be updated. SoftDeleteRetentionDays pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. TenantId pulumi.StringInput } func (KeyVaultArgs) ElementType() reflect.Type { return reflect.TypeOf((*keyVaultArgs)(nil)).Elem() } type KeyVaultInput interface { pulumi.Input ToKeyVaultOutput() KeyVaultOutput ToKeyVaultOutputWithContext(ctx context.Context) KeyVaultOutput } func (*KeyVault) ElementType() reflect.Type { return reflect.TypeOf((**KeyVault)(nil)).Elem() } func (i *KeyVault) ToKeyVaultOutput() KeyVaultOutput { return i.ToKeyVaultOutputWithContext(context.Background()) } func (i *KeyVault) ToKeyVaultOutputWithContext(ctx context.Context) KeyVaultOutput { return pulumi.ToOutputWithContext(ctx, i).(KeyVaultOutput) } // KeyVaultArrayInput is an input type that accepts KeyVaultArray and KeyVaultArrayOutput values. // You can construct a concrete instance of `KeyVaultArrayInput` via: // // KeyVaultArray{ KeyVaultArgs{...} } type KeyVaultArrayInput interface { pulumi.Input ToKeyVaultArrayOutput() KeyVaultArrayOutput ToKeyVaultArrayOutputWithContext(context.Context) KeyVaultArrayOutput } type KeyVaultArray []KeyVaultInput func (KeyVaultArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*KeyVault)(nil)).Elem() } func (i KeyVaultArray) ToKeyVaultArrayOutput() KeyVaultArrayOutput { return i.ToKeyVaultArrayOutputWithContext(context.Background()) } func (i KeyVaultArray) ToKeyVaultArrayOutputWithContext(ctx context.Context) KeyVaultArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(KeyVaultArrayOutput) } // KeyVaultMapInput is an input type that accepts KeyVaultMap and KeyVaultMapOutput values. // You can construct a concrete instance of `KeyVaultMapInput` via: // // KeyVaultMap{ "key": KeyVaultArgs{...} } type KeyVaultMapInput interface { pulumi.Input ToKeyVaultMapOutput() KeyVaultMapOutput ToKeyVaultMapOutputWithContext(context.Context) KeyVaultMapOutput } type KeyVaultMap map[string]KeyVaultInput func (KeyVaultMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*KeyVault)(nil)).Elem() } func (i KeyVaultMap) ToKeyVaultMapOutput() KeyVaultMapOutput { return i.ToKeyVaultMapOutputWithContext(context.Background()) } func (i KeyVaultMap) ToKeyVaultMapOutputWithContext(ctx context.Context) KeyVaultMapOutput { return pulumi.ToOutputWithContext(ctx, i).(KeyVaultMapOutput) } type KeyVaultOutput struct{ *pulumi.OutputState } func (KeyVaultOutput) ElementType() reflect.Type { return reflect.TypeOf((**KeyVault)(nil)).Elem() } func (o KeyVaultOutput) ToKeyVaultOutput() KeyVaultOutput { return o } func (o KeyVaultOutput) ToKeyVaultOutputWithContext(ctx context.Context) KeyVaultOutput { return o } // A list of up to 1024 objects describing access policies, as described below. // // > **Note:** Since `accessPolicy` can be configured both inline and via the separate `keyvault.AccessPolicy` resource, we have to explicitly set it to empty slice (`[]`) to remove it. func (o KeyVaultOutput) AccessPolicies() KeyVaultAccessPolicyArrayOutput { return o.ApplyT(func(v *KeyVault) KeyVaultAccessPolicyArrayOutput { return v.AccessPolicies }).(KeyVaultAccessPolicyArrayOutput) } // Deprecated: As the `contact` property uses a data plane API, to better support private endpoints and key vaults with public network access disabled, new key vaults with the `contact` field defined in the configuration file will now be required to use the `keyvault.CertificateContacts` resource instead of the exposed `contact` field in the key vault resource itself. This field will be removed in v5.0 of the provider. func (o KeyVaultOutput) Contacts() KeyVaultContactArrayOutput { return o.ApplyT(func(v *KeyVault) KeyVaultContactArrayOutput { return v.Contacts }).(KeyVaultContactArrayOutput) } // Deprecated: This property has been renamed to `rbacAuthorizationEnabled` and will be removed in v5.0 of the provider func (o KeyVaultOutput) EnableRbacAuthorization() pulumi.BoolOutput { return o.ApplyT(func(v *KeyVault) pulumi.BoolOutput { return v.EnableRbacAuthorization }).(pulumi.BoolOutput) } // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. func (o KeyVaultOutput) EnabledForDeployment() pulumi.BoolPtrOutput { return o.ApplyT(func(v *KeyVault) pulumi.BoolPtrOutput { return v.EnabledForDeployment }).(pulumi.BoolPtrOutput) } // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. func (o KeyVaultOutput) EnabledForDiskEncryption() pulumi.BoolPtrOutput { return o.ApplyT(func(v *KeyVault) pulumi.BoolPtrOutput { return v.EnabledForDiskEncryption }).(pulumi.BoolPtrOutput) } // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. func (o KeyVaultOutput) EnabledForTemplateDeployment() pulumi.BoolPtrOutput { return o.ApplyT(func(v *KeyVault) pulumi.BoolPtrOutput { return v.EnabledForTemplateDeployment }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o KeyVaultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *KeyVault) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Key Vault. Changing this forces a new resource to be created. The name must be globally unique. If the vault is in a recoverable state then the vault will need to be purged before reusing the name.
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getCertificateData.go
sdk/go/azure/keyvault/getCertificateData.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 data stored in an existing Key Vault Certificate. // // > **Note:** This data source uses the `GetSecret` function of the Azure API, to get the key of the certificate. Therefore you need secret/get permission // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{ // Name: "examplekv", // ResourceGroupName: "some-resource-group", // }, nil) // if err != nil { // return err // } // exampleGetCertificateData, err := keyvault.GetCertificateData(ctx, &keyvault.GetCertificateDataArgs{ // Name: "secret-sauce", // KeyVaultId: example.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("examplePem", exampleGetCertificateData.Pem) // return nil // }) // } // // ``` func GetCertificateData(ctx *pulumi.Context, args *GetCertificateDataArgs, opts ...pulumi.InvokeOption) (*GetCertificateDataResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetCertificateDataResult err := ctx.Invoke("azure:keyvault/getCertificateData:getCertificateData", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCertificateData. type GetCertificateDataArgs struct { // Specifies the ID of the Key Vault instance where the Secret resides, available on the `keyvault.KeyVault` Data Source / Resource. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Secret. Name string `pulumi:"name"` // Specifies the version of the certificate to look up. (Defaults to latest) // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. Version *string `pulumi:"version"` } // A collection of values returned by getCertificateData. type GetCertificateDataResult struct { // Amount of certificates in the chain in case Key Vault Certificate is a bundle (e.g. has an intermediate certificate). CertificatesCount int `pulumi:"certificatesCount"` // Expiry date of certificate in RFC3339 format. Expires string `pulumi:"expires"` // The raw Key Vault Certificate data represented as a hexadecimal string. Hex string `pulumi:"hex"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Key Vault Certificate Key. Key string `pulumi:"key"` KeyVaultId string `pulumi:"keyVaultId"` Name string `pulumi:"name"` // Not Before date of certificate in RFC3339 format. NotBefore string `pulumi:"notBefore"` // The Key Vault Certificate in PEM format. Pem string `pulumi:"pem"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` Version string `pulumi:"version"` } func GetCertificateDataOutput(ctx *pulumi.Context, args GetCertificateDataOutputArgs, opts ...pulumi.InvokeOption) GetCertificateDataResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetCertificateDataResultOutput, error) { args := v.(GetCertificateDataArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getCertificateData:getCertificateData", args, GetCertificateDataResultOutput{}, options).(GetCertificateDataResultOutput), nil }).(GetCertificateDataResultOutput) } // A collection of arguments for invoking getCertificateData. type GetCertificateDataOutputArgs struct { // Specifies the ID of the Key Vault instance where the Secret resides, available on the `keyvault.KeyVault` Data Source / Resource. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Secret. Name pulumi.StringInput `pulumi:"name"` // Specifies the version of the certificate to look up. (Defaults to latest) // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. Version pulumi.StringPtrInput `pulumi:"version"` } func (GetCertificateDataOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetCertificateDataArgs)(nil)).Elem() } // A collection of values returned by getCertificateData. type GetCertificateDataResultOutput struct{ *pulumi.OutputState } func (GetCertificateDataResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetCertificateDataResult)(nil)).Elem() } func (o GetCertificateDataResultOutput) ToGetCertificateDataResultOutput() GetCertificateDataResultOutput { return o } func (o GetCertificateDataResultOutput) ToGetCertificateDataResultOutputWithContext(ctx context.Context) GetCertificateDataResultOutput { return o } // Amount of certificates in the chain in case Key Vault Certificate is a bundle (e.g. has an intermediate certificate). func (o GetCertificateDataResultOutput) CertificatesCount() pulumi.IntOutput { return o.ApplyT(func(v GetCertificateDataResult) int { return v.CertificatesCount }).(pulumi.IntOutput) } // Expiry date of certificate in RFC3339 format. func (o GetCertificateDataResultOutput) Expires() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.Expires }).(pulumi.StringOutput) } // The raw Key Vault Certificate data represented as a hexadecimal string. func (o GetCertificateDataResultOutput) Hex() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.Hex }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetCertificateDataResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.Id }).(pulumi.StringOutput) } // The Key Vault Certificate Key. func (o GetCertificateDataResultOutput) Key() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.Key }).(pulumi.StringOutput) } func (o GetCertificateDataResultOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.KeyVaultId }).(pulumi.StringOutput) } func (o GetCertificateDataResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.Name }).(pulumi.StringOutput) } // Not Before date of certificate in RFC3339 format. func (o GetCertificateDataResultOutput) NotBefore() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.NotBefore }).(pulumi.StringOutput) } // The Key Vault Certificate in PEM format. func (o GetCertificateDataResultOutput) Pem() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.Pem }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o GetCertificateDataResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetCertificateDataResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func (o GetCertificateDataResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v GetCertificateDataResult) string { return v.Version }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetCertificateDataResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/managedHardwareSecurityModuleRoleAssignment.go
sdk/go/azure/keyvault/managedHardwareSecurityModuleRoleAssignment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Managed Hardware Security Module Role Assignment. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // user, err := keyvault.LookupManagedHardwareSecurityModuleRoleDefinition(ctx, &keyvault.LookupManagedHardwareSecurityModuleRoleDefinitionArgs{ // ManagedHsmId: exampleAzurermKeyVaultManagedHardwareSecurityModule.Id, // Name: "21dbd100-6940-42c2-9190-5d6cb909625b", // }, nil) // if err != nil { // return err // } // _, err = keyvault.NewManagedHardwareSecurityModuleRoleAssignment(ctx, "example", &keyvault.ManagedHardwareSecurityModuleRoleAssignmentArgs{ // Name: pulumi.String("a9dbe818-56e7-5878-c0ce-a1477692c1d6"), // ManagedHsmId: pulumi.Any(exampleAzurermKeyVaultManagedHardwareSecurityModule.Id), // Scope: pulumi.Any(user.Scope), // RoleDefinitionId: pulumi.String(user.ResourceManagerId), // PrincipalId: pulumi.Any(current.ObjectId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Managed Hardware Security Modules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/managedHardwareSecurityModuleRoleAssignment:ManagedHardwareSecurityModuleRoleAssignment example https://0000.managedhsm.azure.net///RoleAssignment/00000000-0000-0000-0000-000000000000 // ``` type ManagedHardwareSecurityModuleRoleAssignment struct { pulumi.CustomResourceState // The ID of a Managed Hardware Security Module resource. Changing this forces a new Managed Hardware Security Module to be created. ManagedHsmId pulumi.StringOutput `pulumi:"managedHsmId"` // The name in GUID notation which should be used for this Managed Hardware Security Module Role Assignment. Changing this forces a new Managed Hardware Security Module to be created. Name pulumi.StringOutput `pulumi:"name"` // The principal ID to be assigned to this role. It can point to a user, service principal, or security group. Changing this forces a new Managed Hardware Security Module to be created. PrincipalId pulumi.StringOutput `pulumi:"principalId"` // (Deprecated) The resource id of created assignment resource. ResourceId pulumi.StringOutput `pulumi:"resourceId"` // The resource ID of the role definition to assign. Changing this forces a new Managed Hardware Security Module to be created. RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"` // Specifies the scope to create the role assignment. Changing this forces a new Managed Hardware Security Module to be created. Scope pulumi.StringOutput `pulumi:"scope"` } // NewManagedHardwareSecurityModuleRoleAssignment registers a new resource with the given unique name, arguments, and options. func NewManagedHardwareSecurityModuleRoleAssignment(ctx *pulumi.Context, name string, args *ManagedHardwareSecurityModuleRoleAssignmentArgs, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleRoleAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ManagedHsmId == nil { return nil, errors.New("invalid value for required argument 'ManagedHsmId'") } if args.PrincipalId == nil { return nil, errors.New("invalid value for required argument 'PrincipalId'") } if args.RoleDefinitionId == nil { return nil, errors.New("invalid value for required argument 'RoleDefinitionId'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedHardwareSecurityModuleRoleAssignment err := ctx.RegisterResource("azure:keyvault/managedHardwareSecurityModuleRoleAssignment:ManagedHardwareSecurityModuleRoleAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedHardwareSecurityModuleRoleAssignment gets an existing ManagedHardwareSecurityModuleRoleAssignment resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedHardwareSecurityModuleRoleAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedHardwareSecurityModuleRoleAssignmentState, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleRoleAssignment, error) { var resource ManagedHardwareSecurityModuleRoleAssignment err := ctx.ReadResource("azure:keyvault/managedHardwareSecurityModuleRoleAssignment:ManagedHardwareSecurityModuleRoleAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedHardwareSecurityModuleRoleAssignment resources. type managedHardwareSecurityModuleRoleAssignmentState struct { // The ID of a Managed Hardware Security Module resource. Changing this forces a new Managed Hardware Security Module to be created. ManagedHsmId *string `pulumi:"managedHsmId"` // The name in GUID notation which should be used for this Managed Hardware Security Module Role Assignment. Changing this forces a new Managed Hardware Security Module to be created. Name *string `pulumi:"name"` // The principal ID to be assigned to this role. It can point to a user, service principal, or security group. Changing this forces a new Managed Hardware Security Module to be created. PrincipalId *string `pulumi:"principalId"` // (Deprecated) The resource id of created assignment resource. ResourceId *string `pulumi:"resourceId"` // The resource ID of the role definition to assign. Changing this forces a new Managed Hardware Security Module to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // Specifies the scope to create the role assignment. Changing this forces a new Managed Hardware Security Module to be created. Scope *string `pulumi:"scope"` } type ManagedHardwareSecurityModuleRoleAssignmentState struct { // The ID of a Managed Hardware Security Module resource. Changing this forces a new Managed Hardware Security Module to be created. ManagedHsmId pulumi.StringPtrInput // The name in GUID notation which should be used for this Managed Hardware Security Module Role Assignment. Changing this forces a new Managed Hardware Security Module to be created. Name pulumi.StringPtrInput // The principal ID to be assigned to this role. It can point to a user, service principal, or security group. Changing this forces a new Managed Hardware Security Module to be created. PrincipalId pulumi.StringPtrInput // (Deprecated) The resource id of created assignment resource. ResourceId pulumi.StringPtrInput // The resource ID of the role definition to assign. Changing this forces a new Managed Hardware Security Module to be created. RoleDefinitionId pulumi.StringPtrInput // Specifies the scope to create the role assignment. Changing this forces a new Managed Hardware Security Module to be created. Scope pulumi.StringPtrInput } func (ManagedHardwareSecurityModuleRoleAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleRoleAssignmentState)(nil)).Elem() } type managedHardwareSecurityModuleRoleAssignmentArgs struct { // The ID of a Managed Hardware Security Module resource. Changing this forces a new Managed Hardware Security Module to be created. ManagedHsmId string `pulumi:"managedHsmId"` // The name in GUID notation which should be used for this Managed Hardware Security Module Role Assignment. Changing this forces a new Managed Hardware Security Module to be created. Name *string `pulumi:"name"` // The principal ID to be assigned to this role. It can point to a user, service principal, or security group. Changing this forces a new Managed Hardware Security Module to be created. PrincipalId string `pulumi:"principalId"` // The resource ID of the role definition to assign. Changing this forces a new Managed Hardware Security Module to be created. RoleDefinitionId string `pulumi:"roleDefinitionId"` // Specifies the scope to create the role assignment. Changing this forces a new Managed Hardware Security Module to be created. Scope string `pulumi:"scope"` } // The set of arguments for constructing a ManagedHardwareSecurityModuleRoleAssignment resource. type ManagedHardwareSecurityModuleRoleAssignmentArgs struct { // The ID of a Managed Hardware Security Module resource. Changing this forces a new Managed Hardware Security Module to be created. ManagedHsmId pulumi.StringInput // The name in GUID notation which should be used for this Managed Hardware Security Module Role Assignment. Changing this forces a new Managed Hardware Security Module to be created. Name pulumi.StringPtrInput // The principal ID to be assigned to this role. It can point to a user, service principal, or security group. Changing this forces a new Managed Hardware Security Module to be created. PrincipalId pulumi.StringInput // The resource ID of the role definition to assign. Changing this forces a new Managed Hardware Security Module to be created. RoleDefinitionId pulumi.StringInput // Specifies the scope to create the role assignment. Changing this forces a new Managed Hardware Security Module to be created. Scope pulumi.StringInput } func (ManagedHardwareSecurityModuleRoleAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleRoleAssignmentArgs)(nil)).Elem() } type ManagedHardwareSecurityModuleRoleAssignmentInput interface { pulumi.Input ToManagedHardwareSecurityModuleRoleAssignmentOutput() ManagedHardwareSecurityModuleRoleAssignmentOutput ToManagedHardwareSecurityModuleRoleAssignmentOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleAssignmentOutput } func (*ManagedHardwareSecurityModuleRoleAssignment) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleRoleAssignment)(nil)).Elem() } func (i *ManagedHardwareSecurityModuleRoleAssignment) ToManagedHardwareSecurityModuleRoleAssignmentOutput() ManagedHardwareSecurityModuleRoleAssignmentOutput { return i.ToManagedHardwareSecurityModuleRoleAssignmentOutputWithContext(context.Background()) } func (i *ManagedHardwareSecurityModuleRoleAssignment) ToManagedHardwareSecurityModuleRoleAssignmentOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleRoleAssignmentOutput) } // ManagedHardwareSecurityModuleRoleAssignmentArrayInput is an input type that accepts ManagedHardwareSecurityModuleRoleAssignmentArray and ManagedHardwareSecurityModuleRoleAssignmentArrayOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleRoleAssignmentArrayInput` via: // // ManagedHardwareSecurityModuleRoleAssignmentArray{ ManagedHardwareSecurityModuleRoleAssignmentArgs{...} } type ManagedHardwareSecurityModuleRoleAssignmentArrayInput interface { pulumi.Input ToManagedHardwareSecurityModuleRoleAssignmentArrayOutput() ManagedHardwareSecurityModuleRoleAssignmentArrayOutput ToManagedHardwareSecurityModuleRoleAssignmentArrayOutputWithContext(context.Context) ManagedHardwareSecurityModuleRoleAssignmentArrayOutput } type ManagedHardwareSecurityModuleRoleAssignmentArray []ManagedHardwareSecurityModuleRoleAssignmentInput func (ManagedHardwareSecurityModuleRoleAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleRoleAssignment)(nil)).Elem() } func (i ManagedHardwareSecurityModuleRoleAssignmentArray) ToManagedHardwareSecurityModuleRoleAssignmentArrayOutput() ManagedHardwareSecurityModuleRoleAssignmentArrayOutput { return i.ToManagedHardwareSecurityModuleRoleAssignmentArrayOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleRoleAssignmentArray) ToManagedHardwareSecurityModuleRoleAssignmentArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleRoleAssignmentArrayOutput) } // ManagedHardwareSecurityModuleRoleAssignmentMapInput is an input type that accepts ManagedHardwareSecurityModuleRoleAssignmentMap and ManagedHardwareSecurityModuleRoleAssignmentMapOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleRoleAssignmentMapInput` via: // // ManagedHardwareSecurityModuleRoleAssignmentMap{ "key": ManagedHardwareSecurityModuleRoleAssignmentArgs{...} } type ManagedHardwareSecurityModuleRoleAssignmentMapInput interface { pulumi.Input ToManagedHardwareSecurityModuleRoleAssignmentMapOutput() ManagedHardwareSecurityModuleRoleAssignmentMapOutput ToManagedHardwareSecurityModuleRoleAssignmentMapOutputWithContext(context.Context) ManagedHardwareSecurityModuleRoleAssignmentMapOutput } type ManagedHardwareSecurityModuleRoleAssignmentMap map[string]ManagedHardwareSecurityModuleRoleAssignmentInput func (ManagedHardwareSecurityModuleRoleAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleRoleAssignment)(nil)).Elem() } func (i ManagedHardwareSecurityModuleRoleAssignmentMap) ToManagedHardwareSecurityModuleRoleAssignmentMapOutput() ManagedHardwareSecurityModuleRoleAssignmentMapOutput { return i.ToManagedHardwareSecurityModuleRoleAssignmentMapOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleRoleAssignmentMap) ToManagedHardwareSecurityModuleRoleAssignmentMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleRoleAssignmentMapOutput) } type ManagedHardwareSecurityModuleRoleAssignmentOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleRoleAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleRoleAssignment)(nil)).Elem() } func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) ToManagedHardwareSecurityModuleRoleAssignmentOutput() ManagedHardwareSecurityModuleRoleAssignmentOutput { return o } func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) ToManagedHardwareSecurityModuleRoleAssignmentOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleAssignmentOutput { return o } // The ID of a Managed Hardware Security Module resource. Changing this forces a new Managed Hardware Security Module to be created. func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) ManagedHsmId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleAssignment) pulumi.StringOutput { return v.ManagedHsmId }).(pulumi.StringOutput) } // The name in GUID notation which should be used for this Managed Hardware Security Module Role Assignment. Changing this forces a new Managed Hardware Security Module to be created. func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The principal ID to be assigned to this role. It can point to a user, service principal, or security group. Changing this forces a new Managed Hardware Security Module to be created. func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleAssignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput) } // (Deprecated) The resource id of created assignment resource. func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleAssignment) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) } // The resource ID of the role definition to assign. Changing this forces a new Managed Hardware Security Module to be created. func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleAssignment) pulumi.StringOutput { return v.RoleDefinitionId }).(pulumi.StringOutput) } // Specifies the scope to create the role assignment. Changing this forces a new Managed Hardware Security Module to be created. func (o ManagedHardwareSecurityModuleRoleAssignmentOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleAssignment) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } type ManagedHardwareSecurityModuleRoleAssignmentArrayOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleRoleAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleRoleAssignment)(nil)).Elem() } func (o ManagedHardwareSecurityModuleRoleAssignmentArrayOutput) ToManagedHardwareSecurityModuleRoleAssignmentArrayOutput() ManagedHardwareSecurityModuleRoleAssignmentArrayOutput { return o } func (o ManagedHardwareSecurityModuleRoleAssignmentArrayOutput) ToManagedHardwareSecurityModuleRoleAssignmentArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleAssignmentArrayOutput { return o } func (o ManagedHardwareSecurityModuleRoleAssignmentArrayOutput) Index(i pulumi.IntInput) ManagedHardwareSecurityModuleRoleAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleRoleAssignment { return vs[0].([]*ManagedHardwareSecurityModuleRoleAssignment)[vs[1].(int)] }).(ManagedHardwareSecurityModuleRoleAssignmentOutput) } type ManagedHardwareSecurityModuleRoleAssignmentMapOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleRoleAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleRoleAssignment)(nil)).Elem() } func (o ManagedHardwareSecurityModuleRoleAssignmentMapOutput) ToManagedHardwareSecurityModuleRoleAssignmentMapOutput() ManagedHardwareSecurityModuleRoleAssignmentMapOutput { return o } func (o ManagedHardwareSecurityModuleRoleAssignmentMapOutput) ToManagedHardwareSecurityModuleRoleAssignmentMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleAssignmentMapOutput { return o } func (o ManagedHardwareSecurityModuleRoleAssignmentMapOutput) MapIndex(k pulumi.StringInput) ManagedHardwareSecurityModuleRoleAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleRoleAssignment { return vs[0].(map[string]*ManagedHardwareSecurityModuleRoleAssignment)[vs[1].(string)] }).(ManagedHardwareSecurityModuleRoleAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleRoleAssignmentInput)(nil)).Elem(), &ManagedHardwareSecurityModuleRoleAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleRoleAssignmentArrayInput)(nil)).Elem(), ManagedHardwareSecurityModuleRoleAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleRoleAssignmentMapInput)(nil)).Elem(), ManagedHardwareSecurityModuleRoleAssignmentMap{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleRoleAssignmentOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleRoleAssignmentArrayOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleRoleAssignmentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/accessPolicy.go
sdk/go/azure/keyvault/accessPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Access Policy. // // > **NOTE:** It's possible to define Key Vault Access Policies both within the `keyvault.KeyVault` resource via the `accessPolicy` block and by using the `keyvault.AccessPolicy` resource. However it's not possible to use both methods to manage Access Policies within a KeyVault, since there'll be conflicts. // // > **NOTE:** Azure permits a maximum of 1024 Access Policies per Key Vault - [more information can be found in this document](https://docs.microsoft.com/azure/key-vault/key-vault-secure-your-key-vault#data-plane-access-control). // // ## Import // // Key Vault Access Policies can be imported using the Resource ID of the Key Vault, plus some additional metadata. // // If both an `object_id` and `application_id` are specified, then the Access Policy can be imported using the following code: // // ```sh // $ pulumi import azure:keyvault/accessPolicy:AccessPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.KeyVault/vaults/test-vault/objectId/11111111-1111-1111-1111-111111111111/applicationId/22222222-2222-2222-2222-222222222222 // ``` // // where `11111111-1111-1111-1111-111111111111` is the `object_id` and `22222222-2222-2222-2222-222222222222` is the `application_id`. // // *** // // Access Policies with an `object_id` but no `application_id` can be imported using the following command: // // ```sh // $ pulumi import azure:keyvault/accessPolicy:AccessPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.KeyVault/vaults/test-vault/objectId/11111111-1111-1111-1111-111111111111 // ``` // // where `11111111-1111-1111-1111-111111111111` is the `object_id`. type AccessPolicy struct { pulumi.CustomResourceState // The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created. ApplicationId pulumi.StringPtrOutput `pulumi:"applicationId"` // List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`. CertificatePermissions pulumi.StringArrayOutput `pulumi:"certificatePermissions"` // List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`. KeyPermissions pulumi.StringArrayOutput `pulumi:"keyPermissions"` // Specifies the id of the Key Vault resource. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created. ObjectId pulumi.StringOutput `pulumi:"objectId"` // List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. SecretPermissions pulumi.StringArrayOutput `pulumi:"secretPermissions"` // List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. StoragePermissions pulumi.StringArrayOutput `pulumi:"storagePermissions"` // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewAccessPolicy registers a new resource with the given unique name, arguments, and options. func NewAccessPolicy(ctx *pulumi.Context, name string, args *AccessPolicyArgs, opts ...pulumi.ResourceOption) (*AccessPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AccessPolicy err := ctx.RegisterResource("azure:keyvault/accessPolicy:AccessPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAccessPolicy gets an existing AccessPolicy resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAccessPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AccessPolicyState, opts ...pulumi.ResourceOption) (*AccessPolicy, error) { var resource AccessPolicy err := ctx.ReadResource("azure:keyvault/accessPolicy:AccessPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AccessPolicy resources. type accessPolicyState struct { // The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created. ApplicationId *string `pulumi:"applicationId"` // List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`. CertificatePermissions []string `pulumi:"certificatePermissions"` // List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`. KeyPermissions []string `pulumi:"keyPermissions"` // Specifies the id of the Key Vault resource. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` // The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created. ObjectId *string `pulumi:"objectId"` // List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. SecretPermissions []string `pulumi:"secretPermissions"` // List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. StoragePermissions []string `pulumi:"storagePermissions"` // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created. TenantId *string `pulumi:"tenantId"` } type AccessPolicyState struct { // The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created. ApplicationId pulumi.StringPtrInput // List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`. CertificatePermissions pulumi.StringArrayInput // List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`. KeyPermissions pulumi.StringArrayInput // Specifies the id of the Key Vault resource. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput // The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created. ObjectId pulumi.StringPtrInput // List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. SecretPermissions pulumi.StringArrayInput // List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. StoragePermissions pulumi.StringArrayInput // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created. TenantId pulumi.StringPtrInput } func (AccessPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*accessPolicyState)(nil)).Elem() } type accessPolicyArgs struct { // The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created. ApplicationId *string `pulumi:"applicationId"` // List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`. CertificatePermissions []string `pulumi:"certificatePermissions"` // List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`. KeyPermissions []string `pulumi:"keyPermissions"` // Specifies the id of the Key Vault resource. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` // The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created. ObjectId string `pulumi:"objectId"` // List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. SecretPermissions []string `pulumi:"secretPermissions"` // List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. StoragePermissions []string `pulumi:"storagePermissions"` // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a AccessPolicy resource. type AccessPolicyArgs struct { // The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created. ApplicationId pulumi.StringPtrInput // List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`. CertificatePermissions pulumi.StringArrayInput // List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`. KeyPermissions pulumi.StringArrayInput // Specifies the id of the Key Vault resource. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput // The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created. ObjectId pulumi.StringInput // List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. SecretPermissions pulumi.StringArrayInput // List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. StoragePermissions pulumi.StringArrayInput // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created. TenantId pulumi.StringInput } func (AccessPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*accessPolicyArgs)(nil)).Elem() } type AccessPolicyInput interface { pulumi.Input ToAccessPolicyOutput() AccessPolicyOutput ToAccessPolicyOutputWithContext(ctx context.Context) AccessPolicyOutput } func (*AccessPolicy) ElementType() reflect.Type { return reflect.TypeOf((**AccessPolicy)(nil)).Elem() } func (i *AccessPolicy) ToAccessPolicyOutput() AccessPolicyOutput { return i.ToAccessPolicyOutputWithContext(context.Background()) } func (i *AccessPolicy) ToAccessPolicyOutputWithContext(ctx context.Context) AccessPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessPolicyOutput) } // AccessPolicyArrayInput is an input type that accepts AccessPolicyArray and AccessPolicyArrayOutput values. // You can construct a concrete instance of `AccessPolicyArrayInput` via: // // AccessPolicyArray{ AccessPolicyArgs{...} } type AccessPolicyArrayInput interface { pulumi.Input ToAccessPolicyArrayOutput() AccessPolicyArrayOutput ToAccessPolicyArrayOutputWithContext(context.Context) AccessPolicyArrayOutput } type AccessPolicyArray []AccessPolicyInput func (AccessPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AccessPolicy)(nil)).Elem() } func (i AccessPolicyArray) ToAccessPolicyArrayOutput() AccessPolicyArrayOutput { return i.ToAccessPolicyArrayOutputWithContext(context.Background()) } func (i AccessPolicyArray) ToAccessPolicyArrayOutputWithContext(ctx context.Context) AccessPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessPolicyArrayOutput) } // AccessPolicyMapInput is an input type that accepts AccessPolicyMap and AccessPolicyMapOutput values. // You can construct a concrete instance of `AccessPolicyMapInput` via: // // AccessPolicyMap{ "key": AccessPolicyArgs{...} } type AccessPolicyMapInput interface { pulumi.Input ToAccessPolicyMapOutput() AccessPolicyMapOutput ToAccessPolicyMapOutputWithContext(context.Context) AccessPolicyMapOutput } type AccessPolicyMap map[string]AccessPolicyInput func (AccessPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AccessPolicy)(nil)).Elem() } func (i AccessPolicyMap) ToAccessPolicyMapOutput() AccessPolicyMapOutput { return i.ToAccessPolicyMapOutputWithContext(context.Background()) } func (i AccessPolicyMap) ToAccessPolicyMapOutputWithContext(ctx context.Context) AccessPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessPolicyMapOutput) } type AccessPolicyOutput struct{ *pulumi.OutputState } func (AccessPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**AccessPolicy)(nil)).Elem() } func (o AccessPolicyOutput) ToAccessPolicyOutput() AccessPolicyOutput { return o } func (o AccessPolicyOutput) ToAccessPolicyOutputWithContext(ctx context.Context) AccessPolicyOutput { return o } // The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created. func (o AccessPolicyOutput) ApplicationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringPtrOutput { return v.ApplicationId }).(pulumi.StringPtrOutput) } // List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`. func (o AccessPolicyOutput) CertificatePermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringArrayOutput { return v.CertificatePermissions }).(pulumi.StringArrayOutput) } // List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`. func (o AccessPolicyOutput) KeyPermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringArrayOutput { return v.KeyPermissions }).(pulumi.StringArrayOutput) } // Specifies the id of the Key Vault resource. Changing this forces a new resource to be created. func (o AccessPolicyOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created. func (o AccessPolicyOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. func (o AccessPolicyOutput) SecretPermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringArrayOutput { return v.SecretPermissions }).(pulumi.StringArrayOutput) } // List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. func (o AccessPolicyOutput) StoragePermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringArrayOutput { return v.StoragePermissions }).(pulumi.StringArrayOutput) } // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created. func (o AccessPolicyOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *AccessPolicy) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type AccessPolicyArrayOutput struct{ *pulumi.OutputState } func (AccessPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AccessPolicy)(nil)).Elem() } func (o AccessPolicyArrayOutput) ToAccessPolicyArrayOutput() AccessPolicyArrayOutput { return o } func (o AccessPolicyArrayOutput) ToAccessPolicyArrayOutputWithContext(ctx context.Context) AccessPolicyArrayOutput { return o } func (o AccessPolicyArrayOutput) Index(i pulumi.IntInput) AccessPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccessPolicy { return vs[0].([]*AccessPolicy)[vs[1].(int)] }).(AccessPolicyOutput) } type AccessPolicyMapOutput struct{ *pulumi.OutputState } func (AccessPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AccessPolicy)(nil)).Elem() } func (o AccessPolicyMapOutput) ToAccessPolicyMapOutput() AccessPolicyMapOutput { return o } func (o AccessPolicyMapOutput) ToAccessPolicyMapOutputWithContext(ctx context.Context) AccessPolicyMapOutput { return o } func (o AccessPolicyMapOutput) MapIndex(k pulumi.StringInput) AccessPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccessPolicy { return vs[0].(map[string]*AccessPolicy)[vs[1].(string)] }).(AccessPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AccessPolicyInput)(nil)).Elem(), &AccessPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*AccessPolicyArrayInput)(nil)).Elem(), AccessPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AccessPolicyMapInput)(nil)).Elem(), AccessPolicyMap{}) pulumi.RegisterOutputType(AccessPolicyOutput{}) pulumi.RegisterOutputType(AccessPolicyArrayOutput{}) pulumi.RegisterOutputType(AccessPolicyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getSecret.go
sdk/go/azure/keyvault/getSecret.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 Key Vault Secret. // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.LookupSecret(ctx, &keyvault.LookupSecretArgs{ // Name: "secret-sauce", // KeyVaultId: existing.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("secretValue", example.Value) // return nil // }) // } // // ``` func LookupSecret(ctx *pulumi.Context, args *LookupSecretArgs, opts ...pulumi.InvokeOption) (*LookupSecretResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSecretResult err := ctx.Invoke("azure:keyvault/getSecret:getSecret", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSecret. type LookupSecretArgs struct { // Specifies the ID of the Key Vault instance to fetch secret names from, available on the `keyvault.KeyVault` Data Source / Resource. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Secret. Name string `pulumi:"name"` // Specifies the version of the Key Vault Secret. Defaults to the current version of the Key Vault Secret. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. Version *string `pulumi:"version"` } // A collection of values returned by getSecret. type LookupSecretResult struct { // The content type for the Key Vault Secret. ContentType string `pulumi:"contentType"` // The date and time at which the Key Vault Secret expires and is no longer valid. ExpirationDate string `pulumi:"expirationDate"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` KeyVaultId string `pulumi:"keyVaultId"` Name string `pulumi:"name"` // The earliest date at which the Key Vault Secret can be used. NotBeforeDate string `pulumi:"notBeforeDate"` // The (Versioned) ID for this Key Vault Secret. This property points to a specific version of a Key Vault Secret, as such using this won't auto-rotate values if used in other Azure Services. ResourceId string `pulumi:"resourceId"` // The Versionless ID of the Key Vault Secret. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Secret is updated. ResourceVersionlessId string `pulumi:"resourceVersionlessId"` // Any tags assigned to this resource. Tags map[string]string `pulumi:"tags"` // The value of the Key Vault Secret. Value string `pulumi:"value"` Version *string `pulumi:"version"` // The Versionless ID of the Key Vault Secret. This can be used to always get latest secret value, and enable fetching automatically rotating secrets. VersionlessId string `pulumi:"versionlessId"` } func LookupSecretOutput(ctx *pulumi.Context, args LookupSecretOutputArgs, opts ...pulumi.InvokeOption) LookupSecretResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSecretResultOutput, error) { args := v.(LookupSecretArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getSecret:getSecret", args, LookupSecretResultOutput{}, options).(LookupSecretResultOutput), nil }).(LookupSecretResultOutput) } // A collection of arguments for invoking getSecret. type LookupSecretOutputArgs struct { // Specifies the ID of the Key Vault instance to fetch secret names from, available on the `keyvault.KeyVault` Data Source / Resource. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Secret. Name pulumi.StringInput `pulumi:"name"` // Specifies the version of the Key Vault Secret. Defaults to the current version of the Key Vault Secret. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. Version pulumi.StringPtrInput `pulumi:"version"` } func (LookupSecretOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSecretArgs)(nil)).Elem() } // A collection of values returned by getSecret. type LookupSecretResultOutput struct{ *pulumi.OutputState } func (LookupSecretResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSecretResult)(nil)).Elem() } func (o LookupSecretResultOutput) ToLookupSecretResultOutput() LookupSecretResultOutput { return o } func (o LookupSecretResultOutput) ToLookupSecretResultOutputWithContext(ctx context.Context) LookupSecretResultOutput { return o } // The content type for the Key Vault Secret. func (o LookupSecretResultOutput) ContentType() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.ContentType }).(pulumi.StringOutput) } // The date and time at which the Key Vault Secret expires and is no longer valid. func (o LookupSecretResultOutput) ExpirationDate() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.ExpirationDate }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupSecretResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupSecretResultOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.KeyVaultId }).(pulumi.StringOutput) } func (o LookupSecretResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.Name }).(pulumi.StringOutput) } // The earliest date at which the Key Vault Secret can be used. func (o LookupSecretResultOutput) NotBeforeDate() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.NotBeforeDate }).(pulumi.StringOutput) } // The (Versioned) ID for this Key Vault Secret. This property points to a specific version of a Key Vault Secret, as such using this won't auto-rotate values if used in other Azure Services. func (o LookupSecretResultOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.ResourceId }).(pulumi.StringOutput) } // The Versionless ID of the Key Vault Secret. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Secret is updated. func (o LookupSecretResultOutput) ResourceVersionlessId() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.ResourceVersionlessId }).(pulumi.StringOutput) } // Any tags assigned to this resource. func (o LookupSecretResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupSecretResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The value of the Key Vault Secret. func (o LookupSecretResultOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.Value }).(pulumi.StringOutput) } func (o LookupSecretResultOutput) Version() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupSecretResult) *string { return v.Version }).(pulumi.StringPtrOutput) } // The Versionless ID of the Key Vault Secret. This can be used to always get latest secret value, and enable fetching automatically rotating secrets. func (o LookupSecretResultOutput) VersionlessId() pulumi.StringOutput { return o.ApplyT(func(v LookupSecretResult) string { return v.VersionlessId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupSecretResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getCertificateIssuer.go
sdk/go/azure/keyvault/getCertificateIssuer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 Key Vault Certificate Issuer. // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{ // Name: "mykeyvault", // ResourceGroupName: "some-resource-group", // }, nil) // if err != nil { // return err // } // exampleGetCertificateIssuer, err := keyvault.LookupCertificateIssuer(ctx, &keyvault.LookupCertificateIssuerArgs{ // Name: "existing", // KeyVaultId: example.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("id", exampleGetCertificateIssuer.Id) // return nil // }) // } // // ``` func LookupCertificateIssuer(ctx *pulumi.Context, args *LookupCertificateIssuerArgs, opts ...pulumi.InvokeOption) (*LookupCertificateIssuerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupCertificateIssuerResult err := ctx.Invoke("azure:keyvault/getCertificateIssuer:getCertificateIssuer", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCertificateIssuer. type LookupCertificateIssuerArgs struct { // The ID of the Key Vault in which to locate the Certificate Issuer. KeyVaultId string `pulumi:"keyVaultId"` // The name of the Key Vault Certificate Issuer. Name string `pulumi:"name"` } // A collection of values returned by getCertificateIssuer. type LookupCertificateIssuerResult struct { // The account number with the third-party Certificate Issuer. AccountId string `pulumi:"accountId"` // A list of `admin` blocks as defined below. Admins []GetCertificateIssuerAdmin `pulumi:"admins"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` KeyVaultId string `pulumi:"keyVaultId"` Name string `pulumi:"name"` // The organization ID with the third-party Certificate Issuer. OrgId string `pulumi:"orgId"` // The name of the third-party Certificate Issuer. ProviderName string `pulumi:"providerName"` } func LookupCertificateIssuerOutput(ctx *pulumi.Context, args LookupCertificateIssuerOutputArgs, opts ...pulumi.InvokeOption) LookupCertificateIssuerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupCertificateIssuerResultOutput, error) { args := v.(LookupCertificateIssuerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getCertificateIssuer:getCertificateIssuer", args, LookupCertificateIssuerResultOutput{}, options).(LookupCertificateIssuerResultOutput), nil }).(LookupCertificateIssuerResultOutput) } // A collection of arguments for invoking getCertificateIssuer. type LookupCertificateIssuerOutputArgs struct { // The ID of the Key Vault in which to locate the Certificate Issuer. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` // The name of the Key Vault Certificate Issuer. Name pulumi.StringInput `pulumi:"name"` } func (LookupCertificateIssuerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupCertificateIssuerArgs)(nil)).Elem() } // A collection of values returned by getCertificateIssuer. type LookupCertificateIssuerResultOutput struct{ *pulumi.OutputState } func (LookupCertificateIssuerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupCertificateIssuerResult)(nil)).Elem() } func (o LookupCertificateIssuerResultOutput) ToLookupCertificateIssuerResultOutput() LookupCertificateIssuerResultOutput { return o } func (o LookupCertificateIssuerResultOutput) ToLookupCertificateIssuerResultOutputWithContext(ctx context.Context) LookupCertificateIssuerResultOutput { return o } // The account number with the third-party Certificate Issuer. func (o LookupCertificateIssuerResultOutput) AccountId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateIssuerResult) string { return v.AccountId }).(pulumi.StringOutput) } // A list of `admin` blocks as defined below. func (o LookupCertificateIssuerResultOutput) Admins() GetCertificateIssuerAdminArrayOutput { return o.ApplyT(func(v LookupCertificateIssuerResult) []GetCertificateIssuerAdmin { return v.Admins }).(GetCertificateIssuerAdminArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupCertificateIssuerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateIssuerResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupCertificateIssuerResultOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateIssuerResult) string { return v.KeyVaultId }).(pulumi.StringOutput) } func (o LookupCertificateIssuerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateIssuerResult) string { return v.Name }).(pulumi.StringOutput) } // The organization ID with the third-party Certificate Issuer. func (o LookupCertificateIssuerResultOutput) OrgId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateIssuerResult) string { return v.OrgId }).(pulumi.StringOutput) } // The name of the third-party Certificate Issuer. func (o LookupCertificateIssuerResultOutput) ProviderName() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateIssuerResult) string { return v.ProviderName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupCertificateIssuerResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/managedHardwareSecurityModuleKey.go
sdk/go/azure/keyvault/managedHardwareSecurityModuleKey.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Managed Hardware Security Module Key. // // > **Note:** The Azure Provider includes a Feature Toggle which will purge a Key Vault Managed Hardware Security Module Key resource on destroy, rather than the default soft-delete. See `purgeSoftDeletedHardwareSecurityModulesOnDestroy` for more information. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "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 // } // _, err = keyvault.NewManagedHardwareSecurityModule(ctx, "example", &keyvault.ManagedHardwareSecurityModuleArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name), // Location: pulumi.Any(exampleAzurermResourceGroup.Location), // SkuName: pulumi.String("Standard_B1"), // TenantId: pulumi.String(current.TenantId), // AdminObjectIds: pulumi.StringArray{ // pulumi.String(current.ObjectId), // }, // PurgeProtectionEnabled: pulumi.Bool(false), // ActiveConfig: []map[string]interface{}{ // map[string]interface{}{ // "securityDomainCertificate": []interface{}{ // cert[0].Id, // cert[1].Id, // cert[2].Id, // }, // "securityDomainQuorum": 2, // }, // }, // }) // if err != nil { // return err // } // // this gives your service principal the HSM Crypto User role which lets you create and destroy hsm keys // _, err = keyvault.NewManagedHardwareSecurityModuleRoleAssignment(ctx, "hsm-crypto-user", &keyvault.ManagedHardwareSecurityModuleRoleAssignmentArgs{ // ManagedHsmId: pulumi.Any(test.Id), // Name: pulumi.String("1e243909-064c-6ac3-84e9-1c8bf8d6ad22"), // Scope: pulumi.String("/keys"), // RoleDefinitionId: pulumi.String("/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b"), // PrincipalId: pulumi.String(current.ObjectId), // }) // if err != nil { // return err // } // // this gives your service principal the HSM Crypto Officer role which lets you purge hsm keys // _, err = keyvault.NewManagedHardwareSecurityModuleRoleAssignment(ctx, "hsm-crypto-officer", &keyvault.ManagedHardwareSecurityModuleRoleAssignmentArgs{ // ManagedHsmId: pulumi.Any(test.Id), // Name: pulumi.String("1e243909-064c-6ac3-84e9-1c8bf8d6ad23"), // Scope: pulumi.String("/keys"), // RoleDefinitionId: pulumi.String("/Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778"), // PrincipalId: pulumi.String(current.ObjectId), // }) // if err != nil { // return err // } // _, err = keyvault.NewManagedHardwareSecurityModuleKey(ctx, "example", &keyvault.ManagedHardwareSecurityModuleKeyArgs{ // Name: pulumi.String("example"), // ManagedHsmId: pulumi.Any(test.Id), // KeyType: pulumi.String("EC-HSM"), // Curve: pulumi.String("P-521"), // KeyOpts: pulumi.StringArray{ // pulumi.String("sign"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // testAzurermKeyVaultManagedHardwareSecurityModuleRoleAssignment, // test1, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.KeyVault` - 2023-07-01 // // ## Import // // Key Vault Managed Hardware Security Module Key can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey example https://exampleHSM.managedhsm.azure.net/keys/exampleKey // ``` type ManagedHardwareSecurityModuleKey struct { pulumi.CustomResourceState // Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `keyType` is `EC-HSM`. Changing this forces a new resource to be created. Curve pulumi.StringPtrOutput `pulumi:"curve"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created. ExpirationDate pulumi.StringPtrOutput `pulumi:"expirationDate"` // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify`, `wrapKey` and `import`. Please note these values are case-sensitive. KeyOpts pulumi.StringArrayOutput `pulumi:"keyOpts"` // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA-HSM` or `oct-HSM`. Changing this forces a new resource to be created. KeySize pulumi.IntPtrOutput `pulumi:"keySize"` // Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM`, `oct-HSM` and `RSA-HSM`. More details see [HSM-protected keys](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#hsm-protected-keys). Changing this forces a new resource to be created. KeyType pulumi.StringOutput `pulumi:"keyType"` // Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created. ManagedHsmId pulumi.StringOutput `pulumi:"managedHsmId"` // Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate pulumi.StringPtrOutput `pulumi:"notBeforeDate"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The versioned Key Vault Secret Managed Hardware Security Module Key ID. VersionedId pulumi.StringOutput `pulumi:"versionedId"` } // NewManagedHardwareSecurityModuleKey registers a new resource with the given unique name, arguments, and options. func NewManagedHardwareSecurityModuleKey(ctx *pulumi.Context, name string, args *ManagedHardwareSecurityModuleKeyArgs, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleKey, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyOpts == nil { return nil, errors.New("invalid value for required argument 'KeyOpts'") } if args.KeyType == nil { return nil, errors.New("invalid value for required argument 'KeyType'") } if args.ManagedHsmId == nil { return nil, errors.New("invalid value for required argument 'ManagedHsmId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedHardwareSecurityModuleKey err := ctx.RegisterResource("azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedHardwareSecurityModuleKey gets an existing ManagedHardwareSecurityModuleKey resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedHardwareSecurityModuleKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedHardwareSecurityModuleKeyState, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleKey, error) { var resource ManagedHardwareSecurityModuleKey err := ctx.ReadResource("azure:keyvault/managedHardwareSecurityModuleKey:ManagedHardwareSecurityModuleKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedHardwareSecurityModuleKey resources. type managedHardwareSecurityModuleKeyState struct { // Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `keyType` is `EC-HSM`. Changing this forces a new resource to be created. Curve *string `pulumi:"curve"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created. ExpirationDate *string `pulumi:"expirationDate"` // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify`, `wrapKey` and `import`. Please note these values are case-sensitive. KeyOpts []string `pulumi:"keyOpts"` // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA-HSM` or `oct-HSM`. Changing this forces a new resource to be created. KeySize *int `pulumi:"keySize"` // Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM`, `oct-HSM` and `RSA-HSM`. More details see [HSM-protected keys](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#hsm-protected-keys). Changing this forces a new resource to be created. KeyType *string `pulumi:"keyType"` // Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created. ManagedHsmId *string `pulumi:"managedHsmId"` // Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate *string `pulumi:"notBeforeDate"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The versioned Key Vault Secret Managed Hardware Security Module Key ID. VersionedId *string `pulumi:"versionedId"` } type ManagedHardwareSecurityModuleKeyState struct { // Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `keyType` is `EC-HSM`. Changing this forces a new resource to be created. Curve pulumi.StringPtrInput // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created. ExpirationDate pulumi.StringPtrInput // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify`, `wrapKey` and `import`. Please note these values are case-sensitive. KeyOpts pulumi.StringArrayInput // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA-HSM` or `oct-HSM`. Changing this forces a new resource to be created. KeySize pulumi.IntPtrInput // Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM`, `oct-HSM` and `RSA-HSM`. More details see [HSM-protected keys](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#hsm-protected-keys). Changing this forces a new resource to be created. KeyType pulumi.StringPtrInput // Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created. ManagedHsmId pulumi.StringPtrInput // Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The versioned Key Vault Secret Managed Hardware Security Module Key ID. VersionedId pulumi.StringPtrInput } func (ManagedHardwareSecurityModuleKeyState) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleKeyState)(nil)).Elem() } type managedHardwareSecurityModuleKeyArgs struct { // Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `keyType` is `EC-HSM`. Changing this forces a new resource to be created. Curve *string `pulumi:"curve"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created. ExpirationDate *string `pulumi:"expirationDate"` // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify`, `wrapKey` and `import`. Please note these values are case-sensitive. KeyOpts []string `pulumi:"keyOpts"` // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA-HSM` or `oct-HSM`. Changing this forces a new resource to be created. KeySize *int `pulumi:"keySize"` // Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM`, `oct-HSM` and `RSA-HSM`. More details see [HSM-protected keys](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#hsm-protected-keys). Changing this forces a new resource to be created. KeyType string `pulumi:"keyType"` // Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created. ManagedHsmId string `pulumi:"managedHsmId"` // Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate *string `pulumi:"notBeforeDate"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ManagedHardwareSecurityModuleKey resource. type ManagedHardwareSecurityModuleKeyArgs struct { // Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `keyType` is `EC-HSM`. Changing this forces a new resource to be created. Curve pulumi.StringPtrInput // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created. ExpirationDate pulumi.StringPtrInput // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify`, `wrapKey` and `import`. Please note these values are case-sensitive. KeyOpts pulumi.StringArrayInput // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA-HSM` or `oct-HSM`. Changing this forces a new resource to be created. KeySize pulumi.IntPtrInput // Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM`, `oct-HSM` and `RSA-HSM`. More details see [HSM-protected keys](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#hsm-protected-keys). Changing this forces a new resource to be created. KeyType pulumi.StringInput // Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created. ManagedHsmId pulumi.StringInput // Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ManagedHardwareSecurityModuleKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleKeyArgs)(nil)).Elem() } type ManagedHardwareSecurityModuleKeyInput interface { pulumi.Input ToManagedHardwareSecurityModuleKeyOutput() ManagedHardwareSecurityModuleKeyOutput ToManagedHardwareSecurityModuleKeyOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyOutput } func (*ManagedHardwareSecurityModuleKey) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleKey)(nil)).Elem() } func (i *ManagedHardwareSecurityModuleKey) ToManagedHardwareSecurityModuleKeyOutput() ManagedHardwareSecurityModuleKeyOutput { return i.ToManagedHardwareSecurityModuleKeyOutputWithContext(context.Background()) } func (i *ManagedHardwareSecurityModuleKey) ToManagedHardwareSecurityModuleKeyOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleKeyOutput) } // ManagedHardwareSecurityModuleKeyArrayInput is an input type that accepts ManagedHardwareSecurityModuleKeyArray and ManagedHardwareSecurityModuleKeyArrayOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleKeyArrayInput` via: // // ManagedHardwareSecurityModuleKeyArray{ ManagedHardwareSecurityModuleKeyArgs{...} } type ManagedHardwareSecurityModuleKeyArrayInput interface { pulumi.Input ToManagedHardwareSecurityModuleKeyArrayOutput() ManagedHardwareSecurityModuleKeyArrayOutput ToManagedHardwareSecurityModuleKeyArrayOutputWithContext(context.Context) ManagedHardwareSecurityModuleKeyArrayOutput } type ManagedHardwareSecurityModuleKeyArray []ManagedHardwareSecurityModuleKeyInput func (ManagedHardwareSecurityModuleKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleKey)(nil)).Elem() } func (i ManagedHardwareSecurityModuleKeyArray) ToManagedHardwareSecurityModuleKeyArrayOutput() ManagedHardwareSecurityModuleKeyArrayOutput { return i.ToManagedHardwareSecurityModuleKeyArrayOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleKeyArray) ToManagedHardwareSecurityModuleKeyArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleKeyArrayOutput) } // ManagedHardwareSecurityModuleKeyMapInput is an input type that accepts ManagedHardwareSecurityModuleKeyMap and ManagedHardwareSecurityModuleKeyMapOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleKeyMapInput` via: // // ManagedHardwareSecurityModuleKeyMap{ "key": ManagedHardwareSecurityModuleKeyArgs{...} } type ManagedHardwareSecurityModuleKeyMapInput interface { pulumi.Input ToManagedHardwareSecurityModuleKeyMapOutput() ManagedHardwareSecurityModuleKeyMapOutput ToManagedHardwareSecurityModuleKeyMapOutputWithContext(context.Context) ManagedHardwareSecurityModuleKeyMapOutput } type ManagedHardwareSecurityModuleKeyMap map[string]ManagedHardwareSecurityModuleKeyInput func (ManagedHardwareSecurityModuleKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleKey)(nil)).Elem() } func (i ManagedHardwareSecurityModuleKeyMap) ToManagedHardwareSecurityModuleKeyMapOutput() ManagedHardwareSecurityModuleKeyMapOutput { return i.ToManagedHardwareSecurityModuleKeyMapOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleKeyMap) ToManagedHardwareSecurityModuleKeyMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleKeyMapOutput) } type ManagedHardwareSecurityModuleKeyOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleKey)(nil)).Elem() } func (o ManagedHardwareSecurityModuleKeyOutput) ToManagedHardwareSecurityModuleKeyOutput() ManagedHardwareSecurityModuleKeyOutput { return o } func (o ManagedHardwareSecurityModuleKeyOutput) ToManagedHardwareSecurityModuleKeyOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyOutput { return o } // Specifies the curve to use when creating an `EC-HSM` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field is required if `keyType` is `EC-HSM`. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleKeyOutput) Curve() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringPtrOutput { return v.Curve }).(pulumi.StringPtrOutput) } // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). When this parameter gets changed on reruns, if newer date is ahead of current date, an update is performed. If the newer date is before the current date, resource will be force created. func (o ManagedHardwareSecurityModuleKeyOutput) ExpirationDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringPtrOutput { return v.ExpirationDate }).(pulumi.StringPtrOutput) } // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify`, `wrapKey` and `import`. Please note these values are case-sensitive. func (o ManagedHardwareSecurityModuleKeyOutput) KeyOpts() pulumi.StringArrayOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringArrayOutput { return v.KeyOpts }).(pulumi.StringArrayOutput) } // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA-HSM` or `oct-HSM`. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleKeyOutput) KeySize() pulumi.IntPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.IntPtrOutput { return v.KeySize }).(pulumi.IntPtrOutput) } // Specifies the Key Type to use for this Key Vault Managed Hardware Security Module Key. Possible values are `EC-HSM`, `oct-HSM` and `RSA-HSM`. More details see [HSM-protected keys](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#hsm-protected-keys). Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleKeyOutput) KeyType() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringOutput { return v.KeyType }).(pulumi.StringOutput) } // Specifies the ID of the Key Vault Managed Hardware Security Module that they key will be owned by. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleKeyOutput) ManagedHsmId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringOutput { return v.ManagedHsmId }).(pulumi.StringOutput) } // Specifies the name of the Key Vault Managed Hardware Security Module Key. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleKeyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. func (o ManagedHardwareSecurityModuleKeyOutput) NotBeforeDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringPtrOutput { return v.NotBeforeDate }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the resource. func (o ManagedHardwareSecurityModuleKeyOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The versioned Key Vault Secret Managed Hardware Security Module Key ID. func (o ManagedHardwareSecurityModuleKeyOutput) VersionedId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleKey) pulumi.StringOutput { return v.VersionedId }).(pulumi.StringOutput) } type ManagedHardwareSecurityModuleKeyArrayOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleKey)(nil)).Elem() } func (o ManagedHardwareSecurityModuleKeyArrayOutput) ToManagedHardwareSecurityModuleKeyArrayOutput() ManagedHardwareSecurityModuleKeyArrayOutput { return o } func (o ManagedHardwareSecurityModuleKeyArrayOutput) ToManagedHardwareSecurityModuleKeyArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyArrayOutput { return o } func (o ManagedHardwareSecurityModuleKeyArrayOutput) Index(i pulumi.IntInput) ManagedHardwareSecurityModuleKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleKey { return vs[0].([]*ManagedHardwareSecurityModuleKey)[vs[1].(int)] }).(ManagedHardwareSecurityModuleKeyOutput) } type ManagedHardwareSecurityModuleKeyMapOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleKey)(nil)).Elem() } func (o ManagedHardwareSecurityModuleKeyMapOutput) ToManagedHardwareSecurityModuleKeyMapOutput() ManagedHardwareSecurityModuleKeyMapOutput { return o } func (o ManagedHardwareSecurityModuleKeyMapOutput) ToManagedHardwareSecurityModuleKeyMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleKeyMapOutput { return o } func (o ManagedHardwareSecurityModuleKeyMapOutput) MapIndex(k pulumi.StringInput) ManagedHardwareSecurityModuleKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleKey { return vs[0].(map[string]*ManagedHardwareSecurityModuleKey)[vs[1].(string)] }).(ManagedHardwareSecurityModuleKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleKeyInput)(nil)).Elem(), &ManagedHardwareSecurityModuleKey{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleKeyArrayInput)(nil)).Elem(), ManagedHardwareSecurityModuleKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleKeyMapInput)(nil)).Elem(), ManagedHardwareSecurityModuleKeyMap{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleKeyOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleKeyArrayOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleKeyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/managedStorageAccountSasTokenDefinition.go
sdk/go/azure/keyvault/managedStorageAccountSasTokenDefinition.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Managed Storage Account SAS Definition. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleResourceGroup, 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: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleGetAccountSAS := storage.GetAccountSASOutput(ctx, storage.GetAccountSASOutputArgs{ // ConnectionString: exampleAccount.PrimaryConnectionString, // HttpsOnly: pulumi.Bool(true), // ResourceTypes: &storage.GetAccountSASResourceTypesArgs{ // Service: pulumi.Bool(true), // Container: pulumi.Bool(false), // Object: pulumi.Bool(false), // }, // Services: &storage.GetAccountSASServicesArgs{ // Blob: pulumi.Bool(true), // Queue: pulumi.Bool(false), // Table: pulumi.Bool(false), // File: pulumi.Bool(false), // }, // Start: pulumi.String("2021-04-30T00:00:00Z"), // Expiry: pulumi.String("2023-04-30T00:00:00Z"), // Permissions: &storage.GetAccountSASPermissionsArgs{ // Read: pulumi.Bool(true), // Write: pulumi.Bool(true), // Delete: pulumi.Bool(false), // List: pulumi.Bool(false), // Add: pulumi.Bool(true), // Create: pulumi.Bool(true), // Update: pulumi.Bool(false), // Process: pulumi.Bool(false), // Tag: pulumi.Bool(false), // Filter: pulumi.Bool(false), // }, // }, nil) // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("example-keyvault"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // TenantId: pulumi.String(example.TenantId), // SkuName: pulumi.String("standard"), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(example.TenantId), // ObjectId: pulumi.String(example.ObjectId), // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("Delete"), // }, // StoragePermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Set"), // pulumi.String("SetSAS"), // pulumi.String("GetSAS"), // pulumi.String("DeleteSAS"), // pulumi.String("Update"), // pulumi.String("RegenerateKey"), // }, // }, // }, // }) // if err != nil { // return err // } // exampleManagedStorageAccount, err := keyvault.NewManagedStorageAccount(ctx, "example", &keyvault.ManagedStorageAccountArgs{ // Name: pulumi.String("examplemanagedstorage"), // KeyVaultId: exampleKeyVault.ID(), // StorageAccountId: exampleAccount.ID(), // StorageAccountKey: pulumi.String("key1"), // RegenerateKeyAutomatically: pulumi.Bool(false), // RegenerationPeriod: pulumi.String("P1D"), // }) // if err != nil { // return err // } // _, err = keyvault.NewManagedStorageAccountSasTokenDefinition(ctx, "example", &keyvault.ManagedStorageAccountSasTokenDefinitionArgs{ // Name: pulumi.String("examplesasdefinition"), // ValidityPeriod: pulumi.String("P1D"), // ManagedStorageAccountId: exampleManagedStorageAccount.ID(), // SasTemplateUri: pulumi.String(exampleGetAccountSAS.ApplyT(func(exampleGetAccountSAS storage.GetAccountSASResult) (*string, error) { // return &exampleGetAccountSAS.Sas, nil // }).(pulumi.StringPtrOutput)), // SasType: pulumi.String("account"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vaults can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/managedStorageAccountSasTokenDefinition:ManagedStorageAccountSasTokenDefinition example https://example-keyvault.vault.azure.net/storage/exampleStorageAcc01/sas/exampleSasDefinition01 // ``` type ManagedStorageAccountSasTokenDefinition struct { pulumi.CustomResourceState // The ID of the Managed Storage Account. ManagedStorageAccountId pulumi.StringOutput `pulumi:"managedStorageAccountId"` // The name which should be used for this SAS Definition. Name pulumi.StringOutput `pulumi:"name"` // The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period. SasTemplateUri pulumi.StringOutput `pulumi:"sasTemplateUri"` // The type of SAS token the SAS definition will create. Possible values are `account` and `service`. SasType pulumi.StringOutput `pulumi:"sasType"` // The ID of the Secret that is created by Managed Storage Account SAS Definition. SecretId pulumi.StringOutput `pulumi:"secretId"` // A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. Tags pulumi.StringMapOutput `pulumi:"tags"` // Validity period of SAS token. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). ValidityPeriod pulumi.StringOutput `pulumi:"validityPeriod"` } // NewManagedStorageAccountSasTokenDefinition registers a new resource with the given unique name, arguments, and options. func NewManagedStorageAccountSasTokenDefinition(ctx *pulumi.Context, name string, args *ManagedStorageAccountSasTokenDefinitionArgs, opts ...pulumi.ResourceOption) (*ManagedStorageAccountSasTokenDefinition, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ManagedStorageAccountId == nil { return nil, errors.New("invalid value for required argument 'ManagedStorageAccountId'") } if args.SasTemplateUri == nil { return nil, errors.New("invalid value for required argument 'SasTemplateUri'") } if args.SasType == nil { return nil, errors.New("invalid value for required argument 'SasType'") } if args.ValidityPeriod == nil { return nil, errors.New("invalid value for required argument 'ValidityPeriod'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedStorageAccountSasTokenDefinition err := ctx.RegisterResource("azure:keyvault/managedStorageAccountSasTokenDefinition:ManagedStorageAccountSasTokenDefinition", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedStorageAccountSasTokenDefinition gets an existing ManagedStorageAccountSasTokenDefinition resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedStorageAccountSasTokenDefinition(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedStorageAccountSasTokenDefinitionState, opts ...pulumi.ResourceOption) (*ManagedStorageAccountSasTokenDefinition, error) { var resource ManagedStorageAccountSasTokenDefinition err := ctx.ReadResource("azure:keyvault/managedStorageAccountSasTokenDefinition:ManagedStorageAccountSasTokenDefinition", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedStorageAccountSasTokenDefinition resources. type managedStorageAccountSasTokenDefinitionState struct { // The ID of the Managed Storage Account. ManagedStorageAccountId *string `pulumi:"managedStorageAccountId"` // The name which should be used for this SAS Definition. Name *string `pulumi:"name"` // The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period. SasTemplateUri *string `pulumi:"sasTemplateUri"` // The type of SAS token the SAS definition will create. Possible values are `account` and `service`. SasType *string `pulumi:"sasType"` // The ID of the Secret that is created by Managed Storage Account SAS Definition. SecretId *string `pulumi:"secretId"` // A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. Tags map[string]string `pulumi:"tags"` // Validity period of SAS token. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). ValidityPeriod *string `pulumi:"validityPeriod"` } type ManagedStorageAccountSasTokenDefinitionState struct { // The ID of the Managed Storage Account. ManagedStorageAccountId pulumi.StringPtrInput // The name which should be used for this SAS Definition. Name pulumi.StringPtrInput // The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period. SasTemplateUri pulumi.StringPtrInput // The type of SAS token the SAS definition will create. Possible values are `account` and `service`. SasType pulumi.StringPtrInput // The ID of the Secret that is created by Managed Storage Account SAS Definition. SecretId pulumi.StringPtrInput // A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. Tags pulumi.StringMapInput // Validity period of SAS token. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). ValidityPeriod pulumi.StringPtrInput } func (ManagedStorageAccountSasTokenDefinitionState) ElementType() reflect.Type { return reflect.TypeOf((*managedStorageAccountSasTokenDefinitionState)(nil)).Elem() } type managedStorageAccountSasTokenDefinitionArgs struct { // The ID of the Managed Storage Account. ManagedStorageAccountId string `pulumi:"managedStorageAccountId"` // The name which should be used for this SAS Definition. Name *string `pulumi:"name"` // The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period. SasTemplateUri string `pulumi:"sasTemplateUri"` // The type of SAS token the SAS definition will create. Possible values are `account` and `service`. SasType string `pulumi:"sasType"` // A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. Tags map[string]string `pulumi:"tags"` // Validity period of SAS token. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). ValidityPeriod string `pulumi:"validityPeriod"` } // The set of arguments for constructing a ManagedStorageAccountSasTokenDefinition resource. type ManagedStorageAccountSasTokenDefinitionArgs struct { // The ID of the Managed Storage Account. ManagedStorageAccountId pulumi.StringInput // The name which should be used for this SAS Definition. Name pulumi.StringPtrInput // The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period. SasTemplateUri pulumi.StringInput // The type of SAS token the SAS definition will create. Possible values are `account` and `service`. SasType pulumi.StringInput // A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. Tags pulumi.StringMapInput // Validity period of SAS token. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). ValidityPeriod pulumi.StringInput } func (ManagedStorageAccountSasTokenDefinitionArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedStorageAccountSasTokenDefinitionArgs)(nil)).Elem() } type ManagedStorageAccountSasTokenDefinitionInput interface { pulumi.Input ToManagedStorageAccountSasTokenDefinitionOutput() ManagedStorageAccountSasTokenDefinitionOutput ToManagedStorageAccountSasTokenDefinitionOutputWithContext(ctx context.Context) ManagedStorageAccountSasTokenDefinitionOutput } func (*ManagedStorageAccountSasTokenDefinition) ElementType() reflect.Type { return reflect.TypeOf((**ManagedStorageAccountSasTokenDefinition)(nil)).Elem() } func (i *ManagedStorageAccountSasTokenDefinition) ToManagedStorageAccountSasTokenDefinitionOutput() ManagedStorageAccountSasTokenDefinitionOutput { return i.ToManagedStorageAccountSasTokenDefinitionOutputWithContext(context.Background()) } func (i *ManagedStorageAccountSasTokenDefinition) ToManagedStorageAccountSasTokenDefinitionOutputWithContext(ctx context.Context) ManagedStorageAccountSasTokenDefinitionOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedStorageAccountSasTokenDefinitionOutput) } // ManagedStorageAccountSasTokenDefinitionArrayInput is an input type that accepts ManagedStorageAccountSasTokenDefinitionArray and ManagedStorageAccountSasTokenDefinitionArrayOutput values. // You can construct a concrete instance of `ManagedStorageAccountSasTokenDefinitionArrayInput` via: // // ManagedStorageAccountSasTokenDefinitionArray{ ManagedStorageAccountSasTokenDefinitionArgs{...} } type ManagedStorageAccountSasTokenDefinitionArrayInput interface { pulumi.Input ToManagedStorageAccountSasTokenDefinitionArrayOutput() ManagedStorageAccountSasTokenDefinitionArrayOutput ToManagedStorageAccountSasTokenDefinitionArrayOutputWithContext(context.Context) ManagedStorageAccountSasTokenDefinitionArrayOutput } type ManagedStorageAccountSasTokenDefinitionArray []ManagedStorageAccountSasTokenDefinitionInput func (ManagedStorageAccountSasTokenDefinitionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedStorageAccountSasTokenDefinition)(nil)).Elem() } func (i ManagedStorageAccountSasTokenDefinitionArray) ToManagedStorageAccountSasTokenDefinitionArrayOutput() ManagedStorageAccountSasTokenDefinitionArrayOutput { return i.ToManagedStorageAccountSasTokenDefinitionArrayOutputWithContext(context.Background()) } func (i ManagedStorageAccountSasTokenDefinitionArray) ToManagedStorageAccountSasTokenDefinitionArrayOutputWithContext(ctx context.Context) ManagedStorageAccountSasTokenDefinitionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedStorageAccountSasTokenDefinitionArrayOutput) } // ManagedStorageAccountSasTokenDefinitionMapInput is an input type that accepts ManagedStorageAccountSasTokenDefinitionMap and ManagedStorageAccountSasTokenDefinitionMapOutput values. // You can construct a concrete instance of `ManagedStorageAccountSasTokenDefinitionMapInput` via: // // ManagedStorageAccountSasTokenDefinitionMap{ "key": ManagedStorageAccountSasTokenDefinitionArgs{...} } type ManagedStorageAccountSasTokenDefinitionMapInput interface { pulumi.Input ToManagedStorageAccountSasTokenDefinitionMapOutput() ManagedStorageAccountSasTokenDefinitionMapOutput ToManagedStorageAccountSasTokenDefinitionMapOutputWithContext(context.Context) ManagedStorageAccountSasTokenDefinitionMapOutput } type ManagedStorageAccountSasTokenDefinitionMap map[string]ManagedStorageAccountSasTokenDefinitionInput func (ManagedStorageAccountSasTokenDefinitionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedStorageAccountSasTokenDefinition)(nil)).Elem() } func (i ManagedStorageAccountSasTokenDefinitionMap) ToManagedStorageAccountSasTokenDefinitionMapOutput() ManagedStorageAccountSasTokenDefinitionMapOutput { return i.ToManagedStorageAccountSasTokenDefinitionMapOutputWithContext(context.Background()) } func (i ManagedStorageAccountSasTokenDefinitionMap) ToManagedStorageAccountSasTokenDefinitionMapOutputWithContext(ctx context.Context) ManagedStorageAccountSasTokenDefinitionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedStorageAccountSasTokenDefinitionMapOutput) } type ManagedStorageAccountSasTokenDefinitionOutput struct{ *pulumi.OutputState } func (ManagedStorageAccountSasTokenDefinitionOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedStorageAccountSasTokenDefinition)(nil)).Elem() } func (o ManagedStorageAccountSasTokenDefinitionOutput) ToManagedStorageAccountSasTokenDefinitionOutput() ManagedStorageAccountSasTokenDefinitionOutput { return o } func (o ManagedStorageAccountSasTokenDefinitionOutput) ToManagedStorageAccountSasTokenDefinitionOutputWithContext(ctx context.Context) ManagedStorageAccountSasTokenDefinitionOutput { return o } // The ID of the Managed Storage Account. func (o ManagedStorageAccountSasTokenDefinitionOutput) ManagedStorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccountSasTokenDefinition) pulumi.StringOutput { return v.ManagedStorageAccountId }).(pulumi.StringOutput) } // The name which should be used for this SAS Definition. func (o ManagedStorageAccountSasTokenDefinitionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccountSasTokenDefinition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template, but regenerated with a new validity period. func (o ManagedStorageAccountSasTokenDefinitionOutput) SasTemplateUri() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccountSasTokenDefinition) pulumi.StringOutput { return v.SasTemplateUri }).(pulumi.StringOutput) } // The type of SAS token the SAS definition will create. Possible values are `account` and `service`. func (o ManagedStorageAccountSasTokenDefinitionOutput) SasType() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccountSasTokenDefinition) pulumi.StringOutput { return v.SasType }).(pulumi.StringOutput) } // The ID of the Secret that is created by Managed Storage Account SAS Definition. func (o ManagedStorageAccountSasTokenDefinitionOutput) SecretId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccountSasTokenDefinition) pulumi.StringOutput { return v.SecretId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. func (o ManagedStorageAccountSasTokenDefinitionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ManagedStorageAccountSasTokenDefinition) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Validity period of SAS token. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). func (o ManagedStorageAccountSasTokenDefinitionOutput) ValidityPeriod() pulumi.StringOutput { return o.ApplyT(func(v *ManagedStorageAccountSasTokenDefinition) pulumi.StringOutput { return v.ValidityPeriod }).(pulumi.StringOutput) } type ManagedStorageAccountSasTokenDefinitionArrayOutput struct{ *pulumi.OutputState } func (ManagedStorageAccountSasTokenDefinitionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedStorageAccountSasTokenDefinition)(nil)).Elem() } func (o ManagedStorageAccountSasTokenDefinitionArrayOutput) ToManagedStorageAccountSasTokenDefinitionArrayOutput() ManagedStorageAccountSasTokenDefinitionArrayOutput { return o } func (o ManagedStorageAccountSasTokenDefinitionArrayOutput) ToManagedStorageAccountSasTokenDefinitionArrayOutputWithContext(ctx context.Context) ManagedStorageAccountSasTokenDefinitionArrayOutput { return o } func (o ManagedStorageAccountSasTokenDefinitionArrayOutput) Index(i pulumi.IntInput) ManagedStorageAccountSasTokenDefinitionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedStorageAccountSasTokenDefinition { return vs[0].([]*ManagedStorageAccountSasTokenDefinition)[vs[1].(int)] }).(ManagedStorageAccountSasTokenDefinitionOutput) } type ManagedStorageAccountSasTokenDefinitionMapOutput struct{ *pulumi.OutputState } func (ManagedStorageAccountSasTokenDefinitionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedStorageAccountSasTokenDefinition)(nil)).Elem() } func (o ManagedStorageAccountSasTokenDefinitionMapOutput) ToManagedStorageAccountSasTokenDefinitionMapOutput() ManagedStorageAccountSasTokenDefinitionMapOutput { return o } func (o ManagedStorageAccountSasTokenDefinitionMapOutput) ToManagedStorageAccountSasTokenDefinitionMapOutputWithContext(ctx context.Context) ManagedStorageAccountSasTokenDefinitionMapOutput { return o } func (o ManagedStorageAccountSasTokenDefinitionMapOutput) MapIndex(k pulumi.StringInput) ManagedStorageAccountSasTokenDefinitionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedStorageAccountSasTokenDefinition { return vs[0].(map[string]*ManagedStorageAccountSasTokenDefinition)[vs[1].(string)] }).(ManagedStorageAccountSasTokenDefinitionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedStorageAccountSasTokenDefinitionInput)(nil)).Elem(), &ManagedStorageAccountSasTokenDefinition{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedStorageAccountSasTokenDefinitionArrayInput)(nil)).Elem(), ManagedStorageAccountSasTokenDefinitionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedStorageAccountSasTokenDefinitionMapInput)(nil)).Elem(), ManagedStorageAccountSasTokenDefinitionMap{}) pulumi.RegisterOutputType(ManagedStorageAccountSasTokenDefinitionOutput{}) pulumi.RegisterOutputType(ManagedStorageAccountSasTokenDefinitionArrayOutput{}) pulumi.RegisterOutputType(ManagedStorageAccountSasTokenDefinitionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getCertificates.go
sdk/go/azure/keyvault/getCertificates.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 retrieve a list of certificate names from an existing Key Vault. // // ## Example Usage func GetCertificates(ctx *pulumi.Context, args *GetCertificatesArgs, opts ...pulumi.InvokeOption) (*GetCertificatesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetCertificatesResult err := ctx.Invoke("azure:keyvault/getCertificates:getCertificates", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCertificates. type GetCertificatesArgs struct { // Specifies whether to include certificates which are not completely provisioned. Defaults to true. IncludePending *bool `pulumi:"includePending"` // Specifies the ID of the Key Vault instance to fetch certificate names from, available on the `keyvault.KeyVault` Data Source / Resource. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. KeyVaultId string `pulumi:"keyVaultId"` } // A collection of values returned by getCertificates. type GetCertificatesResult struct { // One or more `certificates` blocks as defined below. Certificates []GetCertificatesCertificate `pulumi:"certificates"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` IncludePending *bool `pulumi:"includePending"` // The Key Vault ID. KeyVaultId string `pulumi:"keyVaultId"` // List containing names of certificates that exist in this Key Vault. Names []string `pulumi:"names"` } func GetCertificatesOutput(ctx *pulumi.Context, args GetCertificatesOutputArgs, opts ...pulumi.InvokeOption) GetCertificatesResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetCertificatesResultOutput, error) { args := v.(GetCertificatesArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getCertificates:getCertificates", args, GetCertificatesResultOutput{}, options).(GetCertificatesResultOutput), nil }).(GetCertificatesResultOutput) } // A collection of arguments for invoking getCertificates. type GetCertificatesOutputArgs struct { // Specifies whether to include certificates which are not completely provisioned. Defaults to true. IncludePending pulumi.BoolPtrInput `pulumi:"includePending"` // Specifies the ID of the Key Vault instance to fetch certificate names from, available on the `keyvault.KeyVault` Data Source / Resource. // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` } func (GetCertificatesOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetCertificatesArgs)(nil)).Elem() } // A collection of values returned by getCertificates. type GetCertificatesResultOutput struct{ *pulumi.OutputState } func (GetCertificatesResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetCertificatesResult)(nil)).Elem() } func (o GetCertificatesResultOutput) ToGetCertificatesResultOutput() GetCertificatesResultOutput { return o } func (o GetCertificatesResultOutput) ToGetCertificatesResultOutputWithContext(ctx context.Context) GetCertificatesResultOutput { return o } // One or more `certificates` blocks as defined below. func (o GetCertificatesResultOutput) Certificates() GetCertificatesCertificateArrayOutput { return o.ApplyT(func(v GetCertificatesResult) []GetCertificatesCertificate { return v.Certificates }).(GetCertificatesCertificateArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetCertificatesResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetCertificatesResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetCertificatesResultOutput) IncludePending() pulumi.BoolPtrOutput { return o.ApplyT(func(v GetCertificatesResult) *bool { return v.IncludePending }).(pulumi.BoolPtrOutput) } // The Key Vault ID. func (o GetCertificatesResultOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v GetCertificatesResult) string { return v.KeyVaultId }).(pulumi.StringOutput) } // List containing names of certificates that exist in this Key Vault. func (o GetCertificatesResultOutput) Names() pulumi.StringArrayOutput { return o.ApplyT(func(v GetCertificatesResult) []string { return v.Names }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(GetCertificatesResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/managedHardwareSecurityModule.go
sdk/go/azure/keyvault/managedHardwareSecurityModule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Managed Hardware Security Module. // // > **Note:** The Azure Provider includes a Feature Toggle which will purge a Key Vault Managed Hardware Security Module resource on destroy, rather than the default soft-delete. See `purgeSoftDeletedHardwareSecurityModulesOnDestroy` for more information. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = keyvault.NewManagedHardwareSecurityModule(ctx, "example", &keyvault.ManagedHardwareSecurityModuleArgs{ // Name: pulumi.String("exampleKVHsm"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("Standard_B1"), // PurgeProtectionEnabled: pulumi.Bool(false), // SoftDeleteRetentionDays: pulumi.Int(90), // TenantId: pulumi.String(current.TenantId), // AdminObjectIds: pulumi.StringArray{ // pulumi.String(current.ObjectId), // }, // Tags: pulumi.StringMap{ // "Env": 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.KeyVault` - 2023-07-01 // // ## Import // // Key Vault Managed Hardware Security Module can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/managedHardwareSecurityModule:ManagedHardwareSecurityModule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.KeyVault/managedHSMs/hsm1 // ``` type ManagedHardwareSecurityModule struct { pulumi.CustomResourceState // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. AdminObjectIds pulumi.StringArrayOutput `pulumi:"adminObjectIds"` // The URI of the Key Vault Managed Hardware Security Module, used for performing operations on keys. HsmUri pulumi.StringOutput `pulumi:"hsmUri"` // 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 Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A `networkAcls` block as defined below. NetworkAcls ManagedHardwareSecurityModuleNetworkAclsOutput `pulumi:"networkAcls"` // Whether traffic from public networks is permitted. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // Is Purge Protection enabled for this Key Vault Managed Hardware Security Module? Changing this forces a new resource to be created. PurgeProtectionEnabled pulumi.BoolPtrOutput `pulumi:"purgeProtectionEnabled"` // The name of the resource group in which to create the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // This attribute can be used for disaster recovery or when creating another Managed HSM that shares the same security domain. SecurityDomainEncryptedData pulumi.StringOutput `pulumi:"securityDomainEncryptedData"` // A list of KeyVault certificates resource IDs (minimum of three and up to a maximum of 10) to activate this Managed HSM. More information see [activate-your-managed-hsm](https://learn.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm) SecurityDomainKeyVaultCertificateIds pulumi.StringArrayOutput `pulumi:"securityDomainKeyVaultCertificateIds"` // Specifies the minimum number of shares required to decrypt the security domain for recovery. This is required when `securityDomainKeyVaultCertificateIds` is specified. Valid values are between 2 and 10. SecurityDomainQuorum pulumi.IntPtrOutput `pulumi:"securityDomainQuorum"` // The Name of the SKU used for this Key Vault Managed Hardware Security Module. Possible value is `Standard_B1`. Changing this forces a new resource to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` days. Defaults to `90`. Changing this forces a new resource to be created. SoftDeleteRetentionDays pulumi.IntPtrOutput `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The Azure Active Directory Tenant ID that should be used for authenticating requests to the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewManagedHardwareSecurityModule registers a new resource with the given unique name, arguments, and options. func NewManagedHardwareSecurityModule(ctx *pulumi.Context, name string, args *ManagedHardwareSecurityModuleArgs, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AdminObjectIds == nil { return nil, errors.New("invalid value for required argument 'AdminObjectIds'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "securityDomainEncryptedData", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedHardwareSecurityModule err := ctx.RegisterResource("azure:keyvault/managedHardwareSecurityModule:ManagedHardwareSecurityModule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedHardwareSecurityModule gets an existing ManagedHardwareSecurityModule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedHardwareSecurityModule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedHardwareSecurityModuleState, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModule, error) { var resource ManagedHardwareSecurityModule err := ctx.ReadResource("azure:keyvault/managedHardwareSecurityModule:ManagedHardwareSecurityModule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedHardwareSecurityModule resources. type managedHardwareSecurityModuleState struct { // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. AdminObjectIds []string `pulumi:"adminObjectIds"` // The URI of the Key Vault Managed Hardware Security Module, used for performing operations on keys. HsmUri *string `pulumi:"hsmUri"` // 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 Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `networkAcls` block as defined below. NetworkAcls *ManagedHardwareSecurityModuleNetworkAcls `pulumi:"networkAcls"` // Whether traffic from public networks is permitted. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Is Purge Protection enabled for this Key Vault Managed Hardware Security Module? Changing this forces a new resource to be created. PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"` // The name of the resource group in which to create the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // This attribute can be used for disaster recovery or when creating another Managed HSM that shares the same security domain. SecurityDomainEncryptedData *string `pulumi:"securityDomainEncryptedData"` // A list of KeyVault certificates resource IDs (minimum of three and up to a maximum of 10) to activate this Managed HSM. More information see [activate-your-managed-hsm](https://learn.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm) SecurityDomainKeyVaultCertificateIds []string `pulumi:"securityDomainKeyVaultCertificateIds"` // Specifies the minimum number of shares required to decrypt the security domain for recovery. This is required when `securityDomainKeyVaultCertificateIds` is specified. Valid values are between 2 and 10. SecurityDomainQuorum *int `pulumi:"securityDomainQuorum"` // The Name of the SKU used for this Key Vault Managed Hardware Security Module. Possible value is `Standard_B1`. Changing this forces a new resource to be created. SkuName *string `pulumi:"skuName"` // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` days. Defaults to `90`. Changing this forces a new resource to be created. SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The Azure Active Directory Tenant ID that should be used for authenticating requests to the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. TenantId *string `pulumi:"tenantId"` } type ManagedHardwareSecurityModuleState struct { // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. AdminObjectIds pulumi.StringArrayInput // The URI of the Key Vault Managed Hardware Security Module, used for performing operations on keys. HsmUri pulumi.StringPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `networkAcls` block as defined below. NetworkAcls ManagedHardwareSecurityModuleNetworkAclsPtrInput // Whether traffic from public networks is permitted. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Is Purge Protection enabled for this Key Vault Managed Hardware Security Module? Changing this forces a new resource to be created. PurgeProtectionEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // This attribute can be used for disaster recovery or when creating another Managed HSM that shares the same security domain. SecurityDomainEncryptedData pulumi.StringPtrInput // A list of KeyVault certificates resource IDs (minimum of three and up to a maximum of 10) to activate this Managed HSM. More information see [activate-your-managed-hsm](https://learn.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm) SecurityDomainKeyVaultCertificateIds pulumi.StringArrayInput // Specifies the minimum number of shares required to decrypt the security domain for recovery. This is required when `securityDomainKeyVaultCertificateIds` is specified. Valid values are between 2 and 10. SecurityDomainQuorum pulumi.IntPtrInput // The Name of the SKU used for this Key Vault Managed Hardware Security Module. Possible value is `Standard_B1`. Changing this forces a new resource to be created. SkuName pulumi.StringPtrInput // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` days. Defaults to `90`. Changing this forces a new resource to be created. SoftDeleteRetentionDays pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Azure Active Directory Tenant ID that should be used for authenticating requests to the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. TenantId pulumi.StringPtrInput } func (ManagedHardwareSecurityModuleState) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleState)(nil)).Elem() } type managedHardwareSecurityModuleArgs struct { // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. AdminObjectIds []string `pulumi:"adminObjectIds"` // 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 Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `networkAcls` block as defined below. NetworkAcls *ManagedHardwareSecurityModuleNetworkAcls `pulumi:"networkAcls"` // Whether traffic from public networks is permitted. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Is Purge Protection enabled for this Key Vault Managed Hardware Security Module? Changing this forces a new resource to be created. PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"` // The name of the resource group in which to create the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A list of KeyVault certificates resource IDs (minimum of three and up to a maximum of 10) to activate this Managed HSM. More information see [activate-your-managed-hsm](https://learn.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm) SecurityDomainKeyVaultCertificateIds []string `pulumi:"securityDomainKeyVaultCertificateIds"` // Specifies the minimum number of shares required to decrypt the security domain for recovery. This is required when `securityDomainKeyVaultCertificateIds` is specified. Valid values are between 2 and 10. SecurityDomainQuorum *int `pulumi:"securityDomainQuorum"` // The Name of the SKU used for this Key Vault Managed Hardware Security Module. Possible value is `Standard_B1`. Changing this forces a new resource to be created. SkuName string `pulumi:"skuName"` // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` days. Defaults to `90`. Changing this forces a new resource to be created. SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The Azure Active Directory Tenant ID that should be used for authenticating requests to the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a ManagedHardwareSecurityModule resource. type ManagedHardwareSecurityModuleArgs struct { // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. AdminObjectIds 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 the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `networkAcls` block as defined below. NetworkAcls ManagedHardwareSecurityModuleNetworkAclsPtrInput // Whether traffic from public networks is permitted. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Is Purge Protection enabled for this Key Vault Managed Hardware Security Module? Changing this forces a new resource to be created. PurgeProtectionEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A list of KeyVault certificates resource IDs (minimum of three and up to a maximum of 10) to activate this Managed HSM. More information see [activate-your-managed-hsm](https://learn.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm) SecurityDomainKeyVaultCertificateIds pulumi.StringArrayInput // Specifies the minimum number of shares required to decrypt the security domain for recovery. This is required when `securityDomainKeyVaultCertificateIds` is specified. Valid values are between 2 and 10. SecurityDomainQuorum pulumi.IntPtrInput // The Name of the SKU used for this Key Vault Managed Hardware Security Module. Possible value is `Standard_B1`. Changing this forces a new resource to be created. SkuName pulumi.StringInput // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` days. Defaults to `90`. Changing this forces a new resource to be created. SoftDeleteRetentionDays pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Azure Active Directory Tenant ID that should be used for authenticating requests to the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. TenantId pulumi.StringInput } func (ManagedHardwareSecurityModuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleArgs)(nil)).Elem() } type ManagedHardwareSecurityModuleInput interface { pulumi.Input ToManagedHardwareSecurityModuleOutput() ManagedHardwareSecurityModuleOutput ToManagedHardwareSecurityModuleOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleOutput } func (*ManagedHardwareSecurityModule) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModule)(nil)).Elem() } func (i *ManagedHardwareSecurityModule) ToManagedHardwareSecurityModuleOutput() ManagedHardwareSecurityModuleOutput { return i.ToManagedHardwareSecurityModuleOutputWithContext(context.Background()) } func (i *ManagedHardwareSecurityModule) ToManagedHardwareSecurityModuleOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleOutput) } // ManagedHardwareSecurityModuleArrayInput is an input type that accepts ManagedHardwareSecurityModuleArray and ManagedHardwareSecurityModuleArrayOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleArrayInput` via: // // ManagedHardwareSecurityModuleArray{ ManagedHardwareSecurityModuleArgs{...} } type ManagedHardwareSecurityModuleArrayInput interface { pulumi.Input ToManagedHardwareSecurityModuleArrayOutput() ManagedHardwareSecurityModuleArrayOutput ToManagedHardwareSecurityModuleArrayOutputWithContext(context.Context) ManagedHardwareSecurityModuleArrayOutput } type ManagedHardwareSecurityModuleArray []ManagedHardwareSecurityModuleInput func (ManagedHardwareSecurityModuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModule)(nil)).Elem() } func (i ManagedHardwareSecurityModuleArray) ToManagedHardwareSecurityModuleArrayOutput() ManagedHardwareSecurityModuleArrayOutput { return i.ToManagedHardwareSecurityModuleArrayOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleArray) ToManagedHardwareSecurityModuleArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleArrayOutput) } // ManagedHardwareSecurityModuleMapInput is an input type that accepts ManagedHardwareSecurityModuleMap and ManagedHardwareSecurityModuleMapOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleMapInput` via: // // ManagedHardwareSecurityModuleMap{ "key": ManagedHardwareSecurityModuleArgs{...} } type ManagedHardwareSecurityModuleMapInput interface { pulumi.Input ToManagedHardwareSecurityModuleMapOutput() ManagedHardwareSecurityModuleMapOutput ToManagedHardwareSecurityModuleMapOutputWithContext(context.Context) ManagedHardwareSecurityModuleMapOutput } type ManagedHardwareSecurityModuleMap map[string]ManagedHardwareSecurityModuleInput func (ManagedHardwareSecurityModuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModule)(nil)).Elem() } func (i ManagedHardwareSecurityModuleMap) ToManagedHardwareSecurityModuleMapOutput() ManagedHardwareSecurityModuleMapOutput { return i.ToManagedHardwareSecurityModuleMapOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleMap) ToManagedHardwareSecurityModuleMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleMapOutput) } type ManagedHardwareSecurityModuleOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModule)(nil)).Elem() } func (o ManagedHardwareSecurityModuleOutput) ToManagedHardwareSecurityModuleOutput() ManagedHardwareSecurityModuleOutput { return o } func (o ManagedHardwareSecurityModuleOutput) ToManagedHardwareSecurityModuleOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleOutput { return o } // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) AdminObjectIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringArrayOutput { return v.AdminObjectIds }).(pulumi.StringArrayOutput) } // The URI of the Key Vault Managed Hardware Security Module, used for performing operations on keys. func (o ManagedHardwareSecurityModuleOutput) HsmUri() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringOutput { return v.HsmUri }).(pulumi.StringOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `networkAcls` block as defined below. func (o ManagedHardwareSecurityModuleOutput) NetworkAcls() ManagedHardwareSecurityModuleNetworkAclsOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) ManagedHardwareSecurityModuleNetworkAclsOutput { return v.NetworkAcls }).(ManagedHardwareSecurityModuleNetworkAclsOutput) } // Whether traffic from public networks is permitted. Defaults to `true`. func (o ManagedHardwareSecurityModuleOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // Is Purge Protection enabled for this Key Vault Managed Hardware Security Module? Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) PurgeProtectionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.BoolPtrOutput { return v.PurgeProtectionEnabled }).(pulumi.BoolPtrOutput) } // The name of the resource group in which to create the Key Vault Managed Hardware Security Module. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // This attribute can be used for disaster recovery or when creating another Managed HSM that shares the same security domain. func (o ManagedHardwareSecurityModuleOutput) SecurityDomainEncryptedData() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringOutput { return v.SecurityDomainEncryptedData }).(pulumi.StringOutput) } // A list of KeyVault certificates resource IDs (minimum of three and up to a maximum of 10) to activate this Managed HSM. More information see [activate-your-managed-hsm](https://learn.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli#activate-your-managed-hsm) func (o ManagedHardwareSecurityModuleOutput) SecurityDomainKeyVaultCertificateIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringArrayOutput { return v.SecurityDomainKeyVaultCertificateIds }).(pulumi.StringArrayOutput) } // Specifies the minimum number of shares required to decrypt the security domain for recovery. This is required when `securityDomainKeyVaultCertificateIds` is specified. Valid values are between 2 and 10. func (o ManagedHardwareSecurityModuleOutput) SecurityDomainQuorum() pulumi.IntPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.IntPtrOutput { return v.SecurityDomainQuorum }).(pulumi.IntPtrOutput) } // The Name of the SKU used for this Key Vault Managed Hardware Security Module. Possible value is `Standard_B1`. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` days. Defaults to `90`. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) SoftDeleteRetentionDays() pulumi.IntPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.IntPtrOutput { return v.SoftDeleteRetentionDays }).(pulumi.IntPtrOutput) } // A mapping of tags to assign to the resource. func (o ManagedHardwareSecurityModuleOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Azure Active Directory Tenant ID that should be used for authenticating requests to the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. func (o ManagedHardwareSecurityModuleOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModule) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type ManagedHardwareSecurityModuleArrayOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModule)(nil)).Elem() } func (o ManagedHardwareSecurityModuleArrayOutput) ToManagedHardwareSecurityModuleArrayOutput() ManagedHardwareSecurityModuleArrayOutput { return o } func (o ManagedHardwareSecurityModuleArrayOutput) ToManagedHardwareSecurityModuleArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleArrayOutput { return o } func (o ManagedHardwareSecurityModuleArrayOutput) Index(i pulumi.IntInput) ManagedHardwareSecurityModuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModule { return vs[0].([]*ManagedHardwareSecurityModule)[vs[1].(int)] }).(ManagedHardwareSecurityModuleOutput) } type ManagedHardwareSecurityModuleMapOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModule)(nil)).Elem() } func (o ManagedHardwareSecurityModuleMapOutput) ToManagedHardwareSecurityModuleMapOutput() ManagedHardwareSecurityModuleMapOutput { return o } func (o ManagedHardwareSecurityModuleMapOutput) ToManagedHardwareSecurityModuleMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleMapOutput { return o } func (o ManagedHardwareSecurityModuleMapOutput) MapIndex(k pulumi.StringInput) ManagedHardwareSecurityModuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModule { return vs[0].(map[string]*ManagedHardwareSecurityModule)[vs[1].(string)] }).(ManagedHardwareSecurityModuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleInput)(nil)).Elem(), &ManagedHardwareSecurityModule{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleArrayInput)(nil)).Elem(), ManagedHardwareSecurityModuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleMapInput)(nil)).Elem(), ManagedHardwareSecurityModuleMap{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleArrayOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getManagedHardwareSecurityModule.go
sdk/go/azure/keyvault/getManagedHardwareSecurityModule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault 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 Key Vault Managed Hardware Security Module. // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.LookupManagedHardwareSecurityModule(ctx, &keyvault.LookupManagedHardwareSecurityModuleArgs{ // Name: "mykeyvaultHsm", // ResourceGroupName: "some-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("hsmUri", example.HsmUri) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.KeyVault` - 2023-07-01 func LookupManagedHardwareSecurityModule(ctx *pulumi.Context, args *LookupManagedHardwareSecurityModuleArgs, opts ...pulumi.InvokeOption) (*LookupManagedHardwareSecurityModuleResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupManagedHardwareSecurityModuleResult err := ctx.Invoke("azure:keyvault/getManagedHardwareSecurityModule:getManagedHardwareSecurityModule", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getManagedHardwareSecurityModule. type LookupManagedHardwareSecurityModuleArgs struct { // The name of the Key Vault Managed Hardware Security Module. Name string `pulumi:"name"` // The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getManagedHardwareSecurityModule. type LookupManagedHardwareSecurityModuleResult struct { // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. AdminObjectIds []string `pulumi:"adminObjectIds"` // The URI of the Hardware Security Module for performing operations on keys and secrets. HsmUri string `pulumi:"hsmUri"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region in which the Key Vault managed Hardware Security Module exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // Is purge protection enabled on this Key Vault Managed Hardware Security Module? PurgeProtectionEnabled bool `pulumi:"purgeProtectionEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` // The Name of the SKU used for this Key Vault Managed Hardware Security Module. SkuName string `pulumi:"skuName"` // The number of days that items should be retained for soft-deleted. SoftDeleteRetentionDays int `pulumi:"softDeleteRetentionDays"` // A mapping of tags assigned to the Key Vault Managed Hardware Security Module. Tags map[string]string `pulumi:"tags"` // The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module. TenantId string `pulumi:"tenantId"` } func LookupManagedHardwareSecurityModuleOutput(ctx *pulumi.Context, args LookupManagedHardwareSecurityModuleOutputArgs, opts ...pulumi.InvokeOption) LookupManagedHardwareSecurityModuleResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupManagedHardwareSecurityModuleResultOutput, error) { args := v.(LookupManagedHardwareSecurityModuleArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getManagedHardwareSecurityModule:getManagedHardwareSecurityModule", args, LookupManagedHardwareSecurityModuleResultOutput{}, options).(LookupManagedHardwareSecurityModuleResultOutput), nil }).(LookupManagedHardwareSecurityModuleResultOutput) } // A collection of arguments for invoking getManagedHardwareSecurityModule. type LookupManagedHardwareSecurityModuleOutputArgs struct { // The name of the Key Vault Managed Hardware Security Module. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the Key Vault Managed Hardware Security Module exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupManagedHardwareSecurityModuleOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedHardwareSecurityModuleArgs)(nil)).Elem() } // A collection of values returned by getManagedHardwareSecurityModule. type LookupManagedHardwareSecurityModuleResultOutput struct{ *pulumi.OutputState } func (LookupManagedHardwareSecurityModuleResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedHardwareSecurityModuleResult)(nil)).Elem() } func (o LookupManagedHardwareSecurityModuleResultOutput) ToLookupManagedHardwareSecurityModuleResultOutput() LookupManagedHardwareSecurityModuleResultOutput { return o } func (o LookupManagedHardwareSecurityModuleResultOutput) ToLookupManagedHardwareSecurityModuleResultOutputWithContext(ctx context.Context) LookupManagedHardwareSecurityModuleResultOutput { return o } // Specifies a list of administrators object IDs for the key vault Managed Hardware Security Module. func (o LookupManagedHardwareSecurityModuleResultOutput) AdminObjectIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) []string { return v.AdminObjectIds }).(pulumi.StringArrayOutput) } // The URI of the Hardware Security Module for performing operations on keys and secrets. func (o LookupManagedHardwareSecurityModuleResultOutput) HsmUri() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) string { return v.HsmUri }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupManagedHardwareSecurityModuleResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region in which the Key Vault managed Hardware Security Module exists. func (o LookupManagedHardwareSecurityModuleResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupManagedHardwareSecurityModuleResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) string { return v.Name }).(pulumi.StringOutput) } // Is purge protection enabled on this Key Vault Managed Hardware Security Module? func (o LookupManagedHardwareSecurityModuleResultOutput) PurgeProtectionEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) bool { return v.PurgeProtectionEnabled }).(pulumi.BoolOutput) } func (o LookupManagedHardwareSecurityModuleResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Name of the SKU used for this Key Vault Managed Hardware Security Module. func (o LookupManagedHardwareSecurityModuleResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) string { return v.SkuName }).(pulumi.StringOutput) } // The number of days that items should be retained for soft-deleted. func (o LookupManagedHardwareSecurityModuleResultOutput) SoftDeleteRetentionDays() pulumi.IntOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) int { return v.SoftDeleteRetentionDays }).(pulumi.IntOutput) } // A mapping of tags assigned to the Key Vault Managed Hardware Security Module. func (o LookupManagedHardwareSecurityModuleResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Azure Active Directory Tenant ID used for authenticating requests to the Key Vault Managed Hardware Security Module. func (o LookupManagedHardwareSecurityModuleResultOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleResult) string { return v.TenantId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupManagedHardwareSecurityModuleResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/managedHardwareSecurityModuleRoleDefinition.go
sdk/go/azure/keyvault/managedHardwareSecurityModuleRoleDefinition.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Managed Hardware Security Module Role Definition. This resource works together with Managed hardware security module resource. // // ## Example Usage // // ```go // package main // // import ( // // "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 := keyvault.NewManagedHardwareSecurityModule(ctx, "example", &keyvault.ManagedHardwareSecurityModuleArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.Any(exampleAzurermResourceGroup.Name), // Location: pulumi.Any(exampleAzurermResourceGroup.Location), // SkuName: pulumi.String("Standard_B1"), // TenantId: pulumi.Any(current.TenantId), // AdminObjectIds: pulumi.StringArray{ // current.ObjectId, // }, // PurgeProtectionEnabled: pulumi.Bool(false), // ActiveConfig: []map[string]interface{}{ // map[string]interface{}{ // "securityDomainCertificate": []interface{}{ // cert[0].Id, // cert[1].Id, // cert[2].Id, // }, // "securityDomainQuorum": 2, // }, // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewManagedHardwareSecurityModuleRoleDefinition(ctx, "example", &keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs{ // Name: pulumi.String("7d206142-bf01-11ed-80bc-00155d61ee9e"), // ManagedHsmId: example.ID(), // Description: pulumi.String("desc foo"), // Permissions: keyvault.ManagedHardwareSecurityModuleRoleDefinitionPermissionArray{ // &keyvault.ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs{ // DataActions: pulumi.StringArray{ // pulumi.String("Microsoft.KeyVault/managedHsm/keys/read/action"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Managed Hardware Security Module Role Definitions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition example https://0000.managedhsm.azure.net///RoleDefinition/00000000-0000-0000-0000-000000000000 // ``` type ManagedHardwareSecurityModuleRoleDefinition struct { pulumi.CustomResourceState // Specifies a text description about this Key Vault Managed Hardware Security Module Role Definition. Description pulumi.StringPtrOutput `pulumi:"description"` // The ID of the Key Vault Managed Hardware Security Module. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. ManagedHsmId pulumi.StringOutput `pulumi:"managedHsmId"` // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `permission` blocks as defined below. Permissions ManagedHardwareSecurityModuleRoleDefinitionPermissionArrayOutput `pulumi:"permissions"` // The ID of the role definition resource without Key Vault base URL. ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"` // Specify a display name for this Key Vault Managed Hardware Security Module Role Definition. RoleName pulumi.StringPtrOutput `pulumi:"roleName"` // The type of the role definition. Possible values are `AKVBuiltInRole` and `CustomRole`. RoleType pulumi.StringOutput `pulumi:"roleType"` } // NewManagedHardwareSecurityModuleRoleDefinition registers a new resource with the given unique name, arguments, and options. func NewManagedHardwareSecurityModuleRoleDefinition(ctx *pulumi.Context, name string, args *ManagedHardwareSecurityModuleRoleDefinitionArgs, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleRoleDefinition, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ManagedHsmId == nil { return nil, errors.New("invalid value for required argument 'ManagedHsmId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedHardwareSecurityModuleRoleDefinition err := ctx.RegisterResource("azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedHardwareSecurityModuleRoleDefinition gets an existing ManagedHardwareSecurityModuleRoleDefinition resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedHardwareSecurityModuleRoleDefinition(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedHardwareSecurityModuleRoleDefinitionState, opts ...pulumi.ResourceOption) (*ManagedHardwareSecurityModuleRoleDefinition, error) { var resource ManagedHardwareSecurityModuleRoleDefinition err := ctx.ReadResource("azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedHardwareSecurityModuleRoleDefinition resources. type managedHardwareSecurityModuleRoleDefinitionState struct { // Specifies a text description about this Key Vault Managed Hardware Security Module Role Definition. Description *string `pulumi:"description"` // The ID of the Key Vault Managed Hardware Security Module. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. ManagedHsmId *string `pulumi:"managedHsmId"` // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. Name *string `pulumi:"name"` // One or more `permission` blocks as defined below. Permissions []ManagedHardwareSecurityModuleRoleDefinitionPermission `pulumi:"permissions"` // The ID of the role definition resource without Key Vault base URL. ResourceManagerId *string `pulumi:"resourceManagerId"` // Specify a display name for this Key Vault Managed Hardware Security Module Role Definition. RoleName *string `pulumi:"roleName"` // The type of the role definition. Possible values are `AKVBuiltInRole` and `CustomRole`. RoleType *string `pulumi:"roleType"` } type ManagedHardwareSecurityModuleRoleDefinitionState struct { // Specifies a text description about this Key Vault Managed Hardware Security Module Role Definition. Description pulumi.StringPtrInput // The ID of the Key Vault Managed Hardware Security Module. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. ManagedHsmId pulumi.StringPtrInput // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. Name pulumi.StringPtrInput // One or more `permission` blocks as defined below. Permissions ManagedHardwareSecurityModuleRoleDefinitionPermissionArrayInput // The ID of the role definition resource without Key Vault base URL. ResourceManagerId pulumi.StringPtrInput // Specify a display name for this Key Vault Managed Hardware Security Module Role Definition. RoleName pulumi.StringPtrInput // The type of the role definition. Possible values are `AKVBuiltInRole` and `CustomRole`. RoleType pulumi.StringPtrInput } func (ManagedHardwareSecurityModuleRoleDefinitionState) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleRoleDefinitionState)(nil)).Elem() } type managedHardwareSecurityModuleRoleDefinitionArgs struct { // Specifies a text description about this Key Vault Managed Hardware Security Module Role Definition. Description *string `pulumi:"description"` // The ID of the Key Vault Managed Hardware Security Module. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. ManagedHsmId string `pulumi:"managedHsmId"` // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. Name *string `pulumi:"name"` // One or more `permission` blocks as defined below. Permissions []ManagedHardwareSecurityModuleRoleDefinitionPermission `pulumi:"permissions"` // Specify a display name for this Key Vault Managed Hardware Security Module Role Definition. RoleName *string `pulumi:"roleName"` } // The set of arguments for constructing a ManagedHardwareSecurityModuleRoleDefinition resource. type ManagedHardwareSecurityModuleRoleDefinitionArgs struct { // Specifies a text description about this Key Vault Managed Hardware Security Module Role Definition. Description pulumi.StringPtrInput // The ID of the Key Vault Managed Hardware Security Module. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. ManagedHsmId pulumi.StringInput // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. Name pulumi.StringPtrInput // One or more `permission` blocks as defined below. Permissions ManagedHardwareSecurityModuleRoleDefinitionPermissionArrayInput // Specify a display name for this Key Vault Managed Hardware Security Module Role Definition. RoleName pulumi.StringPtrInput } func (ManagedHardwareSecurityModuleRoleDefinitionArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedHardwareSecurityModuleRoleDefinitionArgs)(nil)).Elem() } type ManagedHardwareSecurityModuleRoleDefinitionInput interface { pulumi.Input ToManagedHardwareSecurityModuleRoleDefinitionOutput() ManagedHardwareSecurityModuleRoleDefinitionOutput ToManagedHardwareSecurityModuleRoleDefinitionOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleDefinitionOutput } func (*ManagedHardwareSecurityModuleRoleDefinition) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleRoleDefinition)(nil)).Elem() } func (i *ManagedHardwareSecurityModuleRoleDefinition) ToManagedHardwareSecurityModuleRoleDefinitionOutput() ManagedHardwareSecurityModuleRoleDefinitionOutput { return i.ToManagedHardwareSecurityModuleRoleDefinitionOutputWithContext(context.Background()) } func (i *ManagedHardwareSecurityModuleRoleDefinition) ToManagedHardwareSecurityModuleRoleDefinitionOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleDefinitionOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleRoleDefinitionOutput) } // ManagedHardwareSecurityModuleRoleDefinitionArrayInput is an input type that accepts ManagedHardwareSecurityModuleRoleDefinitionArray and ManagedHardwareSecurityModuleRoleDefinitionArrayOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleRoleDefinitionArrayInput` via: // // ManagedHardwareSecurityModuleRoleDefinitionArray{ ManagedHardwareSecurityModuleRoleDefinitionArgs{...} } type ManagedHardwareSecurityModuleRoleDefinitionArrayInput interface { pulumi.Input ToManagedHardwareSecurityModuleRoleDefinitionArrayOutput() ManagedHardwareSecurityModuleRoleDefinitionArrayOutput ToManagedHardwareSecurityModuleRoleDefinitionArrayOutputWithContext(context.Context) ManagedHardwareSecurityModuleRoleDefinitionArrayOutput } type ManagedHardwareSecurityModuleRoleDefinitionArray []ManagedHardwareSecurityModuleRoleDefinitionInput func (ManagedHardwareSecurityModuleRoleDefinitionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleRoleDefinition)(nil)).Elem() } func (i ManagedHardwareSecurityModuleRoleDefinitionArray) ToManagedHardwareSecurityModuleRoleDefinitionArrayOutput() ManagedHardwareSecurityModuleRoleDefinitionArrayOutput { return i.ToManagedHardwareSecurityModuleRoleDefinitionArrayOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleRoleDefinitionArray) ToManagedHardwareSecurityModuleRoleDefinitionArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleDefinitionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleRoleDefinitionArrayOutput) } // ManagedHardwareSecurityModuleRoleDefinitionMapInput is an input type that accepts ManagedHardwareSecurityModuleRoleDefinitionMap and ManagedHardwareSecurityModuleRoleDefinitionMapOutput values. // You can construct a concrete instance of `ManagedHardwareSecurityModuleRoleDefinitionMapInput` via: // // ManagedHardwareSecurityModuleRoleDefinitionMap{ "key": ManagedHardwareSecurityModuleRoleDefinitionArgs{...} } type ManagedHardwareSecurityModuleRoleDefinitionMapInput interface { pulumi.Input ToManagedHardwareSecurityModuleRoleDefinitionMapOutput() ManagedHardwareSecurityModuleRoleDefinitionMapOutput ToManagedHardwareSecurityModuleRoleDefinitionMapOutputWithContext(context.Context) ManagedHardwareSecurityModuleRoleDefinitionMapOutput } type ManagedHardwareSecurityModuleRoleDefinitionMap map[string]ManagedHardwareSecurityModuleRoleDefinitionInput func (ManagedHardwareSecurityModuleRoleDefinitionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleRoleDefinition)(nil)).Elem() } func (i ManagedHardwareSecurityModuleRoleDefinitionMap) ToManagedHardwareSecurityModuleRoleDefinitionMapOutput() ManagedHardwareSecurityModuleRoleDefinitionMapOutput { return i.ToManagedHardwareSecurityModuleRoleDefinitionMapOutputWithContext(context.Background()) } func (i ManagedHardwareSecurityModuleRoleDefinitionMap) ToManagedHardwareSecurityModuleRoleDefinitionMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleDefinitionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedHardwareSecurityModuleRoleDefinitionMapOutput) } type ManagedHardwareSecurityModuleRoleDefinitionOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleRoleDefinitionOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedHardwareSecurityModuleRoleDefinition)(nil)).Elem() } func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) ToManagedHardwareSecurityModuleRoleDefinitionOutput() ManagedHardwareSecurityModuleRoleDefinitionOutput { return o } func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) ToManagedHardwareSecurityModuleRoleDefinitionOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleDefinitionOutput { return o } // Specifies a text description about this Key Vault Managed Hardware Security Module Role Definition. func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleDefinition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The ID of the Key Vault Managed Hardware Security Module. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) ManagedHsmId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleDefinition) pulumi.StringOutput { return v.ManagedHsmId }).(pulumi.StringOutput) } // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Changing this forces a new Key Vault Managed Hardware Security Module Role Definition to be created. func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleDefinition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `permission` blocks as defined below. func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) Permissions() ManagedHardwareSecurityModuleRoleDefinitionPermissionArrayOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleDefinition) ManagedHardwareSecurityModuleRoleDefinitionPermissionArrayOutput { return v.Permissions }).(ManagedHardwareSecurityModuleRoleDefinitionPermissionArrayOutput) } // The ID of the role definition resource without Key Vault base URL. func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) ResourceManagerId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleDefinition) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput) } // Specify a display name for this Key Vault Managed Hardware Security Module Role Definition. func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) RoleName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleDefinition) pulumi.StringPtrOutput { return v.RoleName }).(pulumi.StringPtrOutput) } // The type of the role definition. Possible values are `AKVBuiltInRole` and `CustomRole`. func (o ManagedHardwareSecurityModuleRoleDefinitionOutput) RoleType() pulumi.StringOutput { return o.ApplyT(func(v *ManagedHardwareSecurityModuleRoleDefinition) pulumi.StringOutput { return v.RoleType }).(pulumi.StringOutput) } type ManagedHardwareSecurityModuleRoleDefinitionArrayOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleRoleDefinitionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedHardwareSecurityModuleRoleDefinition)(nil)).Elem() } func (o ManagedHardwareSecurityModuleRoleDefinitionArrayOutput) ToManagedHardwareSecurityModuleRoleDefinitionArrayOutput() ManagedHardwareSecurityModuleRoleDefinitionArrayOutput { return o } func (o ManagedHardwareSecurityModuleRoleDefinitionArrayOutput) ToManagedHardwareSecurityModuleRoleDefinitionArrayOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleDefinitionArrayOutput { return o } func (o ManagedHardwareSecurityModuleRoleDefinitionArrayOutput) Index(i pulumi.IntInput) ManagedHardwareSecurityModuleRoleDefinitionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleRoleDefinition { return vs[0].([]*ManagedHardwareSecurityModuleRoleDefinition)[vs[1].(int)] }).(ManagedHardwareSecurityModuleRoleDefinitionOutput) } type ManagedHardwareSecurityModuleRoleDefinitionMapOutput struct{ *pulumi.OutputState } func (ManagedHardwareSecurityModuleRoleDefinitionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedHardwareSecurityModuleRoleDefinition)(nil)).Elem() } func (o ManagedHardwareSecurityModuleRoleDefinitionMapOutput) ToManagedHardwareSecurityModuleRoleDefinitionMapOutput() ManagedHardwareSecurityModuleRoleDefinitionMapOutput { return o } func (o ManagedHardwareSecurityModuleRoleDefinitionMapOutput) ToManagedHardwareSecurityModuleRoleDefinitionMapOutputWithContext(ctx context.Context) ManagedHardwareSecurityModuleRoleDefinitionMapOutput { return o } func (o ManagedHardwareSecurityModuleRoleDefinitionMapOutput) MapIndex(k pulumi.StringInput) ManagedHardwareSecurityModuleRoleDefinitionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedHardwareSecurityModuleRoleDefinition { return vs[0].(map[string]*ManagedHardwareSecurityModuleRoleDefinition)[vs[1].(string)] }).(ManagedHardwareSecurityModuleRoleDefinitionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleRoleDefinitionInput)(nil)).Elem(), &ManagedHardwareSecurityModuleRoleDefinition{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleRoleDefinitionArrayInput)(nil)).Elem(), ManagedHardwareSecurityModuleRoleDefinitionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedHardwareSecurityModuleRoleDefinitionMapInput)(nil)).Elem(), ManagedHardwareSecurityModuleRoleDefinitionMap{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleRoleDefinitionOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleRoleDefinitionArrayOutput{}) pulumi.RegisterOutputType(ManagedHardwareSecurityModuleRoleDefinitionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/certifiate.go
sdk/go/azure/keyvault/certifiate.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Certificate. // // ## Example Usage // // ### Importing A PFX) // // > **Note:** this example assumed the PFX file is located in the same directory at `certificate-to-import.pfx`. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("DeleteIssuers"), // pulumi.String("Get"), // pulumi.String("GetIssuers"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("ListIssuers"), // pulumi.String("ManageContacts"), // pulumi.String("ManageIssuers"), // pulumi.String("SetIssuers"), // pulumi.String("Update"), // }, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Create"), // pulumi.String("Decrypt"), // pulumi.String("Delete"), // pulumi.String("Encrypt"), // pulumi.String("Get"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Sign"), // pulumi.String("UnwrapKey"), // pulumi.String("Update"), // pulumi.String("Verify"), // pulumi.String("WrapKey"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Set"), // }, // }, // }, // }) // if err != nil { // return err // } // invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{ // Input: "certificate-to-import.pfx", // }, nil) // if err != nil { // return err // } // _, err = keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{ // Name: pulumi.String("imported-cert"), // KeyVaultId: exampleKeyVault.ID(), // Certificate: &keyvault.CertificateCertificateArgs{ // Contents: pulumi.String(invokeFilebase64.Result), // Password: pulumi.String(""), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Generating a new certificate // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // SoftDeleteRetentionDays: pulumi.Int(7), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("DeleteIssuers"), // pulumi.String("Get"), // pulumi.String("GetIssuers"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("ListIssuers"), // pulumi.String("ManageContacts"), // pulumi.String("ManageIssuers"), // pulumi.String("Purge"), // pulumi.String("SetIssuers"), // pulumi.String("Update"), // }, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Create"), // pulumi.String("Decrypt"), // pulumi.String("Delete"), // pulumi.String("Encrypt"), // pulumi.String("Get"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Sign"), // pulumi.String("UnwrapKey"), // pulumi.String("Update"), // pulumi.String("Verify"), // pulumi.String("WrapKey"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Set"), // }, // }, // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{ // Name: pulumi.String("generated-cert"), // KeyVaultId: exampleKeyVault.ID(), // CertificatePolicy: &keyvault.CertificateCertificatePolicyArgs{ // IssuerParameters: &keyvault.CertificateCertificatePolicyIssuerParametersArgs{ // Name: pulumi.String("Self"), // }, // KeyProperties: &keyvault.CertificateCertificatePolicyKeyPropertiesArgs{ // Exportable: pulumi.Bool(true), // KeySize: pulumi.Int(2048), // KeyType: pulumi.String("RSA"), // ReuseKey: pulumi.Bool(true), // }, // LifetimeActions: keyvault.CertificateCertificatePolicyLifetimeActionArray{ // &keyvault.CertificateCertificatePolicyLifetimeActionArgs{ // Action: &keyvault.CertificateCertificatePolicyLifetimeActionActionArgs{ // ActionType: pulumi.String("AutoRenew"), // }, // Trigger: &keyvault.CertificateCertificatePolicyLifetimeActionTriggerArgs{ // DaysBeforeExpiry: pulumi.Int(30), // }, // }, // }, // SecretProperties: &keyvault.CertificateCertificatePolicySecretPropertiesArgs{ // ContentType: pulumi.String("application/x-pkcs12"), // }, // X509CertificateProperties: &keyvault.CertificateCertificatePolicyX509CertificatePropertiesArgs{ // ExtendedKeyUsages: pulumi.StringArray{ // pulumi.String("1.3.6.1.5.5.7.3.1"), // }, // KeyUsages: pulumi.StringArray{ // pulumi.String("cRLSign"), // pulumi.String("dataEncipherment"), // pulumi.String("digitalSignature"), // pulumi.String("keyAgreement"), // pulumi.String("keyCertSign"), // pulumi.String("keyEncipherment"), // }, // SubjectAlternativeNames: &keyvault.CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs{ // DnsNames: pulumi.StringArray{ // pulumi.String("internal.contoso.com"), // pulumi.String("domain.hello.world"), // }, // }, // Subject: pulumi.String("CN=hello-world"), // ValidityInMonths: pulumi.Int(12), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Certificates can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/certifiate:Certifiate example "https://example-keyvault.vault.azure.net/certificates/example/fdf067c93bbb4b22bff4d8b7a9a56217" // ``` // // Deprecated: azure.keyvault.Certifiate has been deprecated in favor of azure.keyvault.Certificate type Certifiate struct { pulumi.CustomResourceState // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate CertifiateCertificatePtrOutput `pulumi:"certificate"` // A `certificateAttribute` block as defined below. CertificateAttributes CertifiateCertificateAttributeArrayOutput `pulumi:"certificateAttributes"` // The raw Key Vault Certificate data represented as a hexadecimal string. CertificateData pulumi.StringOutput `pulumi:"certificateData"` // The Base64 encoded Key Vault Certificate data. CertificateDataBase64 pulumi.StringOutput `pulumi:"certificateDataBase64"` // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy CertifiateCertificatePolicyOutput `pulumi:"certificatePolicy"` // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"` // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. ResourceManagerVersionlessId pulumi.StringOutput `pulumi:"resourceManagerVersionlessId"` // The ID of the associated Key Vault Secret. SecretId pulumi.StringOutput `pulumi:"secretId"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. Thumbprint pulumi.StringOutput `pulumi:"thumbprint"` // The current version of the Key Vault Certificate. Version pulumi.StringOutput `pulumi:"version"` // The Base ID of the Key Vault Certificate. VersionlessId pulumi.StringOutput `pulumi:"versionlessId"` // The Base ID of the Key Vault Secret. VersionlessSecretId pulumi.StringOutput `pulumi:"versionlessSecretId"` } // NewCertifiate registers a new resource with the given unique name, arguments, and options. func NewCertifiate(ctx *pulumi.Context, name string, args *CertifiateArgs, opts ...pulumi.ResourceOption) (*Certifiate, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Certifiate err := ctx.RegisterResource("azure:keyvault/certifiate:Certifiate", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCertifiate gets an existing Certifiate resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetCertifiate(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CertifiateState, opts ...pulumi.ResourceOption) (*Certifiate, error) { var resource Certifiate err := ctx.ReadResource("azure:keyvault/certifiate:Certifiate", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Certifiate resources. type certifiateState struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate *CertifiateCertificate `pulumi:"certificate"` // A `certificateAttribute` block as defined below. CertificateAttributes []CertifiateCertificateAttribute `pulumi:"certificateAttributes"` // The raw Key Vault Certificate data represented as a hexadecimal string. CertificateData *string `pulumi:"certificateData"` // The Base64 encoded Key Vault Certificate data. CertificateDataBase64 *string `pulumi:"certificateDataBase64"` // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy *CertifiateCertificatePolicy `pulumi:"certificatePolicy"` // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. ResourceManagerId *string `pulumi:"resourceManagerId"` // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. ResourceManagerVersionlessId *string `pulumi:"resourceManagerVersionlessId"` // The ID of the associated Key Vault Secret. SecretId *string `pulumi:"secretId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. Thumbprint *string `pulumi:"thumbprint"` // The current version of the Key Vault Certificate. Version *string `pulumi:"version"` // The Base ID of the Key Vault Certificate. VersionlessId *string `pulumi:"versionlessId"` // The Base ID of the Key Vault Secret. VersionlessSecretId *string `pulumi:"versionlessSecretId"` } type CertifiateState struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate CertifiateCertificatePtrInput // A `certificateAttribute` block as defined below. CertificateAttributes CertifiateCertificateAttributeArrayInput // The raw Key Vault Certificate data represented as a hexadecimal string. CertificateData pulumi.StringPtrInput // The Base64 encoded Key Vault Certificate data. CertificateDataBase64 pulumi.StringPtrInput // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy CertifiateCertificatePolicyPtrInput // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. ResourceManagerId pulumi.StringPtrInput // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. ResourceManagerVersionlessId pulumi.StringPtrInput // The ID of the associated Key Vault Secret. SecretId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. Thumbprint pulumi.StringPtrInput // The current version of the Key Vault Certificate. Version pulumi.StringPtrInput // The Base ID of the Key Vault Certificate. VersionlessId pulumi.StringPtrInput // The Base ID of the Key Vault Secret. VersionlessSecretId pulumi.StringPtrInput } func (CertifiateState) ElementType() reflect.Type { return reflect.TypeOf((*certifiateState)(nil)).Elem() } type certifiateArgs struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate *CertifiateCertificate `pulumi:"certificate"` // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy *CertifiateCertificatePolicy `pulumi:"certificatePolicy"` // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Certifiate resource. type CertifiateArgs struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate CertifiateCertificatePtrInput // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy CertifiateCertificatePolicyPtrInput // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (CertifiateArgs) ElementType() reflect.Type { return reflect.TypeOf((*certifiateArgs)(nil)).Elem() } type CertifiateInput interface { pulumi.Input ToCertifiateOutput() CertifiateOutput ToCertifiateOutputWithContext(ctx context.Context) CertifiateOutput } func (*Certifiate) ElementType() reflect.Type { return reflect.TypeOf((**Certifiate)(nil)).Elem() } func (i *Certifiate) ToCertifiateOutput() CertifiateOutput { return i.ToCertifiateOutputWithContext(context.Background()) } func (i *Certifiate) ToCertifiateOutputWithContext(ctx context.Context) CertifiateOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateOutput) } // CertifiateArrayInput is an input type that accepts CertifiateArray and CertifiateArrayOutput values. // You can construct a concrete instance of `CertifiateArrayInput` via: // // CertifiateArray{ CertifiateArgs{...} } type CertifiateArrayInput interface { pulumi.Input ToCertifiateArrayOutput() CertifiateArrayOutput ToCertifiateArrayOutputWithContext(context.Context) CertifiateArrayOutput } type CertifiateArray []CertifiateInput func (CertifiateArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Certifiate)(nil)).Elem() } func (i CertifiateArray) ToCertifiateArrayOutput() CertifiateArrayOutput { return i.ToCertifiateArrayOutputWithContext(context.Background()) } func (i CertifiateArray) ToCertifiateArrayOutputWithContext(ctx context.Context) CertifiateArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateArrayOutput) } // CertifiateMapInput is an input type that accepts CertifiateMap and CertifiateMapOutput values. // You can construct a concrete instance of `CertifiateMapInput` via: // // CertifiateMap{ "key": CertifiateArgs{...} } type CertifiateMapInput interface { pulumi.Input ToCertifiateMapOutput() CertifiateMapOutput ToCertifiateMapOutputWithContext(context.Context) CertifiateMapOutput } type CertifiateMap map[string]CertifiateInput func (CertifiateMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Certifiate)(nil)).Elem() } func (i CertifiateMap) ToCertifiateMapOutput() CertifiateMapOutput { return i.ToCertifiateMapOutputWithContext(context.Background()) } func (i CertifiateMap) ToCertifiateMapOutputWithContext(ctx context.Context) CertifiateMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CertifiateMapOutput) } type CertifiateOutput struct{ *pulumi.OutputState } func (CertifiateOutput) ElementType() reflect.Type { return reflect.TypeOf((**Certifiate)(nil)).Elem() } func (o CertifiateOutput) ToCertifiateOutput() CertifiateOutput { return o } func (o CertifiateOutput) ToCertifiateOutputWithContext(ctx context.Context) CertifiateOutput { return o } // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. func (o CertifiateOutput) Certificate() CertifiateCertificatePtrOutput { return o.ApplyT(func(v *Certifiate) CertifiateCertificatePtrOutput { return v.Certificate }).(CertifiateCertificatePtrOutput) } // A `certificateAttribute` block as defined below. func (o CertifiateOutput) CertificateAttributes() CertifiateCertificateAttributeArrayOutput { return o.ApplyT(func(v *Certifiate) CertifiateCertificateAttributeArrayOutput { return v.CertificateAttributes }).(CertifiateCertificateAttributeArrayOutput) } // The raw Key Vault Certificate data represented as a hexadecimal string. func (o CertifiateOutput) CertificateData() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.CertificateData }).(pulumi.StringOutput) } // The Base64 encoded Key Vault Certificate data. func (o CertifiateOutput) CertificateDataBase64() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.CertificateDataBase64 }).(pulumi.StringOutput) } // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. func (o CertifiateOutput) CertificatePolicy() CertifiateCertificatePolicyOutput { return o.ApplyT(func(v *Certifiate) CertifiateCertificatePolicyOutput { return v.CertificatePolicy }).(CertifiateCertificatePolicyOutput) } // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. func (o CertifiateOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. func (o CertifiateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. func (o CertifiateOutput) ResourceManagerId() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput) } // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. func (o CertifiateOutput) ResourceManagerVersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.ResourceManagerVersionlessId }).(pulumi.StringOutput) } // The ID of the associated Key Vault Secret. func (o CertifiateOutput) SecretId() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.SecretId }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o CertifiateOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. func (o CertifiateOutput) Thumbprint() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.Thumbprint }).(pulumi.StringOutput) } // The current version of the Key Vault Certificate. func (o CertifiateOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) } // The Base ID of the Key Vault Certificate. func (o CertifiateOutput) VersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.VersionlessId }).(pulumi.StringOutput) } // The Base ID of the Key Vault Secret. func (o CertifiateOutput) VersionlessSecretId() pulumi.StringOutput { return o.ApplyT(func(v *Certifiate) pulumi.StringOutput { return v.VersionlessSecretId }).(pulumi.StringOutput) } type CertifiateArrayOutput struct{ *pulumi.OutputState } func (CertifiateArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Certifiate)(nil)).Elem() } func (o CertifiateArrayOutput) ToCertifiateArrayOutput() CertifiateArrayOutput { return o } func (o CertifiateArrayOutput) ToCertifiateArrayOutputWithContext(ctx context.Context) CertifiateArrayOutput { return o } func (o CertifiateArrayOutput) Index(i pulumi.IntInput) CertifiateOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certifiate { return vs[0].([]*Certifiate)[vs[1].(int)] }).(CertifiateOutput) } type CertifiateMapOutput struct{ *pulumi.OutputState } func (CertifiateMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Certifiate)(nil)).Elem() } func (o CertifiateMapOutput) ToCertifiateMapOutput() CertifiateMapOutput { return o } func (o CertifiateMapOutput) ToCertifiateMapOutputWithContext(ctx context.Context) CertifiateMapOutput { return o } func (o CertifiateMapOutput) MapIndex(k pulumi.StringInput) CertifiateOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certifiate { return vs[0].(map[string]*Certifiate)[vs[1].(string)] }).(CertifiateOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CertifiateInput)(nil)).Elem(), &Certifiate{}) pulumi.RegisterInputType(reflect.TypeOf((*CertifiateArrayInput)(nil)).Elem(), CertifiateArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CertifiateMapInput)(nil)).Elem(), CertifiateMap{}) pulumi.RegisterOutputType(CertifiateOutput{}) pulumi.RegisterOutputType(CertifiateArrayOutput{}) pulumi.RegisterOutputType(CertifiateMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getEncryptedValue.go
sdk/go/azure/keyvault/getEncryptedValue.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Encrypts or Decrypts a value using a Key Vault Key. func GetEncryptedValue(ctx *pulumi.Context, args *GetEncryptedValueArgs, opts ...pulumi.InvokeOption) (*GetEncryptedValueResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetEncryptedValueResult err := ctx.Invoke("azure:keyvault/getEncryptedValue:getEncryptedValue", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getEncryptedValue. type GetEncryptedValueArgs struct { // The Algorithm which should be used to Decrypt/Encrypt this Value. Possible values are `RSA1_5`, `RSA-OAEP` and `RSA-OAEP-256`. Algorithm string `pulumi:"algorithm"` // The Base64 URL Encoded Encrypted Data which should be decrypted into `plainTextValue`. EncryptedData *string `pulumi:"encryptedData"` // The ID of the Key Vault Key which should be used to Decrypt/Encrypt this Value. KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // The plain-text value which should be Encrypted into `encryptedData`. // // > **Note:** One of either `encryptedData` or `plainTextValue` must be specified and is used to populate the encrypted/decrypted value for the other field. PlainTextValue *string `pulumi:"plainTextValue"` } // A collection of values returned by getEncryptedValue. type GetEncryptedValueResult struct { Algorithm string `pulumi:"algorithm"` // The Base64URL decoded string of `plainTextValue`. Because the API would remove padding characters of `plainTextValue` when encrypting, this attribute is useful to get the original value. DecodedPlainTextValue string `pulumi:"decodedPlainTextValue"` EncryptedData *string `pulumi:"encryptedData"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` KeyVaultKeyId string `pulumi:"keyVaultKeyId"` PlainTextValue *string `pulumi:"plainTextValue"` } func GetEncryptedValueOutput(ctx *pulumi.Context, args GetEncryptedValueOutputArgs, opts ...pulumi.InvokeOption) GetEncryptedValueResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetEncryptedValueResultOutput, error) { args := v.(GetEncryptedValueArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getEncryptedValue:getEncryptedValue", args, GetEncryptedValueResultOutput{}, options).(GetEncryptedValueResultOutput), nil }).(GetEncryptedValueResultOutput) } // A collection of arguments for invoking getEncryptedValue. type GetEncryptedValueOutputArgs struct { // The Algorithm which should be used to Decrypt/Encrypt this Value. Possible values are `RSA1_5`, `RSA-OAEP` and `RSA-OAEP-256`. Algorithm pulumi.StringInput `pulumi:"algorithm"` // The Base64 URL Encoded Encrypted Data which should be decrypted into `plainTextValue`. EncryptedData pulumi.StringPtrInput `pulumi:"encryptedData"` // The ID of the Key Vault Key which should be used to Decrypt/Encrypt this Value. KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"` // The plain-text value which should be Encrypted into `encryptedData`. // // > **Note:** One of either `encryptedData` or `plainTextValue` must be specified and is used to populate the encrypted/decrypted value for the other field. PlainTextValue pulumi.StringPtrInput `pulumi:"plainTextValue"` } func (GetEncryptedValueOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetEncryptedValueArgs)(nil)).Elem() } // A collection of values returned by getEncryptedValue. type GetEncryptedValueResultOutput struct{ *pulumi.OutputState } func (GetEncryptedValueResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetEncryptedValueResult)(nil)).Elem() } func (o GetEncryptedValueResultOutput) ToGetEncryptedValueResultOutput() GetEncryptedValueResultOutput { return o } func (o GetEncryptedValueResultOutput) ToGetEncryptedValueResultOutputWithContext(ctx context.Context) GetEncryptedValueResultOutput { return o } func (o GetEncryptedValueResultOutput) Algorithm() pulumi.StringOutput { return o.ApplyT(func(v GetEncryptedValueResult) string { return v.Algorithm }).(pulumi.StringOutput) } // The Base64URL decoded string of `plainTextValue`. Because the API would remove padding characters of `plainTextValue` when encrypting, this attribute is useful to get the original value. func (o GetEncryptedValueResultOutput) DecodedPlainTextValue() pulumi.StringOutput { return o.ApplyT(func(v GetEncryptedValueResult) string { return v.DecodedPlainTextValue }).(pulumi.StringOutput) } func (o GetEncryptedValueResultOutput) EncryptedData() pulumi.StringPtrOutput { return o.ApplyT(func(v GetEncryptedValueResult) *string { return v.EncryptedData }).(pulumi.StringPtrOutput) } // The provider-assigned unique ID for this managed resource. func (o GetEncryptedValueResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetEncryptedValueResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetEncryptedValueResultOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v GetEncryptedValueResult) string { return v.KeyVaultKeyId }).(pulumi.StringOutput) } func (o GetEncryptedValueResultOutput) PlainTextValue() pulumi.StringPtrOutput { return o.ApplyT(func(v GetEncryptedValueResult) *string { return v.PlainTextValue }).(pulumi.StringPtrOutput) } func init() { pulumi.RegisterOutputType(GetEncryptedValueResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/secret.go
sdk/go/azure/keyvault/secret.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Secret. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // 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"), // }, // }, // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewSecret(ctx, "example", &keyvault.SecretArgs{ // Name: pulumi.String("secret-sauce"), // Value: pulumi.String("szechuan"), // KeyVaultId: exampleKeyVault.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Secrets which are Enabled can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/secret:Secret example "https://example-keyvault.vault.azure.net/secrets/example/fdf067c93bbb4b22bff4d8b7a9a56217" // ``` type Secret struct { pulumi.CustomResourceState // Specifies the content type for the Key Vault Secret. ContentType pulumi.StringPtrOutput `pulumi:"contentType"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). ExpirationDate pulumi.StringPtrOutput `pulumi:"expirationDate"` // The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). NotBeforeDate pulumi.StringPtrOutput `pulumi:"notBeforeDate"` // The (Versioned) ID for this Key Vault Secret. This property points to a specific version of a Key Vault Secret, as such using this won't auto-rotate values if used in other Azure Services. ResourceId pulumi.StringOutput `pulumi:"resourceId"` // The Versionless ID of the Key Vault Secret. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Secret is updated. ResourceVersionlessId pulumi.StringOutput `pulumi:"resourceVersionlessId"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. Value pulumi.StringPtrOutput `pulumi:"value"` // **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. // // > **Note:** One of `value` or `valueWo` must be specified. ValueWo pulumi.StringPtrOutput `pulumi:"valueWo"` // An integer value used to trigger an update for `valueWo`. This property should be incremented when updating `valueWo`. // // > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("mySecretFile"), "/\n/", "\n")` or `base64encode(file("mySecretFile"))`, respectively. ValueWoVersion pulumi.IntPtrOutput `pulumi:"valueWoVersion"` // The current version of the Key Vault Secret. Version pulumi.StringOutput `pulumi:"version"` // The Base ID of the Key Vault Secret. VersionlessId pulumi.StringOutput `pulumi:"versionlessId"` } // NewSecret registers a new resource with the given unique name, arguments, and options. func NewSecret(ctx *pulumi.Context, name string, args *SecretArgs, opts ...pulumi.ResourceOption) (*Secret, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } if args.Value != nil { args.Value = pulumi.ToSecret(args.Value).(pulumi.StringPtrInput) } if args.ValueWo != nil { args.ValueWo = pulumi.ToSecret(args.ValueWo).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "value", "valueWo", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Secret err := ctx.RegisterResource("azure:keyvault/secret:Secret", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSecret gets an existing Secret resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSecret(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SecretState, opts ...pulumi.ResourceOption) (*Secret, error) { var resource Secret err := ctx.ReadResource("azure:keyvault/secret:Secret", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Secret resources. type secretState struct { // Specifies the content type for the Key Vault Secret. ContentType *string `pulumi:"contentType"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). ExpirationDate *string `pulumi:"expirationDate"` // The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). NotBeforeDate *string `pulumi:"notBeforeDate"` // The (Versioned) ID for this Key Vault Secret. This property points to a specific version of a Key Vault Secret, as such using this won't auto-rotate values if used in other Azure Services. ResourceId *string `pulumi:"resourceId"` // The Versionless ID of the Key Vault Secret. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Secret is updated. ResourceVersionlessId *string `pulumi:"resourceVersionlessId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. Value *string `pulumi:"value"` // **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. // // > **Note:** One of `value` or `valueWo` must be specified. ValueWo *string `pulumi:"valueWo"` // An integer value used to trigger an update for `valueWo`. This property should be incremented when updating `valueWo`. // // > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("mySecretFile"), "/\n/", "\n")` or `base64encode(file("mySecretFile"))`, respectively. ValueWoVersion *int `pulumi:"valueWoVersion"` // The current version of the Key Vault Secret. Version *string `pulumi:"version"` // The Base ID of the Key Vault Secret. VersionlessId *string `pulumi:"versionlessId"` } type SecretState struct { // Specifies the content type for the Key Vault Secret. ContentType pulumi.StringPtrInput // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). ExpirationDate pulumi.StringPtrInput // The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput // Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). NotBeforeDate pulumi.StringPtrInput // The (Versioned) ID for this Key Vault Secret. This property points to a specific version of a Key Vault Secret, as such using this won't auto-rotate values if used in other Azure Services. ResourceId pulumi.StringPtrInput // The Versionless ID of the Key Vault Secret. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Secret is updated. ResourceVersionlessId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. Value pulumi.StringPtrInput // **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. // // > **Note:** One of `value` or `valueWo` must be specified. ValueWo pulumi.StringPtrInput // An integer value used to trigger an update for `valueWo`. This property should be incremented when updating `valueWo`. // // > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("mySecretFile"), "/\n/", "\n")` or `base64encode(file("mySecretFile"))`, respectively. ValueWoVersion pulumi.IntPtrInput // The current version of the Key Vault Secret. Version pulumi.StringPtrInput // The Base ID of the Key Vault Secret. VersionlessId pulumi.StringPtrInput } func (SecretState) ElementType() reflect.Type { return reflect.TypeOf((*secretState)(nil)).Elem() } type secretArgs struct { // Specifies the content type for the Key Vault Secret. ContentType *string `pulumi:"contentType"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). ExpirationDate *string `pulumi:"expirationDate"` // The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). NotBeforeDate *string `pulumi:"notBeforeDate"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. Value *string `pulumi:"value"` // **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. // // > **Note:** One of `value` or `valueWo` must be specified. ValueWo *string `pulumi:"valueWo"` // An integer value used to trigger an update for `valueWo`. This property should be incremented when updating `valueWo`. // // > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("mySecretFile"), "/\n/", "\n")` or `base64encode(file("mySecretFile"))`, respectively. ValueWoVersion *int `pulumi:"valueWoVersion"` } // The set of arguments for constructing a Secret resource. type SecretArgs struct { // Specifies the content type for the Key Vault Secret. ContentType pulumi.StringPtrInput // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). ExpirationDate pulumi.StringPtrInput // The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput // Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). NotBeforeDate pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. Value pulumi.StringPtrInput // **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. // // > **Note:** One of `value` or `valueWo` must be specified. ValueWo pulumi.StringPtrInput // An integer value used to trigger an update for `valueWo`. This property should be incremented when updating `valueWo`. // // > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("mySecretFile"), "/\n/", "\n")` or `base64encode(file("mySecretFile"))`, respectively. ValueWoVersion pulumi.IntPtrInput } func (SecretArgs) ElementType() reflect.Type { return reflect.TypeOf((*secretArgs)(nil)).Elem() } type SecretInput interface { pulumi.Input ToSecretOutput() SecretOutput ToSecretOutputWithContext(ctx context.Context) SecretOutput } func (*Secret) ElementType() reflect.Type { return reflect.TypeOf((**Secret)(nil)).Elem() } func (i *Secret) ToSecretOutput() SecretOutput { return i.ToSecretOutputWithContext(context.Background()) } func (i *Secret) ToSecretOutputWithContext(ctx context.Context) SecretOutput { return pulumi.ToOutputWithContext(ctx, i).(SecretOutput) } // SecretArrayInput is an input type that accepts SecretArray and SecretArrayOutput values. // You can construct a concrete instance of `SecretArrayInput` via: // // SecretArray{ SecretArgs{...} } type SecretArrayInput interface { pulumi.Input ToSecretArrayOutput() SecretArrayOutput ToSecretArrayOutputWithContext(context.Context) SecretArrayOutput } type SecretArray []SecretInput func (SecretArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Secret)(nil)).Elem() } func (i SecretArray) ToSecretArrayOutput() SecretArrayOutput { return i.ToSecretArrayOutputWithContext(context.Background()) } func (i SecretArray) ToSecretArrayOutputWithContext(ctx context.Context) SecretArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SecretArrayOutput) } // SecretMapInput is an input type that accepts SecretMap and SecretMapOutput values. // You can construct a concrete instance of `SecretMapInput` via: // // SecretMap{ "key": SecretArgs{...} } type SecretMapInput interface { pulumi.Input ToSecretMapOutput() SecretMapOutput ToSecretMapOutputWithContext(context.Context) SecretMapOutput } type SecretMap map[string]SecretInput func (SecretMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Secret)(nil)).Elem() } func (i SecretMap) ToSecretMapOutput() SecretMapOutput { return i.ToSecretMapOutputWithContext(context.Background()) } func (i SecretMap) ToSecretMapOutputWithContext(ctx context.Context) SecretMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SecretMapOutput) } type SecretOutput struct{ *pulumi.OutputState } func (SecretOutput) ElementType() reflect.Type { return reflect.TypeOf((**Secret)(nil)).Elem() } func (o SecretOutput) ToSecretOutput() SecretOutput { return o } func (o SecretOutput) ToSecretOutputWithContext(ctx context.Context) SecretOutput { return o } // Specifies the content type for the Key Vault Secret. func (o SecretOutput) ContentType() pulumi.StringPtrOutput { return o.ApplyT(func(v *Secret) pulumi.StringPtrOutput { return v.ContentType }).(pulumi.StringPtrOutput) } // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). func (o SecretOutput) ExpirationDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Secret) pulumi.StringPtrOutput { return v.ExpirationDate }).(pulumi.StringPtrOutput) } // The ID of the Key Vault where the Secret should be created. Changing this forces a new resource to be created. func (o SecretOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *Secret) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // Specifies the name of the Key Vault Secret. Changing this forces a new resource to be created. func (o SecretOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Secret) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). func (o SecretOutput) NotBeforeDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Secret) pulumi.StringPtrOutput { return v.NotBeforeDate }).(pulumi.StringPtrOutput) } // The (Versioned) ID for this Key Vault Secret. This property points to a specific version of a Key Vault Secret, as such using this won't auto-rotate values if used in other Azure Services. func (o SecretOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v *Secret) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) } // The Versionless ID of the Key Vault Secret. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Secret is updated. func (o SecretOutput) ResourceVersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Secret) pulumi.StringOutput { return v.ResourceVersionlessId }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o SecretOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Secret) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. func (o SecretOutput) Value() pulumi.StringPtrOutput { return o.ApplyT(func(v *Secret) pulumi.StringPtrOutput { return v.Value }).(pulumi.StringPtrOutput) } // **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. // Specifies the value of the Key Vault Secret. Changing this will create a new version of the Key Vault Secret. // // > **Note:** One of `value` or `valueWo` must be specified. func (o SecretOutput) ValueWo() pulumi.StringPtrOutput { return o.ApplyT(func(v *Secret) pulumi.StringPtrOutput { return v.ValueWo }).(pulumi.StringPtrOutput) } // An integer value used to trigger an update for `valueWo`. This property should be incremented when updating `valueWo`. // // > **Note:** Key Vault strips newlines. To preserve newlines in multi-line secrets try replacing them with `\n` or by base 64 encoding them with `replace(file("mySecretFile"), "/\n/", "\n")` or `base64encode(file("mySecretFile"))`, respectively. func (o SecretOutput) ValueWoVersion() pulumi.IntPtrOutput { return o.ApplyT(func(v *Secret) pulumi.IntPtrOutput { return v.ValueWoVersion }).(pulumi.IntPtrOutput) } // The current version of the Key Vault Secret. func (o SecretOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v *Secret) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) } // The Base ID of the Key Vault Secret. func (o SecretOutput) VersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Secret) pulumi.StringOutput { return v.VersionlessId }).(pulumi.StringOutput) } type SecretArrayOutput struct{ *pulumi.OutputState } func (SecretArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Secret)(nil)).Elem() } func (o SecretArrayOutput) ToSecretArrayOutput() SecretArrayOutput { return o } func (o SecretArrayOutput) ToSecretArrayOutputWithContext(ctx context.Context) SecretArrayOutput { return o } func (o SecretArrayOutput) Index(i pulumi.IntInput) SecretOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Secret { return vs[0].([]*Secret)[vs[1].(int)] }).(SecretOutput) } type SecretMapOutput struct{ *pulumi.OutputState } func (SecretMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Secret)(nil)).Elem() } func (o SecretMapOutput) ToSecretMapOutput() SecretMapOutput { return o } func (o SecretMapOutput) ToSecretMapOutputWithContext(ctx context.Context) SecretMapOutput { return o } func (o SecretMapOutput) MapIndex(k pulumi.StringInput) SecretOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Secret { return vs[0].(map[string]*Secret)[vs[1].(string)] }).(SecretOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SecretInput)(nil)).Elem(), &Secret{}) pulumi.RegisterInputType(reflect.TypeOf((*SecretArrayInput)(nil)).Elem(), SecretArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SecretMapInput)(nil)).Elem(), SecretMap{}) pulumi.RegisterOutputType(SecretOutput{}) pulumi.RegisterOutputType(SecretArrayOutput{}) pulumi.RegisterOutputType(SecretMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/certificateContacts.go
sdk/go/azure/keyvault/certificateContacts.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages Key Vault Certificate Contacts. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // }) // if err != nil { // return err // } // exampleAccessPolicy, err := keyvault.NewAccessPolicy(ctx, "example", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("ManageContacts"), // }, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Set"), // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewCertificateContacts(ctx, "example", &keyvault.CertificateContactsArgs{ // KeyVaultId: exampleKeyVault.ID(), // Contacts: keyvault.CertificateContactsContactArray{ // &keyvault.CertificateContactsContactArgs{ // Email: pulumi.String("example@example.com"), // Name: pulumi.String("example"), // Phone: pulumi.String("01234567890"), // }, // &keyvault.CertificateContactsContactArgs{ // Email: pulumi.String("example2@example.com"), // }, // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleAccessPolicy, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Certificate Contacts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/certificateContacts:CertificateContacts example https://example-keyvault.vault.azure.net/certificates/contacts // ``` type CertificateContacts struct { pulumi.CustomResourceState // One or more `contact` blocks as defined below. Contacts CertificateContactsContactArrayOutput `pulumi:"contacts"` // The ID of the Key Vault. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` } // NewCertificateContacts registers a new resource with the given unique name, arguments, and options. func NewCertificateContacts(ctx *pulumi.Context, name string, args *CertificateContactsArgs, opts ...pulumi.ResourceOption) (*CertificateContacts, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CertificateContacts err := ctx.RegisterResource("azure:keyvault/certificateContacts:CertificateContacts", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCertificateContacts gets an existing CertificateContacts resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetCertificateContacts(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CertificateContactsState, opts ...pulumi.ResourceOption) (*CertificateContacts, error) { var resource CertificateContacts err := ctx.ReadResource("azure:keyvault/certificateContacts:CertificateContacts", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CertificateContacts resources. type certificateContactsState struct { // One or more `contact` blocks as defined below. Contacts []CertificateContactsContact `pulumi:"contacts"` // The ID of the Key Vault. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` } type CertificateContactsState struct { // One or more `contact` blocks as defined below. Contacts CertificateContactsContactArrayInput // The ID of the Key Vault. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput } func (CertificateContactsState) ElementType() reflect.Type { return reflect.TypeOf((*certificateContactsState)(nil)).Elem() } type certificateContactsArgs struct { // One or more `contact` blocks as defined below. Contacts []CertificateContactsContact `pulumi:"contacts"` // The ID of the Key Vault. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` } // The set of arguments for constructing a CertificateContacts resource. type CertificateContactsArgs struct { // One or more `contact` blocks as defined below. Contacts CertificateContactsContactArrayInput // The ID of the Key Vault. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput } func (CertificateContactsArgs) ElementType() reflect.Type { return reflect.TypeOf((*certificateContactsArgs)(nil)).Elem() } type CertificateContactsInput interface { pulumi.Input ToCertificateContactsOutput() CertificateContactsOutput ToCertificateContactsOutputWithContext(ctx context.Context) CertificateContactsOutput } func (*CertificateContacts) ElementType() reflect.Type { return reflect.TypeOf((**CertificateContacts)(nil)).Elem() } func (i *CertificateContacts) ToCertificateContactsOutput() CertificateContactsOutput { return i.ToCertificateContactsOutputWithContext(context.Background()) } func (i *CertificateContacts) ToCertificateContactsOutputWithContext(ctx context.Context) CertificateContactsOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateContactsOutput) } // CertificateContactsArrayInput is an input type that accepts CertificateContactsArray and CertificateContactsArrayOutput values. // You can construct a concrete instance of `CertificateContactsArrayInput` via: // // CertificateContactsArray{ CertificateContactsArgs{...} } type CertificateContactsArrayInput interface { pulumi.Input ToCertificateContactsArrayOutput() CertificateContactsArrayOutput ToCertificateContactsArrayOutputWithContext(context.Context) CertificateContactsArrayOutput } type CertificateContactsArray []CertificateContactsInput func (CertificateContactsArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CertificateContacts)(nil)).Elem() } func (i CertificateContactsArray) ToCertificateContactsArrayOutput() CertificateContactsArrayOutput { return i.ToCertificateContactsArrayOutputWithContext(context.Background()) } func (i CertificateContactsArray) ToCertificateContactsArrayOutputWithContext(ctx context.Context) CertificateContactsArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateContactsArrayOutput) } // CertificateContactsMapInput is an input type that accepts CertificateContactsMap and CertificateContactsMapOutput values. // You can construct a concrete instance of `CertificateContactsMapInput` via: // // CertificateContactsMap{ "key": CertificateContactsArgs{...} } type CertificateContactsMapInput interface { pulumi.Input ToCertificateContactsMapOutput() CertificateContactsMapOutput ToCertificateContactsMapOutputWithContext(context.Context) CertificateContactsMapOutput } type CertificateContactsMap map[string]CertificateContactsInput func (CertificateContactsMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CertificateContacts)(nil)).Elem() } func (i CertificateContactsMap) ToCertificateContactsMapOutput() CertificateContactsMapOutput { return i.ToCertificateContactsMapOutputWithContext(context.Background()) } func (i CertificateContactsMap) ToCertificateContactsMapOutputWithContext(ctx context.Context) CertificateContactsMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateContactsMapOutput) } type CertificateContactsOutput struct{ *pulumi.OutputState } func (CertificateContactsOutput) ElementType() reflect.Type { return reflect.TypeOf((**CertificateContacts)(nil)).Elem() } func (o CertificateContactsOutput) ToCertificateContactsOutput() CertificateContactsOutput { return o } func (o CertificateContactsOutput) ToCertificateContactsOutputWithContext(ctx context.Context) CertificateContactsOutput { return o } // One or more `contact` blocks as defined below. func (o CertificateContactsOutput) Contacts() CertificateContactsContactArrayOutput { return o.ApplyT(func(v *CertificateContacts) CertificateContactsContactArrayOutput { return v.Contacts }).(CertificateContactsContactArrayOutput) } // The ID of the Key Vault. Changing this forces a new resource to be created. func (o CertificateContactsOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *CertificateContacts) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } type CertificateContactsArrayOutput struct{ *pulumi.OutputState } func (CertificateContactsArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CertificateContacts)(nil)).Elem() } func (o CertificateContactsArrayOutput) ToCertificateContactsArrayOutput() CertificateContactsArrayOutput { return o } func (o CertificateContactsArrayOutput) ToCertificateContactsArrayOutputWithContext(ctx context.Context) CertificateContactsArrayOutput { return o } func (o CertificateContactsArrayOutput) Index(i pulumi.IntInput) CertificateContactsOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CertificateContacts { return vs[0].([]*CertificateContacts)[vs[1].(int)] }).(CertificateContactsOutput) } type CertificateContactsMapOutput struct{ *pulumi.OutputState } func (CertificateContactsMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CertificateContacts)(nil)).Elem() } func (o CertificateContactsMapOutput) ToCertificateContactsMapOutput() CertificateContactsMapOutput { return o } func (o CertificateContactsMapOutput) ToCertificateContactsMapOutputWithContext(ctx context.Context) CertificateContactsMapOutput { return o } func (o CertificateContactsMapOutput) MapIndex(k pulumi.StringInput) CertificateContactsOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CertificateContacts { return vs[0].(map[string]*CertificateContacts)[vs[1].(string)] }).(CertificateContactsOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CertificateContactsInput)(nil)).Elem(), &CertificateContacts{}) pulumi.RegisterInputType(reflect.TypeOf((*CertificateContactsArrayInput)(nil)).Elem(), CertificateContactsArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CertificateContactsMapInput)(nil)).Elem(), CertificateContactsMap{}) pulumi.RegisterOutputType(CertificateContactsOutput{}) pulumi.RegisterOutputType(CertificateContactsArrayOutput{}) pulumi.RegisterOutputType(CertificateContactsMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/certificateIssuer.go
sdk/go/azure/keyvault/certificateIssuer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Certificate Issuer. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("standard"), // TenantId: pulumi.String(current.TenantId), // }) // if err != nil { // return err // } // _, err = keyvault.NewCertificateIssuer(ctx, "example", &keyvault.CertificateIssuerArgs{ // Name: pulumi.String("example-issuer"), // OrgId: pulumi.String("ExampleOrgName"), // KeyVaultId: exampleKeyVault.ID(), // ProviderName: pulumi.String("DigiCert"), // AccountId: pulumi.String("0000"), // Password: pulumi.String("example-password"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Certificate Issuers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/certificateIssuer:CertificateIssuer example "https://key-vault-name.vault.azure.net/certificates/issuers/example" // ``` type CertificateIssuer struct { pulumi.CustomResourceState // The account number with the third-party Certificate Issuer. AccountId pulumi.StringPtrOutput `pulumi:"accountId"` // One or more `admin` blocks as defined below. Admins CertificateIssuerAdminArrayOutput `pulumi:"admins"` // The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the organization as provided to the issuer. OrgId pulumi.StringPtrOutput `pulumi:"orgId"` // The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. Password pulumi.StringPtrOutput `pulumi:"password"` // The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`. ProviderName pulumi.StringOutput `pulumi:"providerName"` } // NewCertificateIssuer registers a new resource with the given unique name, arguments, and options. func NewCertificateIssuer(ctx *pulumi.Context, name string, args *CertificateIssuerArgs, opts ...pulumi.ResourceOption) (*CertificateIssuer, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } if args.ProviderName == nil { return nil, errors.New("invalid value for required argument 'ProviderName'") } 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 CertificateIssuer err := ctx.RegisterResource("azure:keyvault/certificateIssuer:CertificateIssuer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCertificateIssuer gets an existing CertificateIssuer resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetCertificateIssuer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CertificateIssuerState, opts ...pulumi.ResourceOption) (*CertificateIssuer, error) { var resource CertificateIssuer err := ctx.ReadResource("azure:keyvault/certificateIssuer:CertificateIssuer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CertificateIssuer resources. type certificateIssuerState struct { // The account number with the third-party Certificate Issuer. AccountId *string `pulumi:"accountId"` // One or more `admin` blocks as defined below. Admins []CertificateIssuerAdmin `pulumi:"admins"` // The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` // The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created. Name *string `pulumi:"name"` // The ID of the organization as provided to the issuer. OrgId *string `pulumi:"orgId"` // The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. Password *string `pulumi:"password"` // The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`. ProviderName *string `pulumi:"providerName"` } type CertificateIssuerState struct { // The account number with the third-party Certificate Issuer. AccountId pulumi.StringPtrInput // One or more `admin` blocks as defined below. Admins CertificateIssuerAdminArrayInput // The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput // The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created. Name pulumi.StringPtrInput // The ID of the organization as provided to the issuer. OrgId pulumi.StringPtrInput // The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. Password pulumi.StringPtrInput // The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`. ProviderName pulumi.StringPtrInput } func (CertificateIssuerState) ElementType() reflect.Type { return reflect.TypeOf((*certificateIssuerState)(nil)).Elem() } type certificateIssuerArgs struct { // The account number with the third-party Certificate Issuer. AccountId *string `pulumi:"accountId"` // One or more `admin` blocks as defined below. Admins []CertificateIssuerAdmin `pulumi:"admins"` // The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` // The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created. Name *string `pulumi:"name"` // The ID of the organization as provided to the issuer. OrgId *string `pulumi:"orgId"` // The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. Password *string `pulumi:"password"` // The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`. ProviderName string `pulumi:"providerName"` } // The set of arguments for constructing a CertificateIssuer resource. type CertificateIssuerArgs struct { // The account number with the third-party Certificate Issuer. AccountId pulumi.StringPtrInput // One or more `admin` blocks as defined below. Admins CertificateIssuerAdminArrayInput // The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput // The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created. Name pulumi.StringPtrInput // The ID of the organization as provided to the issuer. OrgId pulumi.StringPtrInput // The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. Password pulumi.StringPtrInput // The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`. ProviderName pulumi.StringInput } func (CertificateIssuerArgs) ElementType() reflect.Type { return reflect.TypeOf((*certificateIssuerArgs)(nil)).Elem() } type CertificateIssuerInput interface { pulumi.Input ToCertificateIssuerOutput() CertificateIssuerOutput ToCertificateIssuerOutputWithContext(ctx context.Context) CertificateIssuerOutput } func (*CertificateIssuer) ElementType() reflect.Type { return reflect.TypeOf((**CertificateIssuer)(nil)).Elem() } func (i *CertificateIssuer) ToCertificateIssuerOutput() CertificateIssuerOutput { return i.ToCertificateIssuerOutputWithContext(context.Background()) } func (i *CertificateIssuer) ToCertificateIssuerOutputWithContext(ctx context.Context) CertificateIssuerOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateIssuerOutput) } // CertificateIssuerArrayInput is an input type that accepts CertificateIssuerArray and CertificateIssuerArrayOutput values. // You can construct a concrete instance of `CertificateIssuerArrayInput` via: // // CertificateIssuerArray{ CertificateIssuerArgs{...} } type CertificateIssuerArrayInput interface { pulumi.Input ToCertificateIssuerArrayOutput() CertificateIssuerArrayOutput ToCertificateIssuerArrayOutputWithContext(context.Context) CertificateIssuerArrayOutput } type CertificateIssuerArray []CertificateIssuerInput func (CertificateIssuerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CertificateIssuer)(nil)).Elem() } func (i CertificateIssuerArray) ToCertificateIssuerArrayOutput() CertificateIssuerArrayOutput { return i.ToCertificateIssuerArrayOutputWithContext(context.Background()) } func (i CertificateIssuerArray) ToCertificateIssuerArrayOutputWithContext(ctx context.Context) CertificateIssuerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateIssuerArrayOutput) } // CertificateIssuerMapInput is an input type that accepts CertificateIssuerMap and CertificateIssuerMapOutput values. // You can construct a concrete instance of `CertificateIssuerMapInput` via: // // CertificateIssuerMap{ "key": CertificateIssuerArgs{...} } type CertificateIssuerMapInput interface { pulumi.Input ToCertificateIssuerMapOutput() CertificateIssuerMapOutput ToCertificateIssuerMapOutputWithContext(context.Context) CertificateIssuerMapOutput } type CertificateIssuerMap map[string]CertificateIssuerInput func (CertificateIssuerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CertificateIssuer)(nil)).Elem() } func (i CertificateIssuerMap) ToCertificateIssuerMapOutput() CertificateIssuerMapOutput { return i.ToCertificateIssuerMapOutputWithContext(context.Background()) } func (i CertificateIssuerMap) ToCertificateIssuerMapOutputWithContext(ctx context.Context) CertificateIssuerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateIssuerMapOutput) } type CertificateIssuerOutput struct{ *pulumi.OutputState } func (CertificateIssuerOutput) ElementType() reflect.Type { return reflect.TypeOf((**CertificateIssuer)(nil)).Elem() } func (o CertificateIssuerOutput) ToCertificateIssuerOutput() CertificateIssuerOutput { return o } func (o CertificateIssuerOutput) ToCertificateIssuerOutputWithContext(ctx context.Context) CertificateIssuerOutput { return o } // The account number with the third-party Certificate Issuer. func (o CertificateIssuerOutput) AccountId() pulumi.StringPtrOutput { return o.ApplyT(func(v *CertificateIssuer) pulumi.StringPtrOutput { return v.AccountId }).(pulumi.StringPtrOutput) } // One or more `admin` blocks as defined below. func (o CertificateIssuerOutput) Admins() CertificateIssuerAdminArrayOutput { return o.ApplyT(func(v *CertificateIssuer) CertificateIssuerAdminArrayOutput { return v.Admins }).(CertificateIssuerAdminArrayOutput) } // The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created. func (o CertificateIssuerOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *CertificateIssuer) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created. func (o CertificateIssuerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CertificateIssuer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the organization as provided to the issuer. func (o CertificateIssuerOutput) OrgId() pulumi.StringPtrOutput { return o.ApplyT(func(v *CertificateIssuer) pulumi.StringPtrOutput { return v.OrgId }).(pulumi.StringPtrOutput) } // The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. func (o CertificateIssuerOutput) Password() pulumi.StringPtrOutput { return o.ApplyT(func(v *CertificateIssuer) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput) } // The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`. func (o CertificateIssuerOutput) ProviderName() pulumi.StringOutput { return o.ApplyT(func(v *CertificateIssuer) pulumi.StringOutput { return v.ProviderName }).(pulumi.StringOutput) } type CertificateIssuerArrayOutput struct{ *pulumi.OutputState } func (CertificateIssuerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CertificateIssuer)(nil)).Elem() } func (o CertificateIssuerArrayOutput) ToCertificateIssuerArrayOutput() CertificateIssuerArrayOutput { return o } func (o CertificateIssuerArrayOutput) ToCertificateIssuerArrayOutputWithContext(ctx context.Context) CertificateIssuerArrayOutput { return o } func (o CertificateIssuerArrayOutput) Index(i pulumi.IntInput) CertificateIssuerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CertificateIssuer { return vs[0].([]*CertificateIssuer)[vs[1].(int)] }).(CertificateIssuerOutput) } type CertificateIssuerMapOutput struct{ *pulumi.OutputState } func (CertificateIssuerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CertificateIssuer)(nil)).Elem() } func (o CertificateIssuerMapOutput) ToCertificateIssuerMapOutput() CertificateIssuerMapOutput { return o } func (o CertificateIssuerMapOutput) ToCertificateIssuerMapOutputWithContext(ctx context.Context) CertificateIssuerMapOutput { return o } func (o CertificateIssuerMapOutput) MapIndex(k pulumi.StringInput) CertificateIssuerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CertificateIssuer { return vs[0].(map[string]*CertificateIssuer)[vs[1].(string)] }).(CertificateIssuerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CertificateIssuerInput)(nil)).Elem(), &CertificateIssuer{}) pulumi.RegisterInputType(reflect.TypeOf((*CertificateIssuerArrayInput)(nil)).Elem(), CertificateIssuerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CertificateIssuerMapInput)(nil)).Elem(), CertificateIssuerMap{}) pulumi.RegisterOutputType(CertificateIssuerOutput{}) pulumi.RegisterOutputType(CertificateIssuerArrayOutput{}) pulumi.RegisterOutputType(CertificateIssuerMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/certificate.go
sdk/go/azure/keyvault/certificate.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Certificate. // // ## Example Usage // // ### Importing A PFX) // // > **Note:** this example assumed the PFX file is located in the same directory at `certificate-to-import.pfx`. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("DeleteIssuers"), // pulumi.String("Get"), // pulumi.String("GetIssuers"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("ListIssuers"), // pulumi.String("ManageContacts"), // pulumi.String("ManageIssuers"), // pulumi.String("SetIssuers"), // pulumi.String("Update"), // }, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Create"), // pulumi.String("Decrypt"), // pulumi.String("Delete"), // pulumi.String("Encrypt"), // pulumi.String("Get"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Sign"), // pulumi.String("UnwrapKey"), // pulumi.String("Update"), // pulumi.String("Verify"), // pulumi.String("WrapKey"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Set"), // }, // }, // }, // }) // if err != nil { // return err // } // invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{ // Input: "certificate-to-import.pfx", // }, nil) // if err != nil { // return err // } // _, err = keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{ // Name: pulumi.String("imported-cert"), // KeyVaultId: exampleKeyVault.ID(), // Certificate: &keyvault.CertificateCertificateArgs{ // Contents: pulumi.String(invokeFilebase64.Result), // Password: pulumi.String(""), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Generating a new certificate // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // SoftDeleteRetentionDays: pulumi.Int(7), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("DeleteIssuers"), // pulumi.String("Get"), // pulumi.String("GetIssuers"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("ListIssuers"), // pulumi.String("ManageContacts"), // pulumi.String("ManageIssuers"), // pulumi.String("Purge"), // pulumi.String("SetIssuers"), // pulumi.String("Update"), // }, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Create"), // pulumi.String("Decrypt"), // pulumi.String("Delete"), // pulumi.String("Encrypt"), // pulumi.String("Get"), // pulumi.String("Import"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Sign"), // pulumi.String("UnwrapKey"), // pulumi.String("Update"), // pulumi.String("Verify"), // pulumi.String("WrapKey"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Backup"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Restore"), // pulumi.String("Set"), // }, // }, // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{ // Name: pulumi.String("generated-cert"), // KeyVaultId: exampleKeyVault.ID(), // CertificatePolicy: &keyvault.CertificateCertificatePolicyArgs{ // IssuerParameters: &keyvault.CertificateCertificatePolicyIssuerParametersArgs{ // Name: pulumi.String("Self"), // }, // KeyProperties: &keyvault.CertificateCertificatePolicyKeyPropertiesArgs{ // Exportable: pulumi.Bool(true), // KeySize: pulumi.Int(2048), // KeyType: pulumi.String("RSA"), // ReuseKey: pulumi.Bool(true), // }, // LifetimeActions: keyvault.CertificateCertificatePolicyLifetimeActionArray{ // &keyvault.CertificateCertificatePolicyLifetimeActionArgs{ // Action: &keyvault.CertificateCertificatePolicyLifetimeActionActionArgs{ // ActionType: pulumi.String("AutoRenew"), // }, // Trigger: &keyvault.CertificateCertificatePolicyLifetimeActionTriggerArgs{ // DaysBeforeExpiry: pulumi.Int(30), // }, // }, // }, // SecretProperties: &keyvault.CertificateCertificatePolicySecretPropertiesArgs{ // ContentType: pulumi.String("application/x-pkcs12"), // }, // X509CertificateProperties: &keyvault.CertificateCertificatePolicyX509CertificatePropertiesArgs{ // ExtendedKeyUsages: pulumi.StringArray{ // pulumi.String("1.3.6.1.5.5.7.3.1"), // }, // KeyUsages: pulumi.StringArray{ // pulumi.String("cRLSign"), // pulumi.String("dataEncipherment"), // pulumi.String("digitalSignature"), // pulumi.String("keyAgreement"), // pulumi.String("keyCertSign"), // pulumi.String("keyEncipherment"), // }, // SubjectAlternativeNames: &keyvault.CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs{ // DnsNames: pulumi.StringArray{ // pulumi.String("internal.contoso.com"), // pulumi.String("domain.hello.world"), // }, // }, // Subject: pulumi.String("CN=hello-world"), // ValidityInMonths: pulumi.Int(12), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Certificates can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/certificate:Certificate example "https://example-keyvault.vault.azure.net/certificates/example/fdf067c93bbb4b22bff4d8b7a9a56217" // ``` type Certificate struct { pulumi.CustomResourceState // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate CertificateCertificatePtrOutput `pulumi:"certificate"` // A `certificateAttribute` block as defined below. CertificateAttributes CertificateCertificateAttributeArrayOutput `pulumi:"certificateAttributes"` // The raw Key Vault Certificate data represented as a hexadecimal string. CertificateData pulumi.StringOutput `pulumi:"certificateData"` // The Base64 encoded Key Vault Certificate data. CertificateDataBase64 pulumi.StringOutput `pulumi:"certificateDataBase64"` // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy CertificateCertificatePolicyOutput `pulumi:"certificatePolicy"` // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"` // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. ResourceManagerVersionlessId pulumi.StringOutput `pulumi:"resourceManagerVersionlessId"` // The ID of the associated Key Vault Secret. SecretId pulumi.StringOutput `pulumi:"secretId"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. Thumbprint pulumi.StringOutput `pulumi:"thumbprint"` // The current version of the Key Vault Certificate. Version pulumi.StringOutput `pulumi:"version"` // The Base ID of the Key Vault Certificate. VersionlessId pulumi.StringOutput `pulumi:"versionlessId"` // The Base ID of the Key Vault Secret. VersionlessSecretId pulumi.StringOutput `pulumi:"versionlessSecretId"` } // NewCertificate registers a new resource with the given unique name, arguments, and options. func NewCertificate(ctx *pulumi.Context, name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:keyvault/certifiate:Certifiate"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource Certificate err := ctx.RegisterResource("azure:keyvault/certificate:Certificate", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCertificate gets an existing Certificate resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetCertificate(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error) { var resource Certificate err := ctx.ReadResource("azure:keyvault/certificate:Certificate", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Certificate resources. type certificateState struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate *CertificateCertificate `pulumi:"certificate"` // A `certificateAttribute` block as defined below. CertificateAttributes []CertificateCertificateAttribute `pulumi:"certificateAttributes"` // The raw Key Vault Certificate data represented as a hexadecimal string. CertificateData *string `pulumi:"certificateData"` // The Base64 encoded Key Vault Certificate data. CertificateDataBase64 *string `pulumi:"certificateDataBase64"` // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy *CertificateCertificatePolicy `pulumi:"certificatePolicy"` // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. ResourceManagerId *string `pulumi:"resourceManagerId"` // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. ResourceManagerVersionlessId *string `pulumi:"resourceManagerVersionlessId"` // The ID of the associated Key Vault Secret. SecretId *string `pulumi:"secretId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. Thumbprint *string `pulumi:"thumbprint"` // The current version of the Key Vault Certificate. Version *string `pulumi:"version"` // The Base ID of the Key Vault Certificate. VersionlessId *string `pulumi:"versionlessId"` // The Base ID of the Key Vault Secret. VersionlessSecretId *string `pulumi:"versionlessSecretId"` } type CertificateState struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate CertificateCertificatePtrInput // A `certificateAttribute` block as defined below. CertificateAttributes CertificateCertificateAttributeArrayInput // The raw Key Vault Certificate data represented as a hexadecimal string. CertificateData pulumi.StringPtrInput // The Base64 encoded Key Vault Certificate data. CertificateDataBase64 pulumi.StringPtrInput // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy CertificateCertificatePolicyPtrInput // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. ResourceManagerId pulumi.StringPtrInput // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. ResourceManagerVersionlessId pulumi.StringPtrInput // The ID of the associated Key Vault Secret. SecretId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. Thumbprint pulumi.StringPtrInput // The current version of the Key Vault Certificate. Version pulumi.StringPtrInput // The Base ID of the Key Vault Certificate. VersionlessId pulumi.StringPtrInput // The Base ID of the Key Vault Secret. VersionlessSecretId pulumi.StringPtrInput } func (CertificateState) ElementType() reflect.Type { return reflect.TypeOf((*certificateState)(nil)).Elem() } type certificateArgs struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate *CertificateCertificate `pulumi:"certificate"` // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy *CertificateCertificatePolicy `pulumi:"certificatePolicy"` // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Certificate resource. type CertificateArgs struct { // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. Certificate CertificateCertificatePtrInput // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. CertificatePolicy CertificateCertificatePolicyPtrInput // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (CertificateArgs) ElementType() reflect.Type { return reflect.TypeOf((*certificateArgs)(nil)).Elem() } type CertificateInput interface { pulumi.Input ToCertificateOutput() CertificateOutput ToCertificateOutputWithContext(ctx context.Context) CertificateOutput } func (*Certificate) ElementType() reflect.Type { return reflect.TypeOf((**Certificate)(nil)).Elem() } func (i *Certificate) ToCertificateOutput() CertificateOutput { return i.ToCertificateOutputWithContext(context.Background()) } func (i *Certificate) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateOutput) } // CertificateArrayInput is an input type that accepts CertificateArray and CertificateArrayOutput values. // You can construct a concrete instance of `CertificateArrayInput` via: // // CertificateArray{ CertificateArgs{...} } type CertificateArrayInput interface { pulumi.Input ToCertificateArrayOutput() CertificateArrayOutput ToCertificateArrayOutputWithContext(context.Context) CertificateArrayOutput } type CertificateArray []CertificateInput func (CertificateArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Certificate)(nil)).Elem() } func (i CertificateArray) ToCertificateArrayOutput() CertificateArrayOutput { return i.ToCertificateArrayOutputWithContext(context.Background()) } func (i CertificateArray) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateArrayOutput) } // CertificateMapInput is an input type that accepts CertificateMap and CertificateMapOutput values. // You can construct a concrete instance of `CertificateMapInput` via: // // CertificateMap{ "key": CertificateArgs{...} } type CertificateMapInput interface { pulumi.Input ToCertificateMapOutput() CertificateMapOutput ToCertificateMapOutputWithContext(context.Context) CertificateMapOutput } type CertificateMap map[string]CertificateInput func (CertificateMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem() } func (i CertificateMap) ToCertificateMapOutput() CertificateMapOutput { return i.ToCertificateMapOutputWithContext(context.Background()) } func (i CertificateMap) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CertificateMapOutput) } type CertificateOutput struct{ *pulumi.OutputState } func (CertificateOutput) ElementType() reflect.Type { return reflect.TypeOf((**Certificate)(nil)).Elem() } func (o CertificateOutput) ToCertificateOutput() CertificateOutput { return o } func (o CertificateOutput) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput { return o } // A `certificate` block as defined below, used to Import an existing certificate. Changing this will create a new version of the Key Vault Certificate. func (o CertificateOutput) Certificate() CertificateCertificatePtrOutput { return o.ApplyT(func(v *Certificate) CertificateCertificatePtrOutput { return v.Certificate }).(CertificateCertificatePtrOutput) } // A `certificateAttribute` block as defined below. func (o CertificateOutput) CertificateAttributes() CertificateCertificateAttributeArrayOutput { return o.ApplyT(func(v *Certificate) CertificateCertificateAttributeArrayOutput { return v.CertificateAttributes }).(CertificateCertificateAttributeArrayOutput) } // The raw Key Vault Certificate data represented as a hexadecimal string. func (o CertificateOutput) CertificateData() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.CertificateData }).(pulumi.StringOutput) } // The Base64 encoded Key Vault Certificate data. func (o CertificateOutput) CertificateDataBase64() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.CertificateDataBase64 }).(pulumi.StringOutput) } // A `certificatePolicy` block as defined below. Changing this (except the `lifetimeAction` field) will create a new version of the Key Vault Certificate. // // > **NOTE:** When creating a Key Vault Certificate, at least one of `certificate` or `certificatePolicy` is required. Provide `certificate` to import an existing certificate, `certificatePolicy` to generate a new certificate. func (o CertificateOutput) CertificatePolicy() CertificateCertificatePolicyOutput { return o.ApplyT(func(v *Certificate) CertificateCertificatePolicyOutput { return v.CertificatePolicy }).(CertificateCertificatePolicyOutput) } // The ID of the Key Vault where the Certificate should be created. Changing this forces a new resource to be created. func (o CertificateOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. func (o CertificateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. func (o CertificateOutput) ResourceManagerId() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput) } // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. func (o CertificateOutput) ResourceManagerVersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ResourceManagerVersionlessId }).(pulumi.StringOutput) } // The ID of the associated Key Vault Secret. func (o CertificateOutput) SecretId() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.SecretId }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o CertificateOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Certificate) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. func (o CertificateOutput) Thumbprint() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Thumbprint }).(pulumi.StringOutput) } // The current version of the Key Vault Certificate. func (o CertificateOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) } // The Base ID of the Key Vault Certificate. func (o CertificateOutput) VersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.VersionlessId }).(pulumi.StringOutput) } // The Base ID of the Key Vault Secret. func (o CertificateOutput) VersionlessSecretId() pulumi.StringOutput { return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.VersionlessSecretId }).(pulumi.StringOutput) } type CertificateArrayOutput struct{ *pulumi.OutputState } func (CertificateArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Certificate)(nil)).Elem() } func (o CertificateArrayOutput) ToCertificateArrayOutput() CertificateArrayOutput { return o } func (o CertificateArrayOutput) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput { return o } func (o CertificateArrayOutput) Index(i pulumi.IntInput) CertificateOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certificate { return vs[0].([]*Certificate)[vs[1].(int)] }).(CertificateOutput) } type CertificateMapOutput struct{ *pulumi.OutputState } func (CertificateMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem() } func (o CertificateMapOutput) ToCertificateMapOutput() CertificateMapOutput { return o } func (o CertificateMapOutput) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput { return o } func (o CertificateMapOutput) MapIndex(k pulumi.StringInput) CertificateOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certificate { return vs[0].(map[string]*Certificate)[vs[1].(string)] }).(CertificateOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CertificateInput)(nil)).Elem(), &Certificate{}) pulumi.RegisterInputType(reflect.TypeOf((*CertificateArrayInput)(nil)).Elem(), CertificateArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CertificateMapInput)(nil)).Elem(), CertificateMap{}) pulumi.RegisterOutputType(CertificateOutput{}) pulumi.RegisterOutputType(CertificateArrayOutput{}) pulumi.RegisterOutputType(CertificateMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getAccessPolicy.go
sdk/go/azure/keyvault/getAccessPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about the permissions from the Management Key Vault Templates. // // ## Example Usage // // ```go // package main // // import ( // // "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 { // contributor, err := keyvault.LookupAccessPolicy(ctx, &keyvault.LookupAccessPolicyArgs{ // Name: "Key Management", // }, nil) // if err != nil { // return err // } // ctx.Export("accessPolicyKeyPermissions", contributor.KeyPermissions) // return nil // }) // } // // ``` func LookupAccessPolicy(ctx *pulumi.Context, args *LookupAccessPolicyArgs, opts ...pulumi.InvokeOption) (*LookupAccessPolicyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupAccessPolicyResult err := ctx.Invoke("azure:keyvault/getAccessPolicy:getAccessPolicy", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAccessPolicy. type LookupAccessPolicyArgs struct { // Specifies the name of the Management Template. Possible values are: `Key Management`, // `Secret Management`, `Certificate Management`, `Key & Secret Management`, `Key & Certificate Management`, // `Secret & Certificate Management`, `Key, Secret, & Certificate Management` Name string `pulumi:"name"` } // A collection of values returned by getAccessPolicy. type LookupAccessPolicyResult struct { // the certificate permissions for the access policy CertificatePermissions []string `pulumi:"certificatePermissions"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // the key permissions for the access policy KeyPermissions []string `pulumi:"keyPermissions"` Name string `pulumi:"name"` // the secret permissions for the access policy SecretPermissions []string `pulumi:"secretPermissions"` } func LookupAccessPolicyOutput(ctx *pulumi.Context, args LookupAccessPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupAccessPolicyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAccessPolicyResultOutput, error) { args := v.(LookupAccessPolicyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getAccessPolicy:getAccessPolicy", args, LookupAccessPolicyResultOutput{}, options).(LookupAccessPolicyResultOutput), nil }).(LookupAccessPolicyResultOutput) } // A collection of arguments for invoking getAccessPolicy. type LookupAccessPolicyOutputArgs struct { // Specifies the name of the Management Template. Possible values are: `Key Management`, // `Secret Management`, `Certificate Management`, `Key & Secret Management`, `Key & Certificate Management`, // `Secret & Certificate Management`, `Key, Secret, & Certificate Management` Name pulumi.StringInput `pulumi:"name"` } func (LookupAccessPolicyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupAccessPolicyArgs)(nil)).Elem() } // A collection of values returned by getAccessPolicy. type LookupAccessPolicyResultOutput struct{ *pulumi.OutputState } func (LookupAccessPolicyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupAccessPolicyResult)(nil)).Elem() } func (o LookupAccessPolicyResultOutput) ToLookupAccessPolicyResultOutput() LookupAccessPolicyResultOutput { return o } func (o LookupAccessPolicyResultOutput) ToLookupAccessPolicyResultOutputWithContext(ctx context.Context) LookupAccessPolicyResultOutput { return o } // the certificate permissions for the access policy func (o LookupAccessPolicyResultOutput) CertificatePermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupAccessPolicyResult) []string { return v.CertificatePermissions }).(pulumi.StringArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupAccessPolicyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupAccessPolicyResult) string { return v.Id }).(pulumi.StringOutput) } // the key permissions for the access policy func (o LookupAccessPolicyResultOutput) KeyPermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupAccessPolicyResult) []string { return v.KeyPermissions }).(pulumi.StringArrayOutput) } func (o LookupAccessPolicyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupAccessPolicyResult) string { return v.Name }).(pulumi.StringOutput) } // the secret permissions for the access policy func (o LookupAccessPolicyResultOutput) SecretPermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupAccessPolicyResult) []string { return v.SecretPermissions }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupAccessPolicyResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false