1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. eds
  5. getNetworkPackages
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.eds.getNetworkPackages

Explore with Pulumi AI

Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

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

NOTE: Available in v1.142.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultSimpleOfficeSite = new alicloud.eds.SimpleOfficeSite("default", {
    cidrBlock: "172.16.0.0/12",
    desktopAccessType: "Internet",
    officeSiteName: "example_value",
});
const defaultNetworkPackage = new alicloud.eds.NetworkPackage("default", {
    bandwidth: 10,
    officeSiteId: defaultSimpleOfficeSite.id,
});
const _default = alicloud.eds.getNetworkPackagesOutput({
    ids: [defaultNetworkPackage.id],
});
export const ecdNetworkPackageId1 = _default.apply(_default => _default.packages?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

default_simple_office_site = alicloud.eds.SimpleOfficeSite("default",
    cidr_block="172.16.0.0/12",
    desktop_access_type="Internet",
    office_site_name="example_value")
default_network_package = alicloud.eds.NetworkPackage("default",
    bandwidth=10,
    office_site_id=default_simple_office_site.id)
default = alicloud.eds.get_network_packages_output(ids=[default_network_package.id])
pulumi.export("ecdNetworkPackageId1", default.packages[0].id)
Copy
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, "default", &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, "default", &eds.NetworkPackageArgs{
Bandwidth: pulumi.Int(10),
OfficeSiteId: defaultSimpleOfficeSite.ID(),
})
if err != nil {
return err
}
_default := eds.GetNetworkPackagesOutput(ctx, eds.GetNetworkPackagesOutputArgs{
Ids: pulumi.StringArray{
defaultNetworkPackage.ID(),
},
}, nil);
ctx.Export("ecdNetworkPackageId1", _default.ApplyT(func(_default eds.GetNetworkPackagesResult) (*string, error) {
return &default.Packages[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

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

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

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

    return new Dictionary<string, object?>
    {
        ["ecdNetworkPackageId1"] = @default.Apply(@default => @default.Apply(getNetworkPackagesResult => getNetworkPackagesResult.Packages[0]?.Id)),
    };
});
Copy
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 default = EdsFunctions.getNetworkPackages(GetNetworkPackagesArgs.builder()
            .ids(defaultNetworkPackage.id())
            .build());

        ctx.export("ecdNetworkPackageId1", default_.applyValue(default_ -> default_.packages()[0].id()));
    }
}
Copy
resources:
  defaultSimpleOfficeSite:
    type: alicloud:eds:SimpleOfficeSite
    name: default
    properties:
      cidrBlock: 172.16.0.0/12
      desktopAccessType: Internet
      officeSiteName: example_value
  defaultNetworkPackage:
    type: alicloud:eds:NetworkPackage
    name: default
    properties:
      bandwidth: '10'
      officeSiteId: ${defaultSimpleOfficeSite.id}
variables:
  default:
    fn::invoke:
      function: alicloud:eds:getNetworkPackages
      arguments:
        ids:
          - ${defaultNetworkPackage.id}
outputs:
  ecdNetworkPackageId1: ${default.packages[0].id}
