This resource allows you to create and manage, forwarding metrics to third party integrations for a CloudAMQP instance. Once configured, the metrics produced will be forward to corresponding integration.
Only available for dedicated subscription plans.
Example Usage
Cloudwatch v1 and v2 metric integration
Access key
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const cloudwatch = new cloudamqp.IntegrationMetric("cloudwatch", {
instanceId: instance.id,
name: "cloudwatch",
accessKeyId: awsAccessKeyId,
secretAccessKey: varAwsSecretAcccessKey,
region: awsRegion,
});
const cloudwatchV2 = new cloudamqp.IntegrationMetric("cloudwatch_v2", {
instanceId: instance.id,
name: "cloudwatch_v2",
accessKeyId: awsAccessKeyId,
secretAccessKey: varAwsSecretAcccessKey,
region: awsRegion,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
cloudwatch = cloudamqp.IntegrationMetric("cloudwatch",
instance_id=instance["id"],
name="cloudwatch",
access_key_id=aws_access_key_id,
secret_access_key=var_aws_secret_acccess_key,
region=aws_region)
cloudwatch_v2 = cloudamqp.IntegrationMetric("cloudwatch_v2",
instance_id=instance["id"],
name="cloudwatch_v2",
access_key_id=aws_access_key_id,
secret_access_key=var_aws_secret_acccess_key,
region=aws_region)
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewIntegrationMetric(ctx, "cloudwatch", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("cloudwatch"),
AccessKeyId: pulumi.Any(awsAccessKeyId),
SecretAccessKey: pulumi.Any(varAwsSecretAcccessKey),
Region: pulumi.Any(awsRegion),
})
if err != nil {
return err
}
_, err = cloudamqp.NewIntegrationMetric(ctx, "cloudwatch_v2", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("cloudwatch_v2"),
AccessKeyId: pulumi.Any(awsAccessKeyId),
SecretAccessKey: pulumi.Any(varAwsSecretAcccessKey),
Region: pulumi.Any(awsRegion),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var cloudwatch = new CloudAmqp.IntegrationMetric("cloudwatch", new()
{
InstanceId = instance.Id,
Name = "cloudwatch",
AccessKeyId = awsAccessKeyId,
SecretAccessKey = varAwsSecretAcccessKey,
Region = awsRegion,
});
var cloudwatchV2 = new CloudAmqp.IntegrationMetric("cloudwatch_v2", new()
{
InstanceId = instance.Id,
Name = "cloudwatch_v2",
AccessKeyId = awsAccessKeyId,
SecretAccessKey = varAwsSecretAcccessKey,
Region = awsRegion,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
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 cloudwatch = new IntegrationMetric("cloudwatch", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("cloudwatch")
.accessKeyId(awsAccessKeyId)
.secretAccessKey(varAwsSecretAcccessKey)
.region(awsRegion)
.build());
var cloudwatchV2 = new IntegrationMetric("cloudwatchV2", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("cloudwatch_v2")
.accessKeyId(awsAccessKeyId)
.secretAccessKey(varAwsSecretAcccessKey)
.region(awsRegion)
.build());
}
}
resources:
cloudwatch:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: cloudwatch
accessKeyId: ${awsAccessKeyId}
secretAccessKey: ${varAwsSecretAcccessKey}
region: ${awsRegion}
cloudwatchV2:
type: cloudamqp:IntegrationMetric
name: cloudwatch_v2
properties:
instanceId: ${instance.id}
name: cloudwatch_v2
accessKeyId: ${awsAccessKeyId}
secretAccessKey: ${varAwsSecretAcccessKey}
region: ${awsRegion}
Assume role
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const cloudwatch = new cloudamqp.IntegrationMetric("cloudwatch", {
instanceId: instance.id,
name: "cloudwatch",
iamRole: awsIamRole,
iamExternalId: externalId,
region: awsRegion,
});
const cloudwatchV2 = new cloudamqp.IntegrationMetric("cloudwatch_v2", {
instanceId: instance.id,
name: "cloudwatch_v2",
iamRole: awsIamRole,
iamExternalId: externalId,
region: awsRegion,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
cloudwatch = cloudamqp.IntegrationMetric("cloudwatch",
instance_id=instance["id"],
name="cloudwatch",
iam_role=aws_iam_role,
iam_external_id=external_id,
region=aws_region)
cloudwatch_v2 = cloudamqp.IntegrationMetric("cloudwatch_v2",
instance_id=instance["id"],
name="cloudwatch_v2",
iam_role=aws_iam_role,
iam_external_id=external_id,
region=aws_region)
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewIntegrationMetric(ctx, "cloudwatch", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("cloudwatch"),
IamRole: pulumi.Any(awsIamRole),
IamExternalId: pulumi.Any(externalId),
Region: pulumi.Any(awsRegion),
})
if err != nil {
return err
}
_, err = cloudamqp.NewIntegrationMetric(ctx, "cloudwatch_v2", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("cloudwatch_v2"),
IamRole: pulumi.Any(awsIamRole),
IamExternalId: pulumi.Any(externalId),
Region: pulumi.Any(awsRegion),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var cloudwatch = new CloudAmqp.IntegrationMetric("cloudwatch", new()
{
InstanceId = instance.Id,
Name = "cloudwatch",
IamRole = awsIamRole,
IamExternalId = externalId,
Region = awsRegion,
});
var cloudwatchV2 = new CloudAmqp.IntegrationMetric("cloudwatch_v2", new()
{
InstanceId = instance.Id,
Name = "cloudwatch_v2",
IamRole = awsIamRole,
IamExternalId = externalId,
Region = awsRegion,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
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 cloudwatch = new IntegrationMetric("cloudwatch", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("cloudwatch")
.iamRole(awsIamRole)
.iamExternalId(externalId)
.region(awsRegion)
.build());
var cloudwatchV2 = new IntegrationMetric("cloudwatchV2", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("cloudwatch_v2")
.iamRole(awsIamRole)
.iamExternalId(externalId)
.region(awsRegion)
.build());
}
}
resources:
cloudwatch:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: cloudwatch
iamRole: ${awsIamRole}
iamExternalId: ${externalId}
region: ${awsRegion}
cloudwatchV2:
type: cloudamqp:IntegrationMetric
name: cloudwatch_v2
properties:
instanceId: ${instance.id}
name: cloudwatch_v2
iamRole: ${awsIamRole}
iamExternalId: ${externalId}
region: ${awsRegion}
- AWS IAM role: arn:aws:iam::ACCOUNT-ID:role/ROLE-NAME
- External id: Create own external identifier that match the role created. E.g. “cloudamqp-abc123”.
Datadog v1 and v2 metric integration
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const datadog = new cloudamqp.IntegrationMetric("datadog", {
instanceId: instance.id,
name: "datadog",
apiKey: datadogApiKey,
region: datadogRegion,
tags: "env=prod,region=us1,version=v1.0",
});
const datadogV2 = new cloudamqp.IntegrationMetric("datadog_v2", {
instanceId: instance.id,
name: "datadog_v2",
apiKey: datadogApiKey,
region: datadogRegion,
tags: "env=prod,region=us1,version=v1.0",
});
import pulumi
import pulumi_cloudamqp as cloudamqp
datadog = cloudamqp.IntegrationMetric("datadog",
instance_id=instance["id"],
name="datadog",
api_key=datadog_api_key,
region=datadog_region,
tags="env=prod,region=us1,version=v1.0")
datadog_v2 = cloudamqp.IntegrationMetric("datadog_v2",
instance_id=instance["id"],
name="datadog_v2",
api_key=datadog_api_key,
region=datadog_region,
tags="env=prod,region=us1,version=v1.0")
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewIntegrationMetric(ctx, "datadog", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("datadog"),
ApiKey: pulumi.Any(datadogApiKey),
Region: pulumi.Any(datadogRegion),
Tags: pulumi.String("env=prod,region=us1,version=v1.0"),
})
if err != nil {
return err
}
_, err = cloudamqp.NewIntegrationMetric(ctx, "datadog_v2", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("datadog_v2"),
ApiKey: pulumi.Any(datadogApiKey),
Region: pulumi.Any(datadogRegion),
Tags: pulumi.String("env=prod,region=us1,version=v1.0"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var datadog = new CloudAmqp.IntegrationMetric("datadog", new()
{
InstanceId = instance.Id,
Name = "datadog",
ApiKey = datadogApiKey,
Region = datadogRegion,
Tags = "env=prod,region=us1,version=v1.0",
});
var datadogV2 = new CloudAmqp.IntegrationMetric("datadog_v2", new()
{
InstanceId = instance.Id,
Name = "datadog_v2",
ApiKey = datadogApiKey,
Region = datadogRegion,
Tags = "env=prod,region=us1,version=v1.0",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
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 datadog = new IntegrationMetric("datadog", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("datadog")
.apiKey(datadogApiKey)
.region(datadogRegion)
.tags("env=prod,region=us1,version=v1.0")
.build());
var datadogV2 = new IntegrationMetric("datadogV2", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("datadog_v2")
.apiKey(datadogApiKey)
.region(datadogRegion)
.tags("env=prod,region=us1,version=v1.0")
.build());
}
}
resources:
datadog:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: datadog
apiKey: ${datadogApiKey}
region: ${datadogRegion}
tags: env=prod,region=us1,version=v1.0
datadogV2:
type: cloudamqp:IntegrationMetric
name: datadog_v2
properties:
instanceId: ${instance.id}
name: datadog_v2
apiKey: ${datadogApiKey}
region: ${datadogRegion}
tags: env=prod,region=us1,version=v1.0
Librato metric integration
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const librato = new cloudamqp.IntegrationMetric("librato", {
instanceId: instance.id,
name: "librato",
email: libratoEmail,
apiKey: libratoApiKey,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
librato = cloudamqp.IntegrationMetric("librato",
instance_id=instance["id"],
name="librato",
email=librato_email,
api_key=librato_api_key)
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewIntegrationMetric(ctx, "librato", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("librato"),
Email: pulumi.Any(libratoEmail),
ApiKey: pulumi.Any(libratoApiKey),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var librato = new CloudAmqp.IntegrationMetric("librato", new()
{
InstanceId = instance.Id,
Name = "librato",
Email = libratoEmail,
ApiKey = libratoApiKey,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
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 librato = new IntegrationMetric("librato", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("librato")
.email(libratoEmail)
.apiKey(libratoApiKey)
.build());
}
}
resources:
librato:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: librato
email: ${libratoEmail}
apiKey: ${libratoApiKey}
New relic v2 metric integration
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const newrelic = new cloudamqp.IntegrationMetric("newrelic", {
instanceId: instance.id,
name: "newrelic_v2",
apiKey: newrelicApiKey,
region: newrelicRegion,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
newrelic = cloudamqp.IntegrationMetric("newrelic",
instance_id=instance["id"],
name="newrelic_v2",
api_key=newrelic_api_key,
region=newrelic_region)
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewIntegrationMetric(ctx, "newrelic", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("newrelic_v2"),
ApiKey: pulumi.Any(newrelicApiKey),
Region: pulumi.Any(newrelicRegion),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var newrelic = new CloudAmqp.IntegrationMetric("newrelic", new()
{
InstanceId = instance.Id,
Name = "newrelic_v2",
ApiKey = newrelicApiKey,
Region = newrelicRegion,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
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 newrelic = new IntegrationMetric("newrelic", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("newrelic_v2")
.apiKey(newrelicApiKey)
.region(newrelicRegion)
.build());
}
}
resources:
newrelic:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: newrelic_v2
apiKey: ${newrelicApiKey}
region: ${newrelicRegion}
Stackdriver metric integration (v1.20.2 or earlier versions)
Use variable file populated with project_id, private_key and client_email
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const stackdriver = new cloudamqp.IntegrationMetric("stackdriver", {
instanceId: instance.id,
name: "stackdriver",
projectId: stackdriverProjectId,
privateKey: stackdriverPrivateKey,
clientEmail: stackriverEmail,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
stackdriver = cloudamqp.IntegrationMetric("stackdriver",
instance_id=instance["id"],
name="stackdriver",
project_id=stackdriver_project_id,
private_key=stackdriver_private_key,
client_email=stackriver_email)
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewIntegrationMetric(ctx, "stackdriver", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("stackdriver"),
ProjectId: pulumi.Any(stackdriverProjectId),
PrivateKey: pulumi.Any(stackdriverPrivateKey),
ClientEmail: pulumi.Any(stackriverEmail),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var stackdriver = new CloudAmqp.IntegrationMetric("stackdriver", new()
{
InstanceId = instance.Id,
Name = "stackdriver",
ProjectId = stackdriverProjectId,
PrivateKey = stackdriverPrivateKey,
ClientEmail = stackriverEmail,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
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 stackdriver = new IntegrationMetric("stackdriver", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("stackdriver")
.projectId(stackdriverProjectId)
.privateKey(stackdriverPrivateKey)
.clientEmail(stackriverEmail)
.build());
}
}
resources:
stackdriver:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: stackdriver
projectId: ${stackdriverProjectId}
privateKey: ${stackdriverPrivateKey}
clientEmail: ${stackriverEmail}
or by using google_service_account_key resource from Google provider
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
import * as google from "@pulumi/google";
import * as std from "@pulumi/std";
const serviceAccount = new google.index.ServiceAccount("service_account", {
accountId: "<account_id>",
description: "<description>",
displayName: "<display_name>",
});
const serviceAccountKey = new google.index.ServiceAccountKey("service_account_key", {serviceAccountId: serviceAccount.name});
const stackdriver = new cloudamqp.IntegrationMetric("stackdriver", {
instanceId: instance.id,
name: "stackdriver",
projectId: std.index.jsondecode({
input: std.index.base64decode({
input: serviceAccountKey.privateKey,
}).result,
}).result.projectId,
privateKey: std.index.jsondecode({
input: std.index.base64decode({
input: serviceAccountKey.privateKey,
}).result,
}).result.privateKey,
clientEmail: std.index.jsondecode({
input: std.index.base64decode({
input: serviceAccountKey.privateKey,
}).result,
}).result.clientEmail,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
import pulumi_google as google
import pulumi_std as std
service_account = google.index.ServiceAccount("service_account",
account_id=<account_id>,
description=<description>,
display_name=<display_name>)
service_account_key = google.index.ServiceAccountKey("service_account_key", service_account_id=service_account.name)
stackdriver = cloudamqp.IntegrationMetric("stackdriver",
instance_id=instance["id"],
name="stackdriver",
project_id=std.index.jsondecode(input=std.index.base64decode(input=service_account_key["privateKey"])["result"])["result"]["projectId"],
private_key=std.index.jsondecode(input=std.index.base64decode(input=service_account_key["privateKey"])["result"])["result"]["privateKey"],
client_email=std.index.jsondecode(input=std.index.base64decode(input=service_account_key["privateKey"])["result"])["result"]["clientEmail"])
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi-google/sdk/go/google"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
serviceAccount, err := google.NewServiceAccount(ctx, "service_account", &google.ServiceAccountArgs{
AccountId: "<account_id>",
Description: "<description>",
DisplayName: "<display_name>",
})
if err != nil {
return err
}
serviceAccountKey, err := google.NewServiceAccountKey(ctx, "service_account_key", &google.ServiceAccountKeyArgs{
ServiceAccountId: serviceAccount.Name,
})
if err != nil {
return err
}
invokeJsondecode, err := std.Jsondecode(ctx, map[string]interface{}{
"input": std.Base64decode(ctx, map[string]interface{}{
"input": serviceAccountKey.PrivateKey,
}, nil).Result,
}, nil)
if err != nil {
return err
}
invokeJsondecode1, err := std.Jsondecode(ctx, map[string]interface{}{
"input": std.Base64decode(ctx, map[string]interface{}{
"input": serviceAccountKey.PrivateKey,
}, nil).Result,
}, nil)
if err != nil {
return err
}
invokeJsondecode2, err := std.Jsondecode(ctx, map[string]interface{}{
"input": std.Base64decode(ctx, map[string]interface{}{
"input": serviceAccountKey.PrivateKey,
}, nil).Result,
}, nil)
if err != nil {
return err
}
_, err = cloudamqp.NewIntegrationMetric(ctx, "stackdriver", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("stackdriver"),
ProjectId: invokeJsondecode.Result.ProjectId,
PrivateKey: invokeJsondecode1.Result.PrivateKey,
ClientEmail: invokeJsondecode2.Result.ClientEmail,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
using Google = Pulumi.Google;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var serviceAccount = new Google.Index.ServiceAccount("service_account", new()
{
AccountId = "<account_id>",
Description = "<description>",
DisplayName = "<display_name>",
});
var serviceAccountKey = new Google.Index.ServiceAccountKey("service_account_key", new()
{
ServiceAccountId = serviceAccount.Name,
});
var stackdriver = new CloudAmqp.IntegrationMetric("stackdriver", new()
{
InstanceId = instance.Id,
Name = "stackdriver",
ProjectId = Std.Index.Jsondecode.Invoke(new()
{
Input = Std.Index.Base64decode.Invoke(new()
{
Input = serviceAccountKey.PrivateKey,
}).Result,
}).Result.ProjectId,
PrivateKey = Std.Index.Jsondecode.Invoke(new()
{
Input = Std.Index.Base64decode.Invoke(new()
{
Input = serviceAccountKey.PrivateKey,
}).Result,
}).Result.PrivateKey,
ClientEmail = Std.Index.Jsondecode.Invoke(new()
{
Input = Std.Index.Base64decode.Invoke(new()
{
Input = serviceAccountKey.PrivateKey,
}).Result,
}).Result.ClientEmail,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.google.ServiceAccount;
import com.pulumi.google.ServiceAccountArgs;
import com.pulumi.google.ServiceAccountKey;
import com.pulumi.google.ServiceAccountKeyArgs;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
import com.pulumi.std.StdFunctions;
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 serviceAccount = new ServiceAccount("serviceAccount", ServiceAccountArgs.builder()
.accountId("<account_id>")
.description("<description>")
.displayName("<display_name>")
.build());
var serviceAccountKey = new ServiceAccountKey("serviceAccountKey", ServiceAccountKeyArgs.builder()
.serviceAccountId(serviceAccount.name())
.build());
var stackdriver = new IntegrationMetric("stackdriver", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("stackdriver")
.projectId(StdFunctions.jsondecode(Map.of("input", StdFunctions.base64decode(Map.of("input", serviceAccountKey.privateKey())).result())).result().projectId())
.privateKey(StdFunctions.jsondecode(Map.of("input", StdFunctions.base64decode(Map.of("input", serviceAccountKey.privateKey())).result())).result().privateKey())
.clientEmail(StdFunctions.jsondecode(Map.of("input", StdFunctions.base64decode(Map.of("input", serviceAccountKey.privateKey())).result())).result().clientEmail())
.build());
}
}
resources:
serviceAccount:
type: google:ServiceAccount
name: service_account
properties:
accountId: <account_id>
description: <description>
displayName: <display_name>
serviceAccountKey:
type: google:ServiceAccountKey
name: service_account_key
properties:
serviceAccountId: ${serviceAccount.name}
stackdriver:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: stackdriver
projectId:
fn::invoke:
function: std:jsondecode
arguments:
input:
fn::invoke:
function: std:base64decode
arguments:
input: ${serviceAccountKey.privateKey}
return: result
return: result.projectId
privateKey:
fn::invoke:
function: std:jsondecode
arguments:
input:
fn::invoke:
function: std:base64decode
arguments:
input: ${serviceAccountKey.privateKey}
return: result
return: result.privateKey
clientEmail:
fn::invoke:
function: std:jsondecode
arguments:
input:
fn::invoke:
function: std:base64decode
arguments:
input: ${serviceAccountKey.privateKey}
return: result
return: result.clientEmail
Stackdriver metric integration (v1.21.0 or newer versions)
Use credentials argument and let the provider do the Base64decode and internally populate, project_id, client_name, private_key
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
import * as google from "@pulumi/google";
const serviceAccount = new google.index.ServiceAccount("service_account", {
accountId: "<account_id>",
description: "<description>",
displayName: "<display_name>",
});
const serviceAccountKey = new google.index.ServiceAccountKey("service_account_key", {serviceAccountId: serviceAccount.name});
const stackdriver = new cloudamqp.IntegrationMetric("stackdriver", {
instanceId: instance.id,
name: "stackdriver",
credentials: serviceAccountKey.privateKey,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
import pulumi_google as google
service_account = google.index.ServiceAccount("service_account",
account_id=<account_id>,
description=<description>,
display_name=<display_name>)
service_account_key = google.index.ServiceAccountKey("service_account_key", service_account_id=service_account.name)
stackdriver = cloudamqp.IntegrationMetric("stackdriver",
instance_id=instance["id"],
name="stackdriver",
credentials=service_account_key["privateKey"])
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi-google/sdk/go/google"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
serviceAccount, err := google.NewServiceAccount(ctx, "service_account", &google.ServiceAccountArgs{
AccountId: "<account_id>",
Description: "<description>",
DisplayName: "<display_name>",
})
if err != nil {
return err
}
serviceAccountKey, err := google.NewServiceAccountKey(ctx, "service_account_key", &google.ServiceAccountKeyArgs{
ServiceAccountId: serviceAccount.Name,
})
if err != nil {
return err
}
_, err = cloudamqp.NewIntegrationMetric(ctx, "stackdriver", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("stackdriver"),
Credentials: serviceAccountKey.PrivateKey,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
using Google = Pulumi.Google;
return await Deployment.RunAsync(() =>
{
var serviceAccount = new Google.Index.ServiceAccount("service_account", new()
{
AccountId = "<account_id>",
Description = "<description>",
DisplayName = "<display_name>",
});
var serviceAccountKey = new Google.Index.ServiceAccountKey("service_account_key", new()
{
ServiceAccountId = serviceAccount.Name,
});
var stackdriver = new CloudAmqp.IntegrationMetric("stackdriver", new()
{
InstanceId = instance.Id,
Name = "stackdriver",
Credentials = serviceAccountKey.PrivateKey,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.google.ServiceAccount;
import com.pulumi.google.ServiceAccountArgs;
import com.pulumi.google.ServiceAccountKey;
import com.pulumi.google.ServiceAccountKeyArgs;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
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 serviceAccount = new ServiceAccount("serviceAccount", ServiceAccountArgs.builder()
.accountId("<account_id>")
.description("<description>")
.displayName("<display_name>")
.build());
var serviceAccountKey = new ServiceAccountKey("serviceAccountKey", ServiceAccountKeyArgs.builder()
.serviceAccountId(serviceAccount.name())
.build());
var stackdriver = new IntegrationMetric("stackdriver", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("stackdriver")
.credentials(serviceAccountKey.privateKey())
.build());
}
}
resources:
serviceAccount:
type: google:ServiceAccount
name: service_account
properties:
accountId: <account_id>
description: <description>
displayName: <display_name>
serviceAccountKey:
type: google:ServiceAccountKey
name: service_account_key
properties:
serviceAccountId: ${serviceAccount.name}
stackdriver:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: stackdriver
credentials: ${serviceAccountKey.privateKey}
or use the same as earlier version and decode the google service account key
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
import * as google from "@pulumi/google";
import * as std from "@pulumi/std";
const serviceAccount = new google.index.ServiceAccount("service_account", {
accountId: "<account_id>",
description: "<description>",
displayName: "<display_name>",
});
const serviceAccountKey = new google.index.ServiceAccountKey("service_account_key", {serviceAccountId: serviceAccount.name});
const stackdriver = new cloudamqp.IntegrationMetric("stackdriver", {
instanceId: instance.id,
name: "stackdriver",
projectId: std.index.jsondecode({
input: std.index.base64decode({
input: serviceAccountKey.privateKey,
}).result,
}).result.projectId,
privateKey: std.index.jsondecode({
input: std.index.base64decode({
input: serviceAccountKey.privateKey,
}).result,
}).result.privateKey,
clientEmail: std.index.jsondecode({
input: std.index.base64decode({
input: serviceAccountKey.privateKey,
}).result,
}).result.clientEmail,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
import pulumi_google as google
import pulumi_std as std
service_account = google.index.ServiceAccount("service_account",
account_id=<account_id>,
description=<description>,
display_name=<display_name>)
service_account_key = google.index.ServiceAccountKey("service_account_key", service_account_id=service_account.name)
stackdriver = cloudamqp.IntegrationMetric("stackdriver",
instance_id=instance["id"],
name="stackdriver",
project_id=std.index.jsondecode(input=std.index.base64decode(input=service_account_key["privateKey"])["result"])["result"]["projectId"],
private_key=std.index.jsondecode(input=std.index.base64decode(input=service_account_key["privateKey"])["result"])["result"]["privateKey"],
client_email=std.index.jsondecode(input=std.index.base64decode(input=service_account_key["privateKey"])["result"])["result"]["clientEmail"])
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi-google/sdk/go/google"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
serviceAccount, err := google.NewServiceAccount(ctx, "service_account", &google.ServiceAccountArgs{
AccountId: "<account_id>",
Description: "<description>",
DisplayName: "<display_name>",
})
if err != nil {
return err
}
serviceAccountKey, err := google.NewServiceAccountKey(ctx, "service_account_key", &google.ServiceAccountKeyArgs{
ServiceAccountId: serviceAccount.Name,
})
if err != nil {
return err
}
invokeJsondecode, err := std.Jsondecode(ctx, map[string]interface{}{
"input": std.Base64decode(ctx, map[string]interface{}{
"input": serviceAccountKey.PrivateKey,
}, nil).Result,
}, nil)
if err != nil {
return err
}
invokeJsondecode1, err := std.Jsondecode(ctx, map[string]interface{}{
"input": std.Base64decode(ctx, map[string]interface{}{
"input": serviceAccountKey.PrivateKey,
}, nil).Result,
}, nil)
if err != nil {
return err
}
invokeJsondecode2, err := std.Jsondecode(ctx, map[string]interface{}{
"input": std.Base64decode(ctx, map[string]interface{}{
"input": serviceAccountKey.PrivateKey,
}, nil).Result,
}, nil)
if err != nil {
return err
}
_, err = cloudamqp.NewIntegrationMetric(ctx, "stackdriver", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Any(instance.Id),
Name: pulumi.String("stackdriver"),
ProjectId: invokeJsondecode.Result.ProjectId,
PrivateKey: invokeJsondecode1.Result.PrivateKey,
ClientEmail: invokeJsondecode2.Result.ClientEmail,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
using Google = Pulumi.Google;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var serviceAccount = new Google.Index.ServiceAccount("service_account", new()
{
AccountId = "<account_id>",
Description = "<description>",
DisplayName = "<display_name>",
});
var serviceAccountKey = new Google.Index.ServiceAccountKey("service_account_key", new()
{
ServiceAccountId = serviceAccount.Name,
});
var stackdriver = new CloudAmqp.IntegrationMetric("stackdriver", new()
{
InstanceId = instance.Id,
Name = "stackdriver",
ProjectId = Std.Index.Jsondecode.Invoke(new()
{
Input = Std.Index.Base64decode.Invoke(new()
{
Input = serviceAccountKey.PrivateKey,
}).Result,
}).Result.ProjectId,
PrivateKey = Std.Index.Jsondecode.Invoke(new()
{
Input = Std.Index.Base64decode.Invoke(new()
{
Input = serviceAccountKey.PrivateKey,
}).Result,
}).Result.PrivateKey,
ClientEmail = Std.Index.Jsondecode.Invoke(new()
{
Input = Std.Index.Base64decode.Invoke(new()
{
Input = serviceAccountKey.PrivateKey,
}).Result,
}).Result.ClientEmail,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.google.ServiceAccount;
import com.pulumi.google.ServiceAccountArgs;
import com.pulumi.google.ServiceAccountKey;
import com.pulumi.google.ServiceAccountKeyArgs;
import com.pulumi.cloudamqp.IntegrationMetric;
import com.pulumi.cloudamqp.IntegrationMetricArgs;
import com.pulumi.std.StdFunctions;
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 serviceAccount = new ServiceAccount("serviceAccount", ServiceAccountArgs.builder()
.accountId("<account_id>")
.description("<description>")
.displayName("<display_name>")
.build());
var serviceAccountKey = new ServiceAccountKey("serviceAccountKey", ServiceAccountKeyArgs.builder()
.serviceAccountId(serviceAccount.name())
.build());
var stackdriver = new IntegrationMetric("stackdriver", IntegrationMetricArgs.builder()
.instanceId(instance.id())
.name("stackdriver")
.projectId(StdFunctions.jsondecode(Map.of("input", StdFunctions.base64decode(Map.of("input", serviceAccountKey.privateKey())).result())).result().projectId())
.privateKey(StdFunctions.jsondecode(Map.of("input", StdFunctions.base64decode(Map.of("input", serviceAccountKey.privateKey())).result())).result().privateKey())
.clientEmail(StdFunctions.jsondecode(Map.of("input", StdFunctions.base64decode(Map.of("input", serviceAccountKey.privateKey())).result())).result().clientEmail())
.build());
}
}
resources:
serviceAccount:
type: google:ServiceAccount
name: service_account
properties:
accountId: <account_id>
description: <description>
displayName: <display_name>
serviceAccountKey:
type: google:ServiceAccountKey
name: service_account_key
properties:
serviceAccountId: ${serviceAccount.name}
stackdriver:
type: cloudamqp:IntegrationMetric
properties:
instanceId: ${instance.id}
name: stackdriver
projectId:
fn::invoke:
function: std:jsondecode
arguments:
input:
fn::invoke:
function: std:base64decode
arguments:
input: ${serviceAccountKey.privateKey}
return: result
return: result.projectId
privateKey:
fn::invoke:
function: std:jsondecode
arguments:
input:
fn::invoke:
function: std:base64decode
arguments:
input: ${serviceAccountKey.privateKey}
return: result
return: result.privateKey
clientEmail:
fn::invoke:
function: std:jsondecode
arguments:
input:
fn::invoke:
function: std:base64decode
arguments:
input: ${serviceAccountKey.privateKey}
return: result
return: result.clientEmail
Argument References
The following arguments are supported:
name- (Required) The name of the third party log integration. SeeIntegration service referenceregion- (Optional) Region hosting the integration service.access_key_id- (Optional) AWS access key identifier.secret_access_key- (Optional) AWS secret access key.iam_role- (Optional) The ARN of the role to be assumed when publishing metrics.iam_external_id- (Optional) External identifier that match the role you created.api_key- (Optional) The API key for the integration service.email- (Optional) The email address registred for the integration service.credentials- (Optional) Google Service Account private key credentials.project_id- (Optional/Computed) The project identifier.private_key- (Optional/Computed) The private access key.client_email- (Optional/Computed) The client email registered for the integration service.tags- (Optional) Tags. e.g.env=prod,region=europe.Note: If tags are used with Datadog. The value part (prod, europe, …) must start with a letter, read more about tags format in the Datadog documentation.
queue_allowlist- (Optional) Allowlist queues using regular expression. Leave empty to include all queues.vhost_allowlist- (Optional) Allowlist vhost using regular expression. Leave empty to include all vhosts.queue_whitelist- Deprecated Use queue_allowlist insteadvhost_whitelist- Deprecated Use vhost_allowlist insteadinclude_ad_queues- (Optional) Include auto delete queues.
This is the full list of all arguments. Only a subset of arguments are used based on which type of integration used. See integration type reference below for more information.
Integration service references
Valid names for third party log integration.
| Name | Description |
|---|---|
| cloudwatch | Access key: Create an IAM user with permission to PutMetricData |
| cloudwatch_v2 | Access key: Create an IAM user with permission to PutMetricData |
| cloudwatch | Assume role: Create a IAM role with the permission to PutMetricData |
| cloudwatch_v2 | Assume role: Create a IAM role with the permission to PutMetricData |
| datadog | Create a Datadog API key at app.datadoghq.com |
| datadog_v2 | Create a Datadog API key at app.datadoghq.com |
| librato | Create a new API token (with record only permissions) here: https://metrics.librato.com/tokens |
| newrelic | Deprecated! |
| newrelic_v2 | Find or register an Insert API key for your account: Go to insights.newrelic.com > Manage data > API keys. |
| stackdriver | Create a service account and add ‘monitor metrics writer’ role from your Google Cloud Account |
Integration type reference
Valid arguments for third party metrics integrations. See more information at CloudAMQP API add integrations.
Required arguments for all integrations: nameOptional arguments for all integrations: tags, queue_allowlist, vhost_allowlist
| Name | Type | Required arguments |
|---|---|---|
| Cloudwatch | cloudwatch | Access key: region, access_key_id, secret_access_key |
| Cloudwatch v2 | cloudwatch_v2 | Access key: region, access_key_id, secret_access_key |
| Cloudwatch | cloudwatch | Assume role: region, iam_role, iam_external_id |
| Cloudwatch v2 | cloudwatch_v2 | Assume role: region, iam_role, iam_external_id |
| Datadog | datadog | api_key, region |
| Datadog v2 | datadog_v2 | api_key, region |
| Librato | librato | email, api_key |
| New relic (deprecated) | newrelic | - |
| New relic v2 | newrelic_v2 | api_key, region |
| Stackdriver | stackdriver | credentials |
Note: Stackdriver (v1.20.2 or earlier versions) required arguments: project_id, private_key, client_email
Dependency
This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.
Create IntegrationMetric Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IntegrationMetric(name: string, args: IntegrationMetricArgs, opts?: CustomResourceOptions);@overload
def IntegrationMetric(resource_name: str,
args: IntegrationMetricArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IntegrationMetric(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[int] = None,
name: Optional[str] = None,
client_email: Optional[str] = None,
credentials: Optional[str] = None,
email: Optional[str] = None,
iam_external_id: Optional[str] = None,
iam_role: Optional[str] = None,
include_ad_queues: Optional[bool] = None,
api_key: Optional[str] = None,
access_key_id: Optional[str] = None,
license_key: Optional[str] = None,
project_id: Optional[str] = None,
private_key_id: Optional[str] = None,
private_key: Optional[str] = None,
queue_allowlist: Optional[str] = None,
queue_whitelist: Optional[str] = None,
region: Optional[str] = None,
secret_access_key: Optional[str] = None,
tags: Optional[str] = None,
vhost_allowlist: Optional[str] = None,
vhost_whitelist: Optional[str] = None)func NewIntegrationMetric(ctx *Context, name string, args IntegrationMetricArgs, opts ...ResourceOption) (*IntegrationMetric, error)public IntegrationMetric(string name, IntegrationMetricArgs args, CustomResourceOptions? opts = null)
public IntegrationMetric(String name, IntegrationMetricArgs args)
public IntegrationMetric(String name, IntegrationMetricArgs args, CustomResourceOptions options)
type: cloudamqp:IntegrationMetric
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 IntegrationMetricArgs
- 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 IntegrationMetricArgs
- 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 IntegrationMetricArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IntegrationMetricArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IntegrationMetricArgs
- 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 integrationMetricResource = new CloudAmqp.IntegrationMetric("integrationMetricResource", new()
{
InstanceId = 0,
Name = "string",
ClientEmail = "string",
Credentials = "string",
Email = "string",
IamExternalId = "string",
IamRole = "string",
IncludeAdQueues = false,
ApiKey = "string",
AccessKeyId = "string",
LicenseKey = "string",
ProjectId = "string",
PrivateKeyId = "string",
PrivateKey = "string",
QueueAllowlist = "string",
Region = "string",
SecretAccessKey = "string",
Tags = "string",
VhostAllowlist = "string",
});
example, err := cloudamqp.NewIntegrationMetric(ctx, "integrationMetricResource", &cloudamqp.IntegrationMetricArgs{
InstanceId: pulumi.Int(0),
Name: pulumi.String("string"),
ClientEmail: pulumi.String("string"),
Credentials: pulumi.String("string"),
Email: pulumi.String("string"),
IamExternalId: pulumi.String("string"),
IamRole: pulumi.String("string"),
IncludeAdQueues: pulumi.Bool(false),
ApiKey: pulumi.String("string"),
AccessKeyId: pulumi.String("string"),
LicenseKey: pulumi.String("string"),
ProjectId: pulumi.String("string"),
PrivateKeyId: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
QueueAllowlist: pulumi.String("string"),
Region: pulumi.String("string"),
SecretAccessKey: pulumi.String("string"),
Tags: pulumi.String("string"),
VhostAllowlist: pulumi.String("string"),
})
var integrationMetricResource = new IntegrationMetric("integrationMetricResource", IntegrationMetricArgs.builder()
.instanceId(0)
.name("string")
.clientEmail("string")
.credentials("string")
.email("string")
.iamExternalId("string")
.iamRole("string")
.includeAdQueues(false)
.apiKey("string")
.accessKeyId("string")
.licenseKey("string")
.projectId("string")
.privateKeyId("string")
.privateKey("string")
.queueAllowlist("string")
.region("string")
.secretAccessKey("string")
.tags("string")
.vhostAllowlist("string")
.build());
integration_metric_resource = cloudamqp.IntegrationMetric("integrationMetricResource",
instance_id=0,
name="string",
client_email="string",
credentials="string",
email="string",
iam_external_id="string",
iam_role="string",
include_ad_queues=False,
api_key="string",
access_key_id="string",
license_key="string",
project_id="string",
private_key_id="string",
private_key="string",
queue_allowlist="string",
region="string",
secret_access_key="string",
tags="string",
vhost_allowlist="string")
const integrationMetricResource = new cloudamqp.IntegrationMetric("integrationMetricResource", {
instanceId: 0,
name: "string",
clientEmail: "string",
credentials: "string",
email: "string",
iamExternalId: "string",
iamRole: "string",
includeAdQueues: false,
apiKey: "string",
accessKeyId: "string",
licenseKey: "string",
projectId: "string",
privateKeyId: "string",
privateKey: "string",
queueAllowlist: "string",
region: "string",
secretAccessKey: "string",
tags: "string",
vhostAllowlist: "string",
});
type: cloudamqp:IntegrationMetric
properties:
accessKeyId: string
apiKey: string
clientEmail: string
credentials: string
email: string
iamExternalId: string
iamRole: string
includeAdQueues: false
instanceId: 0
licenseKey: string
name: string
privateKey: string
privateKeyId: string
projectId: string
queueAllowlist: string
region: string
secretAccessKey: string
tags: string
vhostAllowlist: string
IntegrationMetric 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 IntegrationMetric resource accepts the following input properties:
- Instance
Id int - Instance identifier
- Access
Key stringId - AWS access key identifier. (Cloudwatch)
- Api
Key string - The API key for the integration service. (Librato)
- Client
Email string - The client email. (Stackdriver)
- Credentials string
- Base64Encoded credentials. (Stackdriver)
- Email string
- The email address registred for the integration service. (Librato)
- Iam
External stringId - External identifier that match the role you created. (Cloudwatch)
- Iam
Role string - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- Include
Ad boolQueues - (optional) Include Auto-Delete queues
- License
Key string - The license key registred for the integration service. (New Relic)
- Name string
- The name of metrics integration
- Private
Key string - The private key. (Stackdriver)
- Private
Key stringId - Private key identifier. (Stackdriver)
- Project
Id string - Project ID. (Stackdriver)
- Queue
Allowlist string - (optional) allowlist using regular expression
- Queue
Whitelist string - Deprecated
- Region string
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- Secret
Access stringKey - AWS secret key. (Cloudwatch)
- string
- (optional) tags. E.g. env=prod,region=europe
- Vhost
Allowlist string - (optional) allowlist using regular expression
- Vhost
Whitelist string - Deprecated
- Instance
Id int - Instance identifier
- Access
Key stringId - AWS access key identifier. (Cloudwatch)
- Api
Key string - The API key for the integration service. (Librato)
- Client
Email string - The client email. (Stackdriver)
- Credentials string
- Base64Encoded credentials. (Stackdriver)
- Email string
- The email address registred for the integration service. (Librato)
- Iam
External stringId - External identifier that match the role you created. (Cloudwatch)
- Iam
Role string - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- Include
Ad boolQueues - (optional) Include Auto-Delete queues
- License
Key string - The license key registred for the integration service. (New Relic)
- Name string
- The name of metrics integration
- Private
Key string - The private key. (Stackdriver)
- Private
Key stringId - Private key identifier. (Stackdriver)
- Project
Id string - Project ID. (Stackdriver)
- Queue
Allowlist string - (optional) allowlist using regular expression
- Queue
Whitelist string - Deprecated
- Region string
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- Secret
Access stringKey - AWS secret key. (Cloudwatch)
- string
- (optional) tags. E.g. env=prod,region=europe
- Vhost
Allowlist string - (optional) allowlist using regular expression
- Vhost
Whitelist string - Deprecated
- instance
Id Integer - Instance identifier
- access
Key StringId - AWS access key identifier. (Cloudwatch)
- api
Key String - The API key for the integration service. (Librato)
- client
Email String - The client email. (Stackdriver)
- credentials String
- Base64Encoded credentials. (Stackdriver)
- email String
- The email address registred for the integration service. (Librato)
- iam
External StringId - External identifier that match the role you created. (Cloudwatch)
- iam
Role String - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include
Ad BooleanQueues - (optional) Include Auto-Delete queues
- license
Key String - The license key registred for the integration service. (New Relic)
- name String
- The name of metrics integration
- private
Key String - The private key. (Stackdriver)
- private
Key StringId - Private key identifier. (Stackdriver)
- project
Id String - Project ID. (Stackdriver)
- queue
Allowlist String - (optional) allowlist using regular expression
- queue
Whitelist String - Deprecated
- region String
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret
Access StringKey - AWS secret key. (Cloudwatch)
- String
- (optional) tags. E.g. env=prod,region=europe
- vhost
Allowlist String - (optional) allowlist using regular expression
- vhost
Whitelist String - Deprecated
- instance
Id number - Instance identifier
- access
Key stringId - AWS access key identifier. (Cloudwatch)
- api
Key string - The API key for the integration service. (Librato)
- client
Email string - The client email. (Stackdriver)
- credentials string
- Base64Encoded credentials. (Stackdriver)
- email string
- The email address registred for the integration service. (Librato)
- iam
External stringId - External identifier that match the role you created. (Cloudwatch)
- iam
Role string - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include
Ad booleanQueues - (optional) Include Auto-Delete queues
- license
Key string - The license key registred for the integration service. (New Relic)
- name string
- The name of metrics integration
- private
Key string - The private key. (Stackdriver)
- private
Key stringId - Private key identifier. (Stackdriver)
- project
Id string - Project ID. (Stackdriver)
- queue
Allowlist string - (optional) allowlist using regular expression
- queue
Whitelist string - Deprecated
- region string
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret
Access stringKey - AWS secret key. (Cloudwatch)
- string
- (optional) tags. E.g. env=prod,region=europe
- vhost
Allowlist string - (optional) allowlist using regular expression
- vhost
Whitelist string - Deprecated
- instance_
id int - Instance identifier
- access_
key_ strid - AWS access key identifier. (Cloudwatch)
- api_
key str - The API key for the integration service. (Librato)
- client_
email str - The client email. (Stackdriver)
- credentials str
- Base64Encoded credentials. (Stackdriver)
- email str
- The email address registred for the integration service. (Librato)
- iam_
external_ strid - External identifier that match the role you created. (Cloudwatch)
- iam_
role str - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include_
ad_ boolqueues - (optional) Include Auto-Delete queues
- license_
key str - The license key registred for the integration service. (New Relic)
- name str
- The name of metrics integration
- private_
key str - The private key. (Stackdriver)
- private_
key_ strid - Private key identifier. (Stackdriver)
- project_
id str - Project ID. (Stackdriver)
- queue_
allowlist str - (optional) allowlist using regular expression
- queue_
whitelist str - Deprecated
- region str
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret_
access_ strkey - AWS secret key. (Cloudwatch)
- str
- (optional) tags. E.g. env=prod,region=europe
- vhost_
allowlist str - (optional) allowlist using regular expression
- vhost_
whitelist str - Deprecated
- instance
Id Number - Instance identifier
- access
Key StringId - AWS access key identifier. (Cloudwatch)
- api
Key String - The API key for the integration service. (Librato)
- client
Email String - The client email. (Stackdriver)
- credentials String
- Base64Encoded credentials. (Stackdriver)
- email String
- The email address registred for the integration service. (Librato)
- iam
External StringId - External identifier that match the role you created. (Cloudwatch)
- iam
Role String - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include
Ad BooleanQueues - (optional) Include Auto-Delete queues
- license
Key String - The license key registred for the integration service. (New Relic)
- name String
- The name of metrics integration
- private
Key String - The private key. (Stackdriver)
- private
Key StringId - Private key identifier. (Stackdriver)
- project
Id String - Project ID. (Stackdriver)
- queue
Allowlist String - (optional) allowlist using regular expression
- queue
Whitelist String - Deprecated
- region String
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret
Access StringKey - AWS secret key. (Cloudwatch)
- String
- (optional) tags. E.g. env=prod,region=europe
- vhost
Allowlist String - (optional) allowlist using regular expression
- vhost
Whitelist String - Deprecated
Outputs
All input properties are implicitly available as output properties. Additionally, the IntegrationMetric 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 IntegrationMetric Resource
Get an existing IntegrationMetric 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?: IntegrationMetricState, opts?: CustomResourceOptions): IntegrationMetric@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key_id: Optional[str] = None,
api_key: Optional[str] = None,
client_email: Optional[str] = None,
credentials: Optional[str] = None,
email: Optional[str] = None,
iam_external_id: Optional[str] = None,
iam_role: Optional[str] = None,
include_ad_queues: Optional[bool] = None,
instance_id: Optional[int] = None,
license_key: Optional[str] = None,
name: Optional[str] = None,
private_key: Optional[str] = None,
private_key_id: Optional[str] = None,
project_id: Optional[str] = None,
queue_allowlist: Optional[str] = None,
queue_whitelist: Optional[str] = None,
region: Optional[str] = None,
secret_access_key: Optional[str] = None,
tags: Optional[str] = None,
vhost_allowlist: Optional[str] = None,
vhost_whitelist: Optional[str] = None) -> IntegrationMetricfunc GetIntegrationMetric(ctx *Context, name string, id IDInput, state *IntegrationMetricState, opts ...ResourceOption) (*IntegrationMetric, error)public static IntegrationMetric Get(string name, Input<string> id, IntegrationMetricState? state, CustomResourceOptions? opts = null)public static IntegrationMetric get(String name, Output<String> id, IntegrationMetricState state, CustomResourceOptions options)resources: _: type: cloudamqp:IntegrationMetric 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.
- Access
Key stringId - AWS access key identifier. (Cloudwatch)
- Api
Key string - The API key for the integration service. (Librato)
- Client
Email string - The client email. (Stackdriver)
- Credentials string
- Base64Encoded credentials. (Stackdriver)
- Email string
- The email address registred for the integration service. (Librato)
- Iam
External stringId - External identifier that match the role you created. (Cloudwatch)
- Iam
Role string - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- Include
Ad boolQueues - (optional) Include Auto-Delete queues
- Instance
Id int - Instance identifier
- License
Key string - The license key registred for the integration service. (New Relic)
- Name string
- The name of metrics integration
- Private
Key string - The private key. (Stackdriver)
- Private
Key stringId - Private key identifier. (Stackdriver)
- Project
Id string - Project ID. (Stackdriver)
- Queue
Allowlist string - (optional) allowlist using regular expression
- Queue
Whitelist string - Deprecated
- Region string
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- Secret
Access stringKey - AWS secret key. (Cloudwatch)
- string
- (optional) tags. E.g. env=prod,region=europe
- Vhost
Allowlist string - (optional) allowlist using regular expression
- Vhost
Whitelist string - Deprecated
- Access
Key stringId - AWS access key identifier. (Cloudwatch)
- Api
Key string - The API key for the integration service. (Librato)
- Client
Email string - The client email. (Stackdriver)
- Credentials string
- Base64Encoded credentials. (Stackdriver)
- Email string
- The email address registred for the integration service. (Librato)
- Iam
External stringId - External identifier that match the role you created. (Cloudwatch)
- Iam
Role string - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- Include
Ad boolQueues - (optional) Include Auto-Delete queues
- Instance
Id int - Instance identifier
- License
Key string - The license key registred for the integration service. (New Relic)
- Name string
- The name of metrics integration
- Private
Key string - The private key. (Stackdriver)
- Private
Key stringId - Private key identifier. (Stackdriver)
- Project
Id string - Project ID. (Stackdriver)
- Queue
Allowlist string - (optional) allowlist using regular expression
- Queue
Whitelist string - Deprecated
- Region string
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- Secret
Access stringKey - AWS secret key. (Cloudwatch)
- string
- (optional) tags. E.g. env=prod,region=europe
- Vhost
Allowlist string - (optional) allowlist using regular expression
- Vhost
Whitelist string - Deprecated
- access
Key StringId - AWS access key identifier. (Cloudwatch)
- api
Key String - The API key for the integration service. (Librato)
- client
Email String - The client email. (Stackdriver)
- credentials String
- Base64Encoded credentials. (Stackdriver)
- email String
- The email address registred for the integration service. (Librato)
- iam
External StringId - External identifier that match the role you created. (Cloudwatch)
- iam
Role String - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include
Ad BooleanQueues - (optional) Include Auto-Delete queues
- instance
Id Integer - Instance identifier
- license
Key String - The license key registred for the integration service. (New Relic)
- name String
- The name of metrics integration
- private
Key String - The private key. (Stackdriver)
- private
Key StringId - Private key identifier. (Stackdriver)
- project
Id String - Project ID. (Stackdriver)
- queue
Allowlist String - (optional) allowlist using regular expression
- queue
Whitelist String - Deprecated
- region String
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret
Access StringKey - AWS secret key. (Cloudwatch)
- String
- (optional) tags. E.g. env=prod,region=europe
- vhost
Allowlist String - (optional) allowlist using regular expression
- vhost
Whitelist String - Deprecated
- access
Key stringId - AWS access key identifier. (Cloudwatch)
- api
Key string - The API key for the integration service. (Librato)
- client
Email string - The client email. (Stackdriver)
- credentials string
- Base64Encoded credentials. (Stackdriver)
- email string
- The email address registred for the integration service. (Librato)
- iam
External stringId - External identifier that match the role you created. (Cloudwatch)
- iam
Role string - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include
Ad booleanQueues - (optional) Include Auto-Delete queues
- instance
Id number - Instance identifier
- license
Key string - The license key registred for the integration service. (New Relic)
- name string
- The name of metrics integration
- private
Key string - The private key. (Stackdriver)
- private
Key stringId - Private key identifier. (Stackdriver)
- project
Id string - Project ID. (Stackdriver)
- queue
Allowlist string - (optional) allowlist using regular expression
- queue
Whitelist string - Deprecated
- region string
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret
Access stringKey - AWS secret key. (Cloudwatch)
- string
- (optional) tags. E.g. env=prod,region=europe
- vhost
Allowlist string - (optional) allowlist using regular expression
- vhost
Whitelist string - Deprecated
- access_
key_ strid - AWS access key identifier. (Cloudwatch)
- api_
key str - The API key for the integration service. (Librato)
- client_
email str - The client email. (Stackdriver)
- credentials str
- Base64Encoded credentials. (Stackdriver)
- email str
- The email address registred for the integration service. (Librato)
- iam_
external_ strid - External identifier that match the role you created. (Cloudwatch)
- iam_
role str - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include_
ad_ boolqueues - (optional) Include Auto-Delete queues
- instance_
id int - Instance identifier
- license_
key str - The license key registred for the integration service. (New Relic)
- name str
- The name of metrics integration
- private_
key str - The private key. (Stackdriver)
- private_
key_ strid - Private key identifier. (Stackdriver)
- project_
id str - Project ID. (Stackdriver)
- queue_
allowlist str - (optional) allowlist using regular expression
- queue_
whitelist str - Deprecated
- region str
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret_
access_ strkey - AWS secret key. (Cloudwatch)
- str
- (optional) tags. E.g. env=prod,region=europe
- vhost_
allowlist str - (optional) allowlist using regular expression
- vhost_
whitelist str - Deprecated
- access
Key StringId - AWS access key identifier. (Cloudwatch)
- api
Key String - The API key for the integration service. (Librato)
- client
Email String - The client email. (Stackdriver)
- credentials String
- Base64Encoded credentials. (Stackdriver)
- email String
- The email address registred for the integration service. (Librato)
- iam
External StringId - External identifier that match the role you created. (Cloudwatch)
- iam
Role String - The ARN of the role to be assumed when publishing metrics. (Cloudwatch)
- include
Ad BooleanQueues - (optional) Include Auto-Delete queues
- instance
Id Number - Instance identifier
- license
Key String - The license key registred for the integration service. (New Relic)
- name String
- The name of metrics integration
- private
Key String - The private key. (Stackdriver)
- private
Key StringId - Private key identifier. (Stackdriver)
- project
Id String - Project ID. (Stackdriver)
- queue
Allowlist String - (optional) allowlist using regular expression
- queue
Whitelist String - Deprecated
- region String
- AWS region for Cloudwatch and [US/EU] for Data dog/New relic. (Cloudwatch, Data Dog, New Relic)
- secret
Access StringKey - AWS secret key. (Cloudwatch)
- String
- (optional) tags. E.g. env=prod,region=europe
- vhost
Allowlist String - (optional) allowlist using regular expression
- vhost
Whitelist String - Deprecated
Import
cloudamqp_integration_metriccan be imported using the resource identifier together with CloudAMQP
instance identifier (CSV separated). To retrieve the resource identifier, use
CloudAMQP API list integrations.
From Terraform v1.5.0, the import block can be used to import this resource:
hcl
import {
to = cloudamqp_alarm.alarm
id = format("
}
Or use Terraform CLI:
$ pulumi import cloudamqp:index/integrationMetric:IntegrationMetric <resource_name> <resource_id>,<instance_id>`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- CloudAMQP pulumi/pulumi-cloudamqp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudamqpTerraform Provider.
