TelemetryRuleForOrganization class
Manages an AWS CloudWatch Observability Admin Telemetry Rule for an AWS Organization.
An organization-wide telemetry rule defines how telemetry data (logs, metrics, or traces) should be collected for AWS resources across the accounts in your organization. The rule can target one or more Regions and configure a destination (such as CloudWatch Logs or S3) along with source-specific parameters for VPC flow logs, WAF logs, CloudTrail events, ELB access logs, and more.
> NOTE: Before using this resource, telemetry evaluation for organization must be enabled. Use the aws.observabilityadmin.TelemetryEvaluationForOrganization resource to enable it.
> NOTE: This resource can only be used from the organization management account.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.observabilityadmin.TelemetryEvaluationForOrganization("example", {});
const exampleTelemetryRuleForOrganization = new aws.observabilityadmin.TelemetryRuleForOrganization("example", {
rule: {
telemetryType: "Logs",
resourceType: "AWS::EC2::VPC",
},
ruleName: "example-org-telemetry-rule",
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.observabilityadmin.TelemetryEvaluationForOrganization("example")
example_telemetry_rule_for_organization = aws.observabilityadmin.TelemetryRuleForOrganization("example",
rule={
"telemetry_type": "Logs",
"resource_type": "AWS::EC2::VPC",
},
rule_name="example-org-telemetry-rule",
opts = pulumi.ResourceOptions(depends_on=[example]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Observabilityadmin.TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new Aws.Observabilityadmin.TelemetryRuleForOrganization("example", new()
{
Rule = new Aws.Observabilityadmin.Inputs.TelemetryRuleForOrganizationRuleArgs
{
TelemetryType = "Logs",
ResourceType = "AWS::EC2::VPC",
},
RuleName = "example-org-telemetry-rule",
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/observabilityadmin"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := observabilityadmin.NewTelemetryEvaluationForOrganization(ctx, "example", nil)
if err != nil {
return err
}
_, err = observabilityadmin.NewTelemetryRuleForOrganization(ctx, "example", &observabilityadmin.TelemetryRuleForOrganizationArgs{
Rule: &observabilityadmin.TelemetryRuleForOrganizationRuleArgs{
TelemetryType: pulumi.String("Logs"),
ResourceType: pulumi.String("AWS::EC2::VPC"),
},
RuleName: pulumi.String("example-org-telemetry-rule"),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_observabilityadmin_telemetryevaluationfororganization" "example" {
}
resource "aws_observabilityadmin_telemetryrulefororganization" "example" {
depends_on = [aws_observabilityadmin_telemetryevaluationfororganization.example]
rule = {
telemetry_type = "Logs"
resource_type = "AWS::EC2::VPC"
}
rule_name = "example-org-telemetry-rule"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.observabilityadmin.TelemetryEvaluationForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganizationArgs;
import com.pulumi.aws.observabilityadmin.inputs.TelemetryRuleForOrganizationRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new TelemetryRuleForOrganization("exampleTelemetryRuleForOrganization", TelemetryRuleForOrganizationArgs.builder()
.rule(TelemetryRuleForOrganizationRuleArgs.builder()
.telemetryType("Logs")
.resourceType("AWS::EC2::VPC")
.build())
.ruleName("example-org-telemetry-rule")
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:observabilityadmin:TelemetryEvaluationForOrganization
exampleTelemetryRuleForOrganization:
type: aws:observabilityadmin:TelemetryRuleForOrganization
name: example
properties:
rule:
telemetryType: Logs
resourceType: AWS::EC2::VPC
ruleName: example-org-telemetry-rule
options:
dependsOn:
- ${example}
VPC Flow Logs to CloudWatch Logs
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.observabilityadmin.TelemetryEvaluationForOrganization("example", {});
const exampleTelemetryRuleForOrganization = new aws.observabilityadmin.TelemetryRuleForOrganization("example", {
rule: {
destinationConfiguration: {
vpcFlowLogParameters: {
trafficType: "ALL",
maxAggregationInterval: 60,
},
destinationType: "cloud-watch-logs",
destinationPattern: "/aws/vpcflowlogs/<resourceId>",
retentionInDays: 30,
},
telemetryType: "Logs",
resourceType: "AWS::EC2::VPC",
telemetrySourceTypes: ["VPC_FLOW_LOGS"],
allRegions: true,
allowFieldUpdates: true,
},
ruleName: "org-vpc-flow-logs-rule",
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.observabilityadmin.TelemetryEvaluationForOrganization("example")
example_telemetry_rule_for_organization = aws.observabilityadmin.TelemetryRuleForOrganization("example",
rule={
"destination_configuration": {
"vpc_flow_log_parameters": {
"traffic_type": "ALL",
"max_aggregation_interval": 60,
},
"destination_type": "cloud-watch-logs",
"destination_pattern": "/aws/vpcflowlogs/<resourceId>",
"retention_in_days": 30,
},
"telemetry_type": "Logs",
"resource_type": "AWS::EC2::VPC",
"telemetry_source_types": ["VPC_FLOW_LOGS"],
"all_regions": True,
"allow_field_updates": True,
},
rule_name="org-vpc-flow-logs-rule",
opts = pulumi.ResourceOptions(depends_on=[example]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Observabilityadmin.TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new Aws.Observabilityadmin.TelemetryRuleForOrganization("example", new()
{
Rule = new Aws.Observabilityadmin.Inputs.TelemetryRuleForOrganizationRuleArgs
{
DestinationConfiguration = new Aws.Observabilityadmin.Inputs.TelemetryRuleForOrganizationRuleDestinationConfigurationArgs
{
VpcFlowLogParameters = new Aws.Observabilityadmin.Inputs.TelemetryRuleForOrganizationRuleDestinationConfigurationVpcFlowLogParametersArgs
{
TrafficType = "ALL",
MaxAggregationInterval = 60,
},
DestinationType = "cloud-watch-logs",
DestinationPattern = "/aws/vpcflowlogs/<resourceId>",
RetentionInDays = 30,
},
TelemetryType = "Logs",
ResourceType = "AWS::EC2::VPC",
TelemetrySourceTypes = new[]
{
"VPC_FLOW_LOGS",
},
AllRegions = true,
AllowFieldUpdates = true,
},
RuleName = "org-vpc-flow-logs-rule",
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/observabilityadmin"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := observabilityadmin.NewTelemetryEvaluationForOrganization(ctx, "example", nil)
if err != nil {
return err
}
_, err = observabilityadmin.NewTelemetryRuleForOrganization(ctx, "example", &observabilityadmin.TelemetryRuleForOrganizationArgs{
Rule: &observabilityadmin.TelemetryRuleForOrganizationRuleArgs{
DestinationConfiguration: &observabilityadmin.TelemetryRuleForOrganizationRuleDestinationConfigurationArgs{
VpcFlowLogParameters: &observabilityadmin.TelemetryRuleForOrganizationRuleDestinationConfigurationVpcFlowLogParametersArgs{
TrafficType: pulumi.String("ALL"),
MaxAggregationInterval: pulumi.Int(60),
},
DestinationType: pulumi.String("cloud-watch-logs"),
DestinationPattern: pulumi.String("/aws/vpcflowlogs/<resourceId>"),
RetentionInDays: pulumi.Int(30),
},
TelemetryType: pulumi.String("Logs"),
ResourceType: pulumi.String("AWS::EC2::VPC"),
TelemetrySourceTypes: pulumi.StringArray{
pulumi.String("VPC_FLOW_LOGS"),
},
AllRegions: pulumi.Bool(true),
AllowFieldUpdates: pulumi.Bool(true),
},
RuleName: pulumi.String("org-vpc-flow-logs-rule"),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_observabilityadmin_telemetryevaluationfororganization" "example" {
}
resource "aws_observabilityadmin_telemetryrulefororganization" "example" {
depends_on = [aws_observabilityadmin_telemetryevaluationfororganization.example]
rule = {
destination_configuration = {
vpc_flow_log_parameters = {
traffic_type = "ALL"
max_aggregation_interval = 60
}
destination_type = "cloud-watch-logs"
destination_pattern = "/aws/vpcflowlogs/<resourceId>"
retention_in_days = 30
}
telemetry_type = "Logs"
resource_type = "AWS::EC2::VPC"
telemetry_source_types = ["VPC_FLOW_LOGS"]
all_regions = true
allow_field_updates = true
}
rule_name = "org-vpc-flow-logs-rule"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.observabilityadmin.TelemetryEvaluationForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganizationArgs;
import com.pulumi.aws.observabilityadmin.inputs.TelemetryRuleForOrganizationRuleArgs;
import com.pulumi.aws.observabilityadmin.inputs.TelemetryRuleForOrganizationRuleDestinationConfigurationArgs;
import com.pulumi.aws.observabilityadmin.inputs.TelemetryRuleForOrganizationRuleDestinationConfigurationVpcFlowLogParametersArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new TelemetryRuleForOrganization("exampleTelemetryRuleForOrganization", TelemetryRuleForOrganizationArgs.builder()
.rule(TelemetryRuleForOrganizationRuleArgs.builder()
.destinationConfiguration(TelemetryRuleForOrganizationRuleDestinationConfigurationArgs.builder()
.vpcFlowLogParameters(TelemetryRuleForOrganizationRuleDestinationConfigurationVpcFlowLogParametersArgs.builder()
.trafficType("ALL")
.maxAggregationInterval(60)
.build())
.destinationType("cloud-watch-logs")
.destinationPattern("/aws/vpcflowlogs/<resourceId>")
.retentionInDays(30)
.build())
.telemetryType("Logs")
.resourceType("AWS::EC2::VPC")
.telemetrySourceTypes("VPC_FLOW_LOGS")
.allRegions(true)
.allowFieldUpdates(true)
.build())
.ruleName("org-vpc-flow-logs-rule")
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:observabilityadmin:TelemetryEvaluationForOrganization
exampleTelemetryRuleForOrganization:
type: aws:observabilityadmin:TelemetryRuleForOrganization
name: example
properties:
rule:
destinationConfiguration:
vpcFlowLogParameters:
trafficType: ALL
maxAggregationInterval: 60
destinationType: cloud-watch-logs
destinationPattern: /aws/vpcflowlogs/<resourceId>
retentionInDays: 30
telemetryType: Logs
resourceType: AWS::EC2::VPC
telemetrySourceTypes:
- VPC_FLOW_LOGS
allRegions: true
allowFieldUpdates: true
ruleName: org-vpc-flow-logs-rule
options:
dependsOn:
- ${example}
Scoped to Specific Organizational Units
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.organizations.getOrganization({});
const example = new aws.observabilityadmin.TelemetryEvaluationForOrganization("example", {});
const exampleTelemetryRuleForOrganization = new aws.observabilityadmin.TelemetryRuleForOrganization("example", {
rule: {
telemetryType: "Logs",
resourceType: "AWS::EKS::Cluster",
scope: current.then(current => `OrganizationId = '${current.id}'`),
selectionCriteria: "ResourceTags.Environment = 'production'",
regions: [
"us-east-1",
"us-west-2",
],
},
ruleName: "org-scoped-rule",
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
current = aws.organizations.get_organization()
example = aws.observabilityadmin.TelemetryEvaluationForOrganization("example")
example_telemetry_rule_for_organization = aws.observabilityadmin.TelemetryRuleForOrganization("example",
rule={
"telemetry_type": "Logs",
"resource_type": "AWS::EKS::Cluster",
"scope": f"OrganizationId = '{current.id}'",
"selection_criteria": "ResourceTags.Environment = 'production'",
"regions": [
"us-east-1",
"us-west-2",
],
},
rule_name="org-scoped-rule",
opts = pulumi.ResourceOptions(depends_on=[example]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var current = Aws.Organizations.GetOrganization.Invoke();
var example = new Aws.Observabilityadmin.TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new Aws.Observabilityadmin.TelemetryRuleForOrganization("example", new()
{
Rule = new Aws.Observabilityadmin.Inputs.TelemetryRuleForOrganizationRuleArgs
{
TelemetryType = "Logs",
ResourceType = "AWS::EKS::Cluster",
Scope = $"OrganizationId = '{current.Apply(getOrganizationResult => getOrganizationResult.Id)}'",
SelectionCriteria = "ResourceTags.Environment = 'production'",
Regions = new[]
{
"us-east-1",
"us-west-2",
},
},
RuleName = "org-scoped-rule",
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/observabilityadmin"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := organizations.LookupOrganization(ctx, &organizations.LookupOrganizationArgs{}, nil)
if err != nil {
return err
}
example, err := observabilityadmin.NewTelemetryEvaluationForOrganization(ctx, "example", nil)
if err != nil {
return err
}
_, err = observabilityadmin.NewTelemetryRuleForOrganization(ctx, "example", &observabilityadmin.TelemetryRuleForOrganizationArgs{
Rule: &observabilityadmin.TelemetryRuleForOrganizationRuleArgs{
TelemetryType: pulumi.String("Logs"),
ResourceType: pulumi.String("AWS::EKS::Cluster"),
Scope: pulumi.Sprintf("OrganizationId = '%v'", current.Id),
SelectionCriteria: pulumi.String("ResourceTags.Environment = 'production'"),
Regions: pulumi.StringArray{
pulumi.String("us-east-1"),
pulumi.String("us-west-2"),
},
},
RuleName: pulumi.String("org-scoped-rule"),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_organizations_getorganization" "current" {
}
resource "aws_observabilityadmin_telemetryevaluationfororganization" "example" {
}
resource "aws_observabilityadmin_telemetryrulefororganization" "example" {
depends_on = [aws_observabilityadmin_telemetryevaluationfororganization.example]
rule = {
telemetry_type = "Logs"
resource_type = "AWS::EKS::Cluster"
scope ="OrganizationId = '${data.aws_organizations_getorganization.current.id}'"
selection_criteria = "ResourceTags.Environment = 'production'"
regions = ["us-east-1", "us-west-2"]
}
rule_name = "org-scoped-rule"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.organizations.OrganizationsFunctions;
import com.pulumi.aws.organizations.inputs.GetOrganizationArgs;
import com.pulumi.aws.observabilityadmin.TelemetryEvaluationForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganizationArgs;
import com.pulumi.aws.observabilityadmin.inputs.TelemetryRuleForOrganizationRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 current = OrganizationsFunctions.getOrganization(GetOrganizationArgs.builder()
.build());
var example = new TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new TelemetryRuleForOrganization("exampleTelemetryRuleForOrganization", TelemetryRuleForOrganizationArgs.builder()
.rule(TelemetryRuleForOrganizationRuleArgs.builder()
.telemetryType("Logs")
.resourceType("AWS::EKS::Cluster")
.scope(String.format("OrganizationId = '%s'", current.id()))
.selectionCriteria("ResourceTags.Environment = 'production'")
.regions(
"us-east-1",
"us-west-2")
.build())
.ruleName("org-scoped-rule")
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:observabilityadmin:TelemetryEvaluationForOrganization
exampleTelemetryRuleForOrganization:
type: aws:observabilityadmin:TelemetryRuleForOrganization
name: example
properties:
rule:
telemetryType: Logs
resourceType: AWS::EKS::Cluster
scope: OrganizationId = '${current.id}'
selectionCriteria: ResourceTags.Environment = 'production'
regions:
- us-east-1
- us-west-2
ruleName: org-scoped-rule
options:
dependsOn:
- ${example}
variables:
current:
fn::invoke:
function: aws:organizations:getOrganization
arguments: {}
With Tags
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.observabilityadmin.TelemetryEvaluationForOrganization("example", {});
const exampleTelemetryRuleForOrganization = new aws.observabilityadmin.TelemetryRuleForOrganization("example", {
rule: {
telemetryType: "Logs",
resourceType: "AWS::EC2::VPC",
},
ruleName: "org-tagged-rule",
tags: {
Environment: "production",
Purpose: "organization-monitoring",
},
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.observabilityadmin.TelemetryEvaluationForOrganization("example")
example_telemetry_rule_for_organization = aws.observabilityadmin.TelemetryRuleForOrganization("example",
rule={
"telemetry_type": "Logs",
"resource_type": "AWS::EC2::VPC",
},
rule_name="org-tagged-rule",
tags={
"Environment": "production",
"Purpose": "organization-monitoring",
},
opts = pulumi.ResourceOptions(depends_on=[example]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Observabilityadmin.TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new Aws.Observabilityadmin.TelemetryRuleForOrganization("example", new()
{
Rule = new Aws.Observabilityadmin.Inputs.TelemetryRuleForOrganizationRuleArgs
{
TelemetryType = "Logs",
ResourceType = "AWS::EC2::VPC",
},
RuleName = "org-tagged-rule",
Tags =
{
{ "Environment", "production" },
{ "Purpose", "organization-monitoring" },
},
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/observabilityadmin"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := observabilityadmin.NewTelemetryEvaluationForOrganization(ctx, "example", nil)
if err != nil {
return err
}
_, err = observabilityadmin.NewTelemetryRuleForOrganization(ctx, "example", &observabilityadmin.TelemetryRuleForOrganizationArgs{
Rule: &observabilityadmin.TelemetryRuleForOrganizationRuleArgs{
TelemetryType: pulumi.String("Logs"),
ResourceType: pulumi.String("AWS::EC2::VPC"),
},
RuleName: pulumi.String("org-tagged-rule"),
Tags: pulumi.StringMap{
"Environment": pulumi.String("production"),
"Purpose": pulumi.String("organization-monitoring"),
},
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_observabilityadmin_telemetryevaluationfororganization" "example" {
}
resource "aws_observabilityadmin_telemetryrulefororganization" "example" {
depends_on = [aws_observabilityadmin_telemetryevaluationfororganization.example]
rule = {
telemetry_type = "Logs"
resource_type = "AWS::EC2::VPC"
}
rule_name = "org-tagged-rule"
tags = {
"Environment" = "production"
"Purpose" = "organization-monitoring"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.observabilityadmin.TelemetryEvaluationForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganization;
import com.pulumi.aws.observabilityadmin.TelemetryRuleForOrganizationArgs;
import com.pulumi.aws.observabilityadmin.inputs.TelemetryRuleForOrganizationRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 TelemetryEvaluationForOrganization("example");
var exampleTelemetryRuleForOrganization = new TelemetryRuleForOrganization("exampleTelemetryRuleForOrganization", TelemetryRuleForOrganizationArgs.builder()
.rule(TelemetryRuleForOrganizationRuleArgs.builder()
.telemetryType("Logs")
.resourceType("AWS::EC2::VPC")
.build())
.ruleName("org-tagged-rule")
.tags(Map.ofEntries(
Map.entry("Environment", "production"),
Map.entry("Purpose", "organization-monitoring")
))
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:observabilityadmin:TelemetryEvaluationForOrganization
exampleTelemetryRuleForOrganization:
type: aws:observabilityadmin:TelemetryRuleForOrganization
name: example
properties:
rule:
telemetryType: Logs
resourceType: AWS::EC2::VPC
ruleName: org-tagged-rule
tags:
Environment: production
Purpose: organization-monitoring
options:
dependsOn:
- ${example}
Import
Identity Schema
Required
ruleName(String) Name of the telemetry rule.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import CloudWatch Observability Admin Telemetry Rules for Organization using ruleName. For example:
$ pulumi import aws:observabilityadmin/telemetryRuleForOrganization:TelemetryRuleForOrganization example example-org-telemetry-rule
Constructors
- TelemetryRuleForOrganization(String name, {TelemetryRuleForOrganizationArgs? args, CustomResourceOptions? options})
-
Creates a new TelemetryRuleForOrganization.
nameThe Pulumi resource name.argsArguments used to configure this TelemetryRuleForOrganization. The set of arguments for TelemetryRuleForOrganization.optionsResource options controlling this resource's behavior. - TelemetryRuleForOrganization.reference(String urn)
- Creates a typed reference to an existing TelemetryRuleForOrganization resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
rule
↔ Output<
TelemetryRuleForOrganizationRule> -
Configuration block for the organization telemetry rule. See
rulebelow.latefinal -
ruleArn
↔ Output<
String> -
ARN of the organization telemetry rule.
latefinal
-
ruleName
↔ Output<
String> -
Name of the organization telemetry rule. Must be between 1 and 100 characters and contain only alphanumeric characters, hyphens, underscores, periods, hash symbols, and forward slashes. Changing this argument forces a new resource to be created.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Key-value map of resource tags. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
timeouts
↔ Output<
TelemetryRuleForOrganizationTimeouts?> -
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {TelemetryRuleForOrganizationState? state, CustomResourceOptions? options}) → TelemetryRuleForOrganization -
Gets an existing TelemetryRuleForOrganization resource's state with the given
nameandid.