volcengine.rds_postgresql.Allowlist
Explore with Pulumi AI
Provides a resource to manage rds postgresql allowlist
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Rds_postgresql.Allowlist("foo", new()
{
AllowLists = new[]
{
"192.168.0.0/24",
"192.168.1.0/24",
},
AllowListDesc = "acc-test",
AllowListName = "acc-test-allowlist",
AllowListType = "IPv4",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_postgresql"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rds_postgresql.NewAllowlist(ctx, "foo", &rds_postgresql.AllowlistArgs{
AllowLists: pulumi.StringArray{
pulumi.String("192.168.0.0/24"),
pulumi.String("192.168.1.0/24"),
},
AllowListDesc: pulumi.String("acc-test"),
AllowListName: pulumi.String("acc-test-allowlist"),
AllowListType: pulumi.String("IPv4"),
})
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.rds_postgresql.Allowlist;
import com.pulumi.volcengine.rds_postgresql.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(
"192.168.0.0/24",
"192.168.1.0/24")
.allowListDesc("acc-test")
.allowListName("acc-test-allowlist")
.allowListType("IPv4")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.rds_postgresql.Allowlist("foo",
allow_lists=[
"192.168.0.0/24",
"192.168.1.0/24",
],
allow_list_desc="acc-test",
allow_list_name="acc-test-allowlist",
allow_list_type="IPv4")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.rds_postgresql.Allowlist("foo", {
allowLists: [
"192.168.0.0/24",
"192.168.1.0/24",
],
allowListDesc: "acc-test",
allowListName: "acc-test-allowlist",
allowListType: "IPv4",
});
resources:
foo:
type: volcengine:rds_postgresql:Allowlist
properties:
allowLists:
- 192.168.0.0/24
- 192.168.1.0/24
allowListDesc: acc-test
allowListName: acc-test-allowlist
allowListType: IPv4
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,
allow_list_type: 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:rds_postgresql: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 volcengineAllowlistResource = new Volcengine.Rds_postgresql.Allowlist("volcengineAllowlistResource", new()
{
AllowListName = "string",
AllowLists = new[]
{
"string",
},
AllowListDesc = "string",
AllowListType = "string",
});
example, err := rds_postgresql.NewAllowlist(ctx, "volcengineAllowlistResource", &rds_postgresql.AllowlistArgs{
AllowListName: pulumi.String("string"),
AllowLists: pulumi.StringArray{
pulumi.String("string"),
},
AllowListDesc: pulumi.String("string"),
AllowListType: pulumi.String("string"),
})
var volcengineAllowlistResource = new Allowlist("volcengineAllowlistResource", AllowlistArgs.builder()
.allowListName("string")
.allowLists("string")
.allowListDesc("string")
.allowListType("string")
.build());
volcengine_allowlist_resource = volcengine.rds_postgresql.Allowlist("volcengineAllowlistResource",
allow_list_name="string",
allow_lists=["string"],
allow_list_desc="string",
allow_list_type="string")
const volcengineAllowlistResource = new volcengine.rds_postgresql.Allowlist("volcengineAllowlistResource", {
allowListName: "string",
allowLists: ["string"],
allowListDesc: "string",
allowListType: "string",
});
type: volcengine:rds_postgresql:Allowlist
properties:
allowListDesc: string
allowListName: string
allowListType: 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 - The name of the postgresql allow list.
- Allow
Lists List<string> - Enter an IP address or a range of IP addresses in CIDR format.
- Allow
List stringDesc - The description of the postgresql allow list.
- Allow
List stringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported.
- Allow
List stringName - The name of the postgresql allow list.
- Allow
Lists []string - Enter an IP address or a range of IP addresses in CIDR format.
- Allow
List stringDesc - The description of the postgresql allow list.
- Allow
List stringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported.
- allow
List StringName - The name of the postgresql allow list.
- allow
Lists List<String> - Enter an IP address or a range of IP addresses in CIDR format.
- allow
List StringDesc - The description of the postgresql allow list.
- allow
List StringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported.
- allow
List stringName - The name of the postgresql allow list.
- allow
Lists string[] - Enter an IP address or a range of IP addresses in CIDR format.
- allow
List stringDesc - The description of the postgresql allow list.
- allow
List stringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported.
- allow_
list_ strname - The name of the postgresql allow list.
- allow_
lists Sequence[str] - Enter an IP address or a range of IP addresses in CIDR format.
- allow_
list_ strdesc - The description of the postgresql allow list.
- allow_
list_ strtype - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported.
- allow
List StringName - The name of the postgresql allow list.
- allow
Lists List<String> - Enter an IP address or a range of IP addresses in CIDR format.
- allow
List StringDesc - The description of the postgresql allow list.
- allow
List StringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported.
Outputs
All input properties are implicitly available as output properties. Additionally, the Allowlist resource produces the following output properties:
- Associated
Instance intNum - The total number of instances bound under the whitelist.
- Associated
Instances List<AllowlistAssociated Instance> - The list of postgresql instances.
- Id string
- The provider-assigned unique ID for this managed resource.
- Associated
Instance intNum - The total number of instances bound under the whitelist.
- Associated
Instances []AllowlistAssociated Instance - The list of postgresql instances.
- Id string
- The provider-assigned unique ID for this managed resource.
- associated
Instance IntegerNum - The total number of instances bound under the whitelist.
- associated
Instances List<AllowlistAssociated Instance> - The list of postgresql instances.
- id String
- The provider-assigned unique ID for this managed resource.
- associated
Instance numberNum - The total number of instances bound under the whitelist.
- associated
Instances AllowlistAssociated Instance[] - The list of postgresql instances.
- id string
- The provider-assigned unique ID for this managed resource.
- associated_
instance_ intnum - The total number of instances bound under the whitelist.
- associated_
instances Sequence[AllowlistAssociated Instance] - The list of postgresql instances.
- id str
- The provider-assigned unique ID for this managed resource.
- associated
Instance NumberNum - The total number of instances bound under the whitelist.
- associated
Instances List<Property Map> - The list of postgresql instances.
- 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_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 - The description of the postgresql allow list.
- Allow
List stringName - The name of the postgresql allow list.
- Allow
List stringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported. - Allow
Lists List<string> - Enter an IP address or a range of IP addresses in CIDR format.
- Associated
Instance intNum - The total number of instances bound under the whitelist.
- Associated
Instances List<AllowlistAssociated Instance> - The list of postgresql instances.
- Allow
List stringDesc - The description of the postgresql allow list.
- Allow
List stringName - The name of the postgresql allow list.
- Allow
List stringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported. - Allow
Lists []string - Enter an IP address or a range of IP addresses in CIDR format.
- Associated
Instance intNum - The total number of instances bound under the whitelist.
- Associated
Instances []AllowlistAssociated Instance Args - The list of postgresql instances.
- allow
List StringDesc - The description of the postgresql allow list.
- allow
List StringName - The name of the postgresql allow list.
- allow
List StringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported. - allow
Lists List<String> - Enter an IP address or a range of IP addresses in CIDR format.
- associated
Instance IntegerNum - The total number of instances bound under the whitelist.
- associated
Instances List<AllowlistAssociated Instance> - The list of postgresql instances.
- allow
List stringDesc - The description of the postgresql allow list.
- allow
List stringName - The name of the postgresql allow list.
- allow
List stringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported. - allow
Lists string[] - Enter an IP address or a range of IP addresses in CIDR format.
- associated
Instance numberNum - The total number of instances bound under the whitelist.
- associated
Instances AllowlistAssociated Instance[] - The list of postgresql instances.
- allow_
list_ strdesc - The description of the postgresql allow list.
- allow_
list_ strname - The name of the postgresql allow list.
- allow_
list_ strtype - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported. - allow_
lists Sequence[str] - Enter an IP address or a range of IP addresses in CIDR format.
- associated_
instance_ intnum - The total number of instances bound under the whitelist.
- associated_
instances Sequence[AllowlistAssociated Instance Args] - The list of postgresql instances.
- allow
List StringDesc - The description of the postgresql allow list.
- allow
List StringName - The name of the postgresql allow list.
- allow
List StringType - The type of IP address in the whitelist. Currently only
IPv4
addresses are supported. - allow
Lists List<String> - Enter an IP address or a range of IP addresses in CIDR format.
- associated
Instance NumberNum - The total number of instances bound under the whitelist.
- associated
Instances List<Property Map> - The list of postgresql instances.
Supporting Types
AllowlistAssociatedInstance, AllowlistAssociatedInstanceArgs
- Instance
Id string - The id of the postgresql instance.
- Instance
Name string - The name of the postgresql instance.
- Vpc string
- The id of the vpc.
- Instance
Id string - The id of the postgresql instance.
- Instance
Name string - The name of the postgresql instance.
- Vpc string
- The id of the vpc.
- instance
Id String - The id of the postgresql instance.
- instance
Name String - The name of the postgresql instance.
- vpc String
- The id of the vpc.
- instance
Id string - The id of the postgresql instance.
- instance
Name string - The name of the postgresql instance.
- vpc string
- The id of the vpc.
- instance_
id str - The id of the postgresql instance.
- instance_
name str - The name of the postgresql instance.
- vpc str
- The id of the vpc.
- instance
Id String - The id of the postgresql instance.
- instance
Name String - The name of the postgresql instance.
- vpc String
- The id of the vpc.
Import
RdsPostgresqlAllowlist can be imported using the id, e.g.
$ pulumi import volcengine:rds_postgresql/allowlist:Allowlist default resource_id
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.