1. Packages
  2. Alicloud Provider
  3. API Docs
  4. edas
  5. SlbAttachment
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.edas.SlbAttachment

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Binds SLB to an EDAS application.

    NOTE: Available since v1.82.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const default = alicloud.getRegions({
        current: true,
    });
    const defaultGetZones = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultGetImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_[0-9]+_[0-9]+_x64*",
        owners: "system",
    });
    const defaultGetInstanceTypes = defaultGetZones.then(defaultGetZones => alicloud.ecs.getInstanceTypes({
        availabilityZone: defaultGetZones.zones?.[0]?.id,
        cpuCoreCount: 1,
        memorySize: 2,
    }));
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {vpcId: defaultNetwork.id});
    const defaultInstance = new alicloud.ecs.Instance("default", {
        availabilityZone: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
        instanceName: name,
        imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
        instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
        securityGroups: [defaultSecurityGroup.id],
        vswitchId: defaultSwitch.id,
        internetMaxBandwidthOut: 10,
        internetChargeType: "PayByTraffic",
        instanceChargeType: "PostPaid",
        systemDiskCategory: "cloud_efficiency",
    });
    const defaultCluster = new alicloud.edas.Cluster("default", {
        clusterName: name,
        clusterType: 2,
        networkMode: 2,
        logicalRegionId: _default.then(_default => _default.regions?.[0]?.id),
        vpcId: defaultNetwork.id,
    });
    const defaultInstanceClusterAttachment = new alicloud.edas.InstanceClusterAttachment("default", {
        clusterId: defaultCluster.id,
        instanceIds: [defaultInstance.id],
    });
    const defaultApplication = new alicloud.edas.Application("default", {
        applicationName: name,
        clusterId: defaultCluster.id,
        packageType: "JAR",
    });
    const defaultApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("default", {
        loadBalancerName: name,
        vswitchId: defaultSwitch.id,
        loadBalancerSpec: "slb.s2.small",
        addressType: "intranet",
    });
    const defaultSlbAttachment = new alicloud.edas.SlbAttachment("default", {
        appId: defaultApplication.id,
        slbId: defaultApplicationLoadBalancer.id,
        slbIp: defaultApplicationLoadBalancer.address,
        type: defaultApplicationLoadBalancer.addressType,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.get_regions(current=True)
    default_get_zones = alicloud.get_zones(available_resource_creation="VSwitch")
    default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
        owners="system")
    default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_get_zones.zones[0].id,
        cpu_core_count=1,
        memory_size=2)
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_get_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default", vpc_id=default_network.id)
    default_instance = alicloud.ecs.Instance("default",
        availability_zone=default_get_zones.zones[0].id,
        instance_name=name,
        image_id=default_get_images.images[0].id,
        instance_type=default_get_instance_types.instance_types[0].id,
        security_groups=[default_security_group.id],
        vswitch_id=default_switch.id,
        internet_max_bandwidth_out=10,
        internet_charge_type="PayByTraffic",
        instance_charge_type="PostPaid",
        system_disk_category="cloud_efficiency")
    default_cluster = alicloud.edas.Cluster("default",
        cluster_name=name,
        cluster_type=2,
        network_mode=2,
        logical_region_id=default.regions[0].id,
        vpc_id=default_network.id)
    default_instance_cluster_attachment = alicloud.edas.InstanceClusterAttachment("default",
        cluster_id=default_cluster.id,
        instance_ids=[default_instance.id])
    default_application = alicloud.edas.Application("default",
        application_name=name,
        cluster_id=default_cluster.id,
        package_type="JAR")
    default_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("default",
        load_balancer_name=name,
        vswitch_id=default_switch.id,
        load_balancer_spec="slb.s2.small",
        address_type="intranet")
    default_slb_attachment = alicloud.edas.SlbAttachment("default",
        app_id=default_application.id,
        slb_id=default_application_load_balancer.id,
        slb_ip=default_application_load_balancer.address,
        type=default_application_load_balancer.address_type)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/edas"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex: pulumi.StringRef("^ubuntu_[0-9]+_[0-9]+_x64*"),
    			Owners:    pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(defaultGetZones.Zones[0].Id),
    			CpuCoreCount:     pulumi.IntRef(1),
    			MemorySize:       pulumi.Float64Ref(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultGetZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
    			AvailabilityZone: pulumi.String(defaultGetZones.Zones[0].Id),
    			InstanceName:     pulumi.String(name),
    			ImageId:          pulumi.String(defaultGetImages.Images[0].Id),
    			InstanceType:     pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
    			SecurityGroups: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    			VswitchId:               defaultSwitch.ID(),
    			InternetMaxBandwidthOut: pulumi.Int(10),
    			InternetChargeType:      pulumi.String("PayByTraffic"),
    			InstanceChargeType:      pulumi.String("PostPaid"),
    			SystemDiskCategory:      pulumi.String("cloud_efficiency"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultCluster, err := edas.NewCluster(ctx, "default", &edas.ClusterArgs{
    			ClusterName:     pulumi.String(name),
    			ClusterType:     pulumi.Int(2),
    			NetworkMode:     pulumi.Int(2),
    			LogicalRegionId: pulumi.String(_default.Regions[0].Id),
    			VpcId:           defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = edas.NewInstanceClusterAttachment(ctx, "default", &edas.InstanceClusterAttachmentArgs{
    			ClusterId: defaultCluster.ID(),
    			InstanceIds: pulumi.StringArray{
    				defaultInstance.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultApplication, err := edas.NewApplication(ctx, "default", &edas.ApplicationArgs{
    			ApplicationName: pulumi.String(name),
    			ClusterId:       defaultCluster.ID(),
    			PackageType:     pulumi.String("JAR"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "default", &slb.ApplicationLoadBalancerArgs{
    			LoadBalancerName: pulumi.String(name),
    			VswitchId:        defaultSwitch.ID(),
    			LoadBalancerSpec: pulumi.String("slb.s2.small"),
    			AddressType:      pulumi.String("intranet"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = edas.NewSlbAttachment(ctx, "default", &edas.SlbAttachmentArgs{
    			AppId: defaultApplication.ID(),
    			SlbId: defaultApplicationLoadBalancer.ID(),
    			SlbIp: defaultApplicationLoadBalancer.Address,
    			Type:  defaultApplicationLoadBalancer.AddressType,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultGetZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
            Owners = "system",
        });
    
        var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            CpuCoreCount = 1,
            MemorySize = 2,
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("default", new()
        {
            AvailabilityZone = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            InstanceName = name,
            ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SecurityGroups = new[]
            {
                defaultSecurityGroup.Id,
            },
            VswitchId = defaultSwitch.Id,
            InternetMaxBandwidthOut = 10,
            InternetChargeType = "PayByTraffic",
            InstanceChargeType = "PostPaid",
            SystemDiskCategory = "cloud_efficiency",
        });
    
        var defaultCluster = new AliCloud.Edas.Cluster("default", new()
        {
            ClusterName = name,
            ClusterType = 2,
            NetworkMode = 2,
            LogicalRegionId = @default.Apply(@default => @default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)),
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstanceClusterAttachment = new AliCloud.Edas.InstanceClusterAttachment("default", new()
        {
            ClusterId = defaultCluster.Id,
            InstanceIds = new[]
            {
                defaultInstance.Id,
            },
        });
    
        var defaultApplication = new AliCloud.Edas.Application("default", new()
        {
            ApplicationName = name,
            ClusterId = defaultCluster.Id,
            PackageType = "JAR",
        });
    
        var defaultApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("default", new()
        {
            LoadBalancerName = name,
            VswitchId = defaultSwitch.Id,
            LoadBalancerSpec = "slb.s2.small",
            AddressType = "intranet",
        });
    
        var defaultSlbAttachment = new AliCloud.Edas.SlbAttachment("default", new()
        {
            AppId = defaultApplication.Id,
            SlbId = defaultApplicationLoadBalancer.Id,
            SlbIp = defaultApplicationLoadBalancer.Address,
            Type = defaultApplicationLoadBalancer.AddressType,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetRegionsArgs;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.edas.Cluster;
    import com.pulumi.alicloud.edas.ClusterArgs;
    import com.pulumi.alicloud.edas.InstanceClusterAttachment;
    import com.pulumi.alicloud.edas.InstanceClusterAttachmentArgs;
    import com.pulumi.alicloud.edas.Application;
    import com.pulumi.alicloud.edas.ApplicationArgs;
    import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
    import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
    import com.pulumi.alicloud.edas.SlbAttachment;
    import com.pulumi.alicloud.edas.SlbAttachmentArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            final var defaultGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
                .owners("system")
                .build());
    
            final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .cpuCoreCount(1)
                .memorySize(2)
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .availabilityZone(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceName(name)
                .imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .securityGroups(defaultSecurityGroup.id())
                .vswitchId(defaultSwitch.id())
                .internetMaxBandwidthOut("10")
                .internetChargeType("PayByTraffic")
                .instanceChargeType("PostPaid")
                .systemDiskCategory("cloud_efficiency")
                .build());
    
            var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
                .clusterName(name)
                .clusterType("2")
                .networkMode("2")
                .logicalRegionId(default_.regions()[0].id())
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstanceClusterAttachment = new InstanceClusterAttachment("defaultInstanceClusterAttachment", InstanceClusterAttachmentArgs.builder()
                .clusterId(defaultCluster.id())
                .instanceIds(defaultInstance.id())
                .build());
    
            var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()
                .applicationName(name)
                .clusterId(defaultCluster.id())
                .packageType("JAR")
                .build());
    
            var defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()
                .loadBalancerName(name)
                .vswitchId(defaultSwitch.id())
                .loadBalancerSpec("slb.s2.small")
                .addressType("intranet")
                .build());
    
            var defaultSlbAttachment = new SlbAttachment("defaultSlbAttachment", SlbAttachmentArgs.builder()
                .appId(defaultApplication.id())
                .slbId(defaultApplicationLoadBalancer.id())
                .slbIp(defaultApplicationLoadBalancer.address())
                .type(defaultApplicationLoadBalancer.addressType())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultGetZones.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:ecs:Instance
        name: default
        properties:
          availabilityZone: ${defaultGetZones.zones[0].id}
          instanceName: ${name}
          imageId: ${defaultGetImages.images[0].id}
          instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
          securityGroups:
            - ${defaultSecurityGroup.id}
          vswitchId: ${defaultSwitch.id}
          internetMaxBandwidthOut: '10'
          internetChargeType: PayByTraffic
          instanceChargeType: PostPaid
          systemDiskCategory: cloud_efficiency
      defaultCluster:
        type: alicloud:edas:Cluster
        name: default
        properties:
          clusterName: ${name}
          clusterType: '2'
          networkMode: '2'
          logicalRegionId: ${default.regions[0].id}
          vpcId: ${defaultNetwork.id}
      defaultInstanceClusterAttachment:
        type: alicloud:edas:InstanceClusterAttachment
        name: default
        properties:
          clusterId: ${defaultCluster.id}
          instanceIds:
            - ${defaultInstance.id}
      defaultApplication:
        type: alicloud:edas:Application
        name: default
        properties:
          applicationName: ${name}
          clusterId: ${defaultCluster.id}
          packageType: JAR
      defaultApplicationLoadBalancer:
        type: alicloud:slb:ApplicationLoadBalancer
        name: default
        properties:
          loadBalancerName: ${name}
          vswitchId: ${defaultSwitch.id}
          loadBalancerSpec: slb.s2.small
          addressType: intranet
      defaultSlbAttachment:
        type: alicloud:edas:SlbAttachment
        name: default
        properties:
          appId: ${defaultApplication.id}
          slbId: ${defaultApplicationLoadBalancer.id}
          slbIp: ${defaultApplicationLoadBalancer.address}
          type: ${defaultApplicationLoadBalancer.addressType}
    variables:
      default:
        fn::invoke:
          Function: alicloud:getRegions
          Arguments:
            current: true
      defaultGetZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      defaultGetImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_[0-9]+_[0-9]+_x64*
            owners: system
      defaultGetInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${defaultGetZones.zones[0].id}
            cpuCoreCount: 1
            memorySize: 2
    

    Create SlbAttachment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SlbAttachment(name: string, args: SlbAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def SlbAttachment(resource_name: str,
                      args: SlbAttachmentArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SlbAttachment(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      app_id: Optional[str] = None,
                      slb_id: Optional[str] = None,
                      slb_ip: Optional[str] = None,
                      type: Optional[str] = None,
                      listener_port: Optional[int] = None,
                      vserver_group_id: Optional[str] = None)
    func NewSlbAttachment(ctx *Context, name string, args SlbAttachmentArgs, opts ...ResourceOption) (*SlbAttachment, error)
    public SlbAttachment(string name, SlbAttachmentArgs args, CustomResourceOptions? opts = null)
    public SlbAttachment(String name, SlbAttachmentArgs args)
    public SlbAttachment(String name, SlbAttachmentArgs args, CustomResourceOptions options)
    
    type: alicloud:edas:SlbAttachment
    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 SlbAttachmentArgs
    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 SlbAttachmentArgs
    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 SlbAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SlbAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SlbAttachmentArgs
    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 slbAttachmentResource = new AliCloud.Edas.SlbAttachment("slbAttachmentResource", new()
    {
        AppId = "string",
        SlbId = "string",
        SlbIp = "string",
        Type = "string",
        ListenerPort = 0,
        VserverGroupId = "string",
    });
    
    example, err := edas.NewSlbAttachment(ctx, "slbAttachmentResource", &edas.SlbAttachmentArgs{
    	AppId:          pulumi.String("string"),
    	SlbId:          pulumi.String("string"),
    	SlbIp:          pulumi.String("string"),
    	Type:           pulumi.String("string"),
    	ListenerPort:   pulumi.Int(0),
    	VserverGroupId: pulumi.String("string"),
    })
    
    var slbAttachmentResource = new SlbAttachment("slbAttachmentResource", SlbAttachmentArgs.builder()
        .appId("string")
        .slbId("string")
        .slbIp("string")
        .type("string")
        .listenerPort(0)
        .vserverGroupId("string")
        .build());
    
    slb_attachment_resource = alicloud.edas.SlbAttachment("slbAttachmentResource",
        app_id="string",
        slb_id="string",
        slb_ip="string",
        type="string",
        listener_port=0,
        vserver_group_id="string")
    
    const slbAttachmentResource = new alicloud.edas.SlbAttachment("slbAttachmentResource", {
        appId: "string",
        slbId: "string",
        slbIp: "string",
        type: "string",
        listenerPort: 0,
        vserverGroupId: "string",
    });
    
    type: alicloud:edas:SlbAttachment
    properties:
        appId: string
        listenerPort: 0
        slbId: string
        slbIp: string
        type: string
        vserverGroupId: string
    

    SlbAttachment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SlbAttachment resource accepts the following input properties:

    AppId string
    The ID of the application to which you want to bind an SLB instance.
    SlbId string
    The ID of the SLB instance that is going to be bound.
    SlbIp string
    The IP address that is allocated to the bound SLB instance.
    Type string
    The type of the bound SLB instance.
    ListenerPort int
    The listening port for the bound SLB instance.
    VserverGroupId string
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    AppId string
    The ID of the application to which you want to bind an SLB instance.
    SlbId string
    The ID of the SLB instance that is going to be bound.
    SlbIp string
    The IP address that is allocated to the bound SLB instance.
    Type string
    The type of the bound SLB instance.
    ListenerPort int
    The listening port for the bound SLB instance.
    VserverGroupId string
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    appId String
    The ID of the application to which you want to bind an SLB instance.
    slbId String
    The ID of the SLB instance that is going to be bound.
    slbIp String
    The IP address that is allocated to the bound SLB instance.
    type String
    The type of the bound SLB instance.
    listenerPort Integer
    The listening port for the bound SLB instance.
    vserverGroupId String
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    appId string
    The ID of the application to which you want to bind an SLB instance.
    slbId string
    The ID of the SLB instance that is going to be bound.
    slbIp string
    The IP address that is allocated to the bound SLB instance.
    type string
    The type of the bound SLB instance.
    listenerPort number
    The listening port for the bound SLB instance.
    vserverGroupId string
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    app_id str
    The ID of the application to which you want to bind an SLB instance.
    slb_id str
    The ID of the SLB instance that is going to be bound.
    slb_ip str
    The IP address that is allocated to the bound SLB instance.
    type str
    The type of the bound SLB instance.
    listener_port int
    The listening port for the bound SLB instance.
    vserver_group_id str
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    appId String
    The ID of the application to which you want to bind an SLB instance.
    slbId String
    The ID of the SLB instance that is going to be bound.
    slbIp String
    The IP address that is allocated to the bound SLB instance.
    type String
    The type of the bound SLB instance.
    listenerPort Number
    The listening port for the bound SLB instance.
    vserverGroupId String
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SlbAttachment resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    SlbStatus string
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    VswitchId string
    VPC related vswitch ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    SlbStatus string
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    VswitchId string
    VPC related vswitch ID.
    id String
    The provider-assigned unique ID for this managed resource.
    slbStatus String
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    vswitchId String
    VPC related vswitch ID.
    id string
    The provider-assigned unique ID for this managed resource.
    slbStatus string
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    vswitchId string
    VPC related vswitch ID.
    id str
    The provider-assigned unique ID for this managed resource.
    slb_status str
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    vswitch_id str
    VPC related vswitch ID.
    id String
    The provider-assigned unique ID for this managed resource.
    slbStatus String
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    vswitchId String
    VPC related vswitch ID.

    Look up Existing SlbAttachment Resource

    Get an existing SlbAttachment 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?: SlbAttachmentState, opts?: CustomResourceOptions): SlbAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            listener_port: Optional[int] = None,
            slb_id: Optional[str] = None,
            slb_ip: Optional[str] = None,
            slb_status: Optional[str] = None,
            type: Optional[str] = None,
            vserver_group_id: Optional[str] = None,
            vswitch_id: Optional[str] = None) -> SlbAttachment
    func GetSlbAttachment(ctx *Context, name string, id IDInput, state *SlbAttachmentState, opts ...ResourceOption) (*SlbAttachment, error)
    public static SlbAttachment Get(string name, Input<string> id, SlbAttachmentState? state, CustomResourceOptions? opts = null)
    public static SlbAttachment get(String name, Output<String> id, SlbAttachmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AppId string
    The ID of the application to which you want to bind an SLB instance.
    ListenerPort int
    The listening port for the bound SLB instance.
    SlbId string
    The ID of the SLB instance that is going to be bound.
    SlbIp string
    The IP address that is allocated to the bound SLB instance.
    SlbStatus string
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    Type string
    The type of the bound SLB instance.
    VserverGroupId string
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    VswitchId string
    VPC related vswitch ID.
    AppId string
    The ID of the application to which you want to bind an SLB instance.
    ListenerPort int
    The listening port for the bound SLB instance.
    SlbId string
    The ID of the SLB instance that is going to be bound.
    SlbIp string
    The IP address that is allocated to the bound SLB instance.
    SlbStatus string
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    Type string
    The type of the bound SLB instance.
    VserverGroupId string
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    VswitchId string
    VPC related vswitch ID.
    appId String
    The ID of the application to which you want to bind an SLB instance.
    listenerPort Integer
    The listening port for the bound SLB instance.
    slbId String
    The ID of the SLB instance that is going to be bound.
    slbIp String
    The IP address that is allocated to the bound SLB instance.
    slbStatus String
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    type String
    The type of the bound SLB instance.
    vserverGroupId String
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    vswitchId String
    VPC related vswitch ID.
    appId string
    The ID of the application to which you want to bind an SLB instance.
    listenerPort number
    The listening port for the bound SLB instance.
    slbId string
    The ID of the SLB instance that is going to be bound.
    slbIp string
    The IP address that is allocated to the bound SLB instance.
    slbStatus string
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    type string
    The type of the bound SLB instance.
    vserverGroupId string
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    vswitchId string
    VPC related vswitch ID.
    app_id str
    The ID of the application to which you want to bind an SLB instance.
    listener_port int
    The listening port for the bound SLB instance.
    slb_id str
    The ID of the SLB instance that is going to be bound.
    slb_ip str
    The IP address that is allocated to the bound SLB instance.
    slb_status str
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    type str
    The type of the bound SLB instance.
    vserver_group_id str
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    vswitch_id str
    VPC related vswitch ID.
    appId String
    The ID of the application to which you want to bind an SLB instance.
    listenerPort Number
    The listening port for the bound SLB instance.
    slbId String
    The ID of the SLB instance that is going to be bound.
    slbIp String
    The IP address that is allocated to the bound SLB instance.
    slbStatus String
    Running Status of SLB instance. Inactive:The instance is stopped, and listener will not monitor and forward traffic. Active:The instance is running. After the instance is created, the default state is active. Locked:The instance is locked, the instance has been owed or locked by Alibaba Cloud. Expired: The instance has expired.
    type String
    The type of the bound SLB instance.
    vserverGroupId String
    The ID of the virtual server (VServer) group associated with the intranet SLB instance.
    vswitchId String
    VPC related vswitch ID.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi