1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. WhitelistTemplate
Alibaba Cloud v3.83.0 published on Monday, Jul 21, 2025 by Pulumi

alicloud.rds.WhitelistTemplate

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.83.0 published on Monday, Jul 21, 2025 by Pulumi

    Provide a whitelist template resource.

    For information about Resource AliCloudWhitelistTemplate and how to use it, see What is Whitelist Template.

    NOTE: Available since v1.254.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.rds.WhitelistTemplate("example", {
        ipWhiteList: "172.16.0.0",
        templateName: "example-whitelist",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.rds.WhitelistTemplate("example",
        ip_white_list="172.16.0.0",
        template_name="example-whitelist")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rds.NewWhitelistTemplate(ctx, "example", &rds.WhitelistTemplateArgs{
    			IpWhiteList:  pulumi.String("172.16.0.0"),
    			TemplateName: pulumi.String("example-whitelist"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AliCloud.Rds.WhitelistTemplate("example", new()
        {
            IpWhiteList = "172.16.0.0",
            TemplateName = "example-whitelist",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.WhitelistTemplate;
    import com.pulumi.alicloud.rds.WhitelistTemplateArgs;
    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 example = new WhitelistTemplate("example", WhitelistTemplateArgs.builder()
                .ipWhiteList("172.16.0.0")
                .templateName("example-whitelist")
                .build());
    
        }
    }
    
    resources:
      example:
        type: alicloud:rds:WhitelistTemplate
        properties:
          ipWhiteList: 172.16.0.0
          templateName: example-whitelist
    

    Create WhitelistTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WhitelistTemplate(name: string, args: WhitelistTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def WhitelistTemplate(resource_name: str,
                          args: WhitelistTemplateArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def WhitelistTemplate(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          ip_white_list: Optional[str] = None,
                          template_name: Optional[str] = None)
    func NewWhitelistTemplate(ctx *Context, name string, args WhitelistTemplateArgs, opts ...ResourceOption) (*WhitelistTemplate, error)
    public WhitelistTemplate(string name, WhitelistTemplateArgs args, CustomResourceOptions? opts = null)
    public WhitelistTemplate(String name, WhitelistTemplateArgs args)
    public WhitelistTemplate(String name, WhitelistTemplateArgs args, CustomResourceOptions options)
    
    type: alicloud:rds:WhitelistTemplate
    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 WhitelistTemplateArgs
    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 WhitelistTemplateArgs
    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 WhitelistTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WhitelistTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WhitelistTemplateArgs
    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 whitelistTemplateResource = new AliCloud.Rds.WhitelistTemplate("whitelistTemplateResource", new()
    {
        IpWhiteList = "string",
        TemplateName = "string",
    });
    
    example, err := rds.NewWhitelistTemplate(ctx, "whitelistTemplateResource", &rds.WhitelistTemplateArgs{
    	IpWhiteList:  pulumi.String("string"),
    	TemplateName: pulumi.String("string"),
    })
    
    var whitelistTemplateResource = new WhitelistTemplate("whitelistTemplateResource", WhitelistTemplateArgs.builder()
        .ipWhiteList("string")
        .templateName("string")
        .build());
    
    whitelist_template_resource = alicloud.rds.WhitelistTemplate("whitelistTemplateResource",
        ip_white_list="string",
        template_name="string")
    
    const whitelistTemplateResource = new alicloud.rds.WhitelistTemplate("whitelistTemplateResource", {
        ipWhiteList: "string",
        templateName: "string",
    });
    
    type: alicloud:rds:WhitelistTemplate
    properties:
        ipWhiteList: string
        templateName: string
    

    WhitelistTemplate 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 WhitelistTemplate resource accepts the following input properties:

    IpWhiteList string
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    TemplateName string
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    IpWhiteList string
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    TemplateName string
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ipWhiteList String
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    templateName String
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ipWhiteList string
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    templateName string
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ip_white_list str
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    template_name str
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ipWhiteList String
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    templateName String
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WhitelistTemplate resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing WhitelistTemplate Resource

    Get an existing WhitelistTemplate 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?: WhitelistTemplateState, opts?: CustomResourceOptions): WhitelistTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_white_list: Optional[str] = None,
            template_name: Optional[str] = None) -> WhitelistTemplate
    func GetWhitelistTemplate(ctx *Context, name string, id IDInput, state *WhitelistTemplateState, opts ...ResourceOption) (*WhitelistTemplate, error)
    public static WhitelistTemplate Get(string name, Input<string> id, WhitelistTemplateState? state, CustomResourceOptions? opts = null)
    public static WhitelistTemplate get(String name, Output<String> id, WhitelistTemplateState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:rds:WhitelistTemplate    get:      id: ${id}
    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.
    The following state arguments are supported:
    IpWhiteList string
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    TemplateName string
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    IpWhiteList string
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    TemplateName string
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ipWhiteList String
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    templateName String
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ipWhiteList string
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    templateName string
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ip_white_list str
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    template_name str
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.
    ipWhiteList String
    IP whitelist, multiple IP addresses should be separated by commas (,) and cannot be duplicated.Supports the following two formats:

    • IP address format, for example: 10.23.XX.XX.
    • CIDR format, for example: 10.23.XX.XX/24 (no inter domain routing, 24 represents the length of the prefix in the address, ranging from 1 to 32).
    templateName String
    Whitelist template name. Passed in when creating a template, and cannot have the same name under the same account, starting with a letter.

    Import

    You can use the whitelist template ID to import whitelist templates, e.g.

    $ pulumi import alicloud:rds/whitelistTemplate:WhitelistTemplate example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.83.0 published on Monday, Jul 21, 2025 by Pulumi