tencentcloud.MariadbLogFileRetentionPeriod
Explore with Pulumi AI
Provides a resource to create a mariadb log_file_retention_period
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const logFileRetentionPeriod = new tencentcloud.MariadbLogFileRetentionPeriod("logFileRetentionPeriod", {
days: 8,
instanceId: "tdsql-4pzs5b67",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
log_file_retention_period = tencentcloud.MariadbLogFileRetentionPeriod("logFileRetentionPeriod",
days=8,
instance_id="tdsql-4pzs5b67")
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.NewMariadbLogFileRetentionPeriod(ctx, "logFileRetentionPeriod", &tencentcloud.MariadbLogFileRetentionPeriodArgs{
Days: pulumi.Float64(8),
InstanceId: pulumi.String("tdsql-4pzs5b67"),
})
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 logFileRetentionPeriod = new Tencentcloud.MariadbLogFileRetentionPeriod("logFileRetentionPeriod", new()
{
Days = 8,
InstanceId = "tdsql-4pzs5b67",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.MariadbLogFileRetentionPeriod;
import com.pulumi.tencentcloud.MariadbLogFileRetentionPeriodArgs;
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 logFileRetentionPeriod = new MariadbLogFileRetentionPeriod("logFileRetentionPeriod", MariadbLogFileRetentionPeriodArgs.builder()
.days("8")
.instanceId("tdsql-4pzs5b67")
.build());
}
}
resources:
logFileRetentionPeriod:
type: tencentcloud:MariadbLogFileRetentionPeriod
properties:
days: '8'
instanceId: tdsql-4pzs5b67
Create MariadbLogFileRetentionPeriod Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MariadbLogFileRetentionPeriod(name: string, args: MariadbLogFileRetentionPeriodArgs, opts?: CustomResourceOptions);
@overload
def MariadbLogFileRetentionPeriod(resource_name: str,
args: MariadbLogFileRetentionPeriodArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MariadbLogFileRetentionPeriod(resource_name: str,
opts: Optional[ResourceOptions] = None,
days: Optional[float] = None,
instance_id: Optional[str] = None,
mariadb_log_file_retention_period_id: Optional[str] = None)
func NewMariadbLogFileRetentionPeriod(ctx *Context, name string, args MariadbLogFileRetentionPeriodArgs, opts ...ResourceOption) (*MariadbLogFileRetentionPeriod, error)
public MariadbLogFileRetentionPeriod(string name, MariadbLogFileRetentionPeriodArgs args, CustomResourceOptions? opts = null)
public MariadbLogFileRetentionPeriod(String name, MariadbLogFileRetentionPeriodArgs args)
public MariadbLogFileRetentionPeriod(String name, MariadbLogFileRetentionPeriodArgs args, CustomResourceOptions options)
type: tencentcloud:MariadbLogFileRetentionPeriod
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 MariadbLogFileRetentionPeriodArgs
- 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 MariadbLogFileRetentionPeriodArgs
- 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 MariadbLogFileRetentionPeriodArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MariadbLogFileRetentionPeriodArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MariadbLogFileRetentionPeriodArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MariadbLogFileRetentionPeriod 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 MariadbLogFileRetentionPeriod resource accepts the following input properties:
- Days double
- The number of days to save, cannot exceed 30.
- Instance
Id string - instance id.
- Mariadb
Log stringFile Retention Period Id - ID of the resource.
- Days float64
- The number of days to save, cannot exceed 30.
- Instance
Id string - instance id.
- Mariadb
Log stringFile Retention Period Id - ID of the resource.
- days Double
- The number of days to save, cannot exceed 30.
- instance
Id String - instance id.
- mariadb
Log StringFile Retention Period Id - ID of the resource.
- days number
- The number of days to save, cannot exceed 30.
- instance
Id string - instance id.
- mariadb
Log stringFile Retention Period Id - ID of the resource.
- days float
- The number of days to save, cannot exceed 30.
- instance_
id str - instance id.
- mariadb_
log_ strfile_ retention_ period_ id - ID of the resource.
- days Number
- The number of days to save, cannot exceed 30.
- instance
Id String - instance id.
- mariadb
Log StringFile Retention Period Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the MariadbLogFileRetentionPeriod 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 MariadbLogFileRetentionPeriod Resource
Get an existing MariadbLogFileRetentionPeriod 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?: MariadbLogFileRetentionPeriodState, opts?: CustomResourceOptions): MariadbLogFileRetentionPeriod
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
days: Optional[float] = None,
instance_id: Optional[str] = None,
mariadb_log_file_retention_period_id: Optional[str] = None) -> MariadbLogFileRetentionPeriod
func GetMariadbLogFileRetentionPeriod(ctx *Context, name string, id IDInput, state *MariadbLogFileRetentionPeriodState, opts ...ResourceOption) (*MariadbLogFileRetentionPeriod, error)
public static MariadbLogFileRetentionPeriod Get(string name, Input<string> id, MariadbLogFileRetentionPeriodState? state, CustomResourceOptions? opts = null)
public static MariadbLogFileRetentionPeriod get(String name, Output<String> id, MariadbLogFileRetentionPeriodState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MariadbLogFileRetentionPeriod 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.
- Days double
- The number of days to save, cannot exceed 30.
- Instance
Id string - instance id.
- Mariadb
Log stringFile Retention Period Id - ID of the resource.
- Days float64
- The number of days to save, cannot exceed 30.
- Instance
Id string - instance id.
- Mariadb
Log stringFile Retention Period Id - ID of the resource.
- days Double
- The number of days to save, cannot exceed 30.
- instance
Id String - instance id.
- mariadb
Log StringFile Retention Period Id - ID of the resource.
- days number
- The number of days to save, cannot exceed 30.
- instance
Id string - instance id.
- mariadb
Log stringFile Retention Period Id - ID of the resource.
- days float
- The number of days to save, cannot exceed 30.
- instance_
id str - instance id.
- mariadb_
log_ strfile_ retention_ period_ id - ID of the resource.
- days Number
- The number of days to save, cannot exceed 30.
- instance
Id String - instance id.
- mariadb
Log StringFile Retention Period Id - ID of the resource.
Import
mariadb log_file_retention_period can be imported using the id, e.g.
$ pulumi import tencentcloud:index/mariadbLogFileRetentionPeriod:MariadbLogFileRetentionPeriod log_file_retention_period tdsql-4pzs5b67
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.