@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
214 lines (213 loc) • 7.24 kB
TypeScript
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,
* });
* ```
*/
/** @deprecated volcengine.redis.AllowLists has been deprecated in favor of volcengine.redis.getAllowLists */
export declare function allowLists(args: AllowListsArgs, opts?: pulumi.InvokeOptions): Promise<AllowListsResult>;
/**
* A collection of arguments for invoking AllowLists.
*/
export interface AllowListsArgs {
/**
* The Id of instance.
*/
instanceId?: string;
/**
* Filter out the whitelist that meets the conditions based on the IP address. When using IPAddress query, it will precisely match this IP address and filter the IP address segments containing this IP address.
*/
ipAddress?: string;
/**
* Screen out the whitelist that meets the conditions based on the IP address segment. When using IPSegment queries, the IP address segment will be precisely matched for filtering.
*/
ipSegment?: string;
/**
* A Name Regex of Allow List.
*/
nameRegex?: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
/**
* The name of the project to which the white list belongs.
*/
projectName?: string;
/**
* Filter whether to query only the default whitelist based on the type of whitelist.
*/
queryDefault?: boolean;
/**
* The Id of region.
*/
regionId: string;
}
/**
* A collection of values returned by AllowLists.
*/
export interface AllowListsResult {
/**
* Information of list of allow list.
*/
readonly allowLists: outputs.redis.AllowListsAllowList[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* Id of instance.
*/
readonly instanceId?: string;
readonly ipAddress?: string;
readonly ipSegment?: string;
readonly nameRegex?: string;
readonly outputFile?: string;
/**
* The name of the project to which the white list belongs.
*/
readonly projectName?: string;
readonly queryDefault?: boolean;
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,
* });
* ```
*/
/** @deprecated volcengine.redis.AllowLists has been deprecated in favor of volcengine.redis.getAllowLists */
export declare function allowListsOutput(args: AllowListsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<AllowListsResult>;
/**
* A collection of arguments for invoking AllowLists.
*/
export interface AllowListsOutputArgs {
/**
* The Id of instance.
*/
instanceId?: pulumi.Input<string>;
/**
* Filter out the whitelist that meets the conditions based on the IP address. When using IPAddress query, it will precisely match this IP address and filter the IP address segments containing this IP address.
*/
ipAddress?: pulumi.Input<string>;
/**
* Screen out the whitelist that meets the conditions based on the IP address segment. When using IPSegment queries, the IP address segment will be precisely matched for filtering.
*/
ipSegment?: 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 name of the project to which the white list belongs.
*/
projectName?: pulumi.Input<string>;
/**
* Filter whether to query only the default whitelist based on the type of whitelist.
*/
queryDefault?: pulumi.Input<boolean>;
/**
* The Id of region.
*/
regionId: pulumi.Input<string>;
}