Alibaba Cloud
getImages
This data source provides the Ecd Images of the current Alibaba Cloud user.
NOTE: Available in v1.146.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 = "your_simple_office_site_name",
});
var defaultBundles = Output.Create(AliCloud.Eds.GetBundles.InvokeAsync(new AliCloud.Eds.GetBundlesArgs
{
BundleType = "SYSTEM",
}));
var defaultEcdPolicyGroup = new AliCloud.Eds.EcdPolicyGroup("defaultEcdPolicyGroup", new AliCloud.Eds.EcdPolicyGroupArgs
{
PolicyGroupName = "your_policy_group_name",
Clipboard = "readwrite",
LocalDrive = "read",
AuthorizeAccessPolicyRules =
{
new AliCloud.Eds.Inputs.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs
{
Description = "example_value",
CidrIp = "1.2.3.4/24",
},
},
AuthorizeSecurityPolicyRules =
{
new AliCloud.Eds.Inputs.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs
{
Type = "inflow",
Policy = "accept",
Description = "example_value",
PortRange = "80/80",
IpProtocol = "TCP",
Priority = "1",
CidrIp = "0.0.0.0/0",
},
},
});
var defaultDesktop = new AliCloud.Eds.Desktop("defaultDesktop", new AliCloud.Eds.DesktopArgs
{
OfficeSiteId = defaultSimpleOfficeSite.Id,
PolicyGroupId = defaultEcdPolicyGroup.Id,
BundleId = defaultBundles.Apply(defaultBundles => defaultBundles.Bundles?[1]?.Id),
DesktopName = "your_desktop_name",
});
var defaultImage = new AliCloud.Eds.Image("defaultImage", new AliCloud.Eds.ImageArgs
{
ImageName = "your_image_name",
DesktopId = defaultDesktop.Id,
Description = "example_value",
});
var ids = AliCloud.Eds.GetImages.Invoke(new AliCloud.Eds.GetImagesInvokeArgs
{
Ids =
{
defaultImage.Id,
},
});
this.EcdImageId1 = ids.Apply(ids => ids.Images?[0]?.Id);
var nameRegex = defaultImage.ImageName.Apply(imageName => AliCloud.Eds.GetImages.Invoke(new AliCloud.Eds.GetImagesInvokeArgs
{
NameRegex = imageName,
}));
this.EcdImageId2 = nameRegex.Apply(nameRegex => nameRegex.Images?[0]?.Id);
}
[Output("ecdImageId1")]
public Output<string> EcdImageId1 { get; set; }
[Output("ecdImageId2")]
public Output<string> EcdImageId2 { 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("your_simple_office_site_name"),
})
if err != nil {
return err
}
defaultBundles, err := eds.GetBundles(ctx, &eds.GetBundlesArgs{
BundleType: pulumi.StringRef("SYSTEM"),
}, nil)
if err != nil {
return err
}
defaultEcdPolicyGroup, err := eds.NewEcdPolicyGroup(ctx, "defaultEcdPolicyGroup", &eds.EcdPolicyGroupArgs{
PolicyGroupName: pulumi.String("your_policy_group_name"),
Clipboard: pulumi.String("readwrite"),
LocalDrive: pulumi.String("read"),
AuthorizeAccessPolicyRules: eds.EcdPolicyGroupAuthorizeAccessPolicyRuleArray{
&eds.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs{
Description: pulumi.String("example_value"),
CidrIp: pulumi.String("1.2.3.4/24"),
},
},
AuthorizeSecurityPolicyRules: eds.EcdPolicyGroupAuthorizeSecurityPolicyRuleArray{
&eds.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs{
Type: pulumi.String("inflow"),
Policy: pulumi.String("accept"),
Description: pulumi.String("example_value"),
PortRange: pulumi.String("80/80"),
IpProtocol: pulumi.String("TCP"),
Priority: pulumi.String("1"),
CidrIp: pulumi.String("0.0.0.0/0"),
},
},
})
if err != nil {
return err
}
defaultDesktop, err := eds.NewDesktop(ctx, "defaultDesktop", &eds.DesktopArgs{
OfficeSiteId: defaultSimpleOfficeSite.ID(),
PolicyGroupId: defaultEcdPolicyGroup.ID(),
BundleId: pulumi.String(defaultBundles.Bundles[1].Id),
DesktopName: pulumi.String("your_desktop_name"),
})
if err != nil {
return err
}
defaultImage, err := eds.NewImage(ctx, "defaultImage", &eds.ImageArgs{
ImageName: pulumi.String("your_image_name"),
DesktopId: defaultDesktop.ID(),
Description: pulumi.String("example_value"),
})
if err != nil {
return err
}
ids := eds.GetImagesOutput(ctx, eds.GetImagesOutputArgs{
Ids: pulumi.StringArray{
defaultImage.ID(),
},
}, nil)
ctx.Export("ecdImageId1", ids.ApplyT(func(ids eds.GetImagesResult) (string, error) {
return ids.Images[0].Id, nil
}).(pulumi.StringOutput))
ctx.Export("ecdImageId2", nameRegex.ApplyT(func(nameRegex eds.GetImagesResult) (string, error) {
return nameRegex.Images[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="your_simple_office_site_name")
default_bundles = alicloud.eds.get_bundles(bundle_type="SYSTEM")
default_ecd_policy_group = alicloud.eds.EcdPolicyGroup("defaultEcdPolicyGroup",
policy_group_name="your_policy_group_name",
clipboard="readwrite",
local_drive="read",
authorize_access_policy_rules=[alicloud.eds.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs(
description="example_value",
cidr_ip="1.2.3.4/24",
)],
authorize_security_policy_rules=[alicloud.eds.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs(
type="inflow",
policy="accept",
description="example_value",
port_range="80/80",
ip_protocol="TCP",
priority="1",
cidr_ip="0.0.0.0/0",
)])
default_desktop = alicloud.eds.Desktop("defaultDesktop",
office_site_id=default_simple_office_site.id,
policy_group_id=default_ecd_policy_group.id,
bundle_id=default_bundles.bundles[1].id,
desktop_name="your_desktop_name")
default_image = alicloud.eds.Image("defaultImage",
image_name="your_image_name",
desktop_id=default_desktop.id,
description="example_value")
ids = alicloud.eds.get_images_output(ids=[default_image.id])
pulumi.export("ecdImageId1", ids.images[0].id)
name_regex = default_image.image_name.apply(lambda image_name: alicloud.eds.get_images_output(name_regex=image_name))
pulumi.export("ecdImageId2", name_regex.images[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: "your_simple_office_site_name",
});
const defaultBundles = alicloud.eds.getBundles({
bundleType: "SYSTEM",
});
const defaultEcdPolicyGroup = new alicloud.eds.EcdPolicyGroup("defaultEcdPolicyGroup", {
policyGroupName: "your_policy_group_name",
clipboard: "readwrite",
localDrive: "read",
authorizeAccessPolicyRules: [{
description: "example_value",
cidrIp: "1.2.3.4/24",
}],
authorizeSecurityPolicyRules: [{
type: "inflow",
policy: "accept",
description: "example_value",
portRange: "80/80",
ipProtocol: "TCP",
priority: "1",
cidrIp: "0.0.0.0/0",
}],
});
const defaultDesktop = new alicloud.eds.Desktop("defaultDesktop", {
officeSiteId: defaultSimpleOfficeSite.id,
policyGroupId: defaultEcdPolicyGroup.id,
bundleId: defaultBundles.then(defaultBundles => defaultBundles.bundles?[1]?.id),
desktopName: "your_desktop_name",
});
const defaultImage = new alicloud.eds.Image("defaultImage", {
imageName: "your_image_name",
desktopId: defaultDesktop.id,
description: "example_value",
});
const ids = alicloud.eds.getImagesOutput({
ids: [defaultImage.id],
});
export const ecdImageId1 = ids.apply(ids => ids.images?[0]?.id);
const nameRegex = defaultImage.imageName.apply(imageName => alicloud.eds.getImagesOutput({
nameRegex: imageName,
}));
export const ecdImageId2 = nameRegex.apply(nameRegex => nameRegex.images?[0]?.id);
Coming soon!
Using getImages
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 getImages(args: GetImagesArgs, opts?: InvokeOptions): Promise<GetImagesResult>
function getImagesOutput(args: GetImagesOutputArgs, opts?: InvokeOptions): Output<GetImagesResult>
def get_images(ids: Optional[Sequence[str]] = None,
image_type: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetImagesResult
def get_images_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
image_type: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetImagesResult]
func GetImages(ctx *Context, args *GetImagesArgs, opts ...InvokeOption) (*GetImagesResult, error)
func GetImagesOutput(ctx *Context, args *GetImagesOutputArgs, opts ...InvokeOption) GetImagesResultOutput
> Note: This function is named GetImages
in the Go SDK.
public static class GetImages
{
public static Task<GetImagesResult> InvokeAsync(GetImagesArgs args, InvokeOptions? opts = null)
public static Output<GetImagesResult> Invoke(GetImagesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: alicloud:eds/getImages:getImages
Arguments:
# Arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Image IDs.
- Image
Type string The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- Name
Regex string A regex string to filter results by Image name.
- Output
File string - Status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- Ids []string
A list of Image IDs.
- Image
Type string The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- Name
Regex string A regex string to filter results by Image name.
- Output
File string - Status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- ids List<String>
A list of Image IDs.
- image
Type String The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- name
Regex String A regex string to filter results by Image name.
- output
File String - status String
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- ids string[]
A list of Image IDs.
- image
Type string The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- name
Regex string A regex string to filter results by Image name.
- output
File string - status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- ids Sequence[str]
A list of Image IDs.
- image_
type str The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- name_
regex str A regex string to filter results by Image name.
- output_
file str - status str
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- ids List<String>
A list of Image IDs.
- image
Type String The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- name
Regex String A regex string to filter results by Image name.
- output
File String - status String
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
getImages Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Images
List<Pulumi.
Ali Cloud. Eds. Outputs. Get Images Image> - Names List<string>
- Image
Type string - Name
Regex string - Output
File string - Status string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Images
[]Get
Images Image - Names []string
- Image
Type string - Name
Regex string - Output
File string - Status string
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- images
List<Get
Images Image> - names List<String>
- image
Type String - name
Regex String - output
File String - status String
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- images
Get
Images Image[] - names string[]
- image
Type string - name
Regex string - output
File string - status string
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- images
Sequence[Get
Images Image] - names Sequence[str]
- image_
type str - name_
regex str - output_
file str - status str
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- images List<Property Map>
- names List<String>
- image
Type String - name
Regex String - output
File String - status String
Supporting Types
GetImagesImage
- Create
Time string The creation time of the image.
- Data
Disk intSize The size of data disk of the image.
- Description string
The description of the image.
- Gpu
Category bool The Gpu Category of the image.
- Id string
The ID of the Image.
- Image
Id string The image id of the image.
- Image
Name string The image name.
- Image
Type string The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- Os
Type string The os type of the image.
- Progress string
The progress of the image.
- Size int
The size of the image.
- Status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- Create
Time string The creation time of the image.
- Data
Disk intSize The size of data disk of the image.
- Description string
The description of the image.
- Gpu
Category bool The Gpu Category of the image.
- Id string
The ID of the Image.
- Image
Id string The image id of the image.
- Image
Name string The image name.
- Image
Type string The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- Os
Type string The os type of the image.
- Progress string
The progress of the image.
- Size int
The size of the image.
- Status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- create
Time String The creation time of the image.
- data
Disk IntegerSize The size of data disk of the image.
- description String
The description of the image.
- gpu
Category Boolean The Gpu Category of the image.
- id String
The ID of the Image.
- image
Id String The image id of the image.
- image
Name String The image name.
- image
Type String The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- os
Type String The os type of the image.
- progress String
The progress of the image.
- size Integer
The size of the image.
- status String
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- create
Time string The creation time of the image.
- data
Disk numberSize The size of data disk of the image.
- description string
The description of the image.
- gpu
Category boolean The Gpu Category of the image.
- id string
The ID of the Image.
- image
Id string The image id of the image.
- image
Name string The image name.
- image
Type string The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- os
Type string The os type of the image.
- progress string
The progress of the image.
- size number
The size of the image.
- status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- create_
time str The creation time of the image.
- data_
disk_ intsize The size of data disk of the image.
- description str
The description of the image.
- gpu_
category bool The Gpu Category of the image.
- id str
The ID of the Image.
- image_
id str The image id of the image.
- image_
name str The image name.
- image_
type str The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- os_
type str The os type of the image.
- progress str
The progress of the image.
- size int
The size of the image.
- status str
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- create
Time String The creation time of the image.
- data
Disk NumberSize The size of data disk of the image.
- description String
The description of the image.
- gpu
Category Boolean The Gpu Category of the image.
- id String
The ID of the Image.
- image
Id String The image id of the image.
- image
Name String The image name.
- image
Type String The image type of the image. Valid values:
SYSTEM
,CUSTOM
.- os
Type String The os type of the image.
- progress String
The progress of the image.
- size Number
The size of the image.
- status String
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.