All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.xray.kotlin.Group.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.xray.kotlin
import com.pulumi.aws.xray.kotlin.outputs.GroupInsightsConfiguration
import com.pulumi.aws.xray.kotlin.outputs.GroupInsightsConfiguration.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [Group].
*/
@PulumiTagMarker
public class GroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: GroupArgs = GroupArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend GroupArgsBuilder.() -> Unit) {
val builder = GroupArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Group {
val builtJavaResource = com.pulumi.aws.xray.Group(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Group(builtJavaResource)
}
}
/**
* Creates and manages an AWS XRay Group.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.xray.Group("example", {
* groupName: "example",
* filterExpression: "responsetime > 5",
* insightsConfiguration: {
* insightsEnabled: true,
* notificationsEnabled: true,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.xray.Group("example",
* group_name="example",
* filter_expression="responsetime > 5",
* insights_configuration={
* "insights_enabled": True,
* "notifications_enabled": True,
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Xray.Group("example", new()
* {
* GroupName = "example",
* FilterExpression = "responsetime > 5",
* InsightsConfiguration = new Aws.Xray.Inputs.GroupInsightsConfigurationArgs
* {
* InsightsEnabled = true,
* NotificationsEnabled = true,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/xray"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := xray.NewGroup(ctx, "example", &xray.GroupArgs{
* GroupName: pulumi.String("example"),
* FilterExpression: pulumi.String("responsetime > 5"),
* InsightsConfiguration: &xray.GroupInsightsConfigurationArgs{
* InsightsEnabled: pulumi.Bool(true),
* NotificationsEnabled: pulumi.Bool(true),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.xray.Group;
* import com.pulumi.aws.xray.GroupArgs;
* import com.pulumi.aws.xray.inputs.GroupInsightsConfigurationArgs;
* 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 example = new Group("example", GroupArgs.builder()
* .groupName("example")
* .filterExpression("responsetime > 5")
* .insightsConfiguration(GroupInsightsConfigurationArgs.builder()
* .insightsEnabled(true)
* .notificationsEnabled(true)
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:xray:Group
* properties:
* groupName: example
* filterExpression: responsetime > 5
* insightsConfiguration:
* insightsEnabled: true
* notificationsEnabled: true
* ```
*
* ## Import
* Using `pulumi import`, import XRay Groups using the ARN. For example:
* ```sh
* $ pulumi import aws:xray/group:Group example arn:aws:xray:us-west-2:1234567890:group/example-group/TNGX7SW5U6QY36T4ZMOUA3HVLBYCZTWDIOOXY3CJAXTHSS3YCWUA
* ```
*/
public class Group internal constructor(
override val javaResource: com.pulumi.aws.xray.Group,
) : KotlinCustomResource(javaResource, GroupMapper) {
/**
* The ARN of the Group.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html).
*/
public val filterExpression: Output
get() = javaResource.filterExpression().applyValue({ args0 -> args0 })
/**
* The name of the group.
*/
public val groupName: Output
get() = javaResource.groupName().applyValue({ args0 -> args0 })
/**
* Configuration options for enabling insights.
*/
public val insightsConfiguration: Output
get() = javaResource.insightsConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
/**
* Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*/
@Deprecated(
message = """
Please use `tags` instead.
""",
)
public val tagsAll: Output>
get() = javaResource.tagsAll().applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
})
}
public object GroupMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.xray.Group::class == javaResource::class
override fun map(javaResource: Resource): Group = Group(javaResource as com.pulumi.aws.xray.Group)
}
/**
* @see [Group].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Group].
*/
public suspend fun group(name: String, block: suspend GroupResourceBuilder.() -> Unit): Group {
val builder = GroupResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Group].
* @param name The _unique_ name of the resulting resource.
*/
public fun group(name: String): Group {
val builder = GroupResourceBuilder()
builder.name(name)
return builder.build()
}