1. Packages
  2. Ibm Provider
  3. API Docs
  4. IamAccessTag
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.IamAccessTag

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create or delete IBM Cloud access management tags. For more information, about access tags, see IBM Cloud access management tags.

    Example Usage

    The following example enables you to create access management tags

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = new ibm.IamAccessTag("example", {});
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.IamAccessTag("example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewIamAccessTag(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ibm.IamAccessTag("example");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IamAccessTag;
    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) {
            var example = new IamAccessTag("example");
    
        }
    }
    
    resources:
      example:
        type: ibm:IamAccessTag
    

    Attributes reference

    In addition to all argument reference list, you can access the following attribute reference after your resource is created.

    • id - (String) The unique identifier of the access tag. Same as name.
    • tag_type - (String) Type of the tag(access)

    Create IamAccessTag Resource

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

    Constructor syntax

    new IamAccessTag(name: string, args?: IamAccessTagArgs, opts?: CustomResourceOptions);
    @overload
    def IamAccessTag(resource_name: str,
                     args: Optional[IamAccessTagArgs] = None,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamAccessTag(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     iam_access_tag_id: Optional[str] = None,
                     name: Optional[str] = None)
    func NewIamAccessTag(ctx *Context, name string, args *IamAccessTagArgs, opts ...ResourceOption) (*IamAccessTag, error)
    public IamAccessTag(string name, IamAccessTagArgs? args = null, CustomResourceOptions? opts = null)
    public IamAccessTag(String name, IamAccessTagArgs args)
    public IamAccessTag(String name, IamAccessTagArgs args, CustomResourceOptions options)
    
    type: ibm:IamAccessTag
    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 IamAccessTagArgs
    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 IamAccessTagArgs
    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 IamAccessTagArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamAccessTagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamAccessTagArgs
    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 iamAccessTagResource = new Ibm.IamAccessTag("iamAccessTagResource", new()
    {
        IamAccessTagId = "string",
        Name = "string",
    });
    
    example, err := ibm.NewIamAccessTag(ctx, "iamAccessTagResource", &ibm.IamAccessTagArgs{
    	IamAccessTagId: pulumi.String("string"),
    	Name:           pulumi.String("string"),
    })
    
    var iamAccessTagResource = new IamAccessTag("iamAccessTagResource", IamAccessTagArgs.builder()
        .iamAccessTagId("string")
        .name("string")
        .build());
    
    iam_access_tag_resource = ibm.IamAccessTag("iamAccessTagResource",
        iam_access_tag_id="string",
        name="string")
    
    const iamAccessTagResource = new ibm.IamAccessTag("iamAccessTagResource", {
        iamAccessTagId: "string",
        name: "string",
    });
    
    type: ibm:IamAccessTag
    properties:
        iamAccessTagId: string
        name: string
    

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

    IamAccessTagId string
    Name string
    The name of the access management tag.
    IamAccessTagId string
    Name string
    The name of the access management tag.
    iamAccessTagId String
    name String
    The name of the access management tag.
    iamAccessTagId string
    name string
    The name of the access management tag.
    iam_access_tag_id str
    name str
    The name of the access management tag.
    iamAccessTagId String
    name String
    The name of the access management tag.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TagType string
    Type of the tag(access)
    Id string
    The provider-assigned unique ID for this managed resource.
    TagType string
    Type of the tag(access)
    id String
    The provider-assigned unique ID for this managed resource.
    tagType String
    Type of the tag(access)
    id string
    The provider-assigned unique ID for this managed resource.
    tagType string
    Type of the tag(access)
    id str
    The provider-assigned unique ID for this managed resource.
    tag_type str
    Type of the tag(access)
    id String
    The provider-assigned unique ID for this managed resource.
    tagType String
    Type of the tag(access)

    Look up Existing IamAccessTag Resource

    Get an existing IamAccessTag 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?: IamAccessTagState, opts?: CustomResourceOptions): IamAccessTag
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            iam_access_tag_id: Optional[str] = None,
            name: Optional[str] = None,
            tag_type: Optional[str] = None) -> IamAccessTag
    func GetIamAccessTag(ctx *Context, name string, id IDInput, state *IamAccessTagState, opts ...ResourceOption) (*IamAccessTag, error)
    public static IamAccessTag Get(string name, Input<string> id, IamAccessTagState? state, CustomResourceOptions? opts = null)
    public static IamAccessTag get(String name, Output<String> id, IamAccessTagState state, CustomResourceOptions options)
    resources:  _:    type: ibm:IamAccessTag    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:
    IamAccessTagId string
    Name string
    The name of the access management tag.
    TagType string
    Type of the tag(access)
    IamAccessTagId string
    Name string
    The name of the access management tag.
    TagType string
    Type of the tag(access)
    iamAccessTagId String
    name String
    The name of the access management tag.
    tagType String
    Type of the tag(access)
    iamAccessTagId string
    name string
    The name of the access management tag.
    tagType string
    Type of the tag(access)
    iam_access_tag_id str
    name str
    The name of the access management tag.
    tag_type str
    Type of the tag(access)
    iamAccessTagId String
    name String
    The name of the access management tag.
    tagType String
    Type of the tag(access)

    Import

    The ibm_iam_access_tag resource can be imported by using the name.

    Syntax

    $ pulumi import ibm:index/iamAccessTag:IamAccessTag tag tag_name
    

    Example

    Example for importing access tags.

    Syntax

    $ pulumi import ibm:index/iamAccessTag:IamAccessTag tag tag_name
    

    Example

    $ pulumi import ibm:index/iamAccessTag:IamAccessTag tag example:test
    

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

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud