1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. SwrOrganizationPermissionsV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.SwrOrganizationPermissionsV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for SWR permission you can get at documentation portal

    Manages user permissions for the SWR organization resource within Open Telekom Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const org1 = new opentelekomcloud.SwrOrganizationV2("org1", {});
    const user1 = new opentelekomcloud.SwrOrganizationPermissionsV2("user1", {
        organization: org1.name,
        userId: _var.user_id,
        username: _var.username,
        auth: 3,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    org1 = opentelekomcloud.SwrOrganizationV2("org1")
    user1 = opentelekomcloud.SwrOrganizationPermissionsV2("user1",
        organization=org1.name,
        user_id=var["user_id"],
        username=var["username"],
        auth=3)
    
    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 {
    		org1, err := opentelekomcloud.NewSwrOrganizationV2(ctx, "org1", nil)
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewSwrOrganizationPermissionsV2(ctx, "user1", &opentelekomcloud.SwrOrganizationPermissionsV2Args{
    			Organization: org1.Name,
    			UserId:       pulumi.Any(_var.User_id),
    			Username:     pulumi.Any(_var.Username),
    			Auth:         pulumi.Float64(3),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var org1 = new Opentelekomcloud.SwrOrganizationV2("org1");
    
        var user1 = new Opentelekomcloud.SwrOrganizationPermissionsV2("user1", new()
        {
            Organization = org1.Name,
            UserId = @var.User_id,
            Username = @var.Username,
            Auth = 3,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.SwrOrganizationV2;
    import com.pulumi.opentelekomcloud.SwrOrganizationPermissionsV2;
    import com.pulumi.opentelekomcloud.SwrOrganizationPermissionsV2Args;
    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 org1 = new SwrOrganizationV2("org1");
    
            var user1 = new SwrOrganizationPermissionsV2("user1", SwrOrganizationPermissionsV2Args.builder()
                .organization(org1.name())
                .userId(var_.user_id())
                .username(var_.username())
                .auth(3)
                .build());
    
        }
    }
    
    resources:
      org1:
        type: opentelekomcloud:SwrOrganizationV2
      user1:
        type: opentelekomcloud:SwrOrganizationPermissionsV2
        properties:
          organization: ${org1.name}
          userId: ${var.user_id}
          username: ${var.username}
          auth: 3
    

    Create SwrOrganizationPermissionsV2 Resource

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

    Constructor syntax

    new SwrOrganizationPermissionsV2(name: string, args: SwrOrganizationPermissionsV2Args, opts?: CustomResourceOptions);
    @overload
    def SwrOrganizationPermissionsV2(resource_name: str,
                                     args: SwrOrganizationPermissionsV2Args,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def SwrOrganizationPermissionsV2(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     auth: Optional[float] = None,
                                     organization: Optional[str] = None,
                                     user_id: Optional[str] = None,
                                     username: Optional[str] = None,
                                     swr_organization_permissions_v2_id: Optional[str] = None,
                                     timeouts: Optional[SwrOrganizationPermissionsV2TimeoutsArgs] = None)
    func NewSwrOrganizationPermissionsV2(ctx *Context, name string, args SwrOrganizationPermissionsV2Args, opts ...ResourceOption) (*SwrOrganizationPermissionsV2, error)
    public SwrOrganizationPermissionsV2(string name, SwrOrganizationPermissionsV2Args args, CustomResourceOptions? opts = null)
    public SwrOrganizationPermissionsV2(String name, SwrOrganizationPermissionsV2Args args)
    public SwrOrganizationPermissionsV2(String name, SwrOrganizationPermissionsV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:SwrOrganizationPermissionsV2
    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 SwrOrganizationPermissionsV2Args
    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 SwrOrganizationPermissionsV2Args
    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 SwrOrganizationPermissionsV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SwrOrganizationPermissionsV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SwrOrganizationPermissionsV2Args
    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 swrOrganizationPermissionsV2Resource = new Opentelekomcloud.SwrOrganizationPermissionsV2("swrOrganizationPermissionsV2Resource", new()
    {
        Auth = 0,
        Organization = "string",
        UserId = "string",
        Username = "string",
        SwrOrganizationPermissionsV2Id = "string",
        Timeouts = new Opentelekomcloud.Inputs.SwrOrganizationPermissionsV2TimeoutsArgs
        {
            Default = "string",
        },
    });
    
    example, err := opentelekomcloud.NewSwrOrganizationPermissionsV2(ctx, "swrOrganizationPermissionsV2Resource", &opentelekomcloud.SwrOrganizationPermissionsV2Args{
    	Auth:                           pulumi.Float64(0),
    	Organization:                   pulumi.String("string"),
    	UserId:                         pulumi.String("string"),
    	Username:                       pulumi.String("string"),
    	SwrOrganizationPermissionsV2Id: pulumi.String("string"),
    	Timeouts: &opentelekomcloud.SwrOrganizationPermissionsV2TimeoutsArgs{
    		Default: pulumi.String("string"),
    	},
    })
    
    var swrOrganizationPermissionsV2Resource = new SwrOrganizationPermissionsV2("swrOrganizationPermissionsV2Resource", SwrOrganizationPermissionsV2Args.builder()
        .auth(0)
        .organization("string")
        .userId("string")
        .username("string")
        .swrOrganizationPermissionsV2Id("string")
        .timeouts(SwrOrganizationPermissionsV2TimeoutsArgs.builder()
            .default_("string")
            .build())
        .build());
    
    swr_organization_permissions_v2_resource = opentelekomcloud.SwrOrganizationPermissionsV2("swrOrganizationPermissionsV2Resource",
        auth=0,
        organization="string",
        user_id="string",
        username="string",
        swr_organization_permissions_v2_id="string",
        timeouts={
            "default": "string",
        })
    
    const swrOrganizationPermissionsV2Resource = new opentelekomcloud.SwrOrganizationPermissionsV2("swrOrganizationPermissionsV2Resource", {
        auth: 0,
        organization: "string",
        userId: "string",
        username: "string",
        swrOrganizationPermissionsV2Id: "string",
        timeouts: {
            "default": "string",
        },
    });
    
    type: opentelekomcloud:SwrOrganizationPermissionsV2
    properties:
        auth: 0
        organization: string
        swrOrganizationPermissionsV2Id: string
        timeouts:
            default: string
        userId: string
        username: string
    

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

    Auth double
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    Organization string
    The name of the organization (namespace) to be accessed.
    UserId string
    The ID of the existing Open Telekom Cloud user.
    Username string
    The username of the existing Open Telekom Cloud user.
    SwrOrganizationPermissionsV2Id string
    Timeouts SwrOrganizationPermissionsV2Timeouts
    Auth float64
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    Organization string
    The name of the organization (namespace) to be accessed.
    UserId string
    The ID of the existing Open Telekom Cloud user.
    Username string
    The username of the existing Open Telekom Cloud user.
    SwrOrganizationPermissionsV2Id string
    Timeouts SwrOrganizationPermissionsV2TimeoutsArgs
    auth Double
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization String
    The name of the organization (namespace) to be accessed.
    userId String
    The ID of the existing Open Telekom Cloud user.
    username String
    The username of the existing Open Telekom Cloud user.
    swrOrganizationPermissionsV2Id String
    timeouts SwrOrganizationPermissionsV2Timeouts
    auth number
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization string
    The name of the organization (namespace) to be accessed.
    userId string
    The ID of the existing Open Telekom Cloud user.
    username string
    The username of the existing Open Telekom Cloud user.
    swrOrganizationPermissionsV2Id string
    timeouts SwrOrganizationPermissionsV2Timeouts
    auth float
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization str
    The name of the organization (namespace) to be accessed.
    user_id str
    The ID of the existing Open Telekom Cloud user.
    username str
    The username of the existing Open Telekom Cloud user.
    swr_organization_permissions_v2_id str
    timeouts SwrOrganizationPermissionsV2TimeoutsArgs
    auth Number
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization String
    The name of the organization (namespace) to be accessed.
    userId String
    The ID of the existing Open Telekom Cloud user.
    username String
    The username of the existing Open Telekom Cloud user.
    swrOrganizationPermissionsV2Id String
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SwrOrganizationPermissionsV2 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 SwrOrganizationPermissionsV2 Resource

    Get an existing SwrOrganizationPermissionsV2 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?: SwrOrganizationPermissionsV2State, opts?: CustomResourceOptions): SwrOrganizationPermissionsV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth: Optional[float] = None,
            organization: Optional[str] = None,
            swr_organization_permissions_v2_id: Optional[str] = None,
            timeouts: Optional[SwrOrganizationPermissionsV2TimeoutsArgs] = None,
            user_id: Optional[str] = None,
            username: Optional[str] = None) -> SwrOrganizationPermissionsV2
    func GetSwrOrganizationPermissionsV2(ctx *Context, name string, id IDInput, state *SwrOrganizationPermissionsV2State, opts ...ResourceOption) (*SwrOrganizationPermissionsV2, error)
    public static SwrOrganizationPermissionsV2 Get(string name, Input<string> id, SwrOrganizationPermissionsV2State? state, CustomResourceOptions? opts = null)
    public static SwrOrganizationPermissionsV2 get(String name, Output<String> id, SwrOrganizationPermissionsV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:SwrOrganizationPermissionsV2    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:
    Auth double
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    Organization string
    The name of the organization (namespace) to be accessed.
    SwrOrganizationPermissionsV2Id string
    Timeouts SwrOrganizationPermissionsV2Timeouts
    UserId string
    The ID of the existing Open Telekom Cloud user.
    Username string
    The username of the existing Open Telekom Cloud user.
    Auth float64
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    Organization string
    The name of the organization (namespace) to be accessed.
    SwrOrganizationPermissionsV2Id string
    Timeouts SwrOrganizationPermissionsV2TimeoutsArgs
    UserId string
    The ID of the existing Open Telekom Cloud user.
    Username string
    The username of the existing Open Telekom Cloud user.
    auth Double
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization String
    The name of the organization (namespace) to be accessed.
    swrOrganizationPermissionsV2Id String
    timeouts SwrOrganizationPermissionsV2Timeouts
    userId String
    The ID of the existing Open Telekom Cloud user.
    username String
    The username of the existing Open Telekom Cloud user.
    auth number
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization string
    The name of the organization (namespace) to be accessed.
    swrOrganizationPermissionsV2Id string
    timeouts SwrOrganizationPermissionsV2Timeouts
    userId string
    The ID of the existing Open Telekom Cloud user.
    username string
    The username of the existing Open Telekom Cloud user.
    auth float
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization str
    The name of the organization (namespace) to be accessed.
    swr_organization_permissions_v2_id str
    timeouts SwrOrganizationPermissionsV2TimeoutsArgs
    user_id str
    The ID of the existing Open Telekom Cloud user.
    username str
    The username of the existing Open Telekom Cloud user.
    auth Number
    User permission that is configured. The value can be 1, 3, or 7. 7 ― manage, 3 ― write, 1 ― read.
    organization String
    The name of the organization (namespace) to be accessed.
    swrOrganizationPermissionsV2Id String
    timeouts Property Map
    userId String
    The ID of the existing Open Telekom Cloud user.
    username String
    The username of the existing Open Telekom Cloud user.

    Supporting Types

    SwrOrganizationPermissionsV2Timeouts, SwrOrganizationPermissionsV2TimeoutsArgs

    Default string
    Default string
    default_ String
    default string
    default String

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud