Alibaba Cloud
Image
Provides a ECD Image resource.
For information about ECD Image and how to use it, see What is Image.
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",
});
}
}
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
}
_, 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
}
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")
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",
});
Coming soon!
Create a Image Resource
new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);
@overload
def Image(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
desktop_id: Optional[str] = None,
image_name: Optional[str] = None)
@overload
def Image(resource_name: str,
args: ImageArgs,
opts: Optional[ResourceOptions] = None)
func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)
public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)
type: alicloud:eds:Image
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Image Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Image resource accepts the following input properties:
- Desktop
Id string The desktop id of the desktop.
- Description string
The description of the image.
- Image
Name string The name of the image.
- Desktop
Id string The desktop id of the desktop.
- Description string
The description of the image.
- Image
Name string The name of the image.
- desktop
Id String The desktop id of the desktop.
- description String
The description of the image.
- image
Name String The name of the image.
- desktop
Id string The desktop id of the desktop.
- description string
The description of the image.
- image
Name string The name of the image.
- desktop_
id str The desktop id of the desktop.
- description str
The description of the image.
- image_
name str The name of the image.
- desktop
Id String The desktop id of the desktop.
- description String
The description of the image.
- image
Name String The name of the image.
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
Look up an Existing Image Resource
Get an existing Image resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ImageState, opts?: CustomResourceOptions): Image
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
desktop_id: Optional[str] = None,
image_name: Optional[str] = None,
status: Optional[str] = None) -> Image
func GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)
public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)
public static Image get(String name, Output<String> id, ImageState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
The description of the image.
- Desktop
Id string The desktop id of the desktop.
- Image
Name string The name of the image.
- Status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- Description string
The description of the image.
- Desktop
Id string The desktop id of the desktop.
- Image
Name string The name of the image.
- Status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- description String
The description of the image.
- desktop
Id String The desktop id of the desktop.
- image
Name String The name of the image.
- status String
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- description string
The description of the image.
- desktop
Id string The desktop id of the desktop.
- image
Name string The name of the image.
- status string
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- description str
The description of the image.
- desktop_
id str The desktop id of the desktop.
- image_
name str The name of the image.
- status str
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
- description String
The description of the image.
- desktop
Id String The desktop id of the desktop.
- image
Name String The name of the image.
- status String
The status of the image. Valid values:
Creating
,Available
,CreateFailed
.
Import
ECD Image can be imported using the id, e.g.
$ pulumi import alicloud:eds/image:Image example <id>
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.