1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. eds
  5. NetworkPackage
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.eds.NetworkPackage

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a ECD Network Package resource.

    For information about ECD Network Package and how to use it, see What is Network Package.

    NOTE: Available since v1.142.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultSimpleOfficeSite = new alicloud.eds.SimpleOfficeSite("default", {
        cidrBlock: "172.16.0.0/12",
        enableAdminAccess: true,
        desktopAccessType: "Internet",
        officeSiteName: `terraform-example-${_default.result}`,
    });
    const defaultNetworkPackage = new alicloud.eds.NetworkPackage("default", {
        bandwidth: 10,
        officeSiteId: defaultSimpleOfficeSite.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.index.Integer("default",
        min=10000,
        max=99999)
    default_simple_office_site = alicloud.eds.SimpleOfficeSite("default",
        cidr_block="172.16.0.0/12",
        enable_admin_access=True,
        desktop_access_type="Internet",
        office_site_name=f"terraform-example-{default['result']}")
    default_network_package = alicloud.eds.NetworkPackage("default",
        bandwidth=10,
        office_site_id=default_simple_office_site.id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		defaultSimpleOfficeSite, err := eds.NewSimpleOfficeSite(ctx, "default", &eds.SimpleOfficeSiteArgs{
    			CidrBlock:         pulumi.String("172.16.0.0/12"),
    			EnableAdminAccess: pulumi.Bool(true),
    			DesktopAccessType: pulumi.String("Internet"),
    			OfficeSiteName:    pulumi.Sprintf("terraform-example-%v", _default.Result),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = eds.NewNetworkPackage(ctx, "default", &eds.NetworkPackageArgs{
    			Bandwidth:    pulumi.Int(10),
    			OfficeSiteId: defaultSimpleOfficeSite.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultSimpleOfficeSite = new AliCloud.Eds.SimpleOfficeSite("default", new()
        {
            CidrBlock = "172.16.0.0/12",
            EnableAdminAccess = true,
            DesktopAccessType = "Internet",
            OfficeSiteName = $"terraform-example-{@default.Result}",
        });
    
        var defaultNetworkPackage = new AliCloud.Eds.NetworkPackage("default", new()
        {
            Bandwidth = 10,
            OfficeSiteId = defaultSimpleOfficeSite.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.eds.SimpleOfficeSite;
    import com.pulumi.alicloud.eds.SimpleOfficeSiteArgs;
    import com.pulumi.alicloud.eds.NetworkPackage;
    import com.pulumi.alicloud.eds.NetworkPackageArgs;
    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 default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultSimpleOfficeSite = new SimpleOfficeSite("defaultSimpleOfficeSite", SimpleOfficeSiteArgs.builder()
                .cidrBlock("172.16.0.0/12")
                .enableAdminAccess(true)
                .desktopAccessType("Internet")
                .officeSiteName(String.format("terraform-example-%s", default_.result()))
                .build());
    
            var defaultNetworkPackage = new NetworkPackage("defaultNetworkPackage", NetworkPackageArgs.builder()
                .bandwidth(10)
                .officeSiteId(defaultSimpleOfficeSite.id())
                .build());
    
        }
    }
    
    resources:
      default:
        type: random:integer
        properties:
          min: 10000
          max: 99999
      defaultSimpleOfficeSite:
        type: alicloud:eds:SimpleOfficeSite
        name: default
        properties:
          cidrBlock: 172.16.0.0/12
          enableAdminAccess: true
          desktopAccessType: Internet
          officeSiteName: terraform-example-${default.result}
      defaultNetworkPackage:
        type: alicloud:eds:NetworkPackage
        name: default
        properties:
          bandwidth: 10
          officeSiteId: ${defaultSimpleOfficeSite.id}
    

    Create NetworkPackage Resource

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

    Constructor syntax

    new NetworkPackage(name: string, args: NetworkPackageArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkPackage(resource_name: str,
                       args: NetworkPackageArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkPackage(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       bandwidth: Optional[int] = None,
                       office_site_id: Optional[str] = None)
    func NewNetworkPackage(ctx *Context, name string, args NetworkPackageArgs, opts ...ResourceOption) (*NetworkPackage, error)
    public NetworkPackage(string name, NetworkPackageArgs args, CustomResourceOptions? opts = null)
    public NetworkPackage(String name, NetworkPackageArgs args)
    public NetworkPackage(String name, NetworkPackageArgs args, CustomResourceOptions options)
    
    type: alicloud:eds:NetworkPackage
    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 NetworkPackageArgs
    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 NetworkPackageArgs
    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 NetworkPackageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkPackageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkPackageArgs
    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 networkPackageResource = new AliCloud.Eds.NetworkPackage("networkPackageResource", new()
    {
        Bandwidth = 0,
        OfficeSiteId = "string",
    });
    
    example, err := eds.NewNetworkPackage(ctx, "networkPackageResource", &eds.NetworkPackageArgs{
    	Bandwidth:    pulumi.Int(0),
    	OfficeSiteId: pulumi.String("string"),
    })
    
    var networkPackageResource = new NetworkPackage("networkPackageResource", NetworkPackageArgs.builder()
        .bandwidth(0)
        .officeSiteId("string")
        .build());
    
    network_package_resource = alicloud.eds.NetworkPackage("networkPackageResource",
        bandwidth=0,
        office_site_id="string")
    
    const networkPackageResource = new alicloud.eds.NetworkPackage("networkPackageResource", {
        bandwidth: 0,
        officeSiteId: "string",
    });
    
    type: alicloud:eds:NetworkPackage
    properties:
        bandwidth: 0
        officeSiteId: string
    

    NetworkPackage 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 NetworkPackage resource accepts the following input properties:

    Bandwidth int
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    OfficeSiteId string
    The ID of office site.
    Bandwidth int
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    OfficeSiteId string
    The ID of office site.
    bandwidth Integer
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    officeSiteId String
    The ID of office site.
    bandwidth number
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    officeSiteId string
    The ID of office site.
    bandwidth int
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    office_site_id str
    The ID of office site.
    bandwidth Number
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    officeSiteId String
    The ID of office site.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    InternetChargeType string
    The internet charge type of package.
    Status string
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternetChargeType string
    The internet charge type of package.
    Status string
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    id String
    The provider-assigned unique ID for this managed resource.
    internetChargeType String
    The internet charge type of package.
    status String
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    id string
    The provider-assigned unique ID for this managed resource.
    internetChargeType string
    The internet charge type of package.
    status string
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    id str
    The provider-assigned unique ID for this managed resource.
    internet_charge_type str
    The internet charge type of package.
    status str
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    id String
    The provider-assigned unique ID for this managed resource.
    internetChargeType String
    The internet charge type of package.
    status String
    The status of network package. Valid values: Creating, InUse, Releasing,Released.

    Look up Existing NetworkPackage Resource

    Get an existing NetworkPackage 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?: NetworkPackageState, opts?: CustomResourceOptions): NetworkPackage
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bandwidth: Optional[int] = None,
            internet_charge_type: Optional[str] = None,
            office_site_id: Optional[str] = None,
            status: Optional[str] = None) -> NetworkPackage
    func GetNetworkPackage(ctx *Context, name string, id IDInput, state *NetworkPackageState, opts ...ResourceOption) (*NetworkPackage, error)
    public static NetworkPackage Get(string name, Input<string> id, NetworkPackageState? state, CustomResourceOptions? opts = null)
    public static NetworkPackage get(String name, Output<String> id, NetworkPackageState 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:
    Bandwidth int
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    InternetChargeType string
    The internet charge type of package.
    OfficeSiteId string
    The ID of office site.
    Status string
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    Bandwidth int
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    InternetChargeType string
    The internet charge type of package.
    OfficeSiteId string
    The ID of office site.
    Status string
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    bandwidth Integer
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    internetChargeType String
    The internet charge type of package.
    officeSiteId String
    The ID of office site.
    status String
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    bandwidth number
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    internetChargeType string
    The internet charge type of package.
    officeSiteId string
    The ID of office site.
    status string
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    bandwidth int
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    internet_charge_type str
    The internet charge type of package.
    office_site_id str
    The ID of office site.
    status str
    The status of network package. Valid values: Creating, InUse, Releasing,Released.
    bandwidth Number
    The bandwidth of package public network bandwidth peak. Valid values: 1~200. Unit:Mbps.
    internetChargeType String
    The internet charge type of package.
    officeSiteId String
    The ID of office site.
    status String
    The status of network package. Valid values: Creating, InUse, Releasing,Released.

    Import

    ECD Network Package can be imported using the id, e.g.

    $ pulumi import alicloud:eds/networkPackage:NetworkPackage example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi