1. Packages
  2. Scaleway
  3. API Docs
  4. MongoDbSnapshot
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.MongoDbSnapshot

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Creates and manages Scaleway MongoDB® snapshots. For more information refer to the API documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.MongoDbSnapshot("main", {
        instanceId: mainScalewayMongodbInstance.id,
        name: "name-snapshot",
        expiresAt: "2024-12-31T23:59:59Z",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.MongoDbSnapshot("main",
        instance_id=main_scaleway_mongodb_instance["id"],
        name="name-snapshot",
        expires_at="2024-12-31T23:59:59Z")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewMongoDbSnapshot(ctx, "main", &scaleway.MongoDbSnapshotArgs{
    			InstanceId: pulumi.Any(mainScalewayMongodbInstance.Id),
    			Name:       pulumi.String("name-snapshot"),
    			ExpiresAt:  pulumi.String("2024-12-31T23:59:59Z"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.MongoDbSnapshot("main", new()
        {
            InstanceId = mainScalewayMongodbInstance.Id,
            Name = "name-snapshot",
            ExpiresAt = "2024-12-31T23:59:59Z",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.MongoDbSnapshot;
    import com.pulumi.scaleway.MongoDbSnapshotArgs;
    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 main = new MongoDbSnapshot("main", MongoDbSnapshotArgs.builder()
                .instanceId(mainScalewayMongodbInstance.id())
                .name("name-snapshot")
                .expiresAt("2024-12-31T23:59:59Z")
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:MongoDbSnapshot
        properties:
          instanceId: ${mainScalewayMongodbInstance.id}
          name: name-snapshot
          expiresAt: 2024-12-31T23:59:59Z
    

    Create MongoDbSnapshot Resource

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

    Constructor syntax

    new MongoDbSnapshot(name: string, args: MongoDbSnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def MongoDbSnapshot(resource_name: str,
                        args: MongoDbSnapshotArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def MongoDbSnapshot(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        expires_at: Optional[str] = None,
                        instance_id: Optional[str] = None,
                        name: Optional[str] = None,
                        region: Optional[str] = None)
    func NewMongoDbSnapshot(ctx *Context, name string, args MongoDbSnapshotArgs, opts ...ResourceOption) (*MongoDbSnapshot, error)
    public MongoDbSnapshot(string name, MongoDbSnapshotArgs args, CustomResourceOptions? opts = null)
    public MongoDbSnapshot(String name, MongoDbSnapshotArgs args)
    public MongoDbSnapshot(String name, MongoDbSnapshotArgs args, CustomResourceOptions options)
    
    type: scaleway:MongoDbSnapshot
    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 MongoDbSnapshotArgs
    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 MongoDbSnapshotArgs
    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 MongoDbSnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MongoDbSnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MongoDbSnapshotArgs
    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 mongoDbSnapshotResource = new Scaleway.MongoDbSnapshot("mongoDbSnapshotResource", new()
    {
        ExpiresAt = "string",
        InstanceId = "string",
        Name = "string",
        Region = "string",
    });
    
    example, err := scaleway.NewMongoDbSnapshot(ctx, "mongoDbSnapshotResource", &scaleway.MongoDbSnapshotArgs{
    	ExpiresAt:  pulumi.String("string"),
    	InstanceId: pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	Region:     pulumi.String("string"),
    })
    
    var mongoDbSnapshotResource = new MongoDbSnapshot("mongoDbSnapshotResource", MongoDbSnapshotArgs.builder()
        .expiresAt("string")
        .instanceId("string")
        .name("string")
        .region("string")
        .build());
    
    mongo_db_snapshot_resource = scaleway.MongoDbSnapshot("mongoDbSnapshotResource",
        expires_at="string",
        instance_id="string",
        name="string",
        region="string")
    
    const mongoDbSnapshotResource = new scaleway.MongoDbSnapshot("mongoDbSnapshotResource", {
        expiresAt: "string",
        instanceId: "string",
        name: "string",
        region: "string",
    });
    
    type: scaleway:MongoDbSnapshot
    properties:
        expiresAt: string
        instanceId: string
        name: string
        region: string
    

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

    ExpiresAt string

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    InstanceId string
    The ID of the MongoDB® instance from which the snapshot was created.
    Name string
    The name of the MongoDB® snapshot.
    Region string
    region) The region in which the MongoDB® snapshot should be created.
    ExpiresAt string

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    InstanceId string
    The ID of the MongoDB® instance from which the snapshot was created.
    Name string
    The name of the MongoDB® snapshot.
    Region string
    region) The region in which the MongoDB® snapshot should be created.
    expiresAt String

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instanceId String
    The ID of the MongoDB® instance from which the snapshot was created.
    name String
    The name of the MongoDB® snapshot.
    region String
    region) The region in which the MongoDB® snapshot should be created.
    expiresAt string

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instanceId string
    The ID of the MongoDB® instance from which the snapshot was created.
    name string
    The name of the MongoDB® snapshot.
    region string
    region) The region in which the MongoDB® snapshot should be created.
    expires_at str

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instance_id str
    The ID of the MongoDB® instance from which the snapshot was created.
    name str
    The name of the MongoDB® snapshot.
    region str
    region) The region in which the MongoDB® snapshot should be created.
    expiresAt String

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instanceId String
    The ID of the MongoDB® instance from which the snapshot was created.
    name String
    The name of the MongoDB® snapshot.
    region String
    region) The region in which the MongoDB® snapshot should be created.

    Outputs

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

    CreatedAt string
    The date and time when the MongoDB® snapshot was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceName string
    The name of the MongoDB® instance from which the snapshot was created.
    NodeType string
    The type of node associated with the MongoDB® snapshot.
    Size int
    The size of the MongoDB® snapshot in bytes.
    UpdatedAt string
    The date and time of the last update of the MongoDB® snapshot.
    VolumeType string
    The type of volume used for the MongoDB® snapshot.
    CreatedAt string
    The date and time when the MongoDB® snapshot was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceName string
    The name of the MongoDB® instance from which the snapshot was created.
    NodeType string
    The type of node associated with the MongoDB® snapshot.
    Size int
    The size of the MongoDB® snapshot in bytes.
    UpdatedAt string
    The date and time of the last update of the MongoDB® snapshot.
    VolumeType string
    The type of volume used for the MongoDB® snapshot.
    createdAt String
    The date and time when the MongoDB® snapshot was created.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceName String
    The name of the MongoDB® instance from which the snapshot was created.
    nodeType String
    The type of node associated with the MongoDB® snapshot.
    size Integer
    The size of the MongoDB® snapshot in bytes.
    updatedAt String
    The date and time of the last update of the MongoDB® snapshot.
    volumeType String
    The type of volume used for the MongoDB® snapshot.
    createdAt string
    The date and time when the MongoDB® snapshot was created.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceName string
    The name of the MongoDB® instance from which the snapshot was created.
    nodeType string
    The type of node associated with the MongoDB® snapshot.
    size number
    The size of the MongoDB® snapshot in bytes.
    updatedAt string
    The date and time of the last update of the MongoDB® snapshot.
    volumeType string
    The type of volume used for the MongoDB® snapshot.
    created_at str
    The date and time when the MongoDB® snapshot was created.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_name str
    The name of the MongoDB® instance from which the snapshot was created.
    node_type str
    The type of node associated with the MongoDB® snapshot.
    size int
    The size of the MongoDB® snapshot in bytes.
    updated_at str
    The date and time of the last update of the MongoDB® snapshot.
    volume_type str
    The type of volume used for the MongoDB® snapshot.
    createdAt String
    The date and time when the MongoDB® snapshot was created.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceName String
    The name of the MongoDB® instance from which the snapshot was created.
    nodeType String
    The type of node associated with the MongoDB® snapshot.
    size Number
    The size of the MongoDB® snapshot in bytes.
    updatedAt String
    The date and time of the last update of the MongoDB® snapshot.
    volumeType String
    The type of volume used for the MongoDB® snapshot.

    Look up Existing MongoDbSnapshot Resource

    Get an existing MongoDbSnapshot 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?: MongoDbSnapshotState, opts?: CustomResourceOptions): MongoDbSnapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            expires_at: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_name: Optional[str] = None,
            name: Optional[str] = None,
            node_type: Optional[str] = None,
            region: Optional[str] = None,
            size: Optional[int] = None,
            updated_at: Optional[str] = None,
            volume_type: Optional[str] = None) -> MongoDbSnapshot
    func GetMongoDbSnapshot(ctx *Context, name string, id IDInput, state *MongoDbSnapshotState, opts ...ResourceOption) (*MongoDbSnapshot, error)
    public static MongoDbSnapshot Get(string name, Input<string> id, MongoDbSnapshotState? state, CustomResourceOptions? opts = null)
    public static MongoDbSnapshot get(String name, Output<String> id, MongoDbSnapshotState 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:
    CreatedAt string
    The date and time when the MongoDB® snapshot was created.
    ExpiresAt string

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    InstanceId string
    The ID of the MongoDB® instance from which the snapshot was created.
    InstanceName string
    The name of the MongoDB® instance from which the snapshot was created.
    Name string
    The name of the MongoDB® snapshot.
    NodeType string
    The type of node associated with the MongoDB® snapshot.
    Region string
    region) The region in which the MongoDB® snapshot should be created.
    Size int
    The size of the MongoDB® snapshot in bytes.
    UpdatedAt string
    The date and time of the last update of the MongoDB® snapshot.
    VolumeType string
    The type of volume used for the MongoDB® snapshot.
    CreatedAt string
    The date and time when the MongoDB® snapshot was created.
    ExpiresAt string

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    InstanceId string
    The ID of the MongoDB® instance from which the snapshot was created.
    InstanceName string
    The name of the MongoDB® instance from which the snapshot was created.
    Name string
    The name of the MongoDB® snapshot.
    NodeType string
    The type of node associated with the MongoDB® snapshot.
    Region string
    region) The region in which the MongoDB® snapshot should be created.
    Size int
    The size of the MongoDB® snapshot in bytes.
    UpdatedAt string
    The date and time of the last update of the MongoDB® snapshot.
    VolumeType string
    The type of volume used for the MongoDB® snapshot.
    createdAt String
    The date and time when the MongoDB® snapshot was created.
    expiresAt String

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instanceId String
    The ID of the MongoDB® instance from which the snapshot was created.
    instanceName String
    The name of the MongoDB® instance from which the snapshot was created.
    name String
    The name of the MongoDB® snapshot.
    nodeType String
    The type of node associated with the MongoDB® snapshot.
    region String
    region) The region in which the MongoDB® snapshot should be created.
    size Integer
    The size of the MongoDB® snapshot in bytes.
    updatedAt String
    The date and time of the last update of the MongoDB® snapshot.
    volumeType String
    The type of volume used for the MongoDB® snapshot.
    createdAt string
    The date and time when the MongoDB® snapshot was created.
    expiresAt string

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instanceId string
    The ID of the MongoDB® instance from which the snapshot was created.
    instanceName string
    The name of the MongoDB® instance from which the snapshot was created.
    name string
    The name of the MongoDB® snapshot.
    nodeType string
    The type of node associated with the MongoDB® snapshot.
    region string
    region) The region in which the MongoDB® snapshot should be created.
    size number
    The size of the MongoDB® snapshot in bytes.
    updatedAt string
    The date and time of the last update of the MongoDB® snapshot.
    volumeType string
    The type of volume used for the MongoDB® snapshot.
    created_at str
    The date and time when the MongoDB® snapshot was created.
    expires_at str

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instance_id str
    The ID of the MongoDB® instance from which the snapshot was created.
    instance_name str
    The name of the MongoDB® instance from which the snapshot was created.
    name str
    The name of the MongoDB® snapshot.
    node_type str
    The type of node associated with the MongoDB® snapshot.
    region str
    region) The region in which the MongoDB® snapshot should be created.
    size int
    The size of the MongoDB® snapshot in bytes.
    updated_at str
    The date and time of the last update of the MongoDB® snapshot.
    volume_type str
    The type of volume used for the MongoDB® snapshot.
    createdAt String
    The date and time when the MongoDB® snapshot was created.
    expiresAt String

    The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. 2024-12-31T23:59:59Z).

    Important: Once set, expires_at cannot be removed.

    instanceId String
    The ID of the MongoDB® instance from which the snapshot was created.
    instanceName String
    The name of the MongoDB® instance from which the snapshot was created.
    name String
    The name of the MongoDB® snapshot.
    nodeType String
    The type of node associated with the MongoDB® snapshot.
    region String
    region) The region in which the MongoDB® snapshot should be created.
    size Number
    The size of the MongoDB® snapshot in bytes.
    updatedAt String
    The date and time of the last update of the MongoDB® snapshot.
    volumeType String
    The type of volume used for the MongoDB® snapshot.

    Import

    MongoDB® snapshots can be imported using the {region}/{id}, e.g.

    bash

    $ pulumi import scaleway:index/mongoDbSnapshot:MongoDbSnapshot main fr-par-1/11111111-1111-1111-1111-111111111111
    

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

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse