1. Packages
  2. Volcengine
  3. API Docs
  4. mongodb
  5. MongoAllowList
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.mongodb.MongoAllowList

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    Provides a resource to manage mongodb 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.Mongodb.MongoAllowList("foo", new()
        {
            AllowList = "10.1.1.3,10.2.3.0/24,10.1.1.1",
            AllowListDesc = "acc-test",
            AllowListName = "acc-test",
            AllowListType = "IPv4",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/mongodb"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodb.NewMongoAllowList(ctx, "foo", &mongodb.MongoAllowListArgs{
    			AllowList:     pulumi.String("10.1.1.3,10.2.3.0/24,10.1.1.1"),
    			AllowListDesc: pulumi.String("acc-test"),
    			AllowListName: pulumi.String("acc-test"),
    			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.mongodb.MongoAllowList;
    import com.pulumi.volcengine.mongodb.MongoAllowListArgs;
    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 MongoAllowList("foo", MongoAllowListArgs.builder()        
                .allowList("10.1.1.3,10.2.3.0/24,10.1.1.1")
                .allowListDesc("acc-test")
                .allowListName("acc-test")
                .allowListType("IPv4")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.mongodb.MongoAllowList("foo",
        allow_list="10.1.1.3,10.2.3.0/24,10.1.1.1",
        allow_list_desc="acc-test",
        allow_list_name="acc-test",
        allow_list_type="IPv4")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.mongodb.MongoAllowList("foo", {
        allowList: "10.1.1.3,10.2.3.0/24,10.1.1.1",
        allowListDesc: "acc-test",
        allowListName: "acc-test",
        allowListType: "IPv4",
    });
    
    resources:
      foo:
        type: volcengine:mongodb:MongoAllowList
        properties:
          allowList: 10.1.1.3,10.2.3.0/24,10.1.1.1
          allowListDesc: acc-test
          allowListName: acc-test
          allowListType: IPv4
    

    Create MongoAllowList Resource

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

    Constructor syntax

    new MongoAllowList(name: string, args: MongoAllowListArgs, opts?: CustomResourceOptions);
    @overload
    def MongoAllowList(resource_name: str,
                       args: MongoAllowListArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def MongoAllowList(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       allow_list: Optional[str] = None,
                       allow_list_name: Optional[str] = None,
                       allow_list_desc: Optional[str] = None,
                       allow_list_type: Optional[str] = None)
    func NewMongoAllowList(ctx *Context, name string, args MongoAllowListArgs, opts ...ResourceOption) (*MongoAllowList, error)
    public MongoAllowList(string name, MongoAllowListArgs args, CustomResourceOptions? opts = null)
    public MongoAllowList(String name, MongoAllowListArgs args)
    public MongoAllowList(String name, MongoAllowListArgs args, CustomResourceOptions options)
    
    type: volcengine:mongodb:MongoAllowList
    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 MongoAllowListArgs
    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 MongoAllowListArgs
    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 MongoAllowListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MongoAllowListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MongoAllowListArgs
    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 mongoAllowListResource = new Volcengine.Mongodb.MongoAllowList("mongoAllowListResource", new()
    {
        AllowList = "string",
        AllowListName = "string",
        AllowListDesc = "string",
        AllowListType = "string",
    });
    
    example, err := mongodb.NewMongoAllowList(ctx, "mongoAllowListResource", &mongodb.MongoAllowListArgs{
    	AllowList:     pulumi.String("string"),
    	AllowListName: pulumi.String("string"),
    	AllowListDesc: pulumi.String("string"),
    	AllowListType: pulumi.String("string"),
    })
    
    var mongoAllowListResource = new MongoAllowList("mongoAllowListResource", MongoAllowListArgs.builder()
        .allowList("string")
        .allowListName("string")
        .allowListDesc("string")
        .allowListType("string")
        .build());
    
    mongo_allow_list_resource = volcengine.mongodb.MongoAllowList("mongoAllowListResource",
        allow_list="string",
        allow_list_name="string",
        allow_list_desc="string",
        allow_list_type="string")
    
    const mongoAllowListResource = new volcengine.mongodb.MongoAllowList("mongoAllowListResource", {
        allowList: "string",
        allowListName: "string",
        allowListDesc: "string",
        allowListType: "string",
    });
    
    type: volcengine:mongodb:MongoAllowList
    properties:
        allowList: string
        allowListDesc: string
        allowListName: string
        allowListType: string
    

    MongoAllowList Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The MongoAllowList resource accepts the following input properties:

    AllowList string
    IP address or IP address segment in CIDR format.
    AllowListName string
    The name of allow list.
    AllowListDesc string
    The description of allow list.
    AllowListType string
    The IP address type of allow list, valid value contains IPv4.
    AllowList string
    IP address or IP address segment in CIDR format.
    AllowListName string
    The name of allow list.
    AllowListDesc string
    The description of allow list.
    AllowListType string
    The IP address type of allow list, valid value contains IPv4.
    allowList String
    IP address or IP address segment in CIDR format.
    allowListName String
    The name of allow list.
    allowListDesc String
    The description of allow list.
    allowListType String
    The IP address type of allow list, valid value contains IPv4.
    allowList string
    IP address or IP address segment in CIDR format.
    allowListName string
    The name of allow list.
    allowListDesc string
    The description of allow list.
    allowListType string
    The IP address type of allow list, valid value contains IPv4.
    allow_list str
    IP address or IP address segment in CIDR format.
    allow_list_name str
    The name of allow list.
    allow_list_desc str
    The description of allow list.
    allow_list_type str
    The IP address type of allow list, valid value contains IPv4.
    allowList String
    IP address or IP address segment in CIDR format.
    allowListName String
    The name of allow list.
    allowListDesc String
    The description of allow list.
    allowListType String
    The IP address type of allow list, valid value contains IPv4.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MongoAllowList 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 MongoAllowList Resource

    Get an existing MongoAllowList 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?: MongoAllowListState, opts?: CustomResourceOptions): MongoAllowList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_list: Optional[str] = None,
            allow_list_desc: Optional[str] = None,
            allow_list_name: Optional[str] = None,
            allow_list_type: Optional[str] = None) -> MongoAllowList
    func GetMongoAllowList(ctx *Context, name string, id IDInput, state *MongoAllowListState, opts ...ResourceOption) (*MongoAllowList, error)
    public static MongoAllowList Get(string name, Input<string> id, MongoAllowListState? state, CustomResourceOptions? opts = null)
    public static MongoAllowList get(String name, Output<String> id, MongoAllowListState 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.
    The following state arguments are supported:
    AllowList string
    IP address or IP address segment in CIDR format.
    AllowListDesc string
    The description of allow list.
    AllowListName string
    The name of allow list.
    AllowListType string
    The IP address type of allow list, valid value contains IPv4.
    AllowList string
    IP address or IP address segment in CIDR format.
    AllowListDesc string
    The description of allow list.
    AllowListName string
    The name of allow list.
    AllowListType string
    The IP address type of allow list, valid value contains IPv4.
    allowList String
    IP address or IP address segment in CIDR format.
    allowListDesc String
    The description of allow list.
    allowListName String
    The name of allow list.
    allowListType String
    The IP address type of allow list, valid value contains IPv4.
    allowList string
    IP address or IP address segment in CIDR format.
    allowListDesc string
    The description of allow list.
    allowListName string
    The name of allow list.
    allowListType string
    The IP address type of allow list, valid value contains IPv4.
    allow_list str
    IP address or IP address segment in CIDR format.
    allow_list_desc str
    The description of allow list.
    allow_list_name str
    The name of allow list.
    allow_list_type str
    The IP address type of allow list, valid value contains IPv4.
    allowList String
    IP address or IP address segment in CIDR format.
    allowListDesc String
    The description of allow list.
    allowListName String
    The name of allow list.
    allowListType String
    The IP address type of allow list, valid value contains IPv4.

    Import

    mongodb allow list can be imported using the allowListId, e.g.

     $ pulumi import volcengine:mongodb/mongoAllowList:MongoAllowList default acl-d1fd76693bd54e658912e7337d5b****
    

    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.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine