1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eds
  5. NetworkPackage
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.eds.NetworkPackage

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 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";
    
    const default = alicloud.eds.getSimpleOfficeSites({
        status: "REGISTERED",
        nameRegex: "default",
    });
    const defaultNetworkPackage = new alicloud.eds.NetworkPackage("default", {
        bandwidth: 10,
        officeSiteId: _default.then(_default => _default.ids?.[0]),
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.eds.get_simple_office_sites(status="REGISTERED",
        name_regex="default")
    default_network_package = alicloud.eds.NetworkPackage("default",
        bandwidth=10,
        office_site_id=default.ids[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := eds.GetSimpleOfficeSites(ctx, &eds.GetSimpleOfficeSitesArgs{
    			Status:    pulumi.StringRef("REGISTERED"),
    			NameRegex: pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = eds.NewNetworkPackage(ctx, "default", &eds.NetworkPackageArgs{
    			Bandwidth:    pulumi.Int(10),
    			OfficeSiteId: pulumi.String(_default.Ids[0]),
    		})
    		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 @default = AliCloud.Eds.GetSimpleOfficeSites.Invoke(new()
        {
            Status = "REGISTERED",
            NameRegex = "default",
        });
    
        var defaultNetworkPackage = new AliCloud.Eds.NetworkPackage("default", new()
        {
            Bandwidth = 10,
            OfficeSiteId = @default.Apply(@default => @default.Apply(getSimpleOfficeSitesResult => getSimpleOfficeSitesResult.Ids[0])),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.eds.EdsFunctions;
    import com.pulumi.alicloud.eds.inputs.GetSimpleOfficeSitesArgs;
    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) {
            final var default = EdsFunctions.getSimpleOfficeSites(GetSimpleOfficeSitesArgs.builder()
                .status("REGISTERED")
                .nameRegex("default")
                .build());
    
            var defaultNetworkPackage = new NetworkPackage("defaultNetworkPackage", NetworkPackageArgs.builder()        
                .bandwidth(10)
                .officeSiteId(default_.ids()[0])
                .build());
    
        }
    }
    
    resources:
      defaultNetworkPackage:
        type: alicloud:eds:NetworkPackage
        name: default
        properties:
          bandwidth: 10
          officeSiteId: ${default.ids[0]}
    variables:
      default:
        fn::invoke:
          Function: alicloud:eds:getSimpleOfficeSites
          Arguments:
            status: REGISTERED
            nameRegex: default
    

    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.

    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

    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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi