UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

173 lines (172 loc) 5.34 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of redis allow lists * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooAllowList = new volcengine.redis.AllowList("fooAllowList", { * allowLists: ["192.168.0.0/24"], * allowListName: "acc-test-allowlist", * }); * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooInstance = new volcengine.redis.Instance("fooInstance", { * zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)], * instanceName: "acc-test-tf-redis", * shardedCluster: 1, * password: "1qaz!QAZ12", * nodeNumber: 2, * shardCapacity: 1024, * shardNumber: 2, * engineVersion: "5.0", * subnetId: fooSubnet.id, * deletionProtection: "disabled", * vpcAuthMode: "close", * chargeType: "PostPaid", * port: 6381, * projectName: "default", * }); * const fooAllowListAssociate = new volcengine.redis.AllowListAssociate("fooAllowListAssociate", { * allowListId: fooAllowList.id, * instanceId: fooInstance.id, * }); * const fooAllowLists = volcengine.redis.getAllowListsOutput({ * instanceId: fooAllowListAssociate.instanceId, * regionId: "cn-beijing", * nameRegex: fooAllowList.allowListName, * }); * ``` */ export declare function getAllowLists(args: GetAllowListsArgs, opts?: pulumi.InvokeOptions): Promise<GetAllowListsResult>; /** * A collection of arguments for invoking getAllowLists. */ export interface GetAllowListsArgs { /** * The Id of instance. */ instanceId?: string; /** * A Name Regex of Allow List. */ nameRegex?: string; /** * File name where to save data source results. */ outputFile?: string; /** * The Id of region. */ regionId: string; } /** * A collection of values returned by getAllowLists. */ export interface GetAllowListsResult { /** * Information of list of allow list. */ readonly allowLists: outputs.redis.GetAllowListsAllowList[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * Id of instance. */ readonly instanceId?: string; readonly nameRegex?: string; readonly outputFile?: string; readonly regionId: string; /** * The total count of allow list query. */ readonly totalCount: number; } /** * Use this data source to query detailed information of redis allow lists * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooAllowList = new volcengine.redis.AllowList("fooAllowList", { * allowLists: ["192.168.0.0/24"], * allowListName: "acc-test-allowlist", * }); * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooInstance = new volcengine.redis.Instance("fooInstance", { * zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)], * instanceName: "acc-test-tf-redis", * shardedCluster: 1, * password: "1qaz!QAZ12", * nodeNumber: 2, * shardCapacity: 1024, * shardNumber: 2, * engineVersion: "5.0", * subnetId: fooSubnet.id, * deletionProtection: "disabled", * vpcAuthMode: "close", * chargeType: "PostPaid", * port: 6381, * projectName: "default", * }); * const fooAllowListAssociate = new volcengine.redis.AllowListAssociate("fooAllowListAssociate", { * allowListId: fooAllowList.id, * instanceId: fooInstance.id, * }); * const fooAllowLists = volcengine.redis.getAllowListsOutput({ * instanceId: fooAllowListAssociate.instanceId, * regionId: "cn-beijing", * nameRegex: fooAllowList.allowListName, * }); * ``` */ export declare function getAllowListsOutput(args: GetAllowListsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetAllowListsResult>; /** * A collection of arguments for invoking getAllowLists. */ export interface GetAllowListsOutputArgs { /** * The Id of instance. */ instanceId?: pulumi.Input<string>; /** * A Name Regex of Allow List. */ nameRegex?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * The Id of region. */ regionId: pulumi.Input<string>; }