1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. compute
  5. NestServiceInstance
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.compute.NestServiceInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Compute Nest Service Instance resource.

    For information about Compute Nest Service Instance and how to use it, see What is Service Instance.

    NOTE: Available since v1.205.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tfexample";
    const defaultResourceGroups = alicloud.resourcemanager.getResourceGroups({});
    const defaultZones = alicloud.getZones({
        availableDiskCategory: "cloud_efficiency",
        availableResourceCreation: "VSwitch",
    });
    const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
        availabilityZone: defaultZones.zones?.[0]?.id,
        instanceTypeFamily: "ecs.sn1ne",
    }));
    const defaultImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_[0-9]+_[0-9]+_x64*",
        owners: "system",
    });
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
        vpcName: name,
        cidrBlock: "10.0.0.0/8",
    });
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        vswitchName: name,
        cidrBlock: "10.1.0.0/16",
        vpcId: defaultNetwork.id,
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetwork.id});
    const defaultInstance = new alicloud.ecs.Instance("defaultInstance", {
        imageId: defaultImages.then(defaultImages => defaultImages.images?.[0]?.id),
        instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?.[0]?.id),
        securityGroups: [defaultSecurityGroup].map(__item => __item.id),
        internetChargeType: "PayByTraffic",
        internetMaxBandwidthOut: 10,
        availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        instanceChargeType: "PostPaid",
        systemDiskCategory: "cloud_efficiency",
        vswitchId: defaultSwitch.id,
    });
    const defaultNestServiceInstance = new alicloud.compute.NestServiceInstance("defaultNestServiceInstance", {
        serviceId: "service-dd475e6e468348799f0f",
        serviceVersion: "1",
        serviceInstanceName: name,
        resourceGroupId: defaultResourceGroups.then(defaultResourceGroups => defaultResourceGroups.groups?.[0]?.id),
        paymentType: "Permanent",
        operationMetadata: {
            operationStartTime: "1681281179000",
            operationEndTime: "1681367579000",
            resources: pulumi.interpolate`    {
          "Type": "ResourceIds",
          "RegionId": "cn-hangzhou",
          "ResourceIds": {
          "ALIYUN::ECS::INSTANCE": [
            "${defaultInstance.id}"
            ]
          } 
        }
    `,
        },
        tags: {
            Created: "TF",
            For: "ServiceInstance",
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tfexample"
    default_resource_groups = alicloud.resourcemanager.get_resource_groups()
    default_zones = alicloud.get_zones(available_disk_category="cloud_efficiency",
        available_resource_creation="VSwitch")
    default_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_zones.zones[0].id,
        instance_type_family="ecs.sn1ne")
    default_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
        owners="system")
    default_network = alicloud.vpc.Network("defaultNetwork",
        vpc_name=name,
        cidr_block="10.0.0.0/8")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        vswitch_name=name,
        cidr_block="10.1.0.0/16",
        vpc_id=default_network.id,
        zone_id=default_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id)
    default_instance = alicloud.ecs.Instance("defaultInstance",
        image_id=default_images.images[0].id,
        instance_type=default_instance_types.instance_types[0].id,
        security_groups=[__item.id for __item in [default_security_group]],
        internet_charge_type="PayByTraffic",
        internet_max_bandwidth_out=10,
        availability_zone=default_zones.zones[0].id,
        instance_charge_type="PostPaid",
        system_disk_category="cloud_efficiency",
        vswitch_id=default_switch.id)
    default_nest_service_instance = alicloud.compute.NestServiceInstance("defaultNestServiceInstance",
        service_id="service-dd475e6e468348799f0f",
        service_version="1",
        service_instance_name=name,
        resource_group_id=default_resource_groups.groups[0].id,
        payment_type="Permanent",
        operation_metadata=alicloud.compute.NestServiceInstanceOperationMetadataArgs(
            operation_start_time="1681281179000",
            operation_end_time="1681367579000",
            resources=default_instance.id.apply(lambda id: f"""    {{
          "Type": "ResourceIds",
          "RegionId": "cn-hangzhou",
          "ResourceIds": {{
          "ALIYUN::ECS::INSTANCE": [
            "{id}"
            ]
          }} 
        }}
    """),
        ),
        tags={
            "Created": "TF",
            "For": "ServiceInstance",
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/compute"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    cfg := config.New(ctx, "")
    name := "tfexample";
    if param := cfg.Get("name"); param != ""{
    name = param
    }
    defaultResourceGroups, err := resourcemanager.GetResourceGroups(ctx, nil, nil);
    if err != nil {
    return err
    }
    defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
    AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    }, nil);
    if err != nil {
    return err
    }
    defaultInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    AvailabilityZone: pulumi.StringRef(defaultZones.Zones[0].Id),
    InstanceTypeFamily: pulumi.StringRef("ecs.sn1ne"),
    }, nil);
    if err != nil {
    return err
    }
    defaultImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    NameRegex: pulumi.StringRef("^ubuntu_[0-9]+_[0-9]+_x64*"),
    Owners: pulumi.StringRef("system"),
    }, nil);
    if err != nil {
    return err
    }
    defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
    VpcName: pulumi.String(name),
    CidrBlock: pulumi.String("10.0.0.0/8"),
    })
    if err != nil {
    return err
    }
    defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    VswitchName: pulumi.String(name),
    CidrBlock: pulumi.String("10.1.0.0/16"),
    VpcId: defaultNetwork.ID(),
    ZoneId: pulumi.String(defaultZones.Zones[0].Id),
    })
    if err != nil {
    return err
    }
    defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
    VpcId: defaultNetwork.ID(),
    })
    if err != nil {
    return err
    }
    var splat0 pulumi.StringArray
    for _, val0 := range %!v(PANIC=Format method: fatal: An assertion has failed: tok: ) {
    splat0 = append(splat0, val0.ID())
    }
    defaultInstance, err := ecs.NewInstance(ctx, "defaultInstance", &ecs.InstanceArgs{
    ImageId: pulumi.String(defaultImages.Images[0].Id),
    InstanceType: pulumi.String(defaultInstanceTypes.InstanceTypes[0].Id),
    SecurityGroups: splat0,
    InternetChargeType: pulumi.String("PayByTraffic"),
    InternetMaxBandwidthOut: pulumi.Int(10),
    AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
    InstanceChargeType: pulumi.String("PostPaid"),
    SystemDiskCategory: pulumi.String("cloud_efficiency"),
    VswitchId: defaultSwitch.ID(),
    })
    if err != nil {
    return err
    }
    _, err = compute.NewNestServiceInstance(ctx, "defaultNestServiceInstance", &compute.NestServiceInstanceArgs{
    ServiceId: pulumi.String("service-dd475e6e468348799f0f"),
    ServiceVersion: pulumi.String("1"),
    ServiceInstanceName: pulumi.String(name),
    ResourceGroupId: pulumi.String(defaultResourceGroups.Groups[0].Id),
    PaymentType: pulumi.String("Permanent"),
    OperationMetadata: &compute.NestServiceInstanceOperationMetadataArgs{
    OperationStartTime: pulumi.String("1681281179000"),
    OperationEndTime: pulumi.String("1681367579000"),
    Resources: defaultInstance.ID().ApplyT(func(id string) (string, error) {
    return fmt.Sprintf(`    {
          "Type": "ResourceIds",
          "RegionId": "cn-hangzhou",
          "ResourceIds": {
          "ALIYUN::ECS::INSTANCE": [
            "%v"
            ]
          } 
        }
    `, id), nil
    }).(pulumi.StringOutput),
    },
    Tags: pulumi.Map{
    "Created": pulumi.Any("TF"),
    "For": pulumi.Any("ServiceInstance"),
    },
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tfexample";
        var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableDiskCategory = "cloud_efficiency",
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            InstanceTypeFamily = "ecs.sn1ne",
        });
    
        var defaultImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
            Owners = "system",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            VpcName = name,
            CidrBlock = "10.0.0.0/8",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            VswitchName = name,
            CidrBlock = "10.1.0.0/16",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        {
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("defaultInstance", new()
        {
            ImageId = defaultImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SecurityGroups = new[]
            {
                defaultSecurityGroup,
            }.Select(__item => __item.Id).ToList(),
            InternetChargeType = "PayByTraffic",
            InternetMaxBandwidthOut = 10,
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            InstanceChargeType = "PostPaid",
            SystemDiskCategory = "cloud_efficiency",
            VswitchId = defaultSwitch.Id,
        });
    
        var defaultNestServiceInstance = new AliCloud.Compute.NestServiceInstance("defaultNestServiceInstance", new()
        {
            ServiceId = "service-dd475e6e468348799f0f",
            ServiceVersion = "1",
            ServiceInstanceName = name,
            ResourceGroupId = defaultResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
            PaymentType = "Permanent",
            OperationMetadata = new AliCloud.Compute.Inputs.NestServiceInstanceOperationMetadataArgs
            {
                OperationStartTime = "1681281179000",
                OperationEndTime = "1681367579000",
                Resources = defaultInstance.Id.Apply(id => @$"    {{
          ""Type"": ""ResourceIds"",
          ""RegionId"": ""cn-hangzhou"",
          ""ResourceIds"": {{
          ""ALIYUN::ECS::INSTANCE"": [
            ""{id}""
            ]
          }} 
        }}
    "),
            },
            Tags = 
            {
                { "Created", "TF" },
                { "For", "ServiceInstance" },
            },
        });
    
    });
    
    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.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.compute.NestServiceInstance;
    import com.pulumi.alicloud.compute.NestServiceInstanceArgs;
    import com.pulumi.alicloud.compute.inputs.NestServiceInstanceOperationMetadataArgs;
    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("tfexample");
            final var defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups();
    
            final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableDiskCategory("cloud_efficiency")
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceTypeFamily("ecs.sn1ne")
                .build());
    
            final var defaultImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
                .owners("system")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
                .vpcName(name)
                .cidrBlock("10.0.0.0/8")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()        
                .vswitchName(name)
                .cidrBlock("10.1.0.0/16")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()        
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .imageId(defaultImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .securityGroups(defaultSecurityGroup.stream().map(element -> element.id()).collect(toList()))
                .internetChargeType("PayByTraffic")
                .internetMaxBandwidthOut("10")
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceChargeType("PostPaid")
                .systemDiskCategory("cloud_efficiency")
                .vswitchId(defaultSwitch.id())
                .build());
    
            var defaultNestServiceInstance = new NestServiceInstance("defaultNestServiceInstance", NestServiceInstanceArgs.builder()        
                .serviceId("service-dd475e6e468348799f0f")
                .serviceVersion("1")
                .serviceInstanceName(name)
                .resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.groups()[0].id()))
                .paymentType("Permanent")
                .operationMetadata(NestServiceInstanceOperationMetadataArgs.builder()
                    .operationStartTime("1681281179000")
                    .operationEndTime("1681367579000")
                    .resources(defaultInstance.id().applyValue(id -> """
        {
          "Type": "ResourceIds",
          "RegionId": "cn-hangzhou",
          "ResourceIds": {
          "ALIYUN::ECS::INSTANCE": [
            "%s"
            ]
          } 
        }
    ", id)))
                    .build())
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "ServiceInstance")
                ))
                .build());
    
        }
    }
    
    Coming soon!
    

    Create NestServiceInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NestServiceInstance(name: string, args: NestServiceInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def NestServiceInstance(resource_name: str,
                            args: NestServiceInstanceArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def NestServiceInstance(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            service_id: Optional[str] = None,
                            service_version: Optional[str] = None,
                            operation_metadata: Optional[NestServiceInstanceOperationMetadataArgs] = None,
                            commodity: Optional[NestServiceInstanceCommodityArgs] = None,
                            parameters: Optional[str] = None,
                            payment_type: Optional[str] = None,
                            resource_group_id: Optional[str] = None,
                            enable_user_prometheus: Optional[bool] = None,
                            service_instance_name: Optional[str] = None,
                            enable_instance_ops: Optional[bool] = None,
                            specification_name: Optional[str] = None,
                            tags: Optional[Mapping[str, Any]] = None,
                            template_name: Optional[str] = None)
    func NewNestServiceInstance(ctx *Context, name string, args NestServiceInstanceArgs, opts ...ResourceOption) (*NestServiceInstance, error)
    public NestServiceInstance(string name, NestServiceInstanceArgs args, CustomResourceOptions? opts = null)
    public NestServiceInstance(String name, NestServiceInstanceArgs args)
    public NestServiceInstance(String name, NestServiceInstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:compute:NestServiceInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NestServiceInstanceArgs
    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 NestServiceInstanceArgs
    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 NestServiceInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NestServiceInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NestServiceInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var nestServiceInstanceResource = new AliCloud.Compute.NestServiceInstance("nestServiceInstanceResource", new()
    {
        ServiceId = "string",
        ServiceVersion = "string",
        OperationMetadata = new AliCloud.Compute.Inputs.NestServiceInstanceOperationMetadataArgs
        {
            OperatedServiceInstanceId = "string",
            OperationEndTime = "string",
            OperationStartTime = "string",
            Resources = "string",
        },
        Commodity = new AliCloud.Compute.Inputs.NestServiceInstanceCommodityArgs
        {
            PayPeriod = 0,
            PayPeriodUnit = "string",
        },
        Parameters = "string",
        PaymentType = "string",
        ResourceGroupId = "string",
        EnableUserPrometheus = false,
        ServiceInstanceName = "string",
        EnableInstanceOps = false,
        SpecificationName = "string",
        Tags = 
        {
            { "string", "any" },
        },
        TemplateName = "string",
    });
    
    example, err := compute.NewNestServiceInstance(ctx, "nestServiceInstanceResource", &compute.NestServiceInstanceArgs{
    	ServiceId:      pulumi.String("string"),
    	ServiceVersion: pulumi.String("string"),
    	OperationMetadata: &compute.NestServiceInstanceOperationMetadataArgs{
    		OperatedServiceInstanceId: pulumi.String("string"),
    		OperationEndTime:          pulumi.String("string"),
    		OperationStartTime:        pulumi.String("string"),
    		Resources:                 pulumi.String("string"),
    	},
    	Commodity: &compute.NestServiceInstanceCommodityArgs{
    		PayPeriod:     pulumi.Int(0),
    		PayPeriodUnit: pulumi.String("string"),
    	},
    	Parameters:           pulumi.String("string"),
    	PaymentType:          pulumi.String("string"),
    	ResourceGroupId:      pulumi.String("string"),
    	EnableUserPrometheus: pulumi.Bool(false),
    	ServiceInstanceName:  pulumi.String("string"),
    	EnableInstanceOps:    pulumi.Bool(false),
    	SpecificationName:    pulumi.String("string"),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	TemplateName: pulumi.String("string"),
    })
    
    var nestServiceInstanceResource = new NestServiceInstance("nestServiceInstanceResource", NestServiceInstanceArgs.builder()        
        .serviceId("string")
        .serviceVersion("string")
        .operationMetadata(NestServiceInstanceOperationMetadataArgs.builder()
            .operatedServiceInstanceId("string")
            .operationEndTime("string")
            .operationStartTime("string")
            .resources("string")
            .build())
        .commodity(NestServiceInstanceCommodityArgs.builder()
            .payPeriod(0)
            .payPeriodUnit("string")
            .build())
        .parameters("string")
        .paymentType("string")
        .resourceGroupId("string")
        .enableUserPrometheus(false)
        .serviceInstanceName("string")
        .enableInstanceOps(false)
        .specificationName("string")
        .tags(Map.of("string", "any"))
        .templateName("string")
        .build());
    
    nest_service_instance_resource = alicloud.compute.NestServiceInstance("nestServiceInstanceResource",
        service_id="string",
        service_version="string",
        operation_metadata=alicloud.compute.NestServiceInstanceOperationMetadataArgs(
            operated_service_instance_id="string",
            operation_end_time="string",
            operation_start_time="string",
            resources="string",
        ),
        commodity=alicloud.compute.NestServiceInstanceCommodityArgs(
            pay_period=0,
            pay_period_unit="string",
        ),
        parameters="string",
        payment_type="string",
        resource_group_id="string",
        enable_user_prometheus=False,
        service_instance_name="string",
        enable_instance_ops=False,
        specification_name="string",
        tags={
            "string": "any",
        },
        template_name="string")
    
    const nestServiceInstanceResource = new alicloud.compute.NestServiceInstance("nestServiceInstanceResource", {
        serviceId: "string",
        serviceVersion: "string",
        operationMetadata: {
            operatedServiceInstanceId: "string",
            operationEndTime: "string",
            operationStartTime: "string",
            resources: "string",
        },
        commodity: {
            payPeriod: 0,
            payPeriodUnit: "string",
        },
        parameters: "string",
        paymentType: "string",
        resourceGroupId: "string",
        enableUserPrometheus: false,
        serviceInstanceName: "string",
        enableInstanceOps: false,
        specificationName: "string",
        tags: {
            string: "any",
        },
        templateName: "string",
    });
    
    type: alicloud:compute:NestServiceInstance
    properties:
        commodity:
            payPeriod: 0
            payPeriodUnit: string
        enableInstanceOps: false
        enableUserPrometheus: false
        operationMetadata:
            operatedServiceInstanceId: string
            operationEndTime: string
            operationStartTime: string
            resources: string
        parameters: string
        paymentType: string
        resourceGroupId: string
        serviceId: string
        serviceInstanceName: string
        serviceVersion: string
        specificationName: string
        tags:
            string: any
        templateName: string
    

    NestServiceInstance 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 NestServiceInstance resource accepts the following input properties:

    ServiceId string
    The ID of the service.
    ServiceVersion string
    The version of the service.
    Commodity Pulumi.AliCloud.Compute.Inputs.NestServiceInstanceCommodity
    The order information of cloud market. See commodity below.
    EnableInstanceOps bool
    Whether the service instance has the O&M function. Default value: false. Valid values:
    EnableUserPrometheus bool
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    OperationMetadata Pulumi.AliCloud.Compute.Inputs.NestServiceInstanceOperationMetadata
    The configuration of O&M. See operation_metadata below.
    Parameters string
    The parameters entered by the deployment service instance.
    PaymentType string
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    ResourceGroupId string
    The ID of the resource group.
    ServiceInstanceName string
    The name of the Service Instance.
    SpecificationName string
    The name of the specification.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of the template.
    ServiceId string
    The ID of the service.
    ServiceVersion string
    The version of the service.
    Commodity NestServiceInstanceCommodityArgs
    The order information of cloud market. See commodity below.
    EnableInstanceOps bool
    Whether the service instance has the O&M function. Default value: false. Valid values:
    EnableUserPrometheus bool
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    OperationMetadata NestServiceInstanceOperationMetadataArgs
    The configuration of O&M. See operation_metadata below.
    Parameters string
    The parameters entered by the deployment service instance.
    PaymentType string
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    ResourceGroupId string
    The ID of the resource group.
    ServiceInstanceName string
    The name of the Service Instance.
    SpecificationName string
    The name of the specification.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of the template.
    serviceId String
    The ID of the service.
    serviceVersion String
    The version of the service.
    commodity NestServiceInstanceCommodity
    The order information of cloud market. See commodity below.
    enableInstanceOps Boolean
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enableUserPrometheus Boolean
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operationMetadata NestServiceInstanceOperationMetadata
    The configuration of O&M. See operation_metadata below.
    parameters String
    The parameters entered by the deployment service instance.
    paymentType String
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resourceGroupId String
    The ID of the resource group.
    serviceInstanceName String
    The name of the Service Instance.
    specificationName String
    The name of the specification.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    templateName String
    The name of the template.
    serviceId string
    The ID of the service.
    serviceVersion string
    The version of the service.
    commodity NestServiceInstanceCommodity
    The order information of cloud market. See commodity below.
    enableInstanceOps boolean
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enableUserPrometheus boolean
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operationMetadata NestServiceInstanceOperationMetadata
    The configuration of O&M. See operation_metadata below.
    parameters string
    The parameters entered by the deployment service instance.
    paymentType string
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resourceGroupId string
    The ID of the resource group.
    serviceInstanceName string
    The name of the Service Instance.
    specificationName string
    The name of the specification.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    templateName string
    The name of the template.
    service_id str
    The ID of the service.
    service_version str
    The version of the service.
    commodity NestServiceInstanceCommodityArgs
    The order information of cloud market. See commodity below.
    enable_instance_ops bool
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enable_user_prometheus bool
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operation_metadata NestServiceInstanceOperationMetadataArgs
    The configuration of O&M. See operation_metadata below.
    parameters str
    The parameters entered by the deployment service instance.
    payment_type str
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resource_group_id str
    The ID of the resource group.
    service_instance_name str
    The name of the Service Instance.
    specification_name str
    The name of the specification.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    template_name str
    The name of the template.
    serviceId String
    The ID of the service.
    serviceVersion String
    The version of the service.
    commodity Property Map
    The order information of cloud market. See commodity below.
    enableInstanceOps Boolean
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enableUserPrometheus Boolean
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operationMetadata Property Map
    The configuration of O&M. See operation_metadata below.
    parameters String
    The parameters entered by the deployment service instance.
    paymentType String
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resourceGroupId String
    The ID of the resource group.
    serviceInstanceName String
    The name of the Service Instance.
    specificationName String
    The name of the specification.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    templateName String
    The name of the template.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NestServiceInstance resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Service Instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Service Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Service Instance.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the Service Instance.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the Service Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Service Instance.

    Look up Existing NestServiceInstance Resource

    Get an existing NestServiceInstance 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?: NestServiceInstanceState, opts?: CustomResourceOptions): NestServiceInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            commodity: Optional[NestServiceInstanceCommodityArgs] = None,
            enable_instance_ops: Optional[bool] = None,
            enable_user_prometheus: Optional[bool] = None,
            operation_metadata: Optional[NestServiceInstanceOperationMetadataArgs] = None,
            parameters: Optional[str] = None,
            payment_type: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            service_id: Optional[str] = None,
            service_instance_name: Optional[str] = None,
            service_version: Optional[str] = None,
            specification_name: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            template_name: Optional[str] = None) -> NestServiceInstance
    func GetNestServiceInstance(ctx *Context, name string, id IDInput, state *NestServiceInstanceState, opts ...ResourceOption) (*NestServiceInstance, error)
    public static NestServiceInstance Get(string name, Input<string> id, NestServiceInstanceState? state, CustomResourceOptions? opts = null)
    public static NestServiceInstance get(String name, Output<String> id, NestServiceInstanceState 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.
    The following state arguments are supported:
    Commodity Pulumi.AliCloud.Compute.Inputs.NestServiceInstanceCommodity
    The order information of cloud market. See commodity below.
    EnableInstanceOps bool
    Whether the service instance has the O&M function. Default value: false. Valid values:
    EnableUserPrometheus bool
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    OperationMetadata Pulumi.AliCloud.Compute.Inputs.NestServiceInstanceOperationMetadata
    The configuration of O&M. See operation_metadata below.
    Parameters string
    The parameters entered by the deployment service instance.
    PaymentType string
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    ResourceGroupId string
    The ID of the resource group.
    ServiceId string
    The ID of the service.
    ServiceInstanceName string
    The name of the Service Instance.
    ServiceVersion string
    The version of the service.
    SpecificationName string
    The name of the specification.
    Status string
    The status of the Service Instance.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of the template.
    Commodity NestServiceInstanceCommodityArgs
    The order information of cloud market. See commodity below.
    EnableInstanceOps bool
    Whether the service instance has the O&M function. Default value: false. Valid values:
    EnableUserPrometheus bool
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    OperationMetadata NestServiceInstanceOperationMetadataArgs
    The configuration of O&M. See operation_metadata below.
    Parameters string
    The parameters entered by the deployment service instance.
    PaymentType string
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    ResourceGroupId string
    The ID of the resource group.
    ServiceId string
    The ID of the service.
    ServiceInstanceName string
    The name of the Service Instance.
    ServiceVersion string
    The version of the service.
    SpecificationName string
    The name of the specification.
    Status string
    The status of the Service Instance.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of the template.
    commodity NestServiceInstanceCommodity
    The order information of cloud market. See commodity below.
    enableInstanceOps Boolean
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enableUserPrometheus Boolean
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operationMetadata NestServiceInstanceOperationMetadata
    The configuration of O&M. See operation_metadata below.
    parameters String
    The parameters entered by the deployment service instance.
    paymentType String
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resourceGroupId String
    The ID of the resource group.
    serviceId String
    The ID of the service.
    serviceInstanceName String
    The name of the Service Instance.
    serviceVersion String
    The version of the service.
    specificationName String
    The name of the specification.
    status String
    The status of the Service Instance.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    templateName String
    The name of the template.
    commodity NestServiceInstanceCommodity
    The order information of cloud market. See commodity below.
    enableInstanceOps boolean
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enableUserPrometheus boolean
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operationMetadata NestServiceInstanceOperationMetadata
    The configuration of O&M. See operation_metadata below.
    parameters string
    The parameters entered by the deployment service instance.
    paymentType string
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resourceGroupId string
    The ID of the resource group.
    serviceId string
    The ID of the service.
    serviceInstanceName string
    The name of the Service Instance.
    serviceVersion string
    The version of the service.
    specificationName string
    The name of the specification.
    status string
    The status of the Service Instance.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    templateName string
    The name of the template.
    commodity NestServiceInstanceCommodityArgs
    The order information of cloud market. See commodity below.
    enable_instance_ops bool
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enable_user_prometheus bool
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operation_metadata NestServiceInstanceOperationMetadataArgs
    The configuration of O&M. See operation_metadata below.
    parameters str
    The parameters entered by the deployment service instance.
    payment_type str
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resource_group_id str
    The ID of the resource group.
    service_id str
    The ID of the service.
    service_instance_name str
    The name of the Service Instance.
    service_version str
    The version of the service.
    specification_name str
    The name of the specification.
    status str
    The status of the Service Instance.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    template_name str
    The name of the template.
    commodity Property Map
    The order information of cloud market. See commodity below.
    enableInstanceOps Boolean
    Whether the service instance has the O&M function. Default value: false. Valid values:
    enableUserPrometheus Boolean
    Whether Prometheus monitoring is enabled. Default value: false. Valid values:
    operationMetadata Property Map
    The configuration of O&M. See operation_metadata below.
    parameters String
    The parameters entered by the deployment service instance.
    paymentType String
    The type of payment. Valid values: Permanent, Subscription, PayAsYouGo, CustomFixTime.
    resourceGroupId String
    The ID of the resource group.
    serviceId String
    The ID of the service.
    serviceInstanceName String
    The name of the Service Instance.
    serviceVersion String
    The version of the service.
    specificationName String
    The name of the specification.
    status String
    The status of the Service Instance.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    templateName String
    The name of the template.

    Supporting Types

    NestServiceInstanceCommodity, NestServiceInstanceCommodityArgs

    PayPeriod int
    Length of purchase.
    PayPeriodUnit string
    Duration unit. Valid values: Year, Month, Day.
    PayPeriod int
    Length of purchase.
    PayPeriodUnit string
    Duration unit. Valid values: Year, Month, Day.
    payPeriod Integer
    Length of purchase.
    payPeriodUnit String
    Duration unit. Valid values: Year, Month, Day.
    payPeriod number
    Length of purchase.
    payPeriodUnit string
    Duration unit. Valid values: Year, Month, Day.
    pay_period int
    Length of purchase.
    pay_period_unit str
    Duration unit. Valid values: Year, Month, Day.
    payPeriod Number
    Length of purchase.
    payPeriodUnit String
    Duration unit. Valid values: Year, Month, Day.

    NestServiceInstanceOperationMetadata, NestServiceInstanceOperationMetadataArgs

    OperatedServiceInstanceId string
    The ID of the imported service instance.
    OperationEndTime string
    The end time of O&M.
    OperationStartTime string
    The start time of O&M.
    Resources string
    The list of imported resources.
    OperatedServiceInstanceId string
    The ID of the imported service instance.
    OperationEndTime string
    The end time of O&M.
    OperationStartTime string
    The start time of O&M.
    Resources string
    The list of imported resources.
    operatedServiceInstanceId String
    The ID of the imported service instance.
    operationEndTime String
    The end time of O&M.
    operationStartTime String
    The start time of O&M.
    resources String
    The list of imported resources.
    operatedServiceInstanceId string
    The ID of the imported service instance.
    operationEndTime string
    The end time of O&M.
    operationStartTime string
    The start time of O&M.
    resources string
    The list of imported resources.
    operated_service_instance_id str
    The ID of the imported service instance.
    operation_end_time str
    The end time of O&M.
    operation_start_time str
    The start time of O&M.
    resources str
    The list of imported resources.
    operatedServiceInstanceId String
    The ID of the imported service instance.
    operationEndTime String
    The end time of O&M.
    operationStartTime String
    The start time of O&M.
    resources String
    The list of imported resources.

    Import

    Compute Nest Service Instance can be imported using the id, e.g.

    $ pulumi import alicloud:compute/nestServiceInstance:NestServiceInstance example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi