alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.eds.getNetworkPackages

This data source provides the Ecd Network Packages of the current Alibaba Cloud user.

NOTE: Available in v1.142.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var defaultSimpleOfficeSite = new AliCloud.Eds.SimpleOfficeSite("defaultSimpleOfficeSite", new()
    {
        CidrBlock = "172.16.0.0/12",
        DesktopAccessType = "Internet",
        OfficeSiteName = "example_value",
    });

    var defaultNetworkPackage = new AliCloud.Eds.NetworkPackage("defaultNetworkPackage", new()
    {
        Bandwidth = 10,
        OfficeSiteId = defaultSimpleOfficeSite.Id,
    });

    var defaultNetworkPackages = AliCloud.Eds.GetNetworkPackages.Invoke(new()
    {
        Ids = new[]
        {
            defaultNetworkPackage.Id,
        },
    });

    return new Dictionary<string, object?>
    {
        ["ecdNetworkPackageId1"] = defaultNetworkPackages.Apply(getNetworkPackagesResult => getNetworkPackagesResult.Packages[0]?.Id),
    };
});
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 {
		defaultSimpleOfficeSite, err := eds.NewSimpleOfficeSite(ctx, "defaultSimpleOfficeSite", &eds.SimpleOfficeSiteArgs{
			CidrBlock:         pulumi.String("172.16.0.0/12"),
			DesktopAccessType: pulumi.String("Internet"),
			OfficeSiteName:    pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		defaultNetworkPackage, err := eds.NewNetworkPackage(ctx, "defaultNetworkPackage", &eds.NetworkPackageArgs{
			Bandwidth:    pulumi.Int(10),
			OfficeSiteId: defaultSimpleOfficeSite.ID(),
		})
		if err != nil {
			return err
		}
		defaultNetworkPackages := eds.GetNetworkPackagesOutput(ctx, eds.GetNetworkPackagesOutputArgs{
			Ids: pulumi.StringArray{
				defaultNetworkPackage.ID(),
			},
		}, nil)
		ctx.Export("ecdNetworkPackageId1", defaultNetworkPackages.ApplyT(func(defaultNetworkPackages eds.GetNetworkPackagesResult) (*string, error) {
			return &defaultNetworkPackages.Packages[0].Id, nil
		}).(pulumi.StringPtrOutput))
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 com.pulumi.alicloud.eds.EdsFunctions;
import com.pulumi.alicloud.eds.inputs.GetNetworkPackagesArgs;
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 defaultSimpleOfficeSite = new SimpleOfficeSite("defaultSimpleOfficeSite", SimpleOfficeSiteArgs.builder()        
            .cidrBlock("172.16.0.0/12")
            .desktopAccessType("Internet")
            .officeSiteName("example_value")
            .build());

        var defaultNetworkPackage = new NetworkPackage("defaultNetworkPackage", NetworkPackageArgs.builder()        
            .bandwidth("10")
            .officeSiteId(defaultSimpleOfficeSite.id())
            .build());

        final var defaultNetworkPackages = EdsFunctions.getNetworkPackages(GetNetworkPackagesArgs.builder()
            .ids(defaultNetworkPackage.id())
            .build());

        ctx.export("ecdNetworkPackageId1", defaultNetworkPackages.applyValue(getNetworkPackagesResult -> getNetworkPackagesResult).applyValue(defaultNetworkPackages -> defaultNetworkPackages.applyValue(getNetworkPackagesResult -> getNetworkPackagesResult.packages()[0].id())));
    }
}
import pulumi
import pulumi_alicloud as alicloud

default_simple_office_site = alicloud.eds.SimpleOfficeSite("defaultSimpleOfficeSite",
    cidr_block="172.16.0.0/12",
    desktop_access_type="Internet",
    office_site_name="example_value")
default_network_package = alicloud.eds.NetworkPackage("defaultNetworkPackage",
    bandwidth=10,
    office_site_id=default_simple_office_site.id)
default_network_packages = alicloud.eds.get_network_packages_output(ids=[default_network_package.id])
pulumi.export("ecdNetworkPackageId1", default_network_packages.packages[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultSimpleOfficeSite = new alicloud.eds.SimpleOfficeSite("defaultSimpleOfficeSite", {
    cidrBlock: "172.16.0.0/12",
    desktopAccessType: "Internet",
    officeSiteName: "example_value",
});
const defaultNetworkPackage = new alicloud.eds.NetworkPackage("defaultNetworkPackage", {
    bandwidth: 10,
    officeSiteId: defaultSimpleOfficeSite.id,
});
const defaultNetworkPackages = alicloud.eds.getNetworkPackagesOutput({
    ids: [defaultNetworkPackage.id],
});
export const ecdNetworkPackageId1 = defaultNetworkPackages.apply(defaultNetworkPackages => defaultNetworkPackages.packages?.[0]?.id);
resources:
  defaultSimpleOfficeSite:
    type: alicloud:eds:SimpleOfficeSite
    properties:
      cidrBlock: 172.16.0.0/12
      desktopAccessType: Internet
      officeSiteName: example_value
  defaultNetworkPackage:
    type: alicloud:eds:NetworkPackage
    properties:
      bandwidth: '10'
      officeSiteId: ${defaultSimpleOfficeSite.id}
variables:
  defaultNetworkPackages:
    fn::invoke:
      Function: alicloud:eds:getNetworkPackages
      Arguments:
        ids:
          - ${defaultNetworkPackage.id}
outputs:
  ecdNetworkPackageId1: ${defaultNetworkPackages.packages[0].id}

Using getNetworkPackages

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetworkPackages(args: GetNetworkPackagesArgs, opts?: InvokeOptions): Promise<GetNetworkPackagesResult>
function getNetworkPackagesOutput(args: GetNetworkPackagesOutputArgs, opts?: InvokeOptions): Output<GetNetworkPackagesResult>
def get_network_packages(ids: Optional[Sequence[str]] = None,
                         output_file: Optional[str] = None,
                         status: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetNetworkPackagesResult
def get_network_packages_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         status: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetNetworkPackagesResult]
func GetNetworkPackages(ctx *Context, args *GetNetworkPackagesArgs, opts ...InvokeOption) (*GetNetworkPackagesResult, error)
func GetNetworkPackagesOutput(ctx *Context, args *GetNetworkPackagesOutputArgs, opts ...InvokeOption) GetNetworkPackagesResultOutput

> Note: This function is named GetNetworkPackages in the Go SDK.

public static class GetNetworkPackages 
{
    public static Task<GetNetworkPackagesResult> InvokeAsync(GetNetworkPackagesArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkPackagesResult> Invoke(GetNetworkPackagesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkPackagesResult> getNetworkPackages(GetNetworkPackagesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:eds/getNetworkPackages:getNetworkPackages
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of Network Package IDs.

OutputFile string
Status string

The status of network package. Valid values: Creating, InUse, Releasing,Released.

Ids []string

A list of Network Package IDs.

OutputFile string
Status string

The status of network package. Valid values: Creating, InUse, Releasing,Released.

ids List<String>

A list of Network Package IDs.

outputFile String
status String

The status of network package. Valid values: Creating, InUse, Releasing,Released.

ids string[]

A list of Network Package IDs.

outputFile string
status string

The status of network package. Valid values: Creating, InUse, Releasing,Released.

ids Sequence[str]

A list of Network Package IDs.

output_file str
status str

The status of network package. Valid values: Creating, InUse, Releasing,Released.

ids List<String>

A list of Network Package IDs.

outputFile String
status String

The status of network package. Valid values: Creating, InUse, Releasing,Released.

getNetworkPackages Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Packages List<Pulumi.AliCloud.Eds.Outputs.GetNetworkPackagesPackage>
OutputFile string
Status string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Packages []GetNetworkPackagesPackage
OutputFile string
Status string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
packages List<GetNetworkPackagesPackage>
outputFile String
status String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
packages GetNetworkPackagesPackage[]
outputFile string
status string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
packages Sequence[GetNetworkPackagesPackage]
output_file str
status str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
packages List<Property Map>
outputFile String
status String

Supporting Types

GetNetworkPackagesPackage

Bandwidth int

The bandwidth of package.

CreateTime string

The creation time of network package.

EipAddresses List<string>

The public IP address list of the network packet.

ExpiredTime string

The expired time of package.

Id string

The ID of the Network Package.

InternetChargeType string

The internet charge type of package.

NetworkPackageId string

The ID of network package.

OfficeSiteId string

The ID of office site.

OfficeSiteName string

The name of office site.

Status string

The status of network package. Valid values: Creating, InUse, Releasing,Released.

Bandwidth int

The bandwidth of package.

CreateTime string

The creation time of network package.

EipAddresses []string

The public IP address list of the network packet.

ExpiredTime string

The expired time of package.

Id string

The ID of the Network Package.

InternetChargeType string

The internet charge type of package.

NetworkPackageId string

The ID of network package.

OfficeSiteId string

The ID of office site.

OfficeSiteName string

The name of office site.

Status string

The status of network package. Valid values: Creating, InUse, Releasing,Released.

bandwidth Integer

The bandwidth of package.

createTime String

The creation time of network package.

eipAddresses List<String>

The public IP address list of the network packet.

expiredTime String

The expired time of package.

id String

The ID of the Network Package.

internetChargeType String

The internet charge type of package.

networkPackageId String

The ID of network package.

officeSiteId String

The ID of office site.

officeSiteName String

The name of office site.

status String

The status of network package. Valid values: Creating, InUse, Releasing,Released.

bandwidth number

The bandwidth of package.

createTime string

The creation time of network package.

eipAddresses string[]

The public IP address list of the network packet.

expiredTime string

The expired time of package.

id string

The ID of the Network Package.

internetChargeType string

The internet charge type of package.

networkPackageId string

The ID of network package.

officeSiteId string

The ID of office site.

officeSiteName string

The name of office site.

status string

The status of network package. Valid values: Creating, InUse, Releasing,Released.

bandwidth int

The bandwidth of package.

create_time str

The creation time of network package.

eip_addresses Sequence[str]

The public IP address list of the network packet.

expired_time str

The expired time of package.

id str

The ID of the Network Package.

internet_charge_type str

The internet charge type of package.

network_package_id str

The ID of network package.

office_site_id str

The ID of office site.

office_site_name str

The name of office site.

status str

The status of network package. Valid values: Creating, InUse, Releasing,Released.

bandwidth Number

The bandwidth of package.

createTime String

The creation time of network package.

eipAddresses List<String>

The public IP address list of the network packet.

expiredTime String

The expired time of package.

id String

The ID of the Network Package.

internetChargeType String

The internet charge type of package.

networkPackageId String

The ID of network package.

officeSiteId String

The ID of office site.

officeSiteName String

The name of office site.

status String

The status of network package. Valid values: Creating, InUse, Releasing,Released.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.