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

ibm.AppidRole

Explore with Pulumi AI

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

    Create, update, or delete an IBM Cloud AppID Management Services role resource. For more information, see creating roles with API

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const role = new ibm.AppidRole("role", {
        tenantId: _var.tenant_id,
        accesses: [{
            applicationId: _var.client_id,
            scopes: [
                "scope1",
                "scope2",
            ],
        }],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    role = ibm.AppidRole("role",
        tenant_id=var["tenant_id"],
        accesses=[{
            "application_id": var["client_id"],
            "scopes": [
                "scope1",
                "scope2",
            ],
        }])
    
    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.NewAppidRole(ctx, "role", &ibm.AppidRoleArgs{
    			TenantId: pulumi.Any(_var.Tenant_id),
    			Accesses: ibm.AppidRoleAccessArray{
    				&ibm.AppidRoleAccessArgs{
    					ApplicationId: pulumi.Any(_var.Client_id),
    					Scopes: pulumi.StringArray{
    						pulumi.String("scope1"),
    						pulumi.String("scope2"),
    					},
    				},
    			},
    		})
    		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 role = new Ibm.AppidRole("role", new()
        {
            TenantId = @var.Tenant_id,
            Accesses = new[]
            {
                new Ibm.Inputs.AppidRoleAccessArgs
                {
                    ApplicationId = @var.Client_id,
                    Scopes = new[]
                    {
                        "scope1",
                        "scope2",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.AppidRole;
    import com.pulumi.ibm.AppidRoleArgs;
    import com.pulumi.ibm.inputs.AppidRoleAccessArgs;
    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 role = new AppidRole("role", AppidRoleArgs.builder()
                .tenantId(var_.tenant_id())
                .accesses(AppidRoleAccessArgs.builder()
                    .applicationId(var_.client_id())
                    .scopes(                
                        "scope1",
                        "scope2")
                    .build())
                .build());
    
        }
    }
    
    resources:
      role:
        type: ibm:AppidRole
        properties:
          tenantId: ${var.tenant_id}
          accesses:
            - applicationId: ${var.client_id}
              scopes:
                - scope1
                - scope2
    

    Create AppidRole Resource

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

    Constructor syntax

    new AppidRole(name: string, args: AppidRoleArgs, opts?: CustomResourceOptions);
    @overload
    def AppidRole(resource_name: str,
                  args: AppidRoleArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AppidRole(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  tenant_id: Optional[str] = None,
                  accesses: Optional[Sequence[AppidRoleAccessArgs]] = None,
                  appid_role_id: Optional[str] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None)
    func NewAppidRole(ctx *Context, name string, args AppidRoleArgs, opts ...ResourceOption) (*AppidRole, error)
    public AppidRole(string name, AppidRoleArgs args, CustomResourceOptions? opts = null)
    public AppidRole(String name, AppidRoleArgs args)
    public AppidRole(String name, AppidRoleArgs args, CustomResourceOptions options)
    
    type: ibm:AppidRole
    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 AppidRoleArgs
    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 AppidRoleArgs
    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 AppidRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AppidRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AppidRoleArgs
    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 appidRoleResource = new Ibm.AppidRole("appidRoleResource", new()
    {
        TenantId = "string",
        Accesses = new[]
        {
            new Ibm.Inputs.AppidRoleAccessArgs
            {
                ApplicationId = "string",
                Scopes = new[]
                {
                    "string",
                },
            },
        },
        AppidRoleId = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := ibm.NewAppidRole(ctx, "appidRoleResource", &ibm.AppidRoleArgs{
    	TenantId: pulumi.String("string"),
    	Accesses: ibm.AppidRoleAccessArray{
    		&ibm.AppidRoleAccessArgs{
    			ApplicationId: pulumi.String("string"),
    			Scopes: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	AppidRoleId: pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var appidRoleResource = new AppidRole("appidRoleResource", AppidRoleArgs.builder()
        .tenantId("string")
        .accesses(AppidRoleAccessArgs.builder()
            .applicationId("string")
            .scopes("string")
            .build())
        .appidRoleId("string")
        .description("string")
        .name("string")
        .build());
    
    appid_role_resource = ibm.AppidRole("appidRoleResource",
        tenant_id="string",
        accesses=[{
            "application_id": "string",
            "scopes": ["string"],
        }],
        appid_role_id="string",
        description="string",
        name="string")
    
    const appidRoleResource = new ibm.AppidRole("appidRoleResource", {
        tenantId: "string",
        accesses: [{
            applicationId: "string",
            scopes: ["string"],
        }],
        appidRoleId: "string",
        description: "string",
        name: "string",
    });
    
    type: ibm:AppidRole
    properties:
        accesses:
            - applicationId: string
              scopes:
                - string
        appidRoleId: string
        description: string
        name: string
        tenantId: string
    

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

    TenantId string
    The AppID instance GUID
    Accesses List<AppidRoleAccess>

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    AppidRoleId string
    Description string
    Optional role description
    Name string
    The AppID role name
    TenantId string
    The AppID instance GUID
    Accesses []AppidRoleAccessArgs

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    AppidRoleId string
    Description string
    Optional role description
    Name string
    The AppID role name
    tenantId String
    The AppID instance GUID
    accesses List<AppidRoleAccess>

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appidRoleId String
    description String
    Optional role description
    name String
    The AppID role name
    tenantId string
    The AppID instance GUID
    accesses AppidRoleAccess[]

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appidRoleId string
    description string
    Optional role description
    name string
    The AppID role name
    tenant_id str
    The AppID instance GUID
    accesses Sequence[AppidRoleAccessArgs]

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appid_role_id str
    description str
    Optional role description
    name str
    The AppID role name
    tenantId String
    The AppID instance GUID
    accesses List<Property Map>

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appidRoleId String
    description String
    Optional role description
    name String
    The AppID role name

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string
    (String) The AppID role identifier
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string
    (String) The AppID role identifier
    id String
    The provider-assigned unique ID for this managed resource.
    roleId String
    (String) The AppID role identifier
    id string
    The provider-assigned unique ID for this managed resource.
    roleId string
    (String) The AppID role identifier
    id str
    The provider-assigned unique ID for this managed resource.
    role_id str
    (String) The AppID role identifier
    id String
    The provider-assigned unique ID for this managed resource.
    roleId String
    (String) The AppID role identifier

    Look up Existing AppidRole Resource

    Get an existing AppidRole 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?: AppidRoleState, opts?: CustomResourceOptions): AppidRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accesses: Optional[Sequence[AppidRoleAccessArgs]] = None,
            appid_role_id: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            role_id: Optional[str] = None,
            tenant_id: Optional[str] = None) -> AppidRole
    func GetAppidRole(ctx *Context, name string, id IDInput, state *AppidRoleState, opts ...ResourceOption) (*AppidRole, error)
    public static AppidRole Get(string name, Input<string> id, AppidRoleState? state, CustomResourceOptions? opts = null)
    public static AppidRole get(String name, Output<String> id, AppidRoleState state, CustomResourceOptions options)
    resources:  _:    type: ibm:AppidRole    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:
    Accesses List<AppidRoleAccess>

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    AppidRoleId string
    Description string
    Optional role description
    Name string
    The AppID role name
    RoleId string
    (String) The AppID role identifier
    TenantId string
    The AppID instance GUID
    Accesses []AppidRoleAccessArgs

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    AppidRoleId string
    Description string
    Optional role description
    Name string
    The AppID role name
    RoleId string
    (String) The AppID role identifier
    TenantId string
    The AppID instance GUID
    accesses List<AppidRoleAccess>

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appidRoleId String
    description String
    Optional role description
    name String
    The AppID role name
    roleId String
    (String) The AppID role identifier
    tenantId String
    The AppID instance GUID
    accesses AppidRoleAccess[]

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appidRoleId string
    description string
    Optional role description
    name string
    The AppID role name
    roleId string
    (String) The AppID role identifier
    tenantId string
    The AppID instance GUID
    accesses Sequence[AppidRoleAccessArgs]

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appid_role_id str
    description str
    Optional role description
    name str
    The AppID role name
    role_id str
    (String) The AppID role identifier
    tenant_id str
    The AppID instance GUID
    accesses List<Property Map>

    A set of access policies that bind specific application scopes to the role

    Nested scheme for access:

    appidRoleId String
    description String
    Optional role description
    name String
    The AppID role name
    roleId String
    (String) The AppID role identifier
    tenantId String
    The AppID instance GUID

    Supporting Types

    AppidRoleAccess, AppidRoleAccessArgs

    ApplicationId string
    AppID application identifier
    Scopes List<string>
    A list of AppID application scopes
    ApplicationId string
    AppID application identifier
    Scopes []string
    A list of AppID application scopes
    applicationId String
    AppID application identifier
    scopes List<String>
    A list of AppID application scopes
    applicationId string
    AppID application identifier
    scopes string[]
    A list of AppID application scopes
    application_id str
    AppID application identifier
    scopes Sequence[str]
    A list of AppID application scopes
    applicationId String
    AppID application identifier
    scopes List<String>
    A list of AppID application scopes

    Import

    The ibm_appid_role resource can be imported by using the AppID tenant ID and role ID.

    Syntax

    bash

    $ pulumi import ibm:index/appidRole:AppidRole role <tenant_id>/<role_id>
    

    Example

    bash

    $ pulumi import ibm:index/appidRole:AppidRole role 5fa344a8-d361-4bc2-9051-58ca253f4b2b/03cd638a-b35a-43f2-a58a-c2d3fe26aaea
    

    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