volcengine.redis.AllowList
Explore with Pulumi AI
Provides a resource to manage redis allow list
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Redis.AllowList("foo", new()
{
AllowLists = new[]
{
"0.0.0.0/0",
"192.168.0.0/24",
"192.168.1.1",
"192.168.2.22",
},
AllowListDesc = "acctftestallowlist",
AllowListName = "acc_test_tf_allowlist_create",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/redis"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := redis.NewAllowList(ctx, "foo", &redis.AllowListArgs{
AllowLists: pulumi.StringArray{
pulumi.String("0.0.0.0/0"),
pulumi.String("192.168.0.0/24"),
pulumi.String("192.168.1.1"),
pulumi.String("192.168.2.22"),
},
AllowListDesc: pulumi.String("acctftestallowlist"),
AllowListName: pulumi.String("acc_test_tf_allowlist_create"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.redis.AllowList;
import com.pulumi.volcengine.redis.AllowListArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new AllowList("foo", AllowListArgs.builder()
.allowLists(
"0.0.0.0/0",
"192.168.0.0/24",
"192.168.1.1",
"192.168.2.22")
.allowListDesc("acctftestallowlist")
.allowListName("acc_test_tf_allowlist_create")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.redis.AllowList("foo",
allow_lists=[
"0.0.0.0/0",
"192.168.0.0/24",
"192.168.1.1",
"192.168.2.22",
],
allow_list_desc="acctftestallowlist",
allow_list_name="acc_test_tf_allowlist_create")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.redis.AllowList("foo", {
allowLists: [
"0.0.0.0/0",
"192.168.0.0/24",
"192.168.1.1",
"192.168.2.22",
],
allowListDesc: "acctftestallowlist",
allowListName: "acc_test_tf_allowlist_create",
});
resources:
foo:
type: volcengine:redis:AllowList
properties:
allowLists:
- 0.0.0.0/0
- 192.168.0.0/24
- 192.168.1.1
- 192.168.2.22
allowListDesc: acctftestallowlist
allowListName: acc_test_tf_allowlist_create
Create AllowList Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AllowList(name: string, args: AllowListArgs, opts?: CustomResourceOptions);
@overload
def AllowList(resource_name: str,
args: AllowListArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AllowList(resource_name: str,
opts: Optional[ResourceOptions] = None,
allow_list_name: Optional[str] = None,
allow_lists: Optional[Sequence[str]] = None,
allow_list_desc: Optional[str] = None)
func NewAllowList(ctx *Context, name string, args AllowListArgs, opts ...ResourceOption) (*AllowList, error)
public AllowList(string name, AllowListArgs args, CustomResourceOptions? opts = null)
public AllowList(String name, AllowListArgs args)
public AllowList(String name, AllowListArgs args, CustomResourceOptions options)
type: volcengine:redis:AllowList
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AllowListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AllowListArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AllowListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AllowListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AllowListArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var allowListResource = new Volcengine.Redis.AllowList("allowListResource", new()
{
AllowListName = "string",
AllowLists = new[]
{
"string",
},
AllowListDesc = "string",
});
example, err := redis.NewAllowList(ctx, "allowListResource", &redis.AllowListArgs{
AllowListName: pulumi.String("string"),
AllowLists: pulumi.StringArray{
pulumi.String("string"),
},
AllowListDesc: pulumi.String("string"),
})
var allowListResource = new AllowList("allowListResource", AllowListArgs.builder()
.allowListName("string")
.allowLists("string")
.allowListDesc("string")
.build());
allow_list_resource = volcengine.redis.AllowList("allowListResource",
allow_list_name="string",
allow_lists=["string"],
allow_list_desc="string")
const allowListResource = new volcengine.redis.AllowList("allowListResource", {
allowListName: "string",
allowLists: ["string"],
allowListDesc: "string",
});
type: volcengine:redis:AllowList
properties:
allowListDesc: string
allowListName: string
allowLists:
- string
AllowList Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AllowList resource accepts the following input properties:
- Allow
List stringName - Name of allow list.
- Allow
Lists List<string> - Ip list of allow list.
- Allow
List stringDesc - Description of allow list.
- Allow
List stringName - Name of allow list.
- Allow
Lists []string - Ip list of allow list.
- Allow
List stringDesc - Description of allow list.
- allow
List StringName - Name of allow list.
- allow
Lists List<String> - Ip list of allow list.
- allow
List StringDesc - Description of allow list.
- allow
List stringName - Name of allow list.
- allow
Lists string[] - Ip list of allow list.
- allow
List stringDesc - Description of allow list.
- allow_
list_ strname - Name of allow list.
- allow_
lists Sequence[str] - Ip list of allow list.
- allow_
list_ strdesc - Description of allow list.
- allow
List StringName - Name of allow list.
- allow
Lists List<String> - Ip list of allow list.
- allow
List StringDesc - Description of allow list.
Outputs
All input properties are implicitly available as output properties. Additionally, the AllowList resource produces the following output properties:
- Allow
List stringId - Id of allow list.
- Allow
List intIp Num - The IP number of allow list.
- Allow
List stringType - Type of allow list.
- Associated
Instance intNum - The number of instance that associated to allow list.
- Associated
Instances List<AllowList Associated Instance> - Instances associated by this allow list.
- Id string
- The provider-assigned unique ID for this managed resource.
- Allow
List stringId - Id of allow list.
- Allow
List intIp Num - The IP number of allow list.
- Allow
List stringType - Type of allow list.
- Associated
Instance intNum - The number of instance that associated to allow list.
- Associated
Instances []AllowList Associated Instance - Instances associated by this allow list.
- Id string
- The provider-assigned unique ID for this managed resource.
- allow
List StringId - Id of allow list.
- allow
List IntegerIp Num - The IP number of allow list.
- allow
List StringType - Type of allow list.
- associated
Instance IntegerNum - The number of instance that associated to allow list.
- associated
Instances List<AllowList Associated Instance> - Instances associated by this allow list.
- id String
- The provider-assigned unique ID for this managed resource.
- allow
List stringId - Id of allow list.
- allow
List numberIp Num - The IP number of allow list.
- allow
List stringType - Type of allow list.
- associated
Instance numberNum - The number of instance that associated to allow list.
- associated
Instances AllowList Associated Instance[] - Instances associated by this allow list.
- id string
- The provider-assigned unique ID for this managed resource.
- allow_
list_ strid - Id of allow list.
- allow_
list_ intip_ num - The IP number of allow list.
- allow_
list_ strtype - Type of allow list.
- associated_
instance_ intnum - The number of instance that associated to allow list.
- associated_
instances Sequence[AllowList Associated Instance] - Instances associated by this allow list.
- id str
- The provider-assigned unique ID for this managed resource.
- allow
List StringId - Id of allow list.
- allow
List NumberIp Num - The IP number of allow list.
- allow
List StringType - Type of allow list.
- associated
Instance NumberNum - The number of instance that associated to allow list.
- associated
Instances List<Property Map> - Instances associated by this allow list.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AllowList Resource
Get an existing AllowList resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AllowListState, opts?: CustomResourceOptions): AllowList
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_list_desc: Optional[str] = None,
allow_list_id: Optional[str] = None,
allow_list_ip_num: Optional[int] = None,
allow_list_name: Optional[str] = None,
allow_list_type: Optional[str] = None,
allow_lists: Optional[Sequence[str]] = None,
associated_instance_num: Optional[int] = None,
associated_instances: Optional[Sequence[AllowListAssociatedInstanceArgs]] = None) -> AllowList
func GetAllowList(ctx *Context, name string, id IDInput, state *AllowListState, opts ...ResourceOption) (*AllowList, error)
public static AllowList Get(string name, Input<string> id, AllowListState? state, CustomResourceOptions? opts = null)
public static AllowList get(String name, Output<String> id, AllowListState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allow
List stringDesc - Description of allow list.
- Allow
List stringId - Id of allow list.
- Allow
List intIp Num - The IP number of allow list.
- Allow
List stringName - Name of allow list.
- Allow
List stringType - Type of allow list.
- Allow
Lists List<string> - Ip list of allow list.
- Associated
Instance intNum - The number of instance that associated to allow list.
- Associated
Instances List<AllowList Associated Instance> - Instances associated by this allow list.
- Allow
List stringDesc - Description of allow list.
- Allow
List stringId - Id of allow list.
- Allow
List intIp Num - The IP number of allow list.
- Allow
List stringName - Name of allow list.
- Allow
List stringType - Type of allow list.
- Allow
Lists []string - Ip list of allow list.
- Associated
Instance intNum - The number of instance that associated to allow list.
- Associated
Instances []AllowList Associated Instance Args - Instances associated by this allow list.
- allow
List StringDesc - Description of allow list.
- allow
List StringId - Id of allow list.
- allow
List IntegerIp Num - The IP number of allow list.
- allow
List StringName - Name of allow list.
- allow
List StringType - Type of allow list.
- allow
Lists List<String> - Ip list of allow list.
- associated
Instance IntegerNum - The number of instance that associated to allow list.
- associated
Instances List<AllowList Associated Instance> - Instances associated by this allow list.
- allow
List stringDesc - Description of allow list.
- allow
List stringId - Id of allow list.
- allow
List numberIp Num - The IP number of allow list.
- allow
List stringName - Name of allow list.
- allow
List stringType - Type of allow list.
- allow
Lists string[] - Ip list of allow list.
- associated
Instance numberNum - The number of instance that associated to allow list.
- associated
Instances AllowList Associated Instance[] - Instances associated by this allow list.
- allow_
list_ strdesc - Description of allow list.
- allow_
list_ strid - Id of allow list.
- allow_
list_ intip_ num - The IP number of allow list.
- allow_
list_ strname - Name of allow list.
- allow_
list_ strtype - Type of allow list.
- allow_
lists Sequence[str] - Ip list of allow list.
- associated_
instance_ intnum - The number of instance that associated to allow list.
- associated_
instances Sequence[AllowList Associated Instance Args] - Instances associated by this allow list.
- allow
List StringDesc - Description of allow list.
- allow
List StringId - Id of allow list.
- allow
List NumberIp Num - The IP number of allow list.
- allow
List StringName - Name of allow list.
- allow
List StringType - Type of allow list.
- allow
Lists List<String> - Ip list of allow list.
- associated
Instance NumberNum - The number of instance that associated to allow list.
- associated
Instances List<Property Map> - Instances associated by this allow list.
Supporting Types
AllowListAssociatedInstance, AllowListAssociatedInstanceArgs
- Instance
Id string - Id of instance.
- Instance
Name string - Name of instance.
- Vpc string
- Id of virtual private cloud.
- Instance
Id string - Id of instance.
- Instance
Name string - Name of instance.
- Vpc string
- Id of virtual private cloud.
- instance
Id String - Id of instance.
- instance
Name String - Name of instance.
- vpc String
- Id of virtual private cloud.
- instance
Id string - Id of instance.
- instance
Name string - Name of instance.
- vpc string
- Id of virtual private cloud.
- instance_
id str - Id of instance.
- instance_
name str - Name of instance.
- vpc str
- Id of virtual private cloud.
- instance
Id String - Id of instance.
- instance
Name String - Name of instance.
- vpc String
- Id of virtual private cloud.
Import
Redis AllowList can be imported using the id, e.g.
$ pulumi import volcengine:redis/allowList:AllowList default acl-cn03wk541s55c376xxxx
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.