EcsImageComponentArgs

data class EcsImageComponentArgs(val componentType: Output<String>? = null, val componentVersion: Output<String>? = null, val content: Output<String>? = null, val description: Output<String>? = null, val imageComponentName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val systemType: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<EcsImageComponentArgs>

Provides a ECS Image Component resource. For information about ECS Image Component and how to use it, see What is Image Component.

NOTE: Available since v1.159.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.resourcemanager.getResourceGroups({
nameRegex: "default",
});
const example = new alicloud.ecs.EcsImageComponent("example", {
componentType: "Build",
content: "RUN yum update -y",
description: "example_value",
imageComponentName: "example_value",
resourceGroupId: _default.then(_default => _default.groups?.[0]?.id),
systemType: "Linux",
tags: {
Created: "TF",
},
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.resourcemanager.get_resource_groups(name_regex="default")
example = alicloud.ecs.EcsImageComponent("example",
component_type="Build",
content="RUN yum update -y",
description="example_value",
image_component_name="example_value",
resource_group_id=default.groups[0].id,
system_type="Linux",
tags={
"Created": "TF",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
NameRegex = "default",
});
var example = new AliCloud.Ecs.EcsImageComponent("example", new()
{
ComponentType = "Build",
Content = "RUN yum update -y",
Description = "example_value",
ImageComponentName = "example_value",
ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id)),
SystemType = "Linux",
Tags =
{
{ "Created", "TF" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
NameRegex: pulumi.StringRef("default"),
}, nil)
if err != nil {
return err
}
_, err = ecs.NewEcsImageComponent(ctx, "example", &ecs.EcsImageComponentArgs{
ComponentType: pulumi.String("Build"),
Content: pulumi.String("RUN yum update -y"),
Description: pulumi.String("example_value"),
ImageComponentName: pulumi.String("example_value"),
ResourceGroupId: pulumi.String(_default.Groups[0].Id),
SystemType: pulumi.String("Linux"),
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.ecs.EcsImageComponent;
import com.pulumi.alicloud.ecs.EcsImageComponentArgs;
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 default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.nameRegex("default")
.build());
var example = new EcsImageComponent("example", EcsImageComponentArgs.builder()
.componentType("Build")
.content("RUN yum update -y")
.description("example_value")
.imageComponentName("example_value")
.resourceGroupId(default_.groups()[0].id())
.systemType("Linux")
.tags(Map.of("Created", "TF"))
.build());
}
}
resources:
example:
type: alicloud:ecs:EcsImageComponent
properties:
componentType: Build
content: RUN yum update -y
description: example_value
imageComponentName: example_value
resourceGroupId: ${default.groups[0].id}
systemType: Linux
tags:
Created: TF
variables:
default:
fn::invoke:
function: alicloud:resourcemanager:getResourceGroups
arguments:
nameRegex: default

Import

ECS Image Component can be imported using the id, e.g.

$ pulumi import alicloud:ecs/ecsImageComponent:EcsImageComponent example <id>

Constructors

Link copied to clipboard
constructor(componentType: Output<String>? = null, componentVersion: Output<String>? = null, content: Output<String>? = null, description: Output<String>? = null, imageComponentName: Output<String>? = null, resourceGroupId: Output<String>? = null, systemType: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val componentType: Output<String>? = null

The component type. Supports mirrored build components and test components. Value range:

Link copied to clipboard
val componentVersion: Output<String>? = null

The component version number, which is used in conjunction with the component name, is in the format of major.minor.patch and is a non-negative integer. Default value:(x +1).0.0, where x is the maximum major version of the current component.

Link copied to clipboard
val content: Output<String>? = null

Component content. Consists of multiple commands. The maximum number of commands cannot exceed 127. Details of supported commands and command formats,

Link copied to clipboard
val description: Output<String>? = null

Description information. It must be 2 to 256 characters in length and cannot start with http:// or https.

Link copied to clipboard
val imageComponentName: Output<String>? = null

The component name. It must be 2 to 128 characters in length and start with an uppercase letter or a Chinese character. It cannot start with http:// or https. Can contain Chinese, English, numbers, half-length colons (:), underscores (_), half-length periods (.), or dashes (-).

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the enterprise resource group to which the created image component belongs.

Link copied to clipboard
val systemType: Output<String>? = null

The operating system supported by the component. Value range:

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

List of label key-value pairs.

Functions

Link copied to clipboard
open override fun toJava(): EcsImageComponentArgs