com.pulumi.awsnative.logs.kotlin.LogsFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.logs.kotlin
import com.pulumi.awsnative.logs.LogsFunctions.getAccountPolicyPlain
import com.pulumi.awsnative.logs.LogsFunctions.getDeliveryDestinationPlain
import com.pulumi.awsnative.logs.LogsFunctions.getDeliveryPlain
import com.pulumi.awsnative.logs.LogsFunctions.getDeliverySourcePlain
import com.pulumi.awsnative.logs.LogsFunctions.getDestinationPlain
import com.pulumi.awsnative.logs.LogsFunctions.getLogAnomalyDetectorPlain
import com.pulumi.awsnative.logs.LogsFunctions.getLogGroupPlain
import com.pulumi.awsnative.logs.LogsFunctions.getMetricFilterPlain
import com.pulumi.awsnative.logs.LogsFunctions.getQueryDefinitionPlain
import com.pulumi.awsnative.logs.LogsFunctions.getResourcePolicyPlain
import com.pulumi.awsnative.logs.LogsFunctions.getSubscriptionFilterPlain
import com.pulumi.awsnative.logs.kotlin.enums.AccountPolicyPolicyType
import com.pulumi.awsnative.logs.kotlin.inputs.GetAccountPolicyPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetAccountPolicyPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetDeliveryDestinationPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetDeliveryDestinationPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetDeliveryPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetDeliveryPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetDeliverySourcePlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetDeliverySourcePlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetDestinationPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetDestinationPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetLogAnomalyDetectorPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetLogAnomalyDetectorPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetLogGroupPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetLogGroupPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetMetricFilterPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetMetricFilterPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetQueryDefinitionPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetQueryDefinitionPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetResourcePolicyPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetResourcePolicyPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.inputs.GetSubscriptionFilterPlainArgs
import com.pulumi.awsnative.logs.kotlin.inputs.GetSubscriptionFilterPlainArgsBuilder
import com.pulumi.awsnative.logs.kotlin.outputs.GetAccountPolicyResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetDeliveryDestinationResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetDeliveryResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetDeliverySourceResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetDestinationResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetLogAnomalyDetectorResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetLogGroupResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetMetricFilterResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetQueryDefinitionResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetResourcePolicyResult
import com.pulumi.awsnative.logs.kotlin.outputs.GetSubscriptionFilterResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.logs.kotlin.outputs.GetAccountPolicyResult.Companion.toKotlin as getAccountPolicyResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetDeliveryDestinationResult.Companion.toKotlin as getDeliveryDestinationResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetDeliveryResult.Companion.toKotlin as getDeliveryResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetDeliverySourceResult.Companion.toKotlin as getDeliverySourceResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetDestinationResult.Companion.toKotlin as getDestinationResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetLogAnomalyDetectorResult.Companion.toKotlin as getLogAnomalyDetectorResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetLogGroupResult.Companion.toKotlin as getLogGroupResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetMetricFilterResult.Companion.toKotlin as getMetricFilterResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetQueryDefinitionResult.Companion.toKotlin as getQueryDefinitionResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetResourcePolicyResult.Companion.toKotlin as getResourcePolicyResultToKotlin
import com.pulumi.awsnative.logs.kotlin.outputs.GetSubscriptionFilterResult.Companion.toKotlin as getSubscriptionFilterResultToKotlin
public object LogsFunctions {
/**
* The AWS::Logs::AccountPolicy resource specifies a CloudWatch Logs AccountPolicy.
* @param argument null
* @return null
*/
public suspend fun getAccountPolicy(argument: GetAccountPolicyPlainArgs): GetAccountPolicyResult =
getAccountPolicyResultToKotlin(getAccountPolicyPlain(argument.toJava()).await())
/**
* @see [getAccountPolicy].
* @param accountId User account id
* @param policyName The name of the account policy
* @param policyType Type of the policy.
* @return null
*/
public suspend fun getAccountPolicy(
accountId: String,
policyName: String,
policyType: AccountPolicyPolicyType,
): GetAccountPolicyResult {
val argument = GetAccountPolicyPlainArgs(
accountId = accountId,
policyName = policyName,
policyType = policyType,
)
return getAccountPolicyResultToKotlin(getAccountPolicyPlain(argument.toJava()).await())
}
/**
* @see [getAccountPolicy].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetAccountPolicyPlainArgs].
* @return null
*/
public suspend fun getAccountPolicy(argument: suspend GetAccountPolicyPlainArgsBuilder.() -> Unit): GetAccountPolicyResult {
val builder = GetAccountPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccountPolicyResultToKotlin(getAccountPolicyPlain(builtArgument.toJava()).await())
}
/**
* This structure contains information about one delivery in your account.
* A delivery is a connection between a logical delivery source and a logical delivery destination.
* For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html).
* @param argument null
* @return null
*/
public suspend fun getDelivery(argument: GetDeliveryPlainArgs): GetDeliveryResult =
getDeliveryResultToKotlin(getDeliveryPlain(argument.toJava()).await())
/**
* @see [getDelivery].
* @param deliveryId The unique ID that identifies this delivery in your account.
* @return null
*/
public suspend fun getDelivery(deliveryId: String): GetDeliveryResult {
val argument = GetDeliveryPlainArgs(
deliveryId = deliveryId,
)
return getDeliveryResultToKotlin(getDeliveryPlain(argument.toJava()).await())
}
/**
* @see [getDelivery].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetDeliveryPlainArgs].
* @return null
*/
public suspend fun getDelivery(argument: suspend GetDeliveryPlainArgsBuilder.() -> Unit): GetDeliveryResult {
val builder = GetDeliveryPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDeliveryResultToKotlin(getDeliveryPlain(builtArgument.toJava()).await())
}
/**
* This structure contains information about one delivery destination in your account.
* A delivery destination is an AWS resource that represents an AWS service that logs can be sent to CloudWatch Logs, Amazon S3, are supported as Kinesis Data Firehose delivery destinations.
* @param argument null
* @return null
*/
public suspend fun getDeliveryDestination(argument: GetDeliveryDestinationPlainArgs): GetDeliveryDestinationResult =
getDeliveryDestinationResultToKotlin(getDeliveryDestinationPlain(argument.toJava()).await())
/**
* @see [getDeliveryDestination].
* @param name The name of this delivery destination.
* @return null
*/
public suspend fun getDeliveryDestination(name: String): GetDeliveryDestinationResult {
val argument = GetDeliveryDestinationPlainArgs(
name = name,
)
return getDeliveryDestinationResultToKotlin(getDeliveryDestinationPlain(argument.toJava()).await())
}
/**
* @see [getDeliveryDestination].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetDeliveryDestinationPlainArgs].
* @return null
*/
public suspend fun getDeliveryDestination(argument: suspend GetDeliveryDestinationPlainArgsBuilder.() -> Unit): GetDeliveryDestinationResult {
val builder = GetDeliveryDestinationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDeliveryDestinationResultToKotlin(getDeliveryDestinationPlain(builtArgument.toJava()).await())
}
/**
* A delivery source is an AWS resource that sends logs to an AWS destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
* Only some AWS services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from AWS services](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html).
* @param argument null
* @return null
*/
public suspend fun getDeliverySource(argument: GetDeliverySourcePlainArgs): GetDeliverySourceResult =
getDeliverySourceResultToKotlin(getDeliverySourcePlain(argument.toJava()).await())
/**
* @see [getDeliverySource].
* @param name The unique name of the Log source.
* @return null
*/
public suspend fun getDeliverySource(name: String): GetDeliverySourceResult {
val argument = GetDeliverySourcePlainArgs(
name = name,
)
return getDeliverySourceResultToKotlin(getDeliverySourcePlain(argument.toJava()).await())
}
/**
* @see [getDeliverySource].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetDeliverySourcePlainArgs].
* @return null
*/
public suspend fun getDeliverySource(argument: suspend GetDeliverySourcePlainArgsBuilder.() -> Unit): GetDeliverySourceResult {
val builder = GetDeliverySourcePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDeliverySourceResultToKotlin(getDeliverySourcePlain(builtArgument.toJava()).await())
}
/**
* The AWS::Logs::Destination resource specifies a CloudWatch Logs destination. A destination encapsulates a physical resource (such as an Amazon Kinesis data stream) and enables you to subscribe that resource to a stream of log events.
* @param argument null
* @return null
*/
public suspend fun getDestination(argument: GetDestinationPlainArgs): GetDestinationResult =
getDestinationResultToKotlin(getDestinationPlain(argument.toJava()).await())
/**
* @see [getDestination].
* @param destinationName The name of the destination resource
* @return null
*/
public suspend fun getDestination(destinationName: String): GetDestinationResult {
val argument = GetDestinationPlainArgs(
destinationName = destinationName,
)
return getDestinationResultToKotlin(getDestinationPlain(argument.toJava()).await())
}
/**
* @see [getDestination].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetDestinationPlainArgs].
* @return null
*/
public suspend fun getDestination(argument: suspend GetDestinationPlainArgsBuilder.() -> Unit): GetDestinationResult {
val builder = GetDestinationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDestinationResultToKotlin(getDestinationPlain(builtArgument.toJava()).await())
}
/**
* The AWS::Logs::LogAnomalyDetector resource specifies a CloudWatch Logs LogAnomalyDetector.
* @param argument null
* @return null
*/
public suspend fun getLogAnomalyDetector(argument: GetLogAnomalyDetectorPlainArgs): GetLogAnomalyDetectorResult =
getLogAnomalyDetectorResultToKotlin(getLogAnomalyDetectorPlain(argument.toJava()).await())
/**
* @see [getLogAnomalyDetector].
* @param anomalyDetectorArn ARN of LogAnomalyDetector
* @return null
*/
public suspend fun getLogAnomalyDetector(anomalyDetectorArn: String): GetLogAnomalyDetectorResult {
val argument = GetLogAnomalyDetectorPlainArgs(
anomalyDetectorArn = anomalyDetectorArn,
)
return getLogAnomalyDetectorResultToKotlin(getLogAnomalyDetectorPlain(argument.toJava()).await())
}
/**
* @see [getLogAnomalyDetector].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetLogAnomalyDetectorPlainArgs].
* @return null
*/
public suspend fun getLogAnomalyDetector(argument: suspend GetLogAnomalyDetectorPlainArgsBuilder.() -> Unit): GetLogAnomalyDetectorResult {
val builder = GetLogAnomalyDetectorPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getLogAnomalyDetectorResultToKotlin(getLogAnomalyDetectorPlain(builtArgument.toJava()).await())
}
/**
* The ``AWS::Logs::LogGroup`` resource specifies a log group. A log group defines common properties for log streams, such as their retention and access control rules. Each log stream must belong to one log group.
* You can create up to 1,000,000 log groups per Region per account. You must use the following guidelines when naming a log group:
* + Log group names must be unique within a Region for an AWS account.
* + Log group names can be between 1 and 512 characters long.
* + Log group names consist of the following characters: a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
* @param argument null
* @return null
*/
public suspend fun getLogGroup(argument: GetLogGroupPlainArgs): GetLogGroupResult =
getLogGroupResultToKotlin(getLogGroupPlain(argument.toJava()).await())
/**
* @see [getLogGroup].
* @param logGroupName The name of the log group. If you don't specify a name, CFNlong generates a unique ID for the log group.
* @return null
*/
public suspend fun getLogGroup(logGroupName: String): GetLogGroupResult {
val argument = GetLogGroupPlainArgs(
logGroupName = logGroupName,
)
return getLogGroupResultToKotlin(getLogGroupPlain(argument.toJava()).await())
}
/**
* @see [getLogGroup].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetLogGroupPlainArgs].
* @return null
*/
public suspend fun getLogGroup(argument: suspend GetLogGroupPlainArgsBuilder.() -> Unit): GetLogGroupResult {
val builder = GetLogGroupPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getLogGroupResultToKotlin(getLogGroupPlain(builtArgument.toJava()).await())
}
/**
* The ``AWS::Logs::MetricFilter`` resource specifies a metric filter that describes how CWL extracts information from logs and transforms it into Amazon CloudWatch metrics. If you have multiple metric filters that are associated with a log group, all the filters are applied to the log streams in that group.
* The maximum number of metric filters that can be associated with a log group is 100.
* @param argument null
* @return null
*/
public suspend fun getMetricFilter(argument: GetMetricFilterPlainArgs): GetMetricFilterResult =
getMetricFilterResultToKotlin(getMetricFilterPlain(argument.toJava()).await())
/**
* @see [getMetricFilter].
* @param filterName The name of the metric filter.
* @param logGroupName The name of an existing log group that you want to associate with this metric filter.
* @return null
*/
public suspend fun getMetricFilter(filterName: String, logGroupName: String): GetMetricFilterResult {
val argument = GetMetricFilterPlainArgs(
filterName = filterName,
logGroupName = logGroupName,
)
return getMetricFilterResultToKotlin(getMetricFilterPlain(argument.toJava()).await())
}
/**
* @see [getMetricFilter].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetMetricFilterPlainArgs].
* @return null
*/
public suspend fun getMetricFilter(argument: suspend GetMetricFilterPlainArgsBuilder.() -> Unit): GetMetricFilterResult {
val builder = GetMetricFilterPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMetricFilterResultToKotlin(getMetricFilterPlain(builtArgument.toJava()).await())
}
/**
* The resource schema for AWSLogs QueryDefinition
* @param argument null
* @return null
*/
public suspend fun getQueryDefinition(argument: GetQueryDefinitionPlainArgs): GetQueryDefinitionResult =
getQueryDefinitionResultToKotlin(getQueryDefinitionPlain(argument.toJava()).await())
/**
* @see [getQueryDefinition].
* @param queryDefinitionId Unique identifier of a query definition
* @return null
*/
public suspend fun getQueryDefinition(queryDefinitionId: String): GetQueryDefinitionResult {
val argument = GetQueryDefinitionPlainArgs(
queryDefinitionId = queryDefinitionId,
)
return getQueryDefinitionResultToKotlin(getQueryDefinitionPlain(argument.toJava()).await())
}
/**
* @see [getQueryDefinition].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetQueryDefinitionPlainArgs].
* @return null
*/
public suspend fun getQueryDefinition(argument: suspend GetQueryDefinitionPlainArgsBuilder.() -> Unit): GetQueryDefinitionResult {
val builder = GetQueryDefinitionPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getQueryDefinitionResultToKotlin(getQueryDefinitionPlain(builtArgument.toJava()).await())
}
/**
* The resource schema for AWSLogs ResourcePolicy
* @param argument null
* @return null
*/
public suspend fun getResourcePolicy(argument: GetResourcePolicyPlainArgs): GetResourcePolicyResult =
getResourcePolicyResultToKotlin(getResourcePolicyPlain(argument.toJava()).await())
/**
* @see [getResourcePolicy].
* @param policyName A name for resource policy
* @return null
*/
public suspend fun getResourcePolicy(policyName: String): GetResourcePolicyResult {
val argument = GetResourcePolicyPlainArgs(
policyName = policyName,
)
return getResourcePolicyResultToKotlin(getResourcePolicyPlain(argument.toJava()).await())
}
/**
* @see [getResourcePolicy].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetResourcePolicyPlainArgs].
* @return null
*/
public suspend fun getResourcePolicy(argument: suspend GetResourcePolicyPlainArgsBuilder.() -> Unit): GetResourcePolicyResult {
val builder = GetResourcePolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getResourcePolicyResultToKotlin(getResourcePolicyPlain(builtArgument.toJava()).await())
}
/**
* The ``AWS::Logs::SubscriptionFilter`` resource specifies a subscription filter and associates it with the specified log group. Subscription filters allow you to subscribe to a real-time stream of log events and have them delivered to a specific destination. Currently, the supported destinations are:
* + An Amazon Kinesis data stream belonging to the same account as the subscription filter, for same-account delivery.
* + A logical destination that belongs to a different account, for cross-account delivery.
* + An Amazon Kinesis Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery.
* + An LAMlong function that belongs to the same account as the subscription filter, for same-account delivery.
* There can be as many as two subscription filters associated with a log group.
* @param argument null
* @return null
*/
public suspend fun getSubscriptionFilter(argument: GetSubscriptionFilterPlainArgs): GetSubscriptionFilterResult =
getSubscriptionFilterResultToKotlin(getSubscriptionFilterPlain(argument.toJava()).await())
/**
* @see [getSubscriptionFilter].
* @param filterName The name of the subscription filter.
* @param logGroupName The log group to associate with the subscription filter. All log events that are uploaded to this log group are filtered and delivered to the specified AWS resource if the filter pattern matches the log events.
* @return null
*/
public suspend fun getSubscriptionFilter(filterName: String, logGroupName: String): GetSubscriptionFilterResult {
val argument = GetSubscriptionFilterPlainArgs(
filterName = filterName,
logGroupName = logGroupName,
)
return getSubscriptionFilterResultToKotlin(getSubscriptionFilterPlain(argument.toJava()).await())
}
/**
* @see [getSubscriptionFilter].
* @param argument Builder for [com.pulumi.awsnative.logs.kotlin.inputs.GetSubscriptionFilterPlainArgs].
* @return null
*/
public suspend fun getSubscriptionFilter(argument: suspend GetSubscriptionFilterPlainArgsBuilder.() -> Unit): GetSubscriptionFilterResult {
val builder = GetSubscriptionFilterPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getSubscriptionFilterResultToKotlin(getSubscriptionFilterPlain(builtArgument.toJava()).await())
}
}