volcengine.mongodb.MongoAllowList
Explore with Pulumi AI
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:
- Allow
List string - IP address or IP address segment in CIDR format.
- Allow
List stringName - The name of allow list.
- Allow
List stringDesc - The description of allow list.
- Allow
List stringType - The IP address type of allow list, valid value contains
IPv4
.
- Allow
List string - IP address or IP address segment in CIDR format.
- Allow
List stringName - The name of allow list.
- Allow
List stringDesc - The description of allow list.
- Allow
List stringType - The IP address type of allow list, valid value contains
IPv4
.
- allow
List String - IP address or IP address segment in CIDR format.
- allow
List StringName - The name of allow list.
- allow
List StringDesc - The description of allow list.
- allow
List StringType - The IP address type of allow list, valid value contains
IPv4
.
- allow
List string - IP address or IP address segment in CIDR format.
- allow
List stringName - The name of allow list.
- allow
List stringDesc - The description of allow list.
- allow
List stringType - 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_ strname - The name of allow list.
- allow_
list_ strdesc - The description of allow list.
- allow_
list_ strtype - The IP address type of allow list, valid value contains
IPv4
.
- allow
List String - IP address or IP address segment in CIDR format.
- allow
List StringName - The name of allow list.
- allow
List StringDesc - The description of allow list.
- allow
List StringType - 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.
- Allow
List string - IP address or IP address segment in CIDR format.
- Allow
List stringDesc - The description of allow list.
- Allow
List stringName - The name of allow list.
- Allow
List stringType - The IP address type of allow list, valid value contains
IPv4
.
- Allow
List string - IP address or IP address segment in CIDR format.
- Allow
List stringDesc - The description of allow list.
- Allow
List stringName - The name of allow list.
- Allow
List stringType - The IP address type of allow list, valid value contains
IPv4
.
- allow
List String - IP address or IP address segment in CIDR format.
- allow
List StringDesc - The description of allow list.
- allow
List StringName - The name of allow list.
- allow
List StringType - The IP address type of allow list, valid value contains
IPv4
.
- allow
List string - IP address or IP address segment in CIDR format.
- allow
List stringDesc - The description of allow list.
- allow
List stringName - The name of allow list.
- allow
List stringType - 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_ strdesc - The description of allow list.
- allow_
list_ strname - The name of allow list.
- allow_
list_ strtype - The IP address type of allow list, valid value contains
IPv4
.
- allow
List String - IP address or IP address segment in CIDR format.
- allow
List StringDesc - The description of allow list.
- allow
List StringName - The name of allow list.
- allow
List StringType - 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.