UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

172 lines (171 loc) 6.92 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * Manages a DDS database role resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const instanceId = config.requireObject("instanceId"); * const roleName = config.requireObject("roleName"); * const dbName = config.requireObject("dbName"); * const ownedRoleName = config.requireObject("ownedRoleName"); * const ownedRoleDbName = config.requireObject("ownedRoleDbName"); * const test = new huaweicloud.dds.DatabaseRole("test", { * instanceId: instanceId, * dbName: dbName, * roles: [{ * name: ownedRoleName, * dbName: ownedRoleDbName, * }], * }); * ``` * * ## Import * * DDS database roles can be imported using the `instance_id`, `db_name` and `name` separated by slashes (/), e.g. bash * * ```sh * $ pulumi import huaweicloud:Dds/databaseRole:DatabaseRole test <instance_id>/<db_name>/<name> * ``` */ export declare class DatabaseRole extends pulumi.CustomResource { /** * Get an existing DatabaseRole 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?: DatabaseRoleState, opts?: pulumi.CustomResourceOptions): DatabaseRole; /** * Returns true if the given object is an instance of DatabaseRole. 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 DatabaseRole; /** * Specifies the database name to which this owned role belongs. * Changing this parameter will create a new role. */ readonly dbName: pulumi.Output<string>; /** * The list of database privileges owned by the current role, includes all privileges * inherited by owned roles. The inheritedPrivileges structure is documented below. */ readonly inheritedPrivileges: pulumi.Output<outputs.Dds.DatabaseRoleInheritedPrivilege[]>; /** * Specifies the DDS instance ID to which the role belongs. * Changing this parameter will create a new role. */ readonly instanceId: pulumi.Output<string>; /** * Specifies the name of role owned by the current role. * The name can contain `1` to `64` characters, only letters, digits, underscores (_), hyphens (-) and dots (.) are * allowed. Changing this parameter will create a new role. */ readonly name: pulumi.Output<string>; /** * The list of database privileges owned by the current role. * The privileges structure is documented below. */ readonly privileges: pulumi.Output<outputs.Dds.DatabaseRolePrivilege[]>; /** * Specifies the region where the DDS instance is located. * Changing this parameter will create a new role. */ readonly region: pulumi.Output<string>; /** * Specifies the list of roles owned by the current role. * The roles structure is documented below. * Changing this parameter will create a new role. */ readonly roles: pulumi.Output<outputs.Dds.DatabaseRoleRole[]>; /** * Create a DatabaseRole 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: DatabaseRoleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DatabaseRole resources. */ export interface DatabaseRoleState { /** * Specifies the database name to which this owned role belongs. * Changing this parameter will create a new role. */ dbName?: pulumi.Input<string>; /** * The list of database privileges owned by the current role, includes all privileges * inherited by owned roles. The inheritedPrivileges structure is documented below. */ inheritedPrivileges?: pulumi.Input<pulumi.Input<inputs.Dds.DatabaseRoleInheritedPrivilege>[]>; /** * Specifies the DDS instance ID to which the role belongs. * Changing this parameter will create a new role. */ instanceId?: pulumi.Input<string>; /** * Specifies the name of role owned by the current role. * The name can contain `1` to `64` characters, only letters, digits, underscores (_), hyphens (-) and dots (.) are * allowed. Changing this parameter will create a new role. */ name?: pulumi.Input<string>; /** * The list of database privileges owned by the current role. * The privileges structure is documented below. */ privileges?: pulumi.Input<pulumi.Input<inputs.Dds.DatabaseRolePrivilege>[]>; /** * Specifies the region where the DDS instance is located. * Changing this parameter will create a new role. */ region?: pulumi.Input<string>; /** * Specifies the list of roles owned by the current role. * The roles structure is documented below. * Changing this parameter will create a new role. */ roles?: pulumi.Input<pulumi.Input<inputs.Dds.DatabaseRoleRole>[]>; } /** * The set of arguments for constructing a DatabaseRole resource. */ export interface DatabaseRoleArgs { /** * Specifies the database name to which this owned role belongs. * Changing this parameter will create a new role. */ dbName: pulumi.Input<string>; /** * Specifies the DDS instance ID to which the role belongs. * Changing this parameter will create a new role. */ instanceId: pulumi.Input<string>; /** * Specifies the name of role owned by the current role. * The name can contain `1` to `64` characters, only letters, digits, underscores (_), hyphens (-) and dots (.) are * allowed. Changing this parameter will create a new role. */ name?: pulumi.Input<string>; /** * Specifies the region where the DDS instance is located. * Changing this parameter will create a new role. */ region?: pulumi.Input<string>; /** * Specifies the list of roles owned by the current role. * The roles structure is documented below. * Changing this parameter will create a new role. */ roles?: pulumi.Input<pulumi.Input<inputs.Dds.DatabaseRoleRole>[]>; }