1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. VersionDeferral
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

cockroach.VersionDeferral

Explore with Pulumi AI

cockroach logo
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

    Configure minor version upgrade deferral for a cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cockroach from "@pulumiverse/cockroach";
    
    const config = new pulumi.Config();
    const clusterId = config.require("clusterId");
    const offsetDuration = config.get("offsetDuration") || "FIXED_DEFERRAL";
    const example = new cockroach.VersionDeferral("example", {
        clusterId: clusterId,
        deferralPolicy: offsetDuration,
    });
    
    import pulumi
    import pulumiverse_cockroach as cockroach
    
    config = pulumi.Config()
    cluster_id = config.require("clusterId")
    offset_duration = config.get("offsetDuration")
    if offset_duration is None:
        offset_duration = "FIXED_DEFERRAL"
    example = cockroach.VersionDeferral("example",
        cluster_id=cluster_id,
        deferral_policy=offset_duration)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    	"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		clusterId := cfg.Require("clusterId")
    		offsetDuration := "FIXED_DEFERRAL"
    		if param := cfg.Get("offsetDuration"); param != "" {
    			offsetDuration = param
    		}
    		_, err := cockroach.NewVersionDeferral(ctx, "example", &cockroach.VersionDeferralArgs{
    			ClusterId:      pulumi.String(clusterId),
    			DeferralPolicy: pulumi.String(offsetDuration),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cockroach = Pulumiverse.Cockroach;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var clusterId = config.Require("clusterId");
        var offsetDuration = config.Get("offsetDuration") ?? "FIXED_DEFERRAL";
        var example = new Cockroach.VersionDeferral("example", new()
        {
            ClusterId = clusterId,
            DeferralPolicy = offsetDuration,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cockroach.VersionDeferral;
    import com.pulumi.cockroach.VersionDeferralArgs;
    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) {
            final var config = ctx.config();
            final var clusterId = config.get("clusterId");
            final var offsetDuration = config.get("offsetDuration").orElse("FIXED_DEFERRAL");
            var example = new VersionDeferral("example", VersionDeferralArgs.builder()
                .clusterId(clusterId)
                .deferralPolicy(offsetDuration)
                .build());
    
        }
    }
    
    configuration:
      clusterId:
        type: string
      offsetDuration:
        type: string
        default: FIXED_DEFERRAL
    resources:
      example:
        type: cockroach:VersionDeferral
        properties:
          clusterId: ${clusterId}
          deferralPolicy: ${offsetDuration}
    

    Create VersionDeferral Resource

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

    Constructor syntax

    new VersionDeferral(name: string, args: VersionDeferralArgs, opts?: CustomResourceOptions);
    @overload
    def VersionDeferral(resource_name: str,
                        args: VersionDeferralArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def VersionDeferral(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster_id: Optional[str] = None,
                        deferral_policy: Optional[str] = None)
    func NewVersionDeferral(ctx *Context, name string, args VersionDeferralArgs, opts ...ResourceOption) (*VersionDeferral, error)
    public VersionDeferral(string name, VersionDeferralArgs args, CustomResourceOptions? opts = null)
    public VersionDeferral(String name, VersionDeferralArgs args)
    public VersionDeferral(String name, VersionDeferralArgs args, CustomResourceOptions options)
    
    type: cockroach:VersionDeferral
    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 VersionDeferralArgs
    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 VersionDeferralArgs
    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 VersionDeferralArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VersionDeferralArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VersionDeferralArgs
    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 versionDeferralResource = new Cockroach.VersionDeferral("versionDeferralResource", new()
    {
        ClusterId = "string",
        DeferralPolicy = "string",
    });
    
    example, err := cockroach.NewVersionDeferral(ctx, "versionDeferralResource", &cockroach.VersionDeferralArgs{
    	ClusterId:      pulumi.String("string"),
    	DeferralPolicy: pulumi.String("string"),
    })
    
    var versionDeferralResource = new VersionDeferral("versionDeferralResource", VersionDeferralArgs.builder()
        .clusterId("string")
        .deferralPolicy("string")
        .build());
    
    version_deferral_resource = cockroach.VersionDeferral("versionDeferralResource",
        cluster_id="string",
        deferral_policy="string")
    
    const versionDeferralResource = new cockroach.VersionDeferral("versionDeferralResource", {
        clusterId: "string",
        deferralPolicy: "string",
    });
    
    type: cockroach:VersionDeferral
    properties:
        clusterId: string
        deferralPolicy: string
    

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

    ClusterId string
    Cluster ID.
    DeferralPolicy string
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    ClusterId string
    Cluster ID.
    DeferralPolicy string
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    clusterId String
    Cluster ID.
    deferralPolicy String
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    clusterId string
    Cluster ID.
    deferralPolicy string
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    cluster_id str
    Cluster ID.
    deferral_policy str
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    clusterId String
    Cluster ID.
    deferralPolicy String
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.

    Outputs

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

    Get an existing VersionDeferral 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?: VersionDeferralState, opts?: CustomResourceOptions): VersionDeferral
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            deferral_policy: Optional[str] = None) -> VersionDeferral
    func GetVersionDeferral(ctx *Context, name string, id IDInput, state *VersionDeferralState, opts ...ResourceOption) (*VersionDeferral, error)
    public static VersionDeferral Get(string name, Input<string> id, VersionDeferralState? state, CustomResourceOptions? opts = null)
    public static VersionDeferral get(String name, Output<String> id, VersionDeferralState 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:
    ClusterId string
    Cluster ID.
    DeferralPolicy string
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    ClusterId string
    Cluster ID.
    DeferralPolicy string
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    clusterId String
    Cluster ID.
    deferralPolicy String
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    clusterId string
    Cluster ID.
    deferralPolicy string
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    cluster_id str
    Cluster ID.
    deferral_policy str
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.
    clusterId String
    Cluster ID.
    deferralPolicy String
    The policy for managing automated minor version upgrades. Set to FIXEDDEFERRAL to defer upgrades by 60 days or NOTDEFERRED to apply upgrades immediately.

    Package Details

    Repository
    cockroach pulumiverse/pulumi-cockroach
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cockroach Terraform Provider.
    cockroach logo
    CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse