opentelekomcloud.ComputeBmsTagsV2
Explore with Pulumi AI
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:
- Server
Id string - The unique id of bare metal server.
- List<string>
- The tags of a BMS. Changing this parameter creates a new resource.
- string
- Region string
- Timeouts
Compute
Bms Tags V2Timeouts
- Server
Id string - The unique id of bare metal server.
- []string
- The tags of a BMS. Changing this parameter creates a new resource.
- string
- Region string
- Timeouts
Compute
Bms Tags V2Timeouts Args
- server
Id String - The unique id of bare metal server.
- List<String>
- The tags of a BMS. Changing this parameter creates a new resource.
- String
- region String
- timeouts
Compute
Bms Tags V2Timeouts
- server
Id string - The unique id of bare metal server.
- string[]
- The tags of a BMS. Changing this parameter creates a new resource.
- string
- region string
- timeouts
Compute
Bms Tags V2Timeouts
- server_
id str - The unique id of bare metal server.
- Sequence[str]
- The tags of a BMS. Changing this parameter creates a new resource.
- str
- region str
- timeouts
Compute
Bms Tags V2Timeouts Args
- server
Id String - The unique id of bare metal server.
- List<String>
- The tags of a BMS. Changing this parameter creates a new resource.
- 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.
- string
- Region string
- Server
Id string - The unique id of bare metal server.
- List<string>
- The tags of a BMS. Changing this parameter creates a new resource.
- Timeouts
Compute
Bms Tags V2Timeouts
- string
- Region string
- Server
Id string - The unique id of bare metal server.
- []string
- The tags of a BMS. Changing this parameter creates a new resource.
- Timeouts
Compute
Bms Tags V2Timeouts Args
- String
- region String
- server
Id String - The unique id of bare metal server.
- List<String>
- The tags of a BMS. Changing this parameter creates a new resource.
- timeouts
Compute
Bms Tags V2Timeouts
- string
- region string
- server
Id string - The unique id of bare metal server.
- string[]
- The tags of a BMS. Changing this parameter creates a new resource.
- timeouts
Compute
Bms Tags V2Timeouts
- str
- region str
- server_
id str - The unique id of bare metal server.
- Sequence[str]
- The tags of a BMS. Changing this parameter creates a new resource.
- timeouts
Compute
Bms Tags V2Timeouts Args
- String
- region String
- server
Id String - The unique id of bare metal server.
- List<String>
- The tags of a BMS. Changing this parameter creates a new resource.
- timeouts Property Map
Supporting Types
ComputeBmsTagsV2Timeouts, ComputeBmsTagsV2TimeoutsArgs
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.