flexibleengine.SwrOrganizationUsers
Explore with Pulumi AI
Manages user permissions for the SWR organization resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const organizationName = config.requireObject("organizationName");
const user1 = config.requireObject("user1");
const user2 = config.requireObject("user2");
const test = new flexibleengine.SwrOrganizationUsers("test", {
organization: organizationName,
users: [
{
userName: user1.name,
userId: user1.id,
permission: "Read",
},
{
userName: user2.name,
userId: user2.id,
permission: "Read",
},
],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
organization_name = config.require_object("organizationName")
user1 = config.require_object("user1")
user2 = config.require_object("user2")
test = flexibleengine.SwrOrganizationUsers("test",
organization=organization_name,
users=[
{
"user_name": user1["name"],
"user_id": user1["id"],
"permission": "Read",
},
{
"user_name": user2["name"],
"user_id": user2["id"],
"permission": "Read",
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
organizationName := cfg.RequireObject("organizationName")
user1 := cfg.RequireObject("user1")
user2 := cfg.RequireObject("user2")
_, err := flexibleengine.NewSwrOrganizationUsers(ctx, "test", &flexibleengine.SwrOrganizationUsersArgs{
Organization: pulumi.Any(organizationName),
Users: flexibleengine.SwrOrganizationUsersUserArray{
&flexibleengine.SwrOrganizationUsersUserArgs{
UserName: pulumi.Any(user1.Name),
UserId: pulumi.Any(user1.Id),
Permission: pulumi.String("Read"),
},
&flexibleengine.SwrOrganizationUsersUserArgs{
UserName: pulumi.Any(user2.Name),
UserId: pulumi.Any(user2.Id),
Permission: pulumi.String("Read"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var organizationName = config.RequireObject<dynamic>("organizationName");
var user1 = config.RequireObject<dynamic>("user1");
var user2 = config.RequireObject<dynamic>("user2");
var test = new Flexibleengine.SwrOrganizationUsers("test", new()
{
Organization = organizationName,
Users = new[]
{
new Flexibleengine.Inputs.SwrOrganizationUsersUserArgs
{
UserName = user1.Name,
UserId = user1.Id,
Permission = "Read",
},
new Flexibleengine.Inputs.SwrOrganizationUsersUserArgs
{
UserName = user2.Name,
UserId = user2.Id,
Permission = "Read",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.SwrOrganizationUsers;
import com.pulumi.flexibleengine.SwrOrganizationUsersArgs;
import com.pulumi.flexibleengine.inputs.SwrOrganizationUsersUserArgs;
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 config = ctx.config();
final var organizationName = config.get("organizationName");
final var user1 = config.get("user1");
final var user2 = config.get("user2");
var test = new SwrOrganizationUsers("test", SwrOrganizationUsersArgs.builder()
.organization(organizationName)
.users(
SwrOrganizationUsersUserArgs.builder()
.userName(user1.name())
.userId(user1.id())
.permission("Read")
.build(),
SwrOrganizationUsersUserArgs.builder()
.userName(user2.name())
.userId(user2.id())
.permission("Read")
.build())
.build());
}
}
configuration:
organizationName:
type: dynamic
user1:
type: dynamic
user2:
type: dynamic
resources:
test:
type: flexibleengine:SwrOrganizationUsers
properties:
organization: ${organizationName}
users:
- userName: ${user1.name}
userId: ${user1.id}
permission: Read
- userName: ${user2.name}
userId: ${user2.id}
permission: Read
Create SwrOrganizationUsers Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SwrOrganizationUsers(name: string, args: SwrOrganizationUsersArgs, opts?: CustomResourceOptions);
@overload
def SwrOrganizationUsers(resource_name: str,
args: SwrOrganizationUsersArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SwrOrganizationUsers(resource_name: str,
opts: Optional[ResourceOptions] = None,
organization: Optional[str] = None,
users: Optional[Sequence[SwrOrganizationUsersUserArgs]] = None,
region: Optional[str] = None,
swr_organization_users_id: Optional[str] = None,
timeouts: Optional[SwrOrganizationUsersTimeoutsArgs] = None)
func NewSwrOrganizationUsers(ctx *Context, name string, args SwrOrganizationUsersArgs, opts ...ResourceOption) (*SwrOrganizationUsers, error)
public SwrOrganizationUsers(string name, SwrOrganizationUsersArgs args, CustomResourceOptions? opts = null)
public SwrOrganizationUsers(String name, SwrOrganizationUsersArgs args)
public SwrOrganizationUsers(String name, SwrOrganizationUsersArgs args, CustomResourceOptions options)
type: flexibleengine:SwrOrganizationUsers
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 SwrOrganizationUsersArgs
- 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 SwrOrganizationUsersArgs
- 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 SwrOrganizationUsersArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SwrOrganizationUsersArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SwrOrganizationUsersArgs
- 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 swrOrganizationUsersResource = new Flexibleengine.SwrOrganizationUsers("swrOrganizationUsersResource", new()
{
Organization = "string",
Users = new[]
{
new Flexibleengine.Inputs.SwrOrganizationUsersUserArgs
{
Permission = "string",
UserId = "string",
UserName = "string",
},
},
Region = "string",
SwrOrganizationUsersId = "string",
Timeouts = new Flexibleengine.Inputs.SwrOrganizationUsersTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := flexibleengine.NewSwrOrganizationUsers(ctx, "swrOrganizationUsersResource", &flexibleengine.SwrOrganizationUsersArgs{
Organization: pulumi.String("string"),
Users: flexibleengine.SwrOrganizationUsersUserArray{
&flexibleengine.SwrOrganizationUsersUserArgs{
Permission: pulumi.String("string"),
UserId: pulumi.String("string"),
UserName: pulumi.String("string"),
},
},
Region: pulumi.String("string"),
SwrOrganizationUsersId: pulumi.String("string"),
Timeouts: &flexibleengine.SwrOrganizationUsersTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var swrOrganizationUsersResource = new SwrOrganizationUsers("swrOrganizationUsersResource", SwrOrganizationUsersArgs.builder()
.organization("string")
.users(SwrOrganizationUsersUserArgs.builder()
.permission("string")
.userId("string")
.userName("string")
.build())
.region("string")
.swrOrganizationUsersId("string")
.timeouts(SwrOrganizationUsersTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
swr_organization_users_resource = flexibleengine.SwrOrganizationUsers("swrOrganizationUsersResource",
organization="string",
users=[{
"permission": "string",
"user_id": "string",
"user_name": "string",
}],
region="string",
swr_organization_users_id="string",
timeouts={
"create": "string",
"delete": "string",
})
const swrOrganizationUsersResource = new flexibleengine.SwrOrganizationUsers("swrOrganizationUsersResource", {
organization: "string",
users: [{
permission: "string",
userId: "string",
userName: "string",
}],
region: "string",
swrOrganizationUsersId: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: flexibleengine:SwrOrganizationUsers
properties:
organization: string
region: string
swrOrganizationUsersId: string
timeouts:
create: string
delete: string
users:
- permission: string
userId: string
userName: string
SwrOrganizationUsers 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 SwrOrganizationUsers resource accepts the following input properties:
- Organization string
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- Users
List<Swr
Organization Users User> Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- Swr
Organization stringUsers Id - ID of the resource. The value is the name of the organization.
- Timeouts
Swr
Organization Users Timeouts
- Organization string
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- Users
[]Swr
Organization Users User Args Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- Swr
Organization stringUsers Id - ID of the resource. The value is the name of the organization.
- Timeouts
Swr
Organization Users Timeouts Args
- organization String
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- users
List<Swr
Organization Users User> Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- swr
Organization StringUsers Id - ID of the resource. The value is the name of the organization.
- timeouts
Swr
Organization Users Timeouts
- organization string
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- users
Swr
Organization Users User[] Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- swr
Organization stringUsers Id - ID of the resource. The value is the name of the organization.
- timeouts
Swr
Organization Users Timeouts
- organization str
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- users
Sequence[Swr
Organization Users User Args] Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- swr_
organization_ strusers_ id - ID of the resource. The value is the name of the organization.
- timeouts
Swr
Organization Users Timeouts Args
- organization String
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- users List<Property Map>
Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- swr
Organization StringUsers Id - ID of the resource. The value is the name of the organization.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the SwrOrganizationUsers resource produces the following output properties:
- Creator string
- The creator username of the organization.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Permissions List<SwrOrganization Users Self Permission> - The permission information of current user. The self_permission object structure is documented below.
- Creator string
- The creator username of the organization.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Permissions []SwrOrganization Users Self Permission - The permission information of current user. The self_permission object structure is documented below.
- creator String
- The creator username of the organization.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Permissions List<SwrOrganization Users Self Permission> - The permission information of current user. The self_permission object structure is documented below.
- creator string
- The creator username of the organization.
- id string
- The provider-assigned unique ID for this managed resource.
- self
Permissions SwrOrganization Users Self Permission[] - The permission information of current user. The self_permission object structure is documented below.
- creator str
- The creator username of the organization.
- id str
- The provider-assigned unique ID for this managed resource.
- self_
permissions Sequence[SwrOrganization Users Self Permission] - The permission information of current user. The self_permission object structure is documented below.
- creator String
- The creator username of the organization.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Permissions List<Property Map> - The permission information of current user. The self_permission object structure is documented below.
Look up Existing SwrOrganizationUsers Resource
Get an existing SwrOrganizationUsers 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?: SwrOrganizationUsersState, opts?: CustomResourceOptions): SwrOrganizationUsers
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creator: Optional[str] = None,
organization: Optional[str] = None,
region: Optional[str] = None,
self_permissions: Optional[Sequence[SwrOrganizationUsersSelfPermissionArgs]] = None,
swr_organization_users_id: Optional[str] = None,
timeouts: Optional[SwrOrganizationUsersTimeoutsArgs] = None,
users: Optional[Sequence[SwrOrganizationUsersUserArgs]] = None) -> SwrOrganizationUsers
func GetSwrOrganizationUsers(ctx *Context, name string, id IDInput, state *SwrOrganizationUsersState, opts ...ResourceOption) (*SwrOrganizationUsers, error)
public static SwrOrganizationUsers Get(string name, Input<string> id, SwrOrganizationUsersState? state, CustomResourceOptions? opts = null)
public static SwrOrganizationUsers get(String name, Output<String> id, SwrOrganizationUsersState state, CustomResourceOptions options)
resources: _: type: flexibleengine:SwrOrganizationUsers 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.
- Creator string
- The creator username of the organization.
- Organization string
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- Self
Permissions List<SwrOrganization Users Self Permission> - The permission information of current user. The self_permission object structure is documented below.
- Swr
Organization stringUsers Id - ID of the resource. The value is the name of the organization.
- Timeouts
Swr
Organization Users Timeouts - Users
List<Swr
Organization Users User> Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:
- Creator string
- The creator username of the organization.
- Organization string
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- Self
Permissions []SwrOrganization Users Self Permission Args - The permission information of current user. The self_permission object structure is documented below.
- Swr
Organization stringUsers Id - ID of the resource. The value is the name of the organization.
- Timeouts
Swr
Organization Users Timeouts Args - Users
[]Swr
Organization Users User Args Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:
- creator String
- The creator username of the organization.
- organization String
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- self
Permissions List<SwrOrganization Users Self Permission> - The permission information of current user. The self_permission object structure is documented below.
- swr
Organization StringUsers Id - ID of the resource. The value is the name of the organization.
- timeouts
Swr
Organization Users Timeouts - users
List<Swr
Organization Users User> Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:
- creator string
- The creator username of the organization.
- organization string
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- self
Permissions SwrOrganization Users Self Permission[] - The permission information of current user. The self_permission object structure is documented below.
- swr
Organization stringUsers Id - ID of the resource. The value is the name of the organization.
- timeouts
Swr
Organization Users Timeouts - users
Swr
Organization Users User[] Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:
- creator str
- The creator username of the organization.
- organization str
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- self_
permissions Sequence[SwrOrganization Users Self Permission Args] - The permission information of current user. The self_permission object structure is documented below.
- swr_
organization_ strusers_ id - ID of the resource. The value is the name of the organization.
- timeouts
Swr
Organization Users Timeouts Args - users
Sequence[Swr
Organization Users User Args] Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:
- creator String
- The creator username of the organization.
- organization String
- Specifies the name of the organization (namespace) to be accessed. Changing this creates a new resource.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- self
Permissions List<Property Map> - The permission information of current user. The self_permission object structure is documented below.
- swr
Organization StringUsers Id - ID of the resource. The value is the name of the organization.
- timeouts Property Map
- users List<Property Map>
Specifies the users to access to the organization (namespace). The users object structure is documented below.
The
users
block supports:
Supporting Types
SwrOrganizationUsersSelfPermission, SwrOrganizationUsersSelfPermissionArgs
- Permission string
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- User
Id string - Specifies the ID of the existing IAM user.
- User
Name string - Specifies the name of the existing IAM user.
- Permission string
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- User
Id string - Specifies the ID of the existing IAM user.
- User
Name string - Specifies the name of the existing IAM user.
- permission String
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user
Id String - Specifies the ID of the existing IAM user.
- user
Name String - Specifies the name of the existing IAM user.
- permission string
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user
Id string - Specifies the ID of the existing IAM user.
- user
Name string - Specifies the name of the existing IAM user.
- permission str
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user_
id str - Specifies the ID of the existing IAM user.
- user_
name str - Specifies the name of the existing IAM user.
- permission String
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user
Id String - Specifies the ID of the existing IAM user.
- user
Name String - Specifies the name of the existing IAM user.
SwrOrganizationUsersTimeouts, SwrOrganizationUsersTimeoutsArgs
SwrOrganizationUsersUser, SwrOrganizationUsersUserArgs
- Permission string
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- User
Id string - Specifies the ID of the existing IAM user.
- User
Name string - Specifies the name of the existing IAM user.
- Permission string
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- User
Id string - Specifies the ID of the existing IAM user.
- User
Name string - Specifies the name of the existing IAM user.
- permission String
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user
Id String - Specifies the ID of the existing IAM user.
- user
Name String - Specifies the name of the existing IAM user.
- permission string
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user
Id string - Specifies the ID of the existing IAM user.
- user
Name string - Specifies the name of the existing IAM user.
- permission str
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user_
id str - Specifies the ID of the existing IAM user.
- user_
name str - Specifies the name of the existing IAM user.
- permission String
- Specifies the permission of the existing IAM user. The values can be Manage, Write and Read.
- user
Id String - Specifies the ID of the existing IAM user.
- user
Name String - Specifies the name of the existing IAM user.
Import
Organization Permissions can be imported using the id
(organization name), e.g.
$ pulumi import flexibleengine:index/swrOrganizationUsers:SwrOrganizationUsers test org-test
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.