ibm.AppidRole
Explore with Pulumi AI
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:
- Tenant
Id string - The AppID instance GUID
- Accesses
List<Appid
Role Access> A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- Appid
Role stringId - Description string
- Optional role description
- Name string
- The AppID role name
- Tenant
Id string - The AppID instance GUID
- Accesses
[]Appid
Role Access Args A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- Appid
Role stringId - Description string
- Optional role description
- Name string
- The AppID role name
- tenant
Id String - The AppID instance GUID
- accesses
List<Appid
Role Access> A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- appid
Role StringId - description String
- Optional role description
- name String
- The AppID role name
- tenant
Id string - The AppID instance GUID
- accesses
Appid
Role Access[] A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- appid
Role stringId - description string
- Optional role description
- name string
- The AppID role name
- tenant_
id str - The AppID instance GUID
- accesses
Sequence[Appid
Role Access Args] A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- appid_
role_ strid - description str
- Optional role description
- name str
- The AppID role name
- tenant
Id 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
:- appid
Role StringId - 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:
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.
- Accesses
List<Appid
Role Access> A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- Appid
Role stringId - Description string
- Optional role description
- Name string
- The AppID role name
- Role
Id string - (String) The AppID role identifier
- Tenant
Id string - The AppID instance GUID
- Accesses
[]Appid
Role Access Args A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- Appid
Role stringId - Description string
- Optional role description
- Name string
- The AppID role name
- Role
Id string - (String) The AppID role identifier
- Tenant
Id string - The AppID instance GUID
- accesses
List<Appid
Role Access> A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- appid
Role StringId - description String
- Optional role description
- name String
- The AppID role name
- role
Id String - (String) The AppID role identifier
- tenant
Id String - The AppID instance GUID
- accesses
Appid
Role Access[] A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- appid
Role stringId - description string
- Optional role description
- name string
- The AppID role name
- role
Id string - (String) The AppID role identifier
- tenant
Id string - The AppID instance GUID
- accesses
Sequence[Appid
Role Access Args] A set of access policies that bind specific application scopes to the role
Nested scheme for
access
:- appid_
role_ strid - 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
:- appid
Role StringId - description String
- Optional role description
- name String
- The AppID role name
- role
Id String - (String) The AppID role identifier
- tenant
Id String - The AppID instance GUID
Supporting Types
AppidRoleAccess, AppidRoleAccessArgs
- Application
Id string - AppID application identifier
- Scopes List<string>
- A list of AppID application scopes
- Application
Id string - AppID application identifier
- Scopes []string
- A list of AppID application scopes
- application
Id String - AppID application identifier
- scopes List<String>
- A list of AppID application scopes
- application
Id 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
- application
Id 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.