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.
- Output
File string - Status string
The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- Ids []string
A list of Network Package IDs.
- Output
File string - Status string
The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- ids List<String>
A list of Network Package IDs.
- output
File String - status String
The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- ids string[]
A list of Network Package IDs.
- output
File 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.
- output
File 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.
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 int
The bandwidth of package.
- Create
Time string The creation time of network package.
- Eip
Addresses List<string> The public IP address list of the network packet.
- Expired
Time string The expired time of package.
- Id string
The ID of the Network Package.
- Internet
Charge stringType The internet charge type of package.
- Network
Package stringId The ID of network package.
- Office
Site stringId The ID of office site.
- Office
Site stringName 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 string The creation time of network package.
- Eip
Addresses []string The public IP address list of the network packet.
- Expired
Time string The expired time of package.
- Id string
The ID of the Network Package.
- Internet
Charge stringType The internet charge type of package.
- Network
Package stringId The ID of network package.
- Office
Site stringId The ID of office site.
- Office
Site stringName The name of office site.
- Status string
The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- bandwidth Integer
The bandwidth of package.
- create
Time String The creation time of network package.
- eip
Addresses List<String> The public IP address list of the network packet.
- expired
Time String The expired time of package.
- id String
The ID of the Network Package.
- internet
Charge StringType The internet charge type of package.
- network
Package StringId The ID of network package.
- office
Site StringId The ID of office site.
- office
Site StringName The name of office site.
- status String
The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- bandwidth number
The bandwidth of package.
- create
Time string The creation time of network package.
- eip
Addresses string[] The public IP address list of the network packet.
- expired
Time string The expired time of package.
- id string
The ID of the Network Package.
- internet
Charge stringType The internet charge type of package.
- network
Package stringId The ID of network package.
- office
Site stringId The ID of office site.
- office
Site stringName 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_ strtype The internet charge type of package.
- network_
package_ strid The ID of network package.
- office_
site_ strid The ID of office site.
- office_
site_ strname The name of office site.
- status str
The status of network package. Valid values:
Creating
,InUse
,Releasing
,Released
.
- bandwidth Number
The bandwidth of package.
- create
Time String The creation time of network package.
- eip
Addresses List<String> The public IP address list of the network packet.
- expired
Time String The expired time of package.
- id String
The ID of the Network Package.
- internet
Charge StringType The internet charge type of package.
- network
Package StringId The ID of network package.
- office
Site StringId The ID of office site.
- office
Site StringName 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.