1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. PostgresqlRenewDbInstanceOperation
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.PostgresqlRenewDbInstanceOperation

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a postgresql renew_db_instance_operation

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const renewDbInstanceOperation = new tencentcloud.PostgresqlRenewDbInstanceOperation("renewDbInstanceOperation", {
        dbInstanceId: tencentcloud_postgresql_instance.oper_test_PREPAID.id,
        period: 1,
        autoVoucher: 0,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    renew_db_instance_operation = tencentcloud.PostgresqlRenewDbInstanceOperation("renewDbInstanceOperation",
        db_instance_id=tencentcloud_postgresql_instance["oper_test_PREPAID"]["id"],
        period=1,
        auto_voucher=0)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewPostgresqlRenewDbInstanceOperation(ctx, "renewDbInstanceOperation", &tencentcloud.PostgresqlRenewDbInstanceOperationArgs{
    			DbInstanceId: pulumi.Any(tencentcloud_postgresql_instance.Oper_test_PREPAID.Id),
    			Period:       pulumi.Float64(1),
    			AutoVoucher:  pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var renewDbInstanceOperation = new Tencentcloud.PostgresqlRenewDbInstanceOperation("renewDbInstanceOperation", new()
        {
            DbInstanceId = tencentcloud_postgresql_instance.Oper_test_PREPAID.Id,
            Period = 1,
            AutoVoucher = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlRenewDbInstanceOperation;
    import com.pulumi.tencentcloud.PostgresqlRenewDbInstanceOperationArgs;
    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 renewDbInstanceOperation = new PostgresqlRenewDbInstanceOperation("renewDbInstanceOperation", PostgresqlRenewDbInstanceOperationArgs.builder()
                .dbInstanceId(tencentcloud_postgresql_instance.oper_test_PREPAID().id())
                .period(1)
                .autoVoucher(0)
                .build());
    
        }
    }
    
    resources:
      renewDbInstanceOperation:
        type: tencentcloud:PostgresqlRenewDbInstanceOperation
        properties:
          dbInstanceId: ${tencentcloud_postgresql_instance.oper_test_PREPAID.id}
          period: 1
          autoVoucher: 0
    

    Create PostgresqlRenewDbInstanceOperation Resource

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

    Constructor syntax

    new PostgresqlRenewDbInstanceOperation(name: string, args: PostgresqlRenewDbInstanceOperationArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresqlRenewDbInstanceOperation(resource_name: str,
                                           args: PostgresqlRenewDbInstanceOperationArgs,
                                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresqlRenewDbInstanceOperation(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           db_instance_id: Optional[str] = None,
                                           period: Optional[float] = None,
                                           auto_voucher: Optional[float] = None,
                                           postgresql_renew_db_instance_operation_id: Optional[str] = None,
                                           voucher_ids: Optional[Sequence[str]] = None)
    func NewPostgresqlRenewDbInstanceOperation(ctx *Context, name string, args PostgresqlRenewDbInstanceOperationArgs, opts ...ResourceOption) (*PostgresqlRenewDbInstanceOperation, error)
    public PostgresqlRenewDbInstanceOperation(string name, PostgresqlRenewDbInstanceOperationArgs args, CustomResourceOptions? opts = null)
    public PostgresqlRenewDbInstanceOperation(String name, PostgresqlRenewDbInstanceOperationArgs args)
    public PostgresqlRenewDbInstanceOperation(String name, PostgresqlRenewDbInstanceOperationArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PostgresqlRenewDbInstanceOperation
    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 PostgresqlRenewDbInstanceOperationArgs
    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 PostgresqlRenewDbInstanceOperationArgs
    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 PostgresqlRenewDbInstanceOperationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresqlRenewDbInstanceOperationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresqlRenewDbInstanceOperationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DbInstanceId string
    Instance ID in the format of postgres-6fego161.
    Period double
    Renewal duration in months.
    AutoVoucher double
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    PostgresqlRenewDbInstanceOperationId string
    ID of the resource.
    VoucherIds List<string>
    Voucher ID list (only one voucher can be specified currently).
    DbInstanceId string
    Instance ID in the format of postgres-6fego161.
    Period float64
    Renewal duration in months.
    AutoVoucher float64
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    PostgresqlRenewDbInstanceOperationId string
    ID of the resource.
    VoucherIds []string
    Voucher ID list (only one voucher can be specified currently).
    dbInstanceId String
    Instance ID in the format of postgres-6fego161.
    period Double
    Renewal duration in months.
    autoVoucher Double
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    postgresqlRenewDbInstanceOperationId String
    ID of the resource.
    voucherIds List<String>
    Voucher ID list (only one voucher can be specified currently).
    dbInstanceId string
    Instance ID in the format of postgres-6fego161.
    period number
    Renewal duration in months.
    autoVoucher number
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    postgresqlRenewDbInstanceOperationId string
    ID of the resource.
    voucherIds string[]
    Voucher ID list (only one voucher can be specified currently).
    db_instance_id str
    Instance ID in the format of postgres-6fego161.
    period float
    Renewal duration in months.
    auto_voucher float
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    postgresql_renew_db_instance_operation_id str
    ID of the resource.
    voucher_ids Sequence[str]
    Voucher ID list (only one voucher can be specified currently).
    dbInstanceId String
    Instance ID in the format of postgres-6fego161.
    period Number
    Renewal duration in months.
    autoVoucher Number
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    postgresqlRenewDbInstanceOperationId String
    ID of the resource.
    voucherIds List<String>
    Voucher ID list (only one voucher can be specified currently).

    Outputs

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

    Get an existing PostgresqlRenewDbInstanceOperation 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?: PostgresqlRenewDbInstanceOperationState, opts?: CustomResourceOptions): PostgresqlRenewDbInstanceOperation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_voucher: Optional[float] = None,
            db_instance_id: Optional[str] = None,
            period: Optional[float] = None,
            postgresql_renew_db_instance_operation_id: Optional[str] = None,
            voucher_ids: Optional[Sequence[str]] = None) -> PostgresqlRenewDbInstanceOperation
    func GetPostgresqlRenewDbInstanceOperation(ctx *Context, name string, id IDInput, state *PostgresqlRenewDbInstanceOperationState, opts ...ResourceOption) (*PostgresqlRenewDbInstanceOperation, error)
    public static PostgresqlRenewDbInstanceOperation Get(string name, Input<string> id, PostgresqlRenewDbInstanceOperationState? state, CustomResourceOptions? opts = null)
    public static PostgresqlRenewDbInstanceOperation get(String name, Output<String> id, PostgresqlRenewDbInstanceOperationState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlRenewDbInstanceOperation    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:
    AutoVoucher double
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    DbInstanceId string
    Instance ID in the format of postgres-6fego161.
    Period double
    Renewal duration in months.
    PostgresqlRenewDbInstanceOperationId string
    ID of the resource.
    VoucherIds List<string>
    Voucher ID list (only one voucher can be specified currently).
    AutoVoucher float64
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    DbInstanceId string
    Instance ID in the format of postgres-6fego161.
    Period float64
    Renewal duration in months.
    PostgresqlRenewDbInstanceOperationId string
    ID of the resource.
    VoucherIds []string
    Voucher ID list (only one voucher can be specified currently).
    autoVoucher Double
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    dbInstanceId String
    Instance ID in the format of postgres-6fego161.
    period Double
    Renewal duration in months.
    postgresqlRenewDbInstanceOperationId String
    ID of the resource.
    voucherIds List<String>
    Voucher ID list (only one voucher can be specified currently).
    autoVoucher number
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    dbInstanceId string
    Instance ID in the format of postgres-6fego161.
    period number
    Renewal duration in months.
    postgresqlRenewDbInstanceOperationId string
    ID of the resource.
    voucherIds string[]
    Voucher ID list (only one voucher can be specified currently).
    auto_voucher float
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    db_instance_id str
    Instance ID in the format of postgres-6fego161.
    period float
    Renewal duration in months.
    postgresql_renew_db_instance_operation_id str
    ID of the resource.
    voucher_ids Sequence[str]
    Voucher ID list (only one voucher can be specified currently).
    autoVoucher Number
    Whether to automatically use vouchers. 1:yes, 0:no. Default value:0.
    dbInstanceId String
    Instance ID in the format of postgres-6fego161.
    period Number
    Renewal duration in months.
    postgresqlRenewDbInstanceOperationId String
    ID of the resource.
    voucherIds List<String>
    Voucher ID list (only one voucher can be specified currently).

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack