@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
213 lines (212 loc) • 7.41 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manage an RDS PostgreSQL SQL limit 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 instance = new huaweicloud.rds.PgSqlLimit("instance", {
* instanceId: instanceId,
* dbName: dbName,
* queryId: "5",
* maxConcurrency: 20,
* maxWaiting: 5,
* });
* ```
*
* ## Import
*
* The SQL limit can be imported using the `instance_id`, `db_name` and `sql_limit_id`, separated by slashes, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Rds/pgSqlLimit:PgSqlLimit test <instance_id>/<db_name>/<sql_limit_id>
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`query_id`, `query_string`. It is generally recommended running `terraform plan` after importing an RDS PostgreSQL SQL limit. You can then decide if changes should be applied to the RDS PostgreSQL SQL limit, or the resource definition should be updated to align with the RDS PostgreSQL SQL limit. Also, you can ignore changes as below. hcl resource "huaweicloud_rds_pg_sql_limit" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* "query_id", "query_string",
*
* ]
*
* } }
*/
export declare class PgSqlLimit extends pulumi.CustomResource {
/**
* Get an existing PgSqlLimit 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?: PgSqlLimitState, opts?: pulumi.CustomResourceOptions): PgSqlLimit;
/**
* Returns true if the given object is an instance of PgSqlLimit. 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 PgSqlLimit;
/**
* Specifies the name of the database.
*/
readonly dbName: pulumi.Output<string>;
/**
* Specifies the ID of RDS PostgreSQL instance.
*/
readonly instanceId: pulumi.Output<string>;
/**
* Indicates whether the SQL limit is effective.
*/
readonly isEffective: pulumi.Output<boolean>;
/**
* Specifies the number of SQL statements executed simultaneously.
* Value ranges from `0` to `50000`. `0` means no limit.
*/
readonly maxConcurrency: pulumi.Output<number>;
/**
* Specifies the max waiting time in seconds.
*/
readonly maxWaiting: pulumi.Output<number>;
/**
* Specifies the query ID. Value ranges: **-9223372036854775808~9223372036854775807**.
*/
readonly queryId: pulumi.Output<string | undefined>;
/**
* Specifies the text form of SQL statement.
*/
readonly queryString: pulumi.Output<string | undefined>;
/**
* The region in which to create the rds PostgreSQL SQL limit resource. If omitted,
* the provider-level region will be used. Changing this creates a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the query order for names that are not schema qualified.
* Defaults to **public**,
*/
readonly searchPath: pulumi.Output<string | undefined>;
/**
* Indicates the ID of SQL limit.
*/
readonly sqlLimitId: pulumi.Output<string>;
/**
* Specifies the SQL limit switch. Value options: **open**, **close**.
*/
readonly switch: pulumi.Output<string>;
/**
* Create a PgSqlLimit 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: PgSqlLimitArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PgSqlLimit resources.
*/
export interface PgSqlLimitState {
/**
* Specifies the name of the database.
*/
dbName?: pulumi.Input<string>;
/**
* Specifies the ID of RDS PostgreSQL instance.
*/
instanceId?: pulumi.Input<string>;
/**
* Indicates whether the SQL limit is effective.
*/
isEffective?: pulumi.Input<boolean>;
/**
* Specifies the number of SQL statements executed simultaneously.
* Value ranges from `0` to `50000`. `0` means no limit.
*/
maxConcurrency?: pulumi.Input<number>;
/**
* Specifies the max waiting time in seconds.
*/
maxWaiting?: pulumi.Input<number>;
/**
* Specifies the query ID. Value ranges: **-9223372036854775808~9223372036854775807**.
*/
queryId?: pulumi.Input<string>;
/**
* Specifies the text form of SQL statement.
*/
queryString?: pulumi.Input<string>;
/**
* The region in which to create the rds PostgreSQL SQL limit resource. If omitted,
* the provider-level region will be used. Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the query order for names that are not schema qualified.
* Defaults to **public**,
*/
searchPath?: pulumi.Input<string>;
/**
* Indicates the ID of SQL limit.
*/
sqlLimitId?: pulumi.Input<string>;
/**
* Specifies the SQL limit switch. Value options: **open**, **close**.
*/
switch?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a PgSqlLimit resource.
*/
export interface PgSqlLimitArgs {
/**
* Specifies the name of the database.
*/
dbName: pulumi.Input<string>;
/**
* Specifies the ID of RDS PostgreSQL instance.
*/
instanceId: pulumi.Input<string>;
/**
* Specifies the number of SQL statements executed simultaneously.
* Value ranges from `0` to `50000`. `0` means no limit.
*/
maxConcurrency: pulumi.Input<number>;
/**
* Specifies the max waiting time in seconds.
*/
maxWaiting: pulumi.Input<number>;
/**
* Specifies the query ID. Value ranges: **-9223372036854775808~9223372036854775807**.
*/
queryId?: pulumi.Input<string>;
/**
* Specifies the text form of SQL statement.
*/
queryString?: pulumi.Input<string>;
/**
* The region in which to create the rds PostgreSQL SQL limit resource. If omitted,
* the provider-level region will be used. Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the query order for names that are not schema qualified.
* Defaults to **public**,
*/
searchPath?: pulumi.Input<string>;
/**
* Specifies the SQL limit switch. Value options: **open**, **close**.
*/
switch?: pulumi.Input<string>;
}