1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cs
  5. KubernetesPermission
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.cs.KubernetesPermission

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    This resource will help you implement RBAC authorization for the kubernetes cluster, see What is kubernetes permissions.

    NOTE: Please make sure that the target RAM user has been granted a RAM policy with at least read-only permission of the target cluster in the RAM console. Otherwise, the ErrorRamPolicyConfig error will be returned. For more information about how to authorize a RAM user by attaching RAM policies, see Create a custom RAM policy.

    NOTE: If you call this operation as a RAM user, make sure that this RAM user has the permissions to grant other RAM users the permissions to manage ACK clusters. Otherwise, the StatusForbidden or ForbiddenGrantPermissions errors will be returned. For more information, see Use a RAM user to grant RBAC permissions to other RAM users.

    NOTE: This operation overwrites the permissions that have been granted to the specified RAM user. When you call this operation, make sure that the required permissions are included.

    NOTE: Available since v1.122.0.

    Create KubernetesPermission Resource

    new KubernetesPermission(name: string, args: KubernetesPermissionArgs, opts?: CustomResourceOptions);
    @overload
    def KubernetesPermission(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             permissions: Optional[Sequence[KubernetesPermissionPermissionArgs]] = None,
                             uid: Optional[str] = None)
    @overload
    def KubernetesPermission(resource_name: str,
                             args: KubernetesPermissionArgs,
                             opts: Optional[ResourceOptions] = None)
    func NewKubernetesPermission(ctx *Context, name string, args KubernetesPermissionArgs, opts ...ResourceOption) (*KubernetesPermission, error)
    public KubernetesPermission(string name, KubernetesPermissionArgs args, CustomResourceOptions? opts = null)
    public KubernetesPermission(String name, KubernetesPermissionArgs args)
    public KubernetesPermission(String name, KubernetesPermissionArgs args, CustomResourceOptions options)
    
    type: alicloud:cs:KubernetesPermission
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args KubernetesPermissionArgs
    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 KubernetesPermissionArgs
    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 KubernetesPermissionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KubernetesPermissionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KubernetesPermissionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    KubernetesPermission Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The KubernetesPermission resource accepts the following input properties:

    Uid string
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    Permissions List<Pulumi.AliCloud.CS.Inputs.KubernetesPermissionPermission>
    A list of user permission. See permissions below.
    Uid string
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    Permissions []KubernetesPermissionPermissionArgs
    A list of user permission. See permissions below.
    uid String
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions List<KubernetesPermissionPermission>
    A list of user permission. See permissions below.
    uid string
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions KubernetesPermissionPermission[]
    A list of user permission. See permissions below.
    uid str
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions Sequence[KubernetesPermissionPermissionArgs]
    A list of user permission. See permissions below.
    uid String
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions List<Property Map>
    A list of user permission. See permissions below.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing KubernetesPermission Resource

    Get an existing KubernetesPermission 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?: KubernetesPermissionState, opts?: CustomResourceOptions): KubernetesPermission
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            permissions: Optional[Sequence[KubernetesPermissionPermissionArgs]] = None,
            uid: Optional[str] = None) -> KubernetesPermission
    func GetKubernetesPermission(ctx *Context, name string, id IDInput, state *KubernetesPermissionState, opts ...ResourceOption) (*KubernetesPermission, error)
    public static KubernetesPermission Get(string name, Input<string> id, KubernetesPermissionState? state, CustomResourceOptions? opts = null)
    public static KubernetesPermission get(String name, Output<String> id, KubernetesPermissionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Permissions List<Pulumi.AliCloud.CS.Inputs.KubernetesPermissionPermission>
    A list of user permission. See permissions below.
    Uid string
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    Permissions []KubernetesPermissionPermissionArgs
    A list of user permission. See permissions below.
    Uid string
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions List<KubernetesPermissionPermission>
    A list of user permission. See permissions below.
    uid String
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions KubernetesPermissionPermission[]
    A list of user permission. See permissions below.
    uid string
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions Sequence[KubernetesPermissionPermissionArgs]
    A list of user permission. See permissions below.
    uid str
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.
    permissions List<Property Map>
    A list of user permission. See permissions below.
    uid String
    The ID of the Ram user, and it can also be the id of the Ram Role. If you use Ram Role id, you need to set is_ram_role to true during authorization.

    Supporting Types

    KubernetesPermissionPermission, KubernetesPermissionPermissionArgs

    Cluster string
    The ID of the cluster that you want to manage.
    RoleName string
    Specifies the predefined role that you want to assign. Valid values admin, ops, dev, restricted and the custom cluster roles.
    RoleType string
    The authorization type. Valid values cluster, namespace.
    IsCustom bool
    Specifies whether to perform a custom authorization. To perform a custom authorization, set role_name to a custom cluster role.
    IsRamRole bool
    Specifies whether the permissions are granted to a RAM role. When uid is ram role id, the value of is_ram_role must be true.
    Namespace string
    The namespace to which the permissions are scoped. This parameter is required only if you set role_type to namespace.
    Cluster string
    The ID of the cluster that you want to manage.
    RoleName string
    Specifies the predefined role that you want to assign. Valid values admin, ops, dev, restricted and the custom cluster roles.
    RoleType string
    The authorization type. Valid values cluster, namespace.
    IsCustom bool
    Specifies whether to perform a custom authorization. To perform a custom authorization, set role_name to a custom cluster role.
    IsRamRole bool
    Specifies whether the permissions are granted to a RAM role. When uid is ram role id, the value of is_ram_role must be true.
    Namespace string
    The namespace to which the permissions are scoped. This parameter is required only if you set role_type to namespace.
    cluster String
    The ID of the cluster that you want to manage.
    roleName String
    Specifies the predefined role that you want to assign. Valid values admin, ops, dev, restricted and the custom cluster roles.
    roleType String
    The authorization type. Valid values cluster, namespace.
    isCustom Boolean
    Specifies whether to perform a custom authorization. To perform a custom authorization, set role_name to a custom cluster role.
    isRamRole Boolean
    Specifies whether the permissions are granted to a RAM role. When uid is ram role id, the value of is_ram_role must be true.
    namespace String
    The namespace to which the permissions are scoped. This parameter is required only if you set role_type to namespace.
    cluster string
    The ID of the cluster that you want to manage.
    roleName string
    Specifies the predefined role that you want to assign. Valid values admin, ops, dev, restricted and the custom cluster roles.
    roleType string
    The authorization type. Valid values cluster, namespace.
    isCustom boolean
    Specifies whether to perform a custom authorization. To perform a custom authorization, set role_name to a custom cluster role.
    isRamRole boolean
    Specifies whether the permissions are granted to a RAM role. When uid is ram role id, the value of is_ram_role must be true.
    namespace string
    The namespace to which the permissions are scoped. This parameter is required only if you set role_type to namespace.
    cluster str
    The ID of the cluster that you want to manage.
    role_name str
    Specifies the predefined role that you want to assign. Valid values admin, ops, dev, restricted and the custom cluster roles.
    role_type str
    The authorization type. Valid values cluster, namespace.
    is_custom bool
    Specifies whether to perform a custom authorization. To perform a custom authorization, set role_name to a custom cluster role.
    is_ram_role bool
    Specifies whether the permissions are granted to a RAM role. When uid is ram role id, the value of is_ram_role must be true.
    namespace str
    The namespace to which the permissions are scoped. This parameter is required only if you set role_type to namespace.
    cluster String
    The ID of the cluster that you want to manage.
    roleName String
    Specifies the predefined role that you want to assign. Valid values admin, ops, dev, restricted and the custom cluster roles.
    roleType String
    The authorization type. Valid values cluster, namespace.
    isCustom Boolean
    Specifies whether to perform a custom authorization. To perform a custom authorization, set role_name to a custom cluster role.
    isRamRole Boolean
    Specifies whether the permissions are granted to a RAM role. When uid is ram role id, the value of is_ram_role must be true.
    namespace String
    The namespace to which the permissions are scoped. This parameter is required only if you set role_type to namespace.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi