1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. ComputeBmsTagsV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.ComputeBmsTagsV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Used to add tags to a BMS within OpenTelekomCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const bmsId = config.requireObject("bmsId");
    const addTags = new opentelekomcloud.ComputeBmsTagsV2("addTags", {
        serverId: bmsId,
        tags: ["tags_type_baremetal"],
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    bms_id = config.require_object("bmsId")
    add_tags = opentelekomcloud.ComputeBmsTagsV2("addTags",
        server_id=bms_id,
        tags=["tags_type_baremetal"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"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, "")
    		bmsId := cfg.RequireObject("bmsId")
    		_, err := opentelekomcloud.NewComputeBmsTagsV2(ctx, "addTags", &opentelekomcloud.ComputeBmsTagsV2Args{
    			ServerId: pulumi.Any(bmsId),
    			Tags: pulumi.StringArray{
    				pulumi.String("tags_type_baremetal"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var bmsId = config.RequireObject<dynamic>("bmsId");
        var addTags = new Opentelekomcloud.ComputeBmsTagsV2("addTags", new()
        {
            ServerId = bmsId,
            Tags = new[]
            {
                "tags_type_baremetal",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ComputeBmsTagsV2;
    import com.pulumi.opentelekomcloud.ComputeBmsTagsV2Args;
    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 bmsId = config.get("bmsId");
            var addTags = new ComputeBmsTagsV2("addTags", ComputeBmsTagsV2Args.builder()
                .serverId(bmsId)
                .tags("tags_type_baremetal")
                .build());
    
        }
    }
    
    configuration:
      bmsId:
        type: dynamic
    resources:
      addTags:
        type: opentelekomcloud:ComputeBmsTagsV2
        properties:
          serverId: ${bmsId}
          tags:
            - tags_type_baremetal
    

    Create ComputeBmsTagsV2 Resource

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

    Constructor syntax

    new ComputeBmsTagsV2(name: string, args: ComputeBmsTagsV2Args, opts?: CustomResourceOptions);
    @overload
    def ComputeBmsTagsV2(resource_name: str,
                         args: ComputeBmsTagsV2Args,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComputeBmsTagsV2(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         server_id: Optional[str] = None,
                         tags: Optional[Sequence[str]] = None,
                         compute_bms_tags_v2_id: Optional[str] = None,
                         region: Optional[str] = None,
                         timeouts: Optional[ComputeBmsTagsV2TimeoutsArgs] = None)
    func NewComputeBmsTagsV2(ctx *Context, name string, args ComputeBmsTagsV2Args, opts ...ResourceOption) (*ComputeBmsTagsV2, error)
    public ComputeBmsTagsV2(string name, ComputeBmsTagsV2Args args, CustomResourceOptions? opts = null)
    public ComputeBmsTagsV2(String name, ComputeBmsTagsV2Args args)
    public ComputeBmsTagsV2(String name, ComputeBmsTagsV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:ComputeBmsTagsV2
    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 ComputeBmsTagsV2Args
    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 ComputeBmsTagsV2Args
    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 ComputeBmsTagsV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputeBmsTagsV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputeBmsTagsV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var computeBmsTagsV2Resource = new Opentelekomcloud.ComputeBmsTagsV2("computeBmsTagsV2Resource", new()
    {
        ServerId = "string",
        Tags = new[]
        {
            "string",
        },
        ComputeBmsTagsV2Id = "string",
        Region = "string",
        Timeouts = new Opentelekomcloud.Inputs.ComputeBmsTagsV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := opentelekomcloud.NewComputeBmsTagsV2(ctx, "computeBmsTagsV2Resource", &opentelekomcloud.ComputeBmsTagsV2Args{
    	ServerId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ComputeBmsTagsV2Id: pulumi.String("string"),
    	Region:             pulumi.String("string"),
    	Timeouts: &opentelekomcloud.ComputeBmsTagsV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var computeBmsTagsV2Resource = new ComputeBmsTagsV2("computeBmsTagsV2Resource", ComputeBmsTagsV2Args.builder()
        .serverId("string")
        .tags("string")
        .computeBmsTagsV2Id("string")
        .region("string")
        .timeouts(ComputeBmsTagsV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    compute_bms_tags_v2_resource = opentelekomcloud.ComputeBmsTagsV2("computeBmsTagsV2Resource",
        server_id="string",
        tags=["string"],
        compute_bms_tags_v2_id="string",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const computeBmsTagsV2Resource = new opentelekomcloud.ComputeBmsTagsV2("computeBmsTagsV2Resource", {
        serverId: "string",
        tags: ["string"],
        computeBmsTagsV2Id: "string",
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: opentelekomcloud:ComputeBmsTagsV2
    properties:
        computeBmsTagsV2Id: string
        region: string
        serverId: string
        tags:
            - string
        timeouts:
            create: string
            delete: string
    

    ComputeBmsTagsV2 Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ComputeBmsTagsV2 resource accepts the following input properties:

    ServerId string
    The unique id of bare metal server.
    Tags List<string>
    The tags of a BMS. Changing this parameter creates a new resource.
    ComputeBmsTagsV2Id string
    Region string
    Timeouts ComputeBmsTagsV2Timeouts
    ServerId string
    The unique id of bare metal server.
    Tags []string
    The tags of a BMS. Changing this parameter creates a new resource.
    ComputeBmsTagsV2Id string
    Region string
    Timeouts ComputeBmsTagsV2TimeoutsArgs
    serverId String
    The unique id of bare metal server.
    tags List<String>
    The tags of a BMS. Changing this parameter creates a new resource.
    computeBmsTagsV2Id String
    region String
    timeouts ComputeBmsTagsV2Timeouts
    serverId string
    The unique id of bare metal server.
    tags string[]
    The tags of a BMS. Changing this parameter creates a new resource.
    computeBmsTagsV2Id string
    region string
    timeouts ComputeBmsTagsV2Timeouts
    server_id str
    The unique id of bare metal server.
    tags Sequence[str]
    The tags of a BMS. Changing this parameter creates a new resource.
    compute_bms_tags_v2_id str
    region str
    timeouts ComputeBmsTagsV2TimeoutsArgs
    serverId String
    The unique id of bare metal server.
    tags List<String>
    The tags of a BMS. Changing this parameter creates a new resource.
    computeBmsTagsV2Id String
    region String
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ComputeBmsTagsV2 Resource

    Get an existing ComputeBmsTagsV2 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?: ComputeBmsTagsV2State, opts?: CustomResourceOptions): ComputeBmsTagsV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compute_bms_tags_v2_id: Optional[str] = None,
            region: Optional[str] = None,
            server_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[ComputeBmsTagsV2TimeoutsArgs] = None) -> ComputeBmsTagsV2
    func GetComputeBmsTagsV2(ctx *Context, name string, id IDInput, state *ComputeBmsTagsV2State, opts ...ResourceOption) (*ComputeBmsTagsV2, error)
    public static ComputeBmsTagsV2 Get(string name, Input<string> id, ComputeBmsTagsV2State? state, CustomResourceOptions? opts = null)
    public static ComputeBmsTagsV2 get(String name, Output<String> id, ComputeBmsTagsV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:ComputeBmsTagsV2    get:      id: ${id}
    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:
    ComputeBmsTagsV2Id string
    Region string
    ServerId string
    The unique id of bare metal server.
    Tags List<string>
    The tags of a BMS. Changing this parameter creates a new resource.
    Timeouts ComputeBmsTagsV2Timeouts
    ComputeBmsTagsV2Id string
    Region string
    ServerId string
    The unique id of bare metal server.
    Tags []string
    The tags of a BMS. Changing this parameter creates a new resource.
    Timeouts ComputeBmsTagsV2TimeoutsArgs
    computeBmsTagsV2Id String
    region String
    serverId String
    The unique id of bare metal server.
    tags List<String>
    The tags of a BMS. Changing this parameter creates a new resource.
    timeouts ComputeBmsTagsV2Timeouts
    computeBmsTagsV2Id string
    region string
    serverId string
    The unique id of bare metal server.
    tags string[]
    The tags of a BMS. Changing this parameter creates a new resource.
    timeouts ComputeBmsTagsV2Timeouts
    compute_bms_tags_v2_id str
    region str
    server_id str
    The unique id of bare metal server.
    tags Sequence[str]
    The tags of a BMS. Changing this parameter creates a new resource.
    timeouts ComputeBmsTagsV2TimeoutsArgs
    computeBmsTagsV2Id String
    region String
    serverId String
    The unique id of bare metal server.
    tags List<String>
    The tags of a BMS. Changing this parameter creates a new resource.
    timeouts Property Map

    Supporting Types

    ComputeBmsTagsV2Timeouts, ComputeBmsTagsV2TimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    BMS tags can be imported using the server_id, e.g.

    $ pulumi import opentelekomcloud:index/computeBmsTagsV2:ComputeBmsTagsV2 add_tags 4779ab1c-7c1a-44b1-a02e-93dfc361b32d
    

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

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud