@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
316 lines (315 loc) • 10.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages a Linode User.
* For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/post-user).
*
* ## Example Usage
*
* Create an unrestricted user:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const john = new linode.User("john", {
* username: "john123",
* email: "john@acme.io",
* });
* ```
*
* Create a restricted user with grants:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const fooser = new linode.User("fooser", {
* username: "cooluser123",
* email: "cool@acme.io",
* restricted: true,
* globalGrants: {
* addLinodes: true,
* addImages: true,
* },
* linodeGrants: [{
* id: 12345,
* permissions: "read_write",
* }],
* });
* ```
*
* ## Global Grants
*
* * `accountAccess` - (optional) The level of access this User has to Account-level actions, like billing information. (`readOnly`, `readWrite`)
*
* * `addDomains` - (optional) If true, this User may add Domains.
*
* * `addDatabases` - (optional) If true, this User may add Databases.
*
* * `addFirewalls` - (optional) If true, this User may add Firewalls.
*
* * `addImages` - (optional) If true, this User may add Images.
*
* * `addLinodes` - (optional) If true, this User may create Linodes.
*
* * `addLongview` - (optional) If true, this User may create Longview clients and view the current plan.
*
* * `addNodebalancers` - (optional) If true, this User may add NodeBalancers.
*
* * `addPlacementGroups` - (optional) If true, this User may add Placement Groups.
*
* * `addStackscripts` - (optional) If true, this User may add StackScripts.
*
* * `addVpcs` - (optional) If true, this User may add Virtual Private Clouds (VPCs).
*
* * `cancelAccount` - (optional) If true, this User may cancel the entire Account.
*
* * `longviewSubscription` - (optional) If true, this User may manage the Account’s Longview subscription.
*
* ## Entity Grants
*
* * `id` - (required) The ID of the entity this grant applies to.
*
* * `permissions` - (required) The level of access this User has to this entity. (`readOnly`, `readWrite`)
*/
export declare class User extends pulumi.CustomResource {
/**
* Get an existing User resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserState, opts?: pulumi.CustomResourceOptions): User;
/**
* Returns true if the given object is an instance of User. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is User;
/**
* The domains the user has permissions access to.
*/
readonly domainGrants: pulumi.Output<outputs.UserDomainGrant[]>;
/**
* The email address of the user.
*/
readonly email: pulumi.Output<string>;
/**
* The firewalls the user has permissions access to.
*/
readonly firewallGrants: pulumi.Output<outputs.UserFirewallGrant[]>;
/**
* A structure containing the Account-level grants a User has.
*/
readonly globalGrants: pulumi.Output<outputs.UserGlobalGrants>;
/**
* The images the user has permissions access to.
*/
readonly imageGrants: pulumi.Output<outputs.UserImageGrant[]>;
/**
* The Linodes the user has permissions access to.
*/
readonly linodeGrants: pulumi.Output<outputs.UserLinodeGrant[]>;
/**
* The longview the user has permissions access to.
*/
readonly longviewGrants: pulumi.Output<outputs.UserLongviewGrant[]>;
/**
* The NodeBalancers the user has permissions access to.
*/
readonly nodebalancerGrants: pulumi.Output<outputs.UserNodebalancerGrant[]>;
/**
* The Placement Groups the user has permissions access to.
*/
readonly placementGroupGrants: pulumi.Output<outputs.UserPlacementGroupGrant[]>;
/**
* If true, this user will only have explicit permissions granted.
*
* * `globalGrants` - (optional) A structure containing the Account-level grants a User has.
*
* The following arguments are sets of entity grants:
*/
readonly restricted: pulumi.Output<boolean | undefined>;
/**
* A list of the User's SSH keys.
*/
readonly sshKeys: pulumi.Output<string[]>;
/**
* The StackScripts the user has permissions access to.
*/
readonly stackscriptGrants: pulumi.Output<outputs.UserStackscriptGrant[]>;
/**
* Whether the user has two-factor-authentication enabled.
*/
readonly tfaEnabled: pulumi.Output<boolean>;
/**
* The type of this user.
*/
readonly userType: pulumi.Output<string>;
/**
* The username of the user.
*/
readonly username: pulumi.Output<string>;
/**
* The volumes the user has permissions access to.
*/
readonly volumeGrants: pulumi.Output<outputs.UserVolumeGrant[]>;
/**
* The Virtual Private Clouds (VPCs) the user has permissions access to.
*/
readonly vpcGrants: pulumi.Output<outputs.UserVpcGrant[]>;
/**
* Create a User resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: UserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering User resources.
*/
export interface UserState {
/**
* The domains the user has permissions access to.
*/
domainGrants?: pulumi.Input<pulumi.Input<inputs.UserDomainGrant>[]>;
/**
* The email address of the user.
*/
email?: pulumi.Input<string>;
/**
* The firewalls the user has permissions access to.
*/
firewallGrants?: pulumi.Input<pulumi.Input<inputs.UserFirewallGrant>[]>;
/**
* A structure containing the Account-level grants a User has.
*/
globalGrants?: pulumi.Input<inputs.UserGlobalGrants>;
/**
* The images the user has permissions access to.
*/
imageGrants?: pulumi.Input<pulumi.Input<inputs.UserImageGrant>[]>;
/**
* The Linodes the user has permissions access to.
*/
linodeGrants?: pulumi.Input<pulumi.Input<inputs.UserLinodeGrant>[]>;
/**
* The longview the user has permissions access to.
*/
longviewGrants?: pulumi.Input<pulumi.Input<inputs.UserLongviewGrant>[]>;
/**
* The NodeBalancers the user has permissions access to.
*/
nodebalancerGrants?: pulumi.Input<pulumi.Input<inputs.UserNodebalancerGrant>[]>;
/**
* The Placement Groups the user has permissions access to.
*/
placementGroupGrants?: pulumi.Input<pulumi.Input<inputs.UserPlacementGroupGrant>[]>;
/**
* If true, this user will only have explicit permissions granted.
*
* * `globalGrants` - (optional) A structure containing the Account-level grants a User has.
*
* The following arguments are sets of entity grants:
*/
restricted?: pulumi.Input<boolean>;
/**
* A list of the User's SSH keys.
*/
sshKeys?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The StackScripts the user has permissions access to.
*/
stackscriptGrants?: pulumi.Input<pulumi.Input<inputs.UserStackscriptGrant>[]>;
/**
* Whether the user has two-factor-authentication enabled.
*/
tfaEnabled?: pulumi.Input<boolean>;
/**
* The type of this user.
*/
userType?: pulumi.Input<string>;
/**
* The username of the user.
*/
username?: pulumi.Input<string>;
/**
* The volumes the user has permissions access to.
*/
volumeGrants?: pulumi.Input<pulumi.Input<inputs.UserVolumeGrant>[]>;
/**
* The Virtual Private Clouds (VPCs) the user has permissions access to.
*/
vpcGrants?: pulumi.Input<pulumi.Input<inputs.UserVpcGrant>[]>;
}
/**
* The set of arguments for constructing a User resource.
*/
export interface UserArgs {
/**
* The domains the user has permissions access to.
*/
domainGrants?: pulumi.Input<pulumi.Input<inputs.UserDomainGrant>[]>;
/**
* The email address of the user.
*/
email: pulumi.Input<string>;
/**
* The firewalls the user has permissions access to.
*/
firewallGrants?: pulumi.Input<pulumi.Input<inputs.UserFirewallGrant>[]>;
/**
* A structure containing the Account-level grants a User has.
*/
globalGrants?: pulumi.Input<inputs.UserGlobalGrants>;
/**
* The images the user has permissions access to.
*/
imageGrants?: pulumi.Input<pulumi.Input<inputs.UserImageGrant>[]>;
/**
* The Linodes the user has permissions access to.
*/
linodeGrants?: pulumi.Input<pulumi.Input<inputs.UserLinodeGrant>[]>;
/**
* The longview the user has permissions access to.
*/
longviewGrants?: pulumi.Input<pulumi.Input<inputs.UserLongviewGrant>[]>;
/**
* The NodeBalancers the user has permissions access to.
*/
nodebalancerGrants?: pulumi.Input<pulumi.Input<inputs.UserNodebalancerGrant>[]>;
/**
* The Placement Groups the user has permissions access to.
*/
placementGroupGrants?: pulumi.Input<pulumi.Input<inputs.UserPlacementGroupGrant>[]>;
/**
* If true, this user will only have explicit permissions granted.
*
* * `globalGrants` - (optional) A structure containing the Account-level grants a User has.
*
* The following arguments are sets of entity grants:
*/
restricted?: pulumi.Input<boolean>;
/**
* The StackScripts the user has permissions access to.
*/
stackscriptGrants?: pulumi.Input<pulumi.Input<inputs.UserStackscriptGrant>[]>;
/**
* The username of the user.
*/
username: pulumi.Input<string>;
/**
* The volumes the user has permissions access to.
*/
volumeGrants?: pulumi.Input<pulumi.Input<inputs.UserVolumeGrant>[]>;
/**
* The Virtual Private Clouds (VPCs) the user has permissions access to.
*/
vpcGrants?: pulumi.Input<pulumi.Input<inputs.UserVpcGrant>[]>;
}