datadog.GcpUcConfig
Provides a Datadog GcpUcConfig resource. This can be used to create and manage Datadog gcp_uc_config.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
// Create new GCP Usage Cost configuration resource
const example = new datadog.GcpUcConfig("example", {
billingAccountId: "123456_ABCDEF_123456",
bucketName: "my-gcp-cost-bucket",
exportDatasetName: "billing_export",
exportPrefix: "datadog_cloud_cost_detailed_usage_export",
exportProjectName: "my-gcp-project",
serviceAccount: "datadog-cost-management@my-gcp-project.iam.gserviceaccount.com",
});
import pulumi
import pulumi_datadog as datadog
# Create new GCP Usage Cost configuration resource
example = datadog.GcpUcConfig("example",
billing_account_id="123456_ABCDEF_123456",
bucket_name="my-gcp-cost-bucket",
export_dataset_name="billing_export",
export_prefix="datadog_cloud_cost_detailed_usage_export",
export_project_name="my-gcp-project",
service_account="datadog-cost-management@my-gcp-project.iam.gserviceaccount.com")
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create new GCP Usage Cost configuration resource
_, err := datadog.NewGcpUcConfig(ctx, "example", &datadog.GcpUcConfigArgs{
BillingAccountId: pulumi.String("123456_ABCDEF_123456"),
BucketName: pulumi.String("my-gcp-cost-bucket"),
ExportDatasetName: pulumi.String("billing_export"),
ExportPrefix: pulumi.String("datadog_cloud_cost_detailed_usage_export"),
ExportProjectName: pulumi.String("my-gcp-project"),
ServiceAccount: pulumi.String("datadog-cost-management@my-gcp-project.iam.gserviceaccount.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
// Create new GCP Usage Cost configuration resource
var example = new Datadog.GcpUcConfig("example", new()
{
BillingAccountId = "123456_ABCDEF_123456",
BucketName = "my-gcp-cost-bucket",
ExportDatasetName = "billing_export",
ExportPrefix = "datadog_cloud_cost_detailed_usage_export",
ExportProjectName = "my-gcp-project",
ServiceAccount = "datadog-cost-management@my-gcp-project.iam.gserviceaccount.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.GcpUcConfig;
import com.pulumi.datadog.GcpUcConfigArgs;
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) {
// Create new GCP Usage Cost configuration resource
var example = new GcpUcConfig("example", GcpUcConfigArgs.builder()
.billingAccountId("123456_ABCDEF_123456")
.bucketName("my-gcp-cost-bucket")
.exportDatasetName("billing_export")
.exportPrefix("datadog_cloud_cost_detailed_usage_export")
.exportProjectName("my-gcp-project")
.serviceAccount("datadog-cost-management@my-gcp-project.iam.gserviceaccount.com")
.build());
}
}
resources:
# Create new GCP Usage Cost configuration resource
example:
type: datadog:GcpUcConfig
properties:
billingAccountId: 123456_ABCDEF_123456
bucketName: my-gcp-cost-bucket
exportDatasetName: billing_export
exportPrefix: datadog_cloud_cost_detailed_usage_export
exportProjectName: my-gcp-project
serviceAccount: datadog-cost-management@my-gcp-project.iam.gserviceaccount.com
Create GcpUcConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GcpUcConfig(name: string, args: GcpUcConfigArgs, opts?: CustomResourceOptions);
@overload
def GcpUcConfig(resource_name: str,
args: GcpUcConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GcpUcConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
billing_account_id: Optional[str] = None,
bucket_name: Optional[str] = None,
export_dataset_name: Optional[str] = None,
export_project_name: Optional[str] = None,
service_account: Optional[str] = None,
export_prefix: Optional[str] = None)
func NewGcpUcConfig(ctx *Context, name string, args GcpUcConfigArgs, opts ...ResourceOption) (*GcpUcConfig, error)
public GcpUcConfig(string name, GcpUcConfigArgs args, CustomResourceOptions? opts = null)
public GcpUcConfig(String name, GcpUcConfigArgs args)
public GcpUcConfig(String name, GcpUcConfigArgs args, CustomResourceOptions options)
type: datadog:GcpUcConfig
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 GcpUcConfigArgs
- 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 GcpUcConfigArgs
- 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 GcpUcConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GcpUcConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GcpUcConfigArgs
- 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 gcpUcConfigResource = new Datadog.GcpUcConfig("gcpUcConfigResource", new()
{
BillingAccountId = "string",
BucketName = "string",
ExportDatasetName = "string",
ExportProjectName = "string",
ServiceAccount = "string",
ExportPrefix = "string",
});
example, err := datadog.NewGcpUcConfig(ctx, "gcpUcConfigResource", &datadog.GcpUcConfigArgs{
BillingAccountId: pulumi.String("string"),
BucketName: pulumi.String("string"),
ExportDatasetName: pulumi.String("string"),
ExportProjectName: pulumi.String("string"),
ServiceAccount: pulumi.String("string"),
ExportPrefix: pulumi.String("string"),
})
var gcpUcConfigResource = new GcpUcConfig("gcpUcConfigResource", GcpUcConfigArgs.builder()
.billingAccountId("string")
.bucketName("string")
.exportDatasetName("string")
.exportProjectName("string")
.serviceAccount("string")
.exportPrefix("string")
.build());
gcp_uc_config_resource = datadog.GcpUcConfig("gcpUcConfigResource",
billing_account_id="string",
bucket_name="string",
export_dataset_name="string",
export_project_name="string",
service_account="string",
export_prefix="string")
const gcpUcConfigResource = new datadog.GcpUcConfig("gcpUcConfigResource", {
billingAccountId: "string",
bucketName: "string",
exportDatasetName: "string",
exportProjectName: "string",
serviceAccount: "string",
exportPrefix: "string",
});
type: datadog:GcpUcConfig
properties:
billingAccountId: string
bucketName: string
exportDatasetName: string
exportPrefix: string
exportProjectName: string
serviceAccount: string
GcpUcConfig 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 GcpUcConfig resource accepts the following input properties:
- Billing
Account stringId - The Google Cloud account ID.
- Bucket
Name string - The Google Cloud bucket name used to store the Usage Cost export.
- Export
Dataset stringName - The export dataset name used for the Google Cloud Usage Cost report.
- Export
Project stringName - The name of the Google Cloud Usage Cost report.
- Service
Account string - The unique Google Cloud service account email.
- Export
Prefix string - The export prefix used for the Google Cloud Usage Cost report.
- Billing
Account stringId - The Google Cloud account ID.
- Bucket
Name string - The Google Cloud bucket name used to store the Usage Cost export.
- Export
Dataset stringName - The export dataset name used for the Google Cloud Usage Cost report.
- Export
Project stringName - The name of the Google Cloud Usage Cost report.
- Service
Account string - The unique Google Cloud service account email.
- Export
Prefix string - The export prefix used for the Google Cloud Usage Cost report.
- billing
Account StringId - The Google Cloud account ID.
- bucket
Name String - The Google Cloud bucket name used to store the Usage Cost export.
- export
Dataset StringName - The export dataset name used for the Google Cloud Usage Cost report.
- export
Project StringName - The name of the Google Cloud Usage Cost report.
- service
Account String - The unique Google Cloud service account email.
- export
Prefix String - The export prefix used for the Google Cloud Usage Cost report.
- billing
Account stringId - The Google Cloud account ID.
- bucket
Name string - The Google Cloud bucket name used to store the Usage Cost export.
- export
Dataset stringName - The export dataset name used for the Google Cloud Usage Cost report.
- export
Project stringName - The name of the Google Cloud Usage Cost report.
- service
Account string - The unique Google Cloud service account email.
- export
Prefix string - The export prefix used for the Google Cloud Usage Cost report.
- billing_
account_ strid - The Google Cloud account ID.
- bucket_
name str - The Google Cloud bucket name used to store the Usage Cost export.
- export_
dataset_ strname - The export dataset name used for the Google Cloud Usage Cost report.
- export_
project_ strname - The name of the Google Cloud Usage Cost report.
- service_
account str - The unique Google Cloud service account email.
- export_
prefix str - The export prefix used for the Google Cloud Usage Cost report.
- billing
Account StringId - The Google Cloud account ID.
- bucket
Name String - The Google Cloud bucket name used to store the Usage Cost export.
- export
Dataset StringName - The export dataset name used for the Google Cloud Usage Cost report.
- export
Project StringName - The name of the Google Cloud Usage Cost report.
- service
Account String - The unique Google Cloud service account email.
- export
Prefix String - The export prefix used for the Google Cloud Usage Cost report.
Outputs
All input properties are implicitly available as output properties. Additionally, the GcpUcConfig resource produces the following output properties:
- Created
At string - The timestamp when the GCP UC configuration was created.
- Dataset string
- The dataset name used for the GCP Usage Cost export.
- Error
Messages List<string> - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- Id string
- The provider-assigned unique ID for this managed resource.
- Months int
- The number of months of usage data to include in the export.
- Status string
- The current status of the GCP UC configuration.
- Status
Updated stringAt - The timestamp when the configuration status was last updated.
- Updated
At string - The timestamp when the GCP UC configuration was last modified.
- Created
At string - The timestamp when the GCP UC configuration was created.
- Dataset string
- The dataset name used for the GCP Usage Cost export.
- Error
Messages []string - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- Id string
- The provider-assigned unique ID for this managed resource.
- Months int
- The number of months of usage data to include in the export.
- Status string
- The current status of the GCP UC configuration.
- Status
Updated stringAt - The timestamp when the configuration status was last updated.
- Updated
At string - The timestamp when the GCP UC configuration was last modified.
- created
At String - The timestamp when the GCP UC configuration was created.
- dataset String
- The dataset name used for the GCP Usage Cost export.
- error
Messages List<String> - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- id String
- The provider-assigned unique ID for this managed resource.
- months Integer
- The number of months of usage data to include in the export.
- status String
- The current status of the GCP UC configuration.
- status
Updated StringAt - The timestamp when the configuration status was last updated.
- updated
At String - The timestamp when the GCP UC configuration was last modified.
- created
At string - The timestamp when the GCP UC configuration was created.
- dataset string
- The dataset name used for the GCP Usage Cost export.
- error
Messages string[] - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- id string
- The provider-assigned unique ID for this managed resource.
- months number
- The number of months of usage data to include in the export.
- status string
- The current status of the GCP UC configuration.
- status
Updated stringAt - The timestamp when the configuration status was last updated.
- updated
At string - The timestamp when the GCP UC configuration was last modified.
- created_
at str - The timestamp when the GCP UC configuration was created.
- dataset str
- The dataset name used for the GCP Usage Cost export.
- error_
messages Sequence[str] - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- id str
- The provider-assigned unique ID for this managed resource.
- months int
- The number of months of usage data to include in the export.
- status str
- The current status of the GCP UC configuration.
- status_
updated_ strat - The timestamp when the configuration status was last updated.
- updated_
at str - The timestamp when the GCP UC configuration was last modified.
- created
At String - The timestamp when the GCP UC configuration was created.
- dataset String
- The dataset name used for the GCP Usage Cost export.
- error
Messages List<String> - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- id String
- The provider-assigned unique ID for this managed resource.
- months Number
- The number of months of usage data to include in the export.
- status String
- The current status of the GCP UC configuration.
- status
Updated StringAt - The timestamp when the configuration status was last updated.
- updated
At String - The timestamp when the GCP UC configuration was last modified.
Look up Existing GcpUcConfig Resource
Get an existing GcpUcConfig 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?: GcpUcConfigState, opts?: CustomResourceOptions): GcpUcConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
billing_account_id: Optional[str] = None,
bucket_name: Optional[str] = None,
created_at: Optional[str] = None,
dataset: Optional[str] = None,
error_messages: Optional[Sequence[str]] = None,
export_dataset_name: Optional[str] = None,
export_prefix: Optional[str] = None,
export_project_name: Optional[str] = None,
months: Optional[int] = None,
service_account: Optional[str] = None,
status: Optional[str] = None,
status_updated_at: Optional[str] = None,
updated_at: Optional[str] = None) -> GcpUcConfig
func GetGcpUcConfig(ctx *Context, name string, id IDInput, state *GcpUcConfigState, opts ...ResourceOption) (*GcpUcConfig, error)
public static GcpUcConfig Get(string name, Input<string> id, GcpUcConfigState? state, CustomResourceOptions? opts = null)
public static GcpUcConfig get(String name, Output<String> id, GcpUcConfigState state, CustomResourceOptions options)
resources: _: type: datadog:GcpUcConfig 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.
- Billing
Account stringId - The Google Cloud account ID.
- Bucket
Name string - The Google Cloud bucket name used to store the Usage Cost export.
- Created
At string - The timestamp when the GCP UC configuration was created.
- Dataset string
- The dataset name used for the GCP Usage Cost export.
- Error
Messages List<string> - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- Export
Dataset stringName - The export dataset name used for the Google Cloud Usage Cost report.
- Export
Prefix string - The export prefix used for the Google Cloud Usage Cost report.
- Export
Project stringName - The name of the Google Cloud Usage Cost report.
- Months int
- The number of months of usage data to include in the export.
- Service
Account string - The unique Google Cloud service account email.
- Status string
- The current status of the GCP UC configuration.
- Status
Updated stringAt - The timestamp when the configuration status was last updated.
- Updated
At string - The timestamp when the GCP UC configuration was last modified.
- Billing
Account stringId - The Google Cloud account ID.
- Bucket
Name string - The Google Cloud bucket name used to store the Usage Cost export.
- Created
At string - The timestamp when the GCP UC configuration was created.
- Dataset string
- The dataset name used for the GCP Usage Cost export.
- Error
Messages []string - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- Export
Dataset stringName - The export dataset name used for the Google Cloud Usage Cost report.
- Export
Prefix string - The export prefix used for the Google Cloud Usage Cost report.
- Export
Project stringName - The name of the Google Cloud Usage Cost report.
- Months int
- The number of months of usage data to include in the export.
- Service
Account string - The unique Google Cloud service account email.
- Status string
- The current status of the GCP UC configuration.
- Status
Updated stringAt - The timestamp when the configuration status was last updated.
- Updated
At string - The timestamp when the GCP UC configuration was last modified.
- billing
Account StringId - The Google Cloud account ID.
- bucket
Name String - The Google Cloud bucket name used to store the Usage Cost export.
- created
At String - The timestamp when the GCP UC configuration was created.
- dataset String
- The dataset name used for the GCP Usage Cost export.
- error
Messages List<String> - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- export
Dataset StringName - The export dataset name used for the Google Cloud Usage Cost report.
- export
Prefix String - The export prefix used for the Google Cloud Usage Cost report.
- export
Project StringName - The name of the Google Cloud Usage Cost report.
- months Integer
- The number of months of usage data to include in the export.
- service
Account String - The unique Google Cloud service account email.
- status String
- The current status of the GCP UC configuration.
- status
Updated StringAt - The timestamp when the configuration status was last updated.
- updated
At String - The timestamp when the GCP UC configuration was last modified.
- billing
Account stringId - The Google Cloud account ID.
- bucket
Name string - The Google Cloud bucket name used to store the Usage Cost export.
- created
At string - The timestamp when the GCP UC configuration was created.
- dataset string
- The dataset name used for the GCP Usage Cost export.
- error
Messages string[] - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- export
Dataset stringName - The export dataset name used for the Google Cloud Usage Cost report.
- export
Prefix string - The export prefix used for the Google Cloud Usage Cost report.
- export
Project stringName - The name of the Google Cloud Usage Cost report.
- months number
- The number of months of usage data to include in the export.
- service
Account string - The unique Google Cloud service account email.
- status string
- The current status of the GCP UC configuration.
- status
Updated stringAt - The timestamp when the configuration status was last updated.
- updated
At string - The timestamp when the GCP UC configuration was last modified.
- billing_
account_ strid - The Google Cloud account ID.
- bucket_
name str - The Google Cloud bucket name used to store the Usage Cost export.
- created_
at str - The timestamp when the GCP UC configuration was created.
- dataset str
- The dataset name used for the GCP Usage Cost export.
- error_
messages Sequence[str] - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- export_
dataset_ strname - The export dataset name used for the Google Cloud Usage Cost report.
- export_
prefix str - The export prefix used for the Google Cloud Usage Cost report.
- export_
project_ strname - The name of the Google Cloud Usage Cost report.
- months int
- The number of months of usage data to include in the export.
- service_
account str - The unique Google Cloud service account email.
- status str
- The current status of the GCP UC configuration.
- status_
updated_ strat - The timestamp when the configuration status was last updated.
- updated_
at str - The timestamp when the GCP UC configuration was last modified.
- billing
Account StringId - The Google Cloud account ID.
- bucket
Name String - The Google Cloud bucket name used to store the Usage Cost export.
- created
At String - The timestamp when the GCP UC configuration was created.
- dataset String
- The dataset name used for the GCP Usage Cost export.
- error
Messages List<String> - List of error messages if the GCP UC configuration encountered any issues during setup or data processing.
- export
Dataset StringName - The export dataset name used for the Google Cloud Usage Cost report.
- export
Prefix String - The export prefix used for the Google Cloud Usage Cost report.
- export
Project StringName - The name of the Google Cloud Usage Cost report.
- months Number
- The number of months of usage data to include in the export.
- service
Account String - The unique Google Cloud service account email.
- status String
- The current status of the GCP UC configuration.
- status
Updated StringAt - The timestamp when the configuration status was last updated.
- updated
At String - The timestamp when the GCP UC configuration was last modified.
Import
The pulumi import
command can be used, for example:
$ pulumi import datadog:index/gcpUcConfig:GcpUcConfig example <cloud_account_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.