Use the zpa_application_segment_weightedlb_config resource to create, update, or delete the weighted load balancer configuration for an application segment in the Zscaler Private Access cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
const _this = new zpa.ApplicationSegmentWeightedlbConfig("this", {
applicationName: "app02",
weightedLoadBalancing: true,
applicationToServerGroupMappings: [{
name: "Example100",
weight: "100",
}],
});
import pulumi
import zscaler_pulumi_zpa as zpa
this = zpa.ApplicationSegmentWeightedlbConfig("this",
application_name="app02",
weighted_load_balancing=True,
application_to_server_group_mappings=[{
"name": "Example100",
"weight": "100",
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := zpa.NewApplicationSegmentWeightedlbConfig(ctx, "this", &zpa.ApplicationSegmentWeightedlbConfigArgs{
ApplicationName: pulumi.String("app02"),
WeightedLoadBalancing: pulumi.Bool(true),
ApplicationToServerGroupMappings: zpa.ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArray{
&zpa.ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs{
Name: pulumi.String("Example100"),
Weight: pulumi.String("100"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
var @this = new Zpa.ApplicationSegmentWeightedlbConfig("this", new()
{
ApplicationName = "app02",
WeightedLoadBalancing = true,
ApplicationToServerGroupMappings = new[]
{
new Zpa.Inputs.ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs
{
Name = "Example100",
Weight = "100",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.ApplicationSegmentWeightedlbConfig;
import com.pulumi.zpa.ApplicationSegmentWeightedlbConfigArgs;
import com.pulumi.zpa.inputs.ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var this_ = new ApplicationSegmentWeightedlbConfig("this", ApplicationSegmentWeightedlbConfigArgs.builder()
.applicationName("app02")
.weightedLoadBalancing(true)
.applicationToServerGroupMappings(ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs.builder()
.name("Example100")
.weight("100")
.build())
.build());
}
}
resources:
this:
type: zpa:ApplicationSegmentWeightedlbConfig
properties:
applicationName: app02
weightedLoadBalancing: true
applicationToServerGroupMappings:
- name: Example100
weight: '100'
Create ApplicationSegmentWeightedlbConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApplicationSegmentWeightedlbConfig(name: string, args?: ApplicationSegmentWeightedlbConfigArgs, opts?: CustomResourceOptions);@overload
def ApplicationSegmentWeightedlbConfig(resource_name: str,
args: Optional[ApplicationSegmentWeightedlbConfigArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ApplicationSegmentWeightedlbConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
application_name: Optional[str] = None,
application_to_server_group_mappings: Optional[Sequence[ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs]] = None,
microtenant_id: Optional[str] = None,
weighted_load_balancing: Optional[bool] = None)func NewApplicationSegmentWeightedlbConfig(ctx *Context, name string, args *ApplicationSegmentWeightedlbConfigArgs, opts ...ResourceOption) (*ApplicationSegmentWeightedlbConfig, error)public ApplicationSegmentWeightedlbConfig(string name, ApplicationSegmentWeightedlbConfigArgs? args = null, CustomResourceOptions? opts = null)
public ApplicationSegmentWeightedlbConfig(String name, ApplicationSegmentWeightedlbConfigArgs args)
public ApplicationSegmentWeightedlbConfig(String name, ApplicationSegmentWeightedlbConfigArgs args, CustomResourceOptions options)
type: zpa:ApplicationSegmentWeightedlbConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ApplicationSegmentWeightedlbConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApplicationSegmentWeightedlbConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApplicationSegmentWeightedlbConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationSegmentWeightedlbConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApplicationSegmentWeightedlbConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var applicationSegmentWeightedlbConfigResource = new Zpa.ApplicationSegmentWeightedlbConfig("applicationSegmentWeightedlbConfigResource", new()
{
ApplicationId = "string",
ApplicationName = "string",
ApplicationToServerGroupMappings = new[]
{
new Zpa.Inputs.ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs
{
Id = "string",
Name = "string",
Passive = false,
Weight = "string",
},
},
MicrotenantId = "string",
WeightedLoadBalancing = false,
});
example, err := zpa.NewApplicationSegmentWeightedlbConfig(ctx, "applicationSegmentWeightedlbConfigResource", &zpa.ApplicationSegmentWeightedlbConfigArgs{
ApplicationId: pulumi.String("string"),
ApplicationName: pulumi.String("string"),
ApplicationToServerGroupMappings: zpa.ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArray{
&zpa.ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
Passive: pulumi.Bool(false),
Weight: pulumi.String("string"),
},
},
MicrotenantId: pulumi.String("string"),
WeightedLoadBalancing: pulumi.Bool(false),
})
var applicationSegmentWeightedlbConfigResource = new ApplicationSegmentWeightedlbConfig("applicationSegmentWeightedlbConfigResource", ApplicationSegmentWeightedlbConfigArgs.builder()
.applicationId("string")
.applicationName("string")
.applicationToServerGroupMappings(ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs.builder()
.id("string")
.name("string")
.passive(false)
.weight("string")
.build())
.microtenantId("string")
.weightedLoadBalancing(false)
.build());
application_segment_weightedlb_config_resource = zpa.ApplicationSegmentWeightedlbConfig("applicationSegmentWeightedlbConfigResource",
application_id="string",
application_name="string",
application_to_server_group_mappings=[{
"id": "string",
"name": "string",
"passive": False,
"weight": "string",
}],
microtenant_id="string",
weighted_load_balancing=False)
const applicationSegmentWeightedlbConfigResource = new zpa.ApplicationSegmentWeightedlbConfig("applicationSegmentWeightedlbConfigResource", {
applicationId: "string",
applicationName: "string",
applicationToServerGroupMappings: [{
id: "string",
name: "string",
passive: false,
weight: "string",
}],
microtenantId: "string",
weightedLoadBalancing: false,
});
type: zpa:ApplicationSegmentWeightedlbConfig
properties:
applicationId: string
applicationName: string
applicationToServerGroupMappings:
- id: string
name: string
passive: false
weight: string
microtenantId: string
weightedLoadBalancing: false
ApplicationSegmentWeightedlbConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ApplicationSegmentWeightedlbConfig resource accepts the following input properties:
- Application
Id string - Application segment identifier to manage. Either application_id or application_name must be provided.
- Application
Name string - Application segment name to manage. Either application_id or application_name must be provided.
- Application
To List<zscaler.Server Group Mappings Pulumi Package. Zpa. Inputs. Application Segment Weightedlb Config Application To Server Group Mapping> - Application to server group mapping details and weights.
- Microtenant
Id string - Optional microtenant identifier.
- Weighted
Load boolBalancing - Enable or disable weighted load balancing for the application segment.
- Application
Id string - Application segment identifier to manage. Either application_id or application_name must be provided.
- Application
Name string - Application segment name to manage. Either application_id or application_name must be provided.
- Application
To []ApplicationServer Group Mappings Segment Weightedlb Config Application To Server Group Mapping Args - Application to server group mapping details and weights.
- Microtenant
Id string - Optional microtenant identifier.
- Weighted
Load boolBalancing - Enable or disable weighted load balancing for the application segment.
- application
Id String - Application segment identifier to manage. Either application_id or application_name must be provided.
- application
Name String - Application segment name to manage. Either application_id or application_name must be provided.
- application
To List<ApplicationServer Group Mappings Segment Weightedlb Config Application To Server Group Mapping> - Application to server group mapping details and weights.
- microtenant
Id String - Optional microtenant identifier.
- weighted
Load BooleanBalancing - Enable or disable weighted load balancing for the application segment.
- application
Id string - Application segment identifier to manage. Either application_id or application_name must be provided.
- application
Name string - Application segment name to manage. Either application_id or application_name must be provided.
- application
To ApplicationServer Group Mappings Segment Weightedlb Config Application To Server Group Mapping[] - Application to server group mapping details and weights.
- microtenant
Id string - Optional microtenant identifier.
- weighted
Load booleanBalancing - Enable or disable weighted load balancing for the application segment.
- application_
id str - Application segment identifier to manage. Either application_id or application_name must be provided.
- application_
name str - Application segment name to manage. Either application_id or application_name must be provided.
- application_
to_ Sequence[Applicationserver_ group_ mappings Segment Weightedlb Config Application To Server Group Mapping Args] - Application to server group mapping details and weights.
- microtenant_
id str - Optional microtenant identifier.
- weighted_
load_ boolbalancing - Enable or disable weighted load balancing for the application segment.
- application
Id String - Application segment identifier to manage. Either application_id or application_name must be provided.
- application
Name String - Application segment name to manage. Either application_id or application_name must be provided.
- application
To List<Property Map>Server Group Mappings - Application to server group mapping details and weights.
- microtenant
Id String - Optional microtenant identifier.
- weighted
Load BooleanBalancing - Enable or disable weighted load balancing for the application segment.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApplicationSegmentWeightedlbConfig resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ApplicationSegmentWeightedlbConfig Resource
Get an existing ApplicationSegmentWeightedlbConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApplicationSegmentWeightedlbConfigState, opts?: CustomResourceOptions): ApplicationSegmentWeightedlbConfig@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
application_name: Optional[str] = None,
application_to_server_group_mappings: Optional[Sequence[ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs]] = None,
microtenant_id: Optional[str] = None,
weighted_load_balancing: Optional[bool] = None) -> ApplicationSegmentWeightedlbConfigfunc GetApplicationSegmentWeightedlbConfig(ctx *Context, name string, id IDInput, state *ApplicationSegmentWeightedlbConfigState, opts ...ResourceOption) (*ApplicationSegmentWeightedlbConfig, error)public static ApplicationSegmentWeightedlbConfig Get(string name, Input<string> id, ApplicationSegmentWeightedlbConfigState? state, CustomResourceOptions? opts = null)public static ApplicationSegmentWeightedlbConfig get(String name, Output<String> id, ApplicationSegmentWeightedlbConfigState state, CustomResourceOptions options)resources: _: type: zpa:ApplicationSegmentWeightedlbConfig get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Application
Id string - Application segment identifier to manage. Either application_id or application_name must be provided.
- Application
Name string - Application segment name to manage. Either application_id or application_name must be provided.
- Application
To List<zscaler.Server Group Mappings Pulumi Package. Zpa. Inputs. Application Segment Weightedlb Config Application To Server Group Mapping> - Application to server group mapping details and weights.
- Microtenant
Id string - Optional microtenant identifier.
- Weighted
Load boolBalancing - Enable or disable weighted load balancing for the application segment.
- Application
Id string - Application segment identifier to manage. Either application_id or application_name must be provided.
- Application
Name string - Application segment name to manage. Either application_id or application_name must be provided.
- Application
To []ApplicationServer Group Mappings Segment Weightedlb Config Application To Server Group Mapping Args - Application to server group mapping details and weights.
- Microtenant
Id string - Optional microtenant identifier.
- Weighted
Load boolBalancing - Enable or disable weighted load balancing for the application segment.
- application
Id String - Application segment identifier to manage. Either application_id or application_name must be provided.
- application
Name String - Application segment name to manage. Either application_id or application_name must be provided.
- application
To List<ApplicationServer Group Mappings Segment Weightedlb Config Application To Server Group Mapping> - Application to server group mapping details and weights.
- microtenant
Id String - Optional microtenant identifier.
- weighted
Load BooleanBalancing - Enable or disable weighted load balancing for the application segment.
- application
Id string - Application segment identifier to manage. Either application_id or application_name must be provided.
- application
Name string - Application segment name to manage. Either application_id or application_name must be provided.
- application
To ApplicationServer Group Mappings Segment Weightedlb Config Application To Server Group Mapping[] - Application to server group mapping details and weights.
- microtenant
Id string - Optional microtenant identifier.
- weighted
Load booleanBalancing - Enable or disable weighted load balancing for the application segment.
- application_
id str - Application segment identifier to manage. Either application_id or application_name must be provided.
- application_
name str - Application segment name to manage. Either application_id or application_name must be provided.
- application_
to_ Sequence[Applicationserver_ group_ mappings Segment Weightedlb Config Application To Server Group Mapping Args] - Application to server group mapping details and weights.
- microtenant_
id str - Optional microtenant identifier.
- weighted_
load_ boolbalancing - Enable or disable weighted load balancing for the application segment.
- application
Id String - Application segment identifier to manage. Either application_id or application_name must be provided.
- application
Name String - Application segment name to manage. Either application_id or application_name must be provided.
- application
To List<Property Map>Server Group Mappings - Application to server group mapping details and weights.
- microtenant
Id String - Optional microtenant identifier.
- weighted
Load BooleanBalancing - Enable or disable weighted load balancing for the application segment.
Supporting Types
ApplicationSegmentWeightedlbConfigApplicationToServerGroupMapping, ApplicationSegmentWeightedlbConfigApplicationToServerGroupMappingArgs
Package Details
- Repository
- zpa zscaler/pulumi-zpa
- License
- MIT
- Notes
- This Pulumi package is based on the
zpaTerraform Provider.
