Class Image


  • public class Image
    extends com.pulumi.resources.CustomResource
    Provides a ECD Image resource. For information about ECD Image and how to use it, see [What is Image](https://www.alibabacloud.com/help/en/wuying-workspace/developer-reference/api-ecd-2020-09-30-createimage). > **NOTE:** Available since v1.146.0. ## Example Usage Basic Usage ```java 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.EcdPolicyGroup; import com.pulumi.alicloud.eds.EcdPolicyGroupArgs; import com.pulumi.alicloud.eds.inputs.EcdPolicyGroupAuthorizeAccessPolicyRuleArgs; import com.pulumi.alicloud.eds.inputs.EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs; import com.pulumi.alicloud.eds.EdsFunctions; import com.pulumi.alicloud.eds.inputs.GetBundlesArgs; import com.pulumi.alicloud.eds.Desktop; import com.pulumi.alicloud.eds.DesktopArgs; import com.pulumi.alicloud.eds.Image; import com.pulumi.alicloud.eds.ImageArgs; 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) { final var config = ctx.config(); final var name = config.get("name").orElse("terraform-example"); var defaultSimpleOfficeSite = new SimpleOfficeSite("defaultSimpleOfficeSite", SimpleOfficeSiteArgs.builder() .cidrBlock("172.16.0.0/12") .enableAdminAccess(true) .desktopAccessType("Internet") .officeSiteName(name) .build()); var defaultEcdPolicyGroup = new EcdPolicyGroup("defaultEcdPolicyGroup", EcdPolicyGroupArgs.builder() .policyGroupName(name) .clipboard("read") .localDrive("read") .usbRedirect("off") .watermark("off") .authorizeAccessPolicyRules(EcdPolicyGroupAuthorizeAccessPolicyRuleArgs.builder() .description(name) .cidrIp("1.2.3.45/24") .build()) .authorizeSecurityPolicyRules(EcdPolicyGroupAuthorizeSecurityPolicyRuleArgs.builder() .type("inflow") .policy("accept") .description(name) .portRange("80/80") .ipProtocol("TCP") .priority("1") .cidrIp("1.2.3.4/24") .build()) .build()); final var defaultBundles = EdsFunctions.getBundles(GetBundlesArgs.builder() .bundleType("SYSTEM") .build()); var defaultDesktop = new Desktop("defaultDesktop", DesktopArgs.builder() .officeSiteId(defaultSimpleOfficeSite.id()) .policyGroupId(defaultEcdPolicyGroup.id()) .bundleId(defaultBundles.applyValue(getBundlesResult -> getBundlesResult.bundles()[1].id())) .desktopName(name) .build()); var defaultImage = new Image("defaultImage", ImageArgs.builder() .imageName(name) .desktopId(defaultDesktop.id()) .description(name) .build()); } } ``` ## Import ECD Image can be imported using the id, e.g. ```sh $ pulumi import alicloud:eds/image:Image example <id> ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Image​(java.lang.String name)  
      Image​(java.lang.String name, ImageArgs args)  
      Image​(java.lang.String name, ImageArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.String> desktopId()  
      static Image get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ImageState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageName()  
      com.pulumi.core.Output<java.lang.String> status()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Image

        public Image​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Image

        public Image​(java.lang.String name,
                     ImageArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Image

        public Image​(java.lang.String name,
                     ImageArgs args,
                     @Nullable
                     com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        The description of the image.
      • desktopId

        public com.pulumi.core.Output<java.lang.String> desktopId()
        Returns:
        The desktop id of the desktop.
      • imageName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageName()
        Returns:
        The name of the image.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        The status of the image. Valid values: `Creating`, `Available`, `CreateFailed`.
      • get

        public static Image get​(java.lang.String name,
                                com.pulumi.core.Output<java.lang.String> id,
                                @Nullable
                                ImageState state,
                                @Nullable
                                com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.