timescale.LogExporter
Explore with Pulumi AI
Schema for a log exporter.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.timescale.LogExporter;
import com.pulumi.timescale.LogExporterArgs;
import com.pulumi.timescale.inputs.LogExporterCloudwatchArgs;
import com.pulumi.timescale.Service;
import com.pulumi.timescale.ServiceArgs;
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 tsProjectId = config.get("tsProjectId");
final var tsAccessKey = config.get("tsAccessKey");
final var tsSecretKey = config.get("tsSecretKey");
var myCloudwatchExporterWithRole = new LogExporter("myCloudwatchExporterWithRole", LogExporterArgs.builder()
.region("us-east-1")
.cloudwatch(LogExporterCloudwatchArgs.builder()
.region("us-east-1")
.role_arn("arn:aws:iam::123456789012:role/MyLogsExporterRole")
.log_group_name("/myapplication/logs")
.log_stream_name("exporter-stream-role")
.build())
.build());
var myCloudwatchExporterWithKeys = new LogExporter("myCloudwatchExporterWithKeys", LogExporterArgs.builder()
.region("us-east-1")
.cloudwatch(LogExporterCloudwatchArgs.builder()
.region("us-east-1")
.access_key("your_access_key_")
.secret_key("your_secret_keyxxxxxxxxxxxxxxxxxxxxxxxxx")
.log_group_name("/anotherapplication/logs")
.log_stream_name("exporter-stream-keys")
.build())
.build());
// Create a service and attach one of the exporters (only 1 log exporter can be attached at the same time)
var logExporterTest = new Service("logExporterTest", ServiceArgs.builder()
.milliCpu(1000)
.memoryGb(4)
.regionCode("us-east-1")
.logExporterId(myCloudwatchExporterWithKeys.id())
.build());
}
}
configuration:
tsProjectId:
type: string
tsAccessKey:
type: string
tsSecretKey:
type: string
resources:
myCloudwatchExporterWithRole:
type: timescale:LogExporter
properties:
region: us-east-1
cloudwatch:
region: us-east-1
role_arn: arn:aws:iam::123456789012:role/MyLogsExporterRole
log_group_name: /myapplication/logs
log_stream_name: exporter-stream-role
myCloudwatchExporterWithKeys:
type: timescale:LogExporter
properties:
region: us-east-1
cloudwatch:
region: us-east-1
access_key: your_access_key_
secret_key: your_secret_keyxxxxxxxxxxxxxxxxxxxxxxxxx
log_group_name: /anotherapplication/logs
log_stream_name: exporter-stream-keys
# Create a service and attach one of the exporters (only 1 log exporter can be attached at the same time)
logExporterTest:
type: timescale:Service
properties:
milliCpu: 1000
memoryGb: 4
regionCode: us-east-1
logExporterId: ${myCloudwatchExporterWithKeys.id}
Create LogExporter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogExporter(name: string, args: LogExporterArgs, opts?: CustomResourceOptions);
@overload
def LogExporter(resource_name: str,
args: LogExporterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LogExporter(resource_name: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
cloudwatch: Optional[LogExporterCloudwatchArgs] = None,
name: Optional[str] = None)
func NewLogExporter(ctx *Context, name string, args LogExporterArgs, opts ...ResourceOption) (*LogExporter, error)
public LogExporter(string name, LogExporterArgs args, CustomResourceOptions? opts = null)
public LogExporter(String name, LogExporterArgs args)
public LogExporter(String name, LogExporterArgs args, CustomResourceOptions options)
type: timescale:LogExporter
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 LogExporterArgs
- 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 LogExporterArgs
- 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 LogExporterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogExporterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogExporterArgs
- 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 logExporterResource = new Timescale.LogExporter("logExporterResource", new()
{
Region = "string",
Cloudwatch = new Timescale.Inputs.LogExporterCloudwatchArgs
{
LogGroupName = "string",
LogStreamName = "string",
Region = "string",
AccessKey = "string",
RoleArn = "string",
SecretKey = "string",
},
Name = "string",
});
example, err := timescale.NewLogExporter(ctx, "logExporterResource", ×cale.LogExporterArgs{
Region: pulumi.String("string"),
Cloudwatch: ×cale.LogExporterCloudwatchArgs{
LogGroupName: pulumi.String("string"),
LogStreamName: pulumi.String("string"),
Region: pulumi.String("string"),
AccessKey: pulumi.String("string"),
RoleArn: pulumi.String("string"),
SecretKey: pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var logExporterResource = new LogExporter("logExporterResource", LogExporterArgs.builder()
.region("string")
.cloudwatch(LogExporterCloudwatchArgs.builder()
.logGroupName("string")
.logStreamName("string")
.region("string")
.accessKey("string")
.roleArn("string")
.secretKey("string")
.build())
.name("string")
.build());
log_exporter_resource = timescale.LogExporter("logExporterResource",
region="string",
cloudwatch={
"log_group_name": "string",
"log_stream_name": "string",
"region": "string",
"access_key": "string",
"role_arn": "string",
"secret_key": "string",
},
name="string")
const logExporterResource = new timescale.LogExporter("logExporterResource", {
region: "string",
cloudwatch: {
logGroupName: "string",
logStreamName: "string",
region: "string",
accessKey: "string",
roleArn: "string",
secretKey: "string",
},
name: "string",
});
type: timescale:LogExporter
properties:
cloudwatch:
accessKey: string
logGroupName: string
logStreamName: string
region: string
roleArn: string
secretKey: string
name: string
region: string
LogExporter 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 LogExporter resource accepts the following input properties:
- Region string
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- Cloudwatch
Log
Exporter Cloudwatch - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - Name string
- Log exporter name.
- Region string
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- Cloudwatch
Log
Exporter Cloudwatch Args - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - Name string
- Log exporter name.
- region String
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- cloudwatch
Log
Exporter Cloudwatch - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - name String
- Log exporter name.
- region string
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- cloudwatch
Log
Exporter Cloudwatch - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - name string
- Log exporter name.
- region str
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- cloudwatch
Log
Exporter Cloudwatch Args - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - name str
- Log exporter name.
- region String
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- cloudwatch Property Map
- Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - name String
- Log exporter name.
Outputs
All input properties are implicitly available as output properties. Additionally, the LogExporter resource produces the following output properties:
Look up Existing LogExporter Resource
Get an existing LogExporter 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?: LogExporterState, opts?: CustomResourceOptions): LogExporter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cloudwatch: Optional[LogExporterCloudwatchArgs] = None,
created: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
type: Optional[str] = None) -> LogExporter
func GetLogExporter(ctx *Context, name string, id IDInput, state *LogExporterState, opts ...ResourceOption) (*LogExporter, error)
public static LogExporter Get(string name, Input<string> id, LogExporterState? state, CustomResourceOptions? opts = null)
public static LogExporter get(String name, Output<String> id, LogExporterState state, CustomResourceOptions options)
resources: _: type: timescale:LogExporter 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.
- Cloudwatch
Log
Exporter Cloudwatch - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - Created string
- Timestamp of when the log exporter was created (RFC3339 format).
- Name string
- Log exporter name.
- Region string
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- Type string
- Type of the log exporter. Possible values: cloudwatch.
- Cloudwatch
Log
Exporter Cloudwatch Args - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - Created string
- Timestamp of when the log exporter was created (RFC3339 format).
- Name string
- Log exporter name.
- Region string
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- Type string
- Type of the log exporter. Possible values: cloudwatch.
- cloudwatch
Log
Exporter Cloudwatch - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - created String
- Timestamp of when the log exporter was created (RFC3339 format).
- name String
- Log exporter name.
- region String
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- type String
- Type of the log exporter. Possible values: cloudwatch.
- cloudwatch
Log
Exporter Cloudwatch - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - created string
- Timestamp of when the log exporter was created (RFC3339 format).
- name string
- Log exporter name.
- region string
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- type string
- Type of the log exporter. Possible values: cloudwatch.
- cloudwatch
Log
Exporter Cloudwatch Args - Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - created str
- Timestamp of when the log exporter was created (RFC3339 format).
- name str
- Log exporter name.
- region str
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- type str
- Type of the log exporter. Possible values: cloudwatch.
- cloudwatch Property Map
- Configuration for AWS CloudWatch exporter. Configure authentication using either
role_arn
oraccess_key
withsecret_key
. - created String
- Timestamp of when the log exporter was created (RFC3339 format).
- name String
- Log exporter name.
- region String
- Region where the exporter will be deployed. Only services running in the same region can be attached.
- type String
- Type of the log exporter. Possible values: cloudwatch.
Supporting Types
LogExporterCloudwatch, LogExporterCloudwatchArgs
- Log
Group stringName - Name of the CloudWatch Log Group.
- Log
Stream stringName - Name of the CloudWatch Log Stream.
- Region string
- AWS region for CloudWatch.
- Access
Key string - AWS access key ID. If provided,
secret_key
must also be set, androle_arn
must not be set. - Role
Arn string - ARN of the IAM role to assume for CloudWatch access. If provided,
access_key
andsecret_key
must not be set. - Secret
Key string - AWS secret access key. If provided,
access_key
must also be set, androle_arn
must not be set.
- Log
Group stringName - Name of the CloudWatch Log Group.
- Log
Stream stringName - Name of the CloudWatch Log Stream.
- Region string
- AWS region for CloudWatch.
- Access
Key string - AWS access key ID. If provided,
secret_key
must also be set, androle_arn
must not be set. - Role
Arn string - ARN of the IAM role to assume for CloudWatch access. If provided,
access_key
andsecret_key
must not be set. - Secret
Key string - AWS secret access key. If provided,
access_key
must also be set, androle_arn
must not be set.
- log
Group StringName - Name of the CloudWatch Log Group.
- log
Stream StringName - Name of the CloudWatch Log Stream.
- region String
- AWS region for CloudWatch.
- access
Key String - AWS access key ID. If provided,
secret_key
must also be set, androle_arn
must not be set. - role
Arn String - ARN of the IAM role to assume for CloudWatch access. If provided,
access_key
andsecret_key
must not be set. - secret
Key String - AWS secret access key. If provided,
access_key
must also be set, androle_arn
must not be set.
- log
Group stringName - Name of the CloudWatch Log Group.
- log
Stream stringName - Name of the CloudWatch Log Stream.
- region string
- AWS region for CloudWatch.
- access
Key string - AWS access key ID. If provided,
secret_key
must also be set, androle_arn
must not be set. - role
Arn string - ARN of the IAM role to assume for CloudWatch access. If provided,
access_key
andsecret_key
must not be set. - secret
Key string - AWS secret access key. If provided,
access_key
must also be set, androle_arn
must not be set.
- log_
group_ strname - Name of the CloudWatch Log Group.
- log_
stream_ strname - Name of the CloudWatch Log Stream.
- region str
- AWS region for CloudWatch.
- access_
key str - AWS access key ID. If provided,
secret_key
must also be set, androle_arn
must not be set. - role_
arn str - ARN of the IAM role to assume for CloudWatch access. If provided,
access_key
andsecret_key
must not be set. - secret_
key str - AWS secret access key. If provided,
access_key
must also be set, androle_arn
must not be set.
- log
Group StringName - Name of the CloudWatch Log Group.
- log
Stream StringName - Name of the CloudWatch Log Stream.
- region String
- AWS region for CloudWatch.
- access
Key String - AWS access key ID. If provided,
secret_key
must also be set, androle_arn
must not be set. - role
Arn String - ARN of the IAM role to assume for CloudWatch access. If provided,
access_key
andsecret_key
must not be set. - secret
Key String - AWS secret access key. If provided,
access_key
must also be set, androle_arn
must not be set.
Package Details
- Repository
- timescale timescale/terraform-provider-timescale
- License
- Notes
- This Pulumi package is based on the
timescale
Terraform Provider.