1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getIdentityRoleCustomV3
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.getIdentityRoleCustomV3

Explore with Pulumi AI

Up-to-date reference of API arguments for IAM role you can get at documentation portal

Use this data source to get the info of custom OpenTelekomCloud role.

For pre-defined user roles usage please refer to opentelekomcloud.IdentityRoleV3

Example Usage

Querying custom role by display_name

import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";

const authAdmin = opentelekomcloud.getIdentityRoleCustomV3({
    displayName: "my-custom-policy",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

auth_admin = opentelekomcloud.get_identity_role_custom_v3(display_name="my-custom-policy")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.GetIdentityRoleCustomV3(ctx, &opentelekomcloud.GetIdentityRoleCustomV3Args{
			DisplayName: pulumi.StringRef("my-custom-policy"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var authAdmin = Opentelekomcloud.GetIdentityRoleCustomV3.Invoke(new()
    {
        DisplayName = "my-custom-policy",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetIdentityRoleCustomV3Args;
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 authAdmin = OpentelekomcloudFunctions.getIdentityRoleCustomV3(GetIdentityRoleCustomV3Args.builder()
            .displayName("my-custom-policy")
            .build());

    }
}
Copy
variables:
  authAdmin:
    fn::invoke:
      function: opentelekomcloud:getIdentityRoleCustomV3
      arguments:
        displayName: my-custom-policy
Copy

Querying custom role by resource id

import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";

const authAdmin = opentelekomcloud.getIdentityRoleCustomV3({
    id: "13f0e753101649699664672d7b7af752",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

auth_admin = opentelekomcloud.get_identity_role_custom_v3(id="13f0e753101649699664672d7b7af752")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.GetIdentityRoleCustomV3(ctx, &opentelekomcloud.GetIdentityRoleCustomV3Args{
			Id: pulumi.StringRef("13f0e753101649699664672d7b7af752"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var authAdmin = Opentelekomcloud.GetIdentityRoleCustomV3.Invoke(new()
    {
        Id = "13f0e753101649699664672d7b7af752",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetIdentityRoleCustomV3Args;
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 authAdmin = OpentelekomcloudFunctions.getIdentityRoleCustomV3(GetIdentityRoleCustomV3Args.builder()
            .id("13f0e753101649699664672d7b7af752")
            .build());

    }
}
Copy
variables:
  authAdmin:
    fn::invoke:
      function: opentelekomcloud:getIdentityRoleCustomV3
      arguments:
        id: 13f0e753101649699664672d7b7af752
Copy

Using getIdentityRoleCustomV3

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getIdentityRoleCustomV3(args: GetIdentityRoleCustomV3Args, opts?: InvokeOptions): Promise<GetIdentityRoleCustomV3Result>
function getIdentityRoleCustomV3Output(args: GetIdentityRoleCustomV3OutputArgs, opts?: InvokeOptions): Output<GetIdentityRoleCustomV3Result>
Copy
def get_identity_role_custom_v3(display_name: Optional[str] = None,
                                id: Optional[str] = None,
                                type: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetIdentityRoleCustomV3Result
def get_identity_role_custom_v3_output(display_name: Optional[pulumi.Input[str]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                type: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetIdentityRoleCustomV3Result]
Copy
func GetIdentityRoleCustomV3(ctx *Context, args *GetIdentityRoleCustomV3Args, opts ...InvokeOption) (*GetIdentityRoleCustomV3Result, error)
func GetIdentityRoleCustomV3Output(ctx *Context, args *GetIdentityRoleCustomV3OutputArgs, opts ...InvokeOption) GetIdentityRoleCustomV3ResultOutput
Copy

> Note: This function is named GetIdentityRoleCustomV3 in the Go SDK.

public static class GetIdentityRoleCustomV3 
{
    public static Task<GetIdentityRoleCustomV3Result> InvokeAsync(GetIdentityRoleCustomV3Args args, InvokeOptions? opts = null)
    public static Output<GetIdentityRoleCustomV3Result> Invoke(GetIdentityRoleCustomV3InvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIdentityRoleCustomV3Result> getIdentityRoleCustomV3(GetIdentityRoleCustomV3Args args, InvokeOptions options)
public static Output<GetIdentityRoleCustomV3Result> getIdentityRoleCustomV3(GetIdentityRoleCustomV3Args args, InvokeOptions options)
Copy
fn::invoke:
  function: opentelekomcloud:index/getIdentityRoleCustomV3:getIdentityRoleCustomV3
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DisplayName string
The name of the role.
Id string
The id of custom role.
Type string
Display layer of a role.
DisplayName string
The name of the role.
Id string
The id of custom role.
Type string
Display layer of a role.
displayName String
The name of the role.
id String
The id of custom role.
type String
Display layer of a role.
displayName string
The name of the role.
id string
The id of custom role.
type string
Display layer of a role.
display_name str
The name of the role.
id str
The id of custom role.
type str
Display layer of a role.
displayName String
The name of the role.
id String
The id of custom role.
type String
Display layer of a role.

getIdentityRoleCustomV3 Result

The following output properties are available:

Description string
Description of a role.
DisplayName string
DomainId string
ID of the domain to which a role belongs
Id string
Name string
Name of a role
Statements List<GetIdentityRoleCustomV3Statement>
Statement: The Statement field contains the Effect and Action elements. Effect indicates whether the policy allows or denies access. Action indicates authorization items. The number of statements cannot exceed 8. Structure is documented below.
Type string
Description string
Description of a role.
DisplayName string
DomainId string
ID of the domain to which a role belongs
Id string
Name string
Name of a role
Statements []GetIdentityRoleCustomV3Statement
Statement: The Statement field contains the Effect and Action elements. Effect indicates whether the policy allows or denies access. Action indicates authorization items. The number of statements cannot exceed 8. Structure is documented below.
Type string
description String
Description of a role.
displayName String
domainId String
ID of the domain to which a role belongs
id String
name String
Name of a role
statements List<GetIdentityRoleCustomV3Statement>
Statement: The Statement field contains the Effect and Action elements. Effect indicates whether the policy allows or denies access. Action indicates authorization items. The number of statements cannot exceed 8. Structure is documented below.
type String
description string
Description of a role.
displayName string
domainId string
ID of the domain to which a role belongs
id string
name string
Name of a role
statements GetIdentityRoleCustomV3Statement[]
Statement: The Statement field contains the Effect and Action elements. Effect indicates whether the policy allows or denies access. Action indicates authorization items. The number of statements cannot exceed 8. Structure is documented below.
type string
description str
Description of a role.
display_name str
domain_id str
ID of the domain to which a role belongs
id str
name str
Name of a role
statements Sequence[GetIdentityRoleCustomV3Statement]
Statement: The Statement field contains the Effect and Action elements. Effect indicates whether the policy allows or denies access. Action indicates authorization items. The number of statements cannot exceed 8. Structure is documented below.
type str
description String
Description of a role.
displayName String
domainId String
ID of the domain to which a role belongs
id String
name String
Name of a role
statements List<Property Map>
Statement: The Statement field contains the Effect and Action elements. Effect indicates whether the policy allows or denies access. Action indicates authorization items. The number of statements cannot exceed 8. Structure is documented below.
type String

Supporting Types

GetIdentityRoleCustomV3Statement

Actions This property is required. List<string>
Permission set, which specifies the operation permissions on resources. The number of permission sets cannot exceed 100. Format: The value format is Service name:Resource type:Action, for example, vpc:ports:create. Service name: indicates the product name, such as ecs, evs, or vpc. Only lowercase letters are allowed. Resource type and Action: The values are case-insensitive, and the wildcard () are allowed. A wildcard () can represent all or part of information about resource types and actions for the specific service.
Condition This property is required. string
The conditions for the permission to take effect.
Effect This property is required. string
The value can be Allow and Deny. If both Allow and Deny are found in statements, the policy evaluation starts with Deny.
Resources This property is required. List<string>
The resources which will be granted/denied accesses. Format: Service:*:*:resource:resource_path. Examples: KMS:*:*:KeyId:your_key, OBS:*:*:bucket:your_bucket, OBS:*:*:object:your_object.
Actions This property is required. []string
Permission set, which specifies the operation permissions on resources. The number of permission sets cannot exceed 100. Format: The value format is Service name:Resource type:Action, for example, vpc:ports:create. Service name: indicates the product name, such as ecs, evs, or vpc. Only lowercase letters are allowed. Resource type and Action: The values are case-insensitive, and the wildcard () are allowed. A wildcard () can represent all or part of information about resource types and actions for the specific service.
Condition This property is required. string
The conditions for the permission to take effect.
Effect This property is required. string
The value can be Allow and Deny. If both Allow and Deny are found in statements, the policy evaluation starts with Deny.
Resources This property is required. []string
The resources which will be granted/denied accesses. Format: Service:*:*:resource:resource_path. Examples: KMS:*:*:KeyId:your_key, OBS:*:*:bucket:your_bucket, OBS:*:*:object:your_object.
actions This property is required. List<String>
Permission set, which specifies the operation permissions on resources. The number of permission sets cannot exceed 100. Format: The value format is Service name:Resource type:Action, for example, vpc:ports:create. Service name: indicates the product name, such as ecs, evs, or vpc. Only lowercase letters are allowed. Resource type and Action: The values are case-insensitive, and the wildcard () are allowed. A wildcard () can represent all or part of information about resource types and actions for the specific service.
condition This property is required. String
The conditions for the permission to take effect.
effect This property is required. String
The value can be Allow and Deny. If both Allow and Deny are found in statements, the policy evaluation starts with Deny.
resources This property is required. List<String>
The resources which will be granted/denied accesses. Format: Service:*:*:resource:resource_path. Examples: KMS:*:*:KeyId:your_key, OBS:*:*:bucket:your_bucket, OBS:*:*:object:your_object.
actions This property is required. string[]
Permission set, which specifies the operation permissions on resources. The number of permission sets cannot exceed 100. Format: The value format is Service name:Resource type:Action, for example, vpc:ports:create. Service name: indicates the product name, such as ecs, evs, or vpc. Only lowercase letters are allowed. Resource type and Action: The values are case-insensitive, and the wildcard () are allowed. A wildcard () can represent all or part of information about resource types and actions for the specific service.
condition This property is required. string
The conditions for the permission to take effect.
effect This property is required. string
The value can be Allow and Deny. If both Allow and Deny are found in statements, the policy evaluation starts with Deny.
resources This property is required. string[]
The resources which will be granted/denied accesses. Format: Service:*:*:resource:resource_path. Examples: KMS:*:*:KeyId:your_key, OBS:*:*:bucket:your_bucket, OBS:*:*:object:your_object.
actions This property is required. Sequence[str]
Permission set, which specifies the operation permissions on resources. The number of permission sets cannot exceed 100. Format: The value format is Service name:Resource type:Action, for example, vpc:ports:create. Service name: indicates the product name, such as ecs, evs, or vpc. Only lowercase letters are allowed. Resource type and Action: The values are case-insensitive, and the wildcard () are allowed. A wildcard () can represent all or part of information about resource types and actions for the specific service.
condition This property is required. str
The conditions for the permission to take effect.
effect This property is required. str
The value can be Allow and Deny. If both Allow and Deny are found in statements, the policy evaluation starts with Deny.
resources This property is required. Sequence[str]
The resources which will be granted/denied accesses. Format: Service:*:*:resource:resource_path. Examples: KMS:*:*:KeyId:your_key, OBS:*:*:bucket:your_bucket, OBS:*:*:object:your_object.
actions This property is required. List<String>
Permission set, which specifies the operation permissions on resources. The number of permission sets cannot exceed 100. Format: The value format is Service name:Resource type:Action, for example, vpc:ports:create. Service name: indicates the product name, such as ecs, evs, or vpc. Only lowercase letters are allowed. Resource type and Action: The values are case-insensitive, and the wildcard () are allowed. A wildcard () can represent all or part of information about resource types and actions for the specific service.
condition This property is required. String
The conditions for the permission to take effect.
effect This property is required. String
The value can be Allow and Deny. If both Allow and Deny are found in statements, the policy evaluation starts with Deny.
resources This property is required. List<String>
The resources which will be granted/denied accesses. Format: Service:*:*:resource:resource_path. Examples: KMS:*:*:KeyId:your_key, OBS:*:*:bucket:your_bucket, OBS:*:*:object:your_object.

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.