outscale.User
Explore with Pulumi AI
Manages a user.
For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.
Example Usage
Creating a user
import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";
const user_1 = new outscale.User("user-1", {
    path: "/terraform/",
    userEmail: "test-TF1@test2.fr",
    userName: "User-TF-1",
});
import pulumi
import pulumi_outscale as outscale
user_1 = outscale.User("user-1",
    path="/terraform/",
    user_email="test-TF1@test2.fr",
    user_name="User-TF-1")
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewUser(ctx, "user-1", &outscale.UserArgs{
			Path:      pulumi.String("/terraform/"),
			UserEmail: pulumi.String("test-TF1@test2.fr"),
			UserName:  pulumi.String("User-TF-1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;
return await Deployment.RunAsync(() => 
{
    var user_1 = new Outscale.User("user-1", new()
    {
        Path = "/terraform/",
        UserEmail = "test-TF1@test2.fr",
        UserName = "User-TF-1",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.User;
import com.pulumi.outscale.UserArgs;
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 user_1 = new User("user-1", UserArgs.builder()
            .path("/terraform/")
            .userEmail("test-TF1@test2.fr")
            .userName("User-TF-1")
            .build());
    }
}
resources:
  user-1:
    type: outscale:User
    properties:
      path: /terraform/
      userEmail: test-TF1@test2.fr
      userName: User-TF-1
Linking a policy to a user
import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";
const user_1 = new outscale.User("user-1", {
    userName: "User-TF-1",
    policies: [{
        policyOrn: outscale_policy["policy-1"].orn,
        defaultVersionId: "V1",
    }],
});
import pulumi
import pulumi_outscale as outscale
user_1 = outscale.User("user-1",
    user_name="User-TF-1",
    policies=[{
        "policy_orn": outscale_policy["policy-1"]["orn"],
        "default_version_id": "V1",
    }])
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewUser(ctx, "user-1", &outscale.UserArgs{
			UserName: pulumi.String("User-TF-1"),
			Policies: outscale.UserPolicyArray{
				&outscale.UserPolicyArgs{
					PolicyOrn:        pulumi.Any(outscale_policy.Policy1.Orn),
					DefaultVersionId: pulumi.String("V1"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;
return await Deployment.RunAsync(() => 
{
    var user_1 = new Outscale.User("user-1", new()
    {
        UserName = "User-TF-1",
        Policies = new[]
        {
            new Outscale.Inputs.UserPolicyArgs
            {
                PolicyOrn = outscale_policy.Policy_1.Orn,
                DefaultVersionId = "V1",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.User;
import com.pulumi.outscale.UserArgs;
import com.pulumi.outscale.inputs.UserPolicyArgs;
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 user_1 = new User("user-1", UserArgs.builder()
            .userName("User-TF-1")
            .policies(UserPolicyArgs.builder()
                .policyOrn(outscale_policy.policy-1().orn())
                .defaultVersionId("V1")
                .build())
            .build());
    }
}
resources:
  user-1:
    type: outscale:User
    properties:
      userName: User-TF-1
      policies:
        - policyOrn: ${outscale_policy"policy-1"[%!s(MISSING)].orn}
          defaultVersionId: V1
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);@overload
def User(resource_name: str,
         args: UserArgs,
         opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         user_name: Optional[str] = None,
         outscale_user_id: Optional[str] = None,
         path: Optional[str] = None,
         policies: Optional[Sequence[UserPolicyArgs]] = None,
         user_email: Optional[str] = None)func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)public User(string name, UserArgs args, CustomResourceOptions? opts = null)type: outscale:User
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 UserArgs
- 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 UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- 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 userResource = new Outscale.User("userResource", new()
{
    UserName = "string",
    OutscaleUserId = "string",
    Path = "string",
    Policies = new[]
    {
        new Outscale.Inputs.UserPolicyArgs
        {
            PolicyOrn = "string",
            CreationDate = "string",
            DefaultVersionId = "string",
            LastModificationDate = "string",
            PolicyId = "string",
            PolicyName = "string",
        },
    },
    UserEmail = "string",
});
example, err := outscale.NewUser(ctx, "userResource", &outscale.UserArgs{
UserName: pulumi.String("string"),
OutscaleUserId: pulumi.String("string"),
Path: pulumi.String("string"),
Policies: .UserPolicyArray{
&.UserPolicyArgs{
PolicyOrn: pulumi.String("string"),
CreationDate: pulumi.String("string"),
DefaultVersionId: pulumi.String("string"),
LastModificationDate: pulumi.String("string"),
PolicyId: pulumi.String("string"),
PolicyName: pulumi.String("string"),
},
},
UserEmail: pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
    .userName("string")
    .outscaleUserId("string")
    .path("string")
    .policies(UserPolicyArgs.builder()
        .policyOrn("string")
        .creationDate("string")
        .defaultVersionId("string")
        .lastModificationDate("string")
        .policyId("string")
        .policyName("string")
        .build())
    .userEmail("string")
    .build());
user_resource = outscale.User("userResource",
    user_name="string",
    outscale_user_id="string",
    path="string",
    policies=[{
        "policy_orn": "string",
        "creation_date": "string",
        "default_version_id": "string",
        "last_modification_date": "string",
        "policy_id": "string",
        "policy_name": "string",
    }],
    user_email="string")
const userResource = new outscale.User("userResource", {
    userName: "string",
    outscaleUserId: "string",
    path: "string",
    policies: [{
        policyOrn: "string",
        creationDate: "string",
        defaultVersionId: "string",
        lastModificationDate: "string",
        policyId: "string",
        policyName: "string",
    }],
    userEmail: "string",
});
type: outscale:User
properties:
    outscaleUserId: string
    path: string
    policies:
        - creationDate: string
          defaultVersionId: string
          lastModificationDate: string
          policyId: string
          policyName: string
          policyOrn: string
    userEmail: string
    userName: string
User 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 User resource accepts the following input properties:
- UserName string
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- OutscaleUser stringId 
- Path string
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- Policies
List<UserPolicy> 
- UserEmail string
- The email address of the EIM user.
- UserName string
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- OutscaleUser stringId 
- Path string
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- Policies
[]UserPolicy Args 
- UserEmail string
- The email address of the EIM user.
- userName String
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- outscaleUser StringId 
- path String
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies
List<UserPolicy> 
- userEmail String
- The email address of the EIM user.
- userName string
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- outscaleUser stringId 
- path string
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies
UserPolicy[] 
- userEmail string
- The email address of the EIM user.
- user_name str
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- outscale_user_ strid 
- path str
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies
Sequence[UserPolicy Args] 
- user_email str
- The email address of the EIM user.
- userName String
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- outscaleUser StringId 
- path String
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies List<Property Map>
- userEmail String
- The email address of the EIM user.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
- CreationDate string
- The date and time (UTC) of creation of the EIM user.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- UserId string
- The ID of the EIM user.
- CreationDate string
- The date and time (UTC) of creation of the EIM user.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- UserId string
- The ID of the EIM user.
- creationDate String
- The date and time (UTC) of creation of the EIM user.
- id String
- The provider-assigned unique ID for this managed resource.
- lastModification StringDate 
- The date and time (UTC) of the last modification of the EIM user.
- userId String
- The ID of the EIM user.
- creationDate string
- The date and time (UTC) of creation of the EIM user.
- id string
- The provider-assigned unique ID for this managed resource.
- lastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- userId string
- The ID of the EIM user.
- creation_date str
- The date and time (UTC) of creation of the EIM user.
- id str
- The provider-assigned unique ID for this managed resource.
- last_modification_ strdate 
- The date and time (UTC) of the last modification of the EIM user.
- user_id str
- The ID of the EIM user.
- creationDate String
- The date and time (UTC) of creation of the EIM user.
- id String
- The provider-assigned unique ID for this managed resource.
- lastModification StringDate 
- The date and time (UTC) of the last modification of the EIM user.
- userId String
- The ID of the EIM user.
Look up Existing User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): User@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        creation_date: Optional[str] = None,
        last_modification_date: Optional[str] = None,
        outscale_user_id: Optional[str] = None,
        path: Optional[str] = None,
        policies: Optional[Sequence[UserPolicyArgs]] = None,
        user_email: Optional[str] = None,
        user_id: Optional[str] = None,
        user_name: Optional[str] = None) -> Userfunc GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)resources:  _:    type: outscale:User    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.
- CreationDate string
- The date and time (UTC) of creation of the EIM user.
- LastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- OutscaleUser stringId 
- Path string
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- Policies
List<UserPolicy> 
- UserEmail string
- The email address of the EIM user.
- UserId string
- The ID of the EIM user.
- UserName string
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- CreationDate string
- The date and time (UTC) of creation of the EIM user.
- LastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- OutscaleUser stringId 
- Path string
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- Policies
[]UserPolicy Args 
- UserEmail string
- The email address of the EIM user.
- UserId string
- The ID of the EIM user.
- UserName string
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- creationDate String
- The date and time (UTC) of creation of the EIM user.
- lastModification StringDate 
- The date and time (UTC) of the last modification of the EIM user.
- outscaleUser StringId 
- path String
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies
List<UserPolicy> 
- userEmail String
- The email address of the EIM user.
- userId String
- The ID of the EIM user.
- userName String
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- creationDate string
- The date and time (UTC) of creation of the EIM user.
- lastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- outscaleUser stringId 
- path string
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies
UserPolicy[] 
- userEmail string
- The email address of the EIM user.
- userId string
- The ID of the EIM user.
- userName string
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- creation_date str
- The date and time (UTC) of creation of the EIM user.
- last_modification_ strdate 
- The date and time (UTC) of the last modification of the EIM user.
- outscale_user_ strid 
- path str
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies
Sequence[UserPolicy Args] 
- user_email str
- The email address of the EIM user.
- user_id str
- The ID of the EIM user.
- user_name str
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
- creationDate String
- The date and time (UTC) of creation of the EIM user.
- lastModification StringDate 
- The date and time (UTC) of the last modification of the EIM user.
- outscaleUser StringId 
- path String
- The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
- policies List<Property Map>
- userEmail String
- The email address of the EIM user.
- userId String
- The ID of the EIM user.
- userName String
- The name of the EIM user. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).
Supporting Types
UserPolicy, UserPolicyArgs    
- PolicyOrn string
- CreationDate string
- The date and time (UTC) of creation of the EIM user.
- DefaultVersion stringId 
- The ID of a policy version that you want to make the default one (the active one).
- LastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- PolicyId string
- PolicyName string
- PolicyOrn string
- CreationDate string
- The date and time (UTC) of creation of the EIM user.
- DefaultVersion stringId 
- The ID of a policy version that you want to make the default one (the active one).
- LastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- PolicyId string
- PolicyName string
- policyOrn String
- creationDate String
- The date and time (UTC) of creation of the EIM user.
- defaultVersion StringId 
- The ID of a policy version that you want to make the default one (the active one).
- lastModification StringDate 
- The date and time (UTC) of the last modification of the EIM user.
- policyId String
- policyName String
- policyOrn string
- creationDate string
- The date and time (UTC) of creation of the EIM user.
- defaultVersion stringId 
- The ID of a policy version that you want to make the default one (the active one).
- lastModification stringDate 
- The date and time (UTC) of the last modification of the EIM user.
- policyId string
- policyName string
- policy_orn str
- creation_date str
- The date and time (UTC) of creation of the EIM user.
- default_version_ strid 
- The ID of a policy version that you want to make the default one (the active one).
- last_modification_ strdate 
- The date and time (UTC) of the last modification of the EIM user.
- policy_id str
- policy_name str
- policyOrn String
- creationDate String
- The date and time (UTC) of creation of the EIM user.
- defaultVersion StringId 
- The ID of a policy version that you want to make the default one (the active one).
- lastModification StringDate 
- The date and time (UTC) of the last modification of the EIM user.
- policyId String
- policyName String
Import
A user can be imported using its ID. For example:
console
$ pulumi import outscale:index/user:User user1 user_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- outscale outscale/terraform-provider-outscale
- License
- Notes
- This Pulumi package is based on the outscaleTerraform Provider.