@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
137 lines (136 loc) • 5.21 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages user permissions for the SWR organization resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const organizationName = config.requireObject("organizationName");
* const user1 = config.requireObject("user1");
* const user2 = config.requireObject("user2");
* const test = new huaweicloud.swr.OrganizationPermissions("test", {
* organization: organizationName,
* users: [
* {
* userName: user1.name,
* userId: user1.id,
* permission: "Read",
* },
* {
* userName: user2.name,
* userId: user2.id,
* permission: "Read",
* },
* ],
* });
* ```
*
* ## Import
*
* Organization Permissions can be imported using the `id` (organization name), e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Swr/organizationPermissions:OrganizationPermissions test terraform-test
* ```
*/
export declare class OrganizationPermissions extends pulumi.CustomResource {
/**
* Get an existing OrganizationPermissions 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?: OrganizationPermissionsState, opts?: pulumi.CustomResourceOptions): OrganizationPermissions;
/**
* Returns true if the given object is an instance of OrganizationPermissions. 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 OrganizationPermissions;
/**
* The creator user name of the organization.
*/
readonly creator: pulumi.Output<string>;
/**
* Specifies the name of the organization (namespace) to be accessed.
* Changing this creates a new resource.
*/
readonly organization: pulumi.Output<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.
*/
readonly region: pulumi.Output<string>;
/**
* The permission information of current user.
*/
readonly selfPermissions: pulumi.Output<outputs.Swr.OrganizationPermissionsSelfPermission[]>;
/**
* Specifies the users to access to the organization (namespace).
* Structure is documented below.
*/
readonly users: pulumi.Output<outputs.Swr.OrganizationPermissionsUser[]>;
/**
* Create a OrganizationPermissions 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: OrganizationPermissionsArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OrganizationPermissions resources.
*/
export interface OrganizationPermissionsState {
/**
* The creator user name of the organization.
*/
creator?: pulumi.Input<string>;
/**
* Specifies the name of the organization (namespace) to be accessed.
* Changing this creates a new resource.
*/
organization?: pulumi.Input<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.
*/
region?: pulumi.Input<string>;
/**
* The permission information of current user.
*/
selfPermissions?: pulumi.Input<pulumi.Input<inputs.Swr.OrganizationPermissionsSelfPermission>[]>;
/**
* Specifies the users to access to the organization (namespace).
* Structure is documented below.
*/
users?: pulumi.Input<pulumi.Input<inputs.Swr.OrganizationPermissionsUser>[]>;
}
/**
* The set of arguments for constructing a OrganizationPermissions resource.
*/
export interface OrganizationPermissionsArgs {
/**
* Specifies the name of the organization (namespace) to be accessed.
* Changing this creates a new resource.
*/
organization: pulumi.Input<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.
*/
region?: pulumi.Input<string>;
/**
* Specifies the users to access to the organization (namespace).
* Structure is documented below.
*/
users: pulumi.Input<pulumi.Input<inputs.Swr.OrganizationPermissionsUser>[]>;
}