Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.21.0 published on Tuesday, Jun 14, 2022 by Pulumi

getNetworkPackages

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

NOTE: Available in v1.142.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultSimpleOfficeSite = new AliCloud.Eds.SimpleOfficeSite("defaultSimpleOfficeSite", new AliCloud.Eds.SimpleOfficeSiteArgs
        {
            CidrBlock = "172.16.0.0/12",
            DesktopAccessType = "Internet",
            OfficeSiteName = "example_value",
        });
        var defaultNetworkPackage = new AliCloud.Eds.NetworkPackage("defaultNetworkPackage", new AliCloud.Eds.NetworkPackageArgs
        {
            Bandwidth = 10,
            OfficeSiteId = defaultSimpleOfficeSite.Id,
        });
        var defaultNetworkPackages = AliCloud.Eds.GetNetworkPackages.Invoke(new AliCloud.Eds.GetNetworkPackagesInvokeArgs
        {
            Ids = 
            {
                defaultNetworkPackage.Id,
            },
        });
        this.EcdNetworkPackageId1 = defaultNetworkPackages.Apply(defaultNetworkPackages => defaultNetworkPackages.Packages?[0]?.Id);
    }

    [Output("ecdNetworkPackageId1")]
    public Output<string> EcdNetworkPackageId1 { get; set; }
}
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.StringOutput))
		return nil
	})
}

Coming soon!

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);

Coming soon!

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.

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.

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.

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.

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.

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.

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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.