Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.eds.getNetworkPackages
Explore with Pulumi AI
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);
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)
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
})
}
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)),
};
});
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()));
}
}
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}
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)
public static Output<GetNetworkPackagesResult> getNetworkPackages(GetNetworkPackagesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:eds/getNetworkPackages:getNetworkPackages
arguments:
# arguments dictionary
The following arguments are supported:
- Ids
Changes to this property will trigger replacement.
- A list of Network Package IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status
Changes to this property will trigger replacement.
- The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- Ids
Changes to this property will trigger replacement.
- A list of Network Package IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status
Changes to this property will trigger replacement.
- The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- ids
Changes to this property will trigger replacement.
- A list of Network Package IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status
Changes to this property will trigger replacement.
- The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- ids
Changes to this property will trigger replacement.
- A list of Network Package IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status
Changes to this property will trigger replacement.
- The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- ids
Changes to this property will trigger replacement.
- 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.
- The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- ids
Changes to this property will trigger replacement.
- A list of Network Package IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status
Changes to this property will trigger replacement.
- 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.
Ali Cloud. Eds. Outputs. Get Network Packages Package> - Output
File string - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Packages
[]Get
Network Packages Package - Output
File string - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- packages
List<Get
Network Packages Package> - output
File String - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- packages
Get
Network Packages Package[] - output
File string - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- packages
Sequence[Get
Network Packages Package] - output_
file str - status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- packages List<Property Map>
- output
File String - status String
Supporting Types
GetNetworkPackagesPackage
- Bandwidth
This property is required. int - The bandwidth of package.
- Create
Time This property is required. string - The creation time of network package.
- Eip
Addresses This property is required. List<string> - The public IP address list of the network packet.
- Expired
Time This property is required. string - The expired time of package.
- Id
This property is required. string - The ID of the Network Package.
- Internet
Charge Type This property is required. string - The internet charge type of package.
- Network
Package Id This property is required. string - The ID of network package.
- Office
Site Id This property is required. string - The ID of office site.
- Office
Site Name 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. string - The creation time of network package.
- Eip
Addresses This property is required. []string - The public IP address list of the network packet.
- Expired
Time This property is required. string - The expired time of package.
- Id
This property is required. string - The ID of the Network Package.
- Internet
Charge Type This property is required. string - The internet charge type of package.
- Network
Package Id This property is required. string - The ID of network package.
- Office
Site Id This property is required. string - The ID of office site.
- Office
Site Name 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.
- create
Time This property is required. String - The creation time of network package.
- eip
Addresses This property is required. List<String> - The public IP address list of the network packet.
- expired
Time This property is required. String - The expired time of package.
- id
This property is required. String - The ID of the Network Package.
- internet
Charge Type This property is required. String - The internet charge type of package.
- network
Package Id This property is required. String - The ID of network package.
- office
Site Id This property is required. String - The ID of office site.
- office
Site Name 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.
- create
Time This property is required. string - The creation time of network package.
- eip
Addresses This property is required. string[] - The public IP address list of the network packet.
- expired
Time This property is required. string - The expired time of package.
- id
This property is required. string - The ID of the Network Package.
- internet
Charge Type This property is required. string - The internet charge type of package.
- network
Package Id This property is required. string - The ID of network package.
- office
Site Id This property is required. string - The ID of office site.
- office
Site Name 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.
- create
Time This property is required. String - The creation time of network package.
- eip
Addresses This property is required. List<String> - The public IP address list of the network packet.
- expired
Time This property is required. String - The expired time of package.
- id
This property is required. String - The ID of the Network Package.
- internet
Charge Type This property is required. String - The internet charge type of package.
- network
Package Id This property is required. String - The ID of network package.
- office
Site Id This property is required. String - The ID of office site.
- office
Site Name 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.