Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.19.0 published on Friday, Mar 18, 2022 by Pulumi

getKubernetesPermission

This data source provides a list of Ram user permissions.

NOTE: Available in v1.122.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var usersDs = Output.Create(AliCloud.Ram.GetUsers.InvokeAsync(new AliCloud.Ram.GetUsersArgs
        {
            NameRegex = "your_user_name",
        }));
        var @default = usersDs.Apply(usersDs => Output.Create(AliCloud.CS.GetKubernetesPermission.InvokeAsync(new AliCloud.CS.GetKubernetesPermissionArgs
        {
            Uid = usersDs.Users?[0]?.Id,
        })));
        this.Permissions = @default.Apply(@default => @default.Permissions);
    }

    [Output("permissions")]
    public Output<string> Permissions { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		usersDs, err := ram.GetUsers(ctx, &ram.GetUsersArgs{
			NameRegex: pulumi.StringRef("your_user_name"),
		}, nil)
		if err != nil {
			return err
		}
		_default, err := cs.LookupKubernetesPermission(ctx, &cs.LookupKubernetesPermissionArgs{
			Uid: usersDs.Users[0].Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("permissions", _default.Permissions)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

users_ds = alicloud.ram.get_users(name_regex="your_user_name")
default = alicloud.cs.get_kubernetes_permission(uid=users_ds.users[0].id)
pulumi.export("permissions", default.permissions)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const usersDs = alicloud.ram.getUsers({
    nameRegex: "your_user_name",
});
const default = usersDs.then(usersDs => alicloud.cs.getKubernetesPermission({
    uid: usersDs.users?[0]?.id,
}));
export const permissions = _default.then(_default => _default.permissions);

Coming soon!

Using getKubernetesPermission

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 getKubernetesPermission(args: GetKubernetesPermissionArgs, opts?: InvokeOptions): Promise<GetKubernetesPermissionResult>
function getKubernetesPermissionOutput(args: GetKubernetesPermissionOutputArgs, opts?: InvokeOptions): Output<GetKubernetesPermissionResult>
def get_kubernetes_permission(permissions: Optional[Sequence[GetKubernetesPermissionPermission]] = None,
                              uid: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetKubernetesPermissionResult
def get_kubernetes_permission_output(permissions: Optional[pulumi.Input[Sequence[pulumi.Input[GetKubernetesPermissionPermissionArgs]]]] = None,
                              uid: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetKubernetesPermissionResult]
func LookupKubernetesPermission(ctx *Context, args *LookupKubernetesPermissionArgs, opts ...InvokeOption) (*LookupKubernetesPermissionResult, error)
func LookupKubernetesPermissionOutput(ctx *Context, args *LookupKubernetesPermissionOutputArgs, opts ...InvokeOption) LookupKubernetesPermissionResultOutput

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

public static class GetKubernetesPermission 
{
    public static Task<GetKubernetesPermissionResult> InvokeAsync(GetKubernetesPermissionArgs args, InvokeOptions? opts = null)
    public static Output<GetKubernetesPermissionResult> Invoke(GetKubernetesPermissionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKubernetesPermissionResult> getKubernetesPermission(GetKubernetesPermissionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:cs/getKubernetesPermission:getKubernetesPermission
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Uid string

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

Permissions List<Pulumi.AliCloud.CS.Inputs.GetKubernetesPermissionPermission>

A list of user permission.

Uid string

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

Permissions []GetKubernetesPermissionPermission

A list of user permission.

uid String

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions ListKubernetesPermissionPermission>

A list of user permission.

uid string

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions GetKubernetesPermissionPermission[]

A list of user permission.

uid str

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions Sequence[GetKubernetesPermissionPermission]

A list of user permission.

uid String

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions List

A list of user permission.

getKubernetesPermission Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Uid string

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

Permissions List<Pulumi.AliCloud.CS.Outputs.GetKubernetesPermissionPermission>

A list of user permission.

Id string

The provider-assigned unique ID for this managed resource.

Uid string

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

Permissions []GetKubernetesPermissionPermission

A list of user permission.

id String

The provider-assigned unique ID for this managed resource.

uid String

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions ListKubernetesPermissionPermission>

A list of user permission.

id string

The provider-assigned unique ID for this managed resource.

uid string

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions GetKubernetesPermissionPermission[]

A list of user permission.

id str

The provider-assigned unique ID for this managed resource.

uid str

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions Sequence[GetKubernetesPermissionPermission]

A list of user permission.

id String

The provider-assigned unique ID for this managed resource.

uid String

The ID of the RAM user. If you want to query the permissions of a RAM role, specify the ID of the RAM role.

permissions List

A list of user permission.

Supporting Types

GetKubernetesPermissionPermission

ResourceId string

The permission settings to manage ACK clusters.

ResourceType string

The authorization type. Valid values cluster, namespace and console.

RoleName string

The name of the predefined role. If a custom role is assigned, the value is the name of the assigined custom role.

IsOwner bool

ndicates whether the permissions are granted to the cluster owner. Valid values 0, 1.

  • is_ram_role -Indicates whether the permissions are granted to the RAM role. Valid values 0,1.
IsRamRole bool
RoleType string

The predefined role. Valid values admin,ops,dev,restricted and custom.

ResourceId string

The permission settings to manage ACK clusters.

ResourceType string

The authorization type. Valid values cluster, namespace and console.

RoleName string

The name of the predefined role. If a custom role is assigned, the value is the name of the assigined custom role.

IsOwner bool

ndicates whether the permissions are granted to the cluster owner. Valid values 0, 1.

  • is_ram_role -Indicates whether the permissions are granted to the RAM role. Valid values 0,1.
IsRamRole bool
RoleType string

The predefined role. Valid values admin,ops,dev,restricted and custom.

resourceId String

The permission settings to manage ACK clusters.

resourceType String

The authorization type. Valid values cluster, namespace and console.

roleName String

The name of the predefined role. If a custom role is assigned, the value is the name of the assigined custom role.

isOwner Boolean

ndicates whether the permissions are granted to the cluster owner. Valid values 0, 1.

  • is_ram_role -Indicates whether the permissions are granted to the RAM role. Valid values 0,1.
isRamRole Boolean
roleType String

The predefined role. Valid values admin,ops,dev,restricted and custom.

resourceId string

The permission settings to manage ACK clusters.

resourceType string

The authorization type. Valid values cluster, namespace and console.

roleName string

The name of the predefined role. If a custom role is assigned, the value is the name of the assigined custom role.

isOwner boolean

ndicates whether the permissions are granted to the cluster owner. Valid values 0, 1.

  • is_ram_role -Indicates whether the permissions are granted to the RAM role. Valid values 0,1.
isRamRole boolean
roleType string

The predefined role. Valid values admin,ops,dev,restricted and custom.

resource_id str

The permission settings to manage ACK clusters.

resource_type str

The authorization type. Valid values cluster, namespace and console.

role_name str

The name of the predefined role. If a custom role is assigned, the value is the name of the assigined custom role.

is_owner bool

ndicates whether the permissions are granted to the cluster owner. Valid values 0, 1.

  • is_ram_role -Indicates whether the permissions are granted to the RAM role. Valid values 0,1.
is_ram_role bool
role_type str

The predefined role. Valid values admin,ops,dev,restricted and custom.

resourceId String

The permission settings to manage ACK clusters.

resourceType String

The authorization type. Valid values cluster, namespace and console.

roleName String

The name of the predefined role. If a custom role is assigned, the value is the name of the assigined custom role.

isOwner Boolean

ndicates whether the permissions are granted to the cluster owner. Valid values 0, 1.

  • is_ram_role -Indicates whether the permissions are granted to the RAM role. Valid values 0,1.
isRamRole Boolean
roleType String

The predefined role. Valid values admin,ops,dev,restricted and custom.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.