Copy

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>
Copy
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]
Copy
func GetNetworkPackages(ctx *Context, args *GetNetworkPackagesArgs, opts ...InvokeOption) (*GetNetworkPackagesResult, error)
func GetNetworkPackagesOutput(ctx *Context, args *GetNetworkPackagesOutputArgs, opts ...InvokeOption) GetNetworkPackagesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetNetworkPackagesResult> getNetworkPackages(GetNetworkPackagesArgs args, InvokeOptions options)
public static Output<GetNetworkPackagesResult> getNetworkPackages(GetNetworkPackagesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:eds/getNetworkPackages:getNetworkPackages
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of Network Package IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of network package. Valid values: Creating, InUse, Releasing,Released.
Ids Changes to this property will trigger replacement. []string
A list of Network Package IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of network package. Valid values: Creating, InUse, Releasing,Released.
ids Changes to this property will trigger replacement. List<String>
A list of Network Package IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of network package. Valid values: Creating, InUse, Releasing,Released.
ids Changes to this property will trigger replacement. string[]
A list of Network Package IDs.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. string
The status of network package. Valid values: Creating, InUse, Releasing,Released.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Network Package IDs.
output_file str
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. str
The status of network package. Valid values: Creating, InUse, Releasing,Released.
ids Changes to this property will trigger replacement. List<String>
A list of Network Package IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. 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 This property is required. int
The bandwidth of package.
CreateTime This property is required. string
The creation time of network package.
EipAddresses This property is required. List<string>
The public IP address list of the network packet.
ExpiredTime This property is required. string
The expired time of package.
Id This property is required. string
The ID of the Network Package.
InternetChargeType This property is required. string
The internet charge type of package.
NetworkPackageId This property is required. string
The ID of network package.
OfficeSiteId This property is required. string
The ID of office site.
OfficeSiteName This property is required. string
The name of office site.
Status This property is required. string
The status of network package. Valid values: Creating, InUse, Releasing,Released.
Bandwidth This property is required. int
The bandwidth of package.
CreateTime This property is required. string
The creation time of network package.
EipAddresses This property is required. []string
The public IP address list of the network packet.
ExpiredTime This property is required. string
The expired time of package.
Id This property is required. string
The ID of the Network Package.
InternetChargeType This property is required. string
The internet charge type of package.
NetworkPackageId This property is required. string
The ID of network package.
OfficeSiteId This property is required. string
The ID of office site.
OfficeSiteName This property is required. string
The name of office site.
Status This property is required. string
The status of network package. Valid values: Creating, InUse, Releasing,Released.
bandwidth This property is required. Integer
The bandwidth of package.
createTime This property is required. String
The creation time of network package.
eipAddresses This property is required. List<String>
The public IP address list of the network packet.
expiredTime This property is required. String
The expired time of package.
id This property is required. String
The ID of the Network Package.
internetChargeType This property is required. String
The internet charge type of package.
networkPackageId This property is required. String
The ID of network package.
officeSiteId This property is required. String
The ID of office site.
officeSiteName This property is required. String
The name of office site.
status This property is required. String
The status of network package. Valid values: Creating, InUse, Releasing,Released.
bandwidth This property is required. number
The bandwidth of package.
createTime This property is required. string
The creation time of network package.
eipAddresses This property is required. string[]
The public IP address list of the network packet.
expiredTime This property is required. string
The expired time of package.
id This property is required. string
The ID of the Network Package.
internetChargeType This property is required. string
The internet charge type of package.
networkPackageId This property is required. string
The ID of network package.
officeSiteId This property is required. string
The ID of office site.
officeSiteName This property is required. string
The name of office site.
status This property is required. string
The status of network package. Valid values: Creating, InUse, Releasing,Released.
bandwidth This property is required. int
The bandwidth of package.
create_time This property is required. str
The creation time of network package.
eip_addresses This property is required. Sequence[str]
The public IP address list of the network packet.
expired_time This property is required. str
The expired time of package.
id This property is required. str
The ID of the Network Package.
internet_charge_type This property is required. str
The internet charge type of package.
network_package_id This property is required. str
The ID of network package.
office_site_id This property is required. str
The ID of office site.
office_site_name This property is required. str
The name of office site.
status This property is required. str
The status of network package. Valid values: Creating, InUse, Releasing,Released.
bandwidth This property is required. Number
The bandwidth of package.
createTime This property is required. String
The creation time of network package.
eipAddresses This property is required. List<String>
The public IP address list of the network packet.
expiredTime This property is required. String
The expired time of package.
id This property is required. String
The ID of the Network Package.
internetChargeType This property is required. String
The internet charge type of package.
networkPackageId This property is required. String
The ID of network package.
officeSiteId This property is required. String
The ID of office site.
officeSiteName This property is required. String
The name of office site.
status This property is required. 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.
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi