@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
127 lines (126 loc) • 4.73 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages RDS SQL Server database privilege 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 dbName = config.requireObject("dbName");
* const userName1 = config.requireObject("userName1");
* const userName2 = config.requireObject("userName2");
* const test = new huaweicloud.rds.SqlserverDatabasePrivilege("test", {
* instanceId: instanceId,
* dbName: dbName,
* users: [
* {
* name: userName1,
* readonly: true,
* },
* {
* name: userName2,
* readonly: false,
* },
* ],
* });
* ```
*
* ## Import
*
* The RDS SQL Server database privilege can be imported using the `instance_id` and `db_name` separated by a slash, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Rds/sqlserverDatabasePrivilege:SqlserverDatabasePrivilege test <instance_id>/<db_name>
* ```
*/
export declare class SqlserverDatabasePrivilege extends pulumi.CustomResource {
/**
* Get an existing SqlserverDatabasePrivilege 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?: SqlserverDatabasePrivilegeState, opts?: pulumi.CustomResourceOptions): SqlserverDatabasePrivilege;
/**
* Returns true if the given object is an instance of SqlserverDatabasePrivilege. 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 SqlserverDatabasePrivilege;
/**
* Specifies the database name.
*/
readonly dbName: pulumi.Output<string>;
/**
* Specifies the ID of the RDS SQL Server instance.
*/
readonly instanceId: pulumi.Output<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the account that associated with the database
*/
readonly users: pulumi.Output<outputs.Rds.SqlserverDatabasePrivilegeUser[]>;
/**
* Create a SqlserverDatabasePrivilege 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: SqlserverDatabasePrivilegeArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SqlserverDatabasePrivilege resources.
*/
export interface SqlserverDatabasePrivilegeState {
/**
* Specifies the database name.
*/
dbName?: pulumi.Input<string>;
/**
* Specifies the ID of the RDS SQL Server instance.
*/
instanceId?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the account that associated with the database
*/
users?: pulumi.Input<pulumi.Input<inputs.Rds.SqlserverDatabasePrivilegeUser>[]>;
}
/**
* The set of arguments for constructing a SqlserverDatabasePrivilege resource.
*/
export interface SqlserverDatabasePrivilegeArgs {
/**
* Specifies the database name.
*/
dbName: pulumi.Input<string>;
/**
* Specifies the ID of the RDS SQL Server instance.
*/
instanceId: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the account that associated with the database
*/
users: pulumi.Input<pulumi.Input<inputs.Rds.SqlserverDatabasePrivilegeUser>[]>;
}