1. Packages
  2. Azure Native v2
  3. API Docs
  4. costmanagement
  5. Connector
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.costmanagement.Connector

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

The Connector model definition Azure REST API version: 2018-08-01-preview.

Example Usage

Connector_Put

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var connector = new AzureNative.CostManagement.Connector("connector", new()
    {
        ConnectorName = "AWSBillingAccount",
        CredentialsKey = "arn:aws:iam::123456789012:role/AzureCostManagementRole",
        CredentialsSecret = "external-id",
        DisplayName = "AWS-Consolidated-1",
        Location = "westus",
        ReportId = "HourlyWithResources",
        ResourceGroupName = "rg1",
        Status = AzureNative.CostManagement.ConnectorStatus.Active,
    });

});
Copy
package main

import (
	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costmanagement.NewConnector(ctx, "connector", &costmanagement.ConnectorArgs{
			ConnectorName:     pulumi.String("AWSBillingAccount"),
			CredentialsKey:    pulumi.String("arn:aws:iam::123456789012:role/AzureCostManagementRole"),
			CredentialsSecret: pulumi.String("external-id"),
			DisplayName:       pulumi.String("AWS-Consolidated-1"),
			Location:          pulumi.String("westus"),
			ReportId:          pulumi.String("HourlyWithResources"),
			ResourceGroupName: pulumi.String("rg1"),
			Status:            pulumi.String(costmanagement.ConnectorStatusActive),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.Connector;
import com.pulumi.azurenative.costmanagement.ConnectorArgs;
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 connector = new Connector("connector", ConnectorArgs.builder()
            .connectorName("AWSBillingAccount")
            .credentialsKey("arn:aws:iam::123456789012:role/AzureCostManagementRole")
            .credentialsSecret("external-id")
            .displayName("AWS-Consolidated-1")
            .location("westus")
            .reportId("HourlyWithResources")
            .resourceGroupName("rg1")
            .status("active")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const connector = new azure_native.costmanagement.Connector("connector", {
    connectorName: "AWSBillingAccount",
    credentialsKey: "arn:aws:iam::123456789012:role/AzureCostManagementRole",
    credentialsSecret: "external-id",
    displayName: "AWS-Consolidated-1",
    location: "westus",
    reportId: "HourlyWithResources",
    resourceGroupName: "rg1",
    status: azure_native.costmanagement.ConnectorStatus.Active,
});
Copy
import pulumi
import pulumi_azure_native as azure_native

connector = azure_native.costmanagement.Connector("connector",
    connector_name="AWSBillingAccount",
    credentials_key="arn:aws:iam::123456789012:role/AzureCostManagementRole",
    credentials_secret="external-id",
    display_name="AWS-Consolidated-1",
    location="westus",
    report_id="HourlyWithResources",
    resource_group_name="rg1",
    status=azure_native.costmanagement.ConnectorStatus.ACTIVE)
Copy
resources:
  connector:
    type: azure-native:costmanagement:Connector
    properties:
      connectorName: AWSBillingAccount
      credentialsKey: arn:aws:iam::123456789012:role/AzureCostManagementRole
      credentialsSecret: external-id
      displayName: AWS-Consolidated-1
      location: westus
      reportId: HourlyWithResources
      resourceGroupName: rg1
      status: active
Copy

Create Connector Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Connector(name: string, args: ConnectorArgs, opts?: CustomResourceOptions);
@overload
def Connector(resource_name: str,
              args: ConnectorArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def Connector(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              resource_group_name: Optional[str] = None,
              connector_name: Optional[str] = None,
              credentials_key: Optional[str] = None,
              credentials_secret: Optional[str] = None,
              display_name: Optional[str] = None,
              kind: Optional[str] = None,
              location: Optional[str] = None,
              report_id: Optional[str] = None,
              status: Optional[Union[str, ConnectorStatus]] = None,
              tags: Optional[Mapping[str, str]] = None)
func NewConnector(ctx *Context, name string, args ConnectorArgs, opts ...ResourceOption) (*Connector, error)
public Connector(string name, ConnectorArgs args, CustomResourceOptions? opts = null)
public Connector(String name, ConnectorArgs args)
public Connector(String name, ConnectorArgs args, CustomResourceOptions options)
type: azure-native:costmanagement:Connector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConnectorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConnectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConnectorArgs
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 azure_nativeConnectorResource = new AzureNative.Costmanagement.Connector("azure-nativeConnectorResource", new()
{
    ResourceGroupName = "string",
    ConnectorName = "string",
    CredentialsKey = "string",
    CredentialsSecret = "string",
    DisplayName = "string",
    Kind = "string",
    Location = "string",
    ReportId = "string",
    Status = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := costmanagement.NewConnector(ctx, "azure-nativeConnectorResource", &costmanagement.ConnectorArgs{
	ResourceGroupName: "string",
	ConnectorName:     "string",
	CredentialsKey:    "string",
	CredentialsSecret: "string",
	DisplayName:       "string",
	Kind:              "string",
	Location:          "string",
	ReportId:          "string",
	Status:            "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
})
Copy
var azure_nativeConnectorResource = new Connector("azure-nativeConnectorResource", ConnectorArgs.builder()
    .resourceGroupName("string")
    .connectorName("string")
    .credentialsKey("string")
    .credentialsSecret("string")
    .displayName("string")
    .kind("string")
    .location("string")
    .reportId("string")
    .status("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
azure_native_connector_resource = azure_native.costmanagement.Connector("azure-nativeConnectorResource",
    resource_group_name=string,
    connector_name=string,
    credentials_key=string,
    credentials_secret=string,
    display_name=string,
    kind=string,
    location=string,
    report_id=string,
    status=string,
    tags={
        string: string,
    })
Copy
const azure_nativeConnectorResource = new azure_native.costmanagement.Connector("azure-nativeConnectorResource", {
    resourceGroupName: "string",
    connectorName: "string",
    credentialsKey: "string",
    credentialsSecret: "string",
    displayName: "string",
    kind: "string",
    location: "string",
    reportId: "string",
    status: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:costmanagement:Connector
properties:
    connectorName: string
    credentialsKey: string
    credentialsSecret: string
    displayName: string
    kind: string
    location: string
    reportId: string
    resourceGroupName: string
    status: string
    tags:
        string: string
Copy

Connector 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 Connector resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Azure Resource Group Name.
ConnectorName Changes to this property will trigger replacement. string
Connector Name.
CredentialsKey string
Credentials authentication key (eg AWS ARN)
CredentialsSecret string
Credentials secret (eg AWS ExternalId)
DisplayName string
Connector DisplayName (defaults to Name)
Kind string
Connector kind (eg aws)
Location Changes to this property will trigger replacement. string
Connector location
ReportId string
Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
Status string | Pulumi.AzureNative.CostManagement.ConnectorStatus
Connector status
Tags Dictionary<string, string>
Resource tags.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Azure Resource Group Name.
ConnectorName Changes to this property will trigger replacement. string
Connector Name.
CredentialsKey string
Credentials authentication key (eg AWS ARN)
CredentialsSecret string
Credentials secret (eg AWS ExternalId)
DisplayName string
Connector DisplayName (defaults to Name)
Kind string
Connector kind (eg aws)
Location Changes to this property will trigger replacement. string
Connector location
ReportId string
Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
Status string | ConnectorStatus
Connector status
Tags map[string]string
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Azure Resource Group Name.
connectorName Changes to this property will trigger replacement. String
Connector Name.
credentialsKey String
Credentials authentication key (eg AWS ARN)
credentialsSecret String
Credentials secret (eg AWS ExternalId)
displayName String
Connector DisplayName (defaults to Name)
kind String
Connector kind (eg aws)
location Changes to this property will trigger replacement. String
Connector location
reportId String
Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
status String | ConnectorStatus
Connector status
tags Map<String,String>
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Azure Resource Group Name.
connectorName Changes to this property will trigger replacement. string
Connector Name.
credentialsKey string
Credentials authentication key (eg AWS ARN)
credentialsSecret string
Credentials secret (eg AWS ExternalId)
displayName string
Connector DisplayName (defaults to Name)
kind string
Connector kind (eg aws)
location Changes to this property will trigger replacement. string
Connector location
reportId string
Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
status string | ConnectorStatus
Connector status
tags {[key: string]: string}
Resource tags.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Azure Resource Group Name.
connector_name Changes to this property will trigger replacement. str
Connector Name.
credentials_key str
Credentials authentication key (eg AWS ARN)
credentials_secret str
Credentials secret (eg AWS ExternalId)
display_name str
Connector DisplayName (defaults to Name)
kind str
Connector kind (eg aws)
location Changes to this property will trigger replacement. str
Connector location
report_id str
Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
status str | ConnectorStatus
Connector status
tags Mapping[str, str]
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Azure Resource Group Name.
connectorName Changes to this property will trigger replacement. String
Connector Name.
credentialsKey String
Credentials authentication key (eg AWS ARN)
credentialsSecret String
Credentials secret (eg AWS ExternalId)
displayName String
Connector DisplayName (defaults to Name)
kind String
Connector kind (eg aws)
location Changes to this property will trigger replacement. String
Connector location
reportId String
Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
status String | "active" | "error" | "suspended"
Connector status
tags Map<String>
Resource tags.

Outputs

All input properties are implicitly available as output properties. Additionally, the Connector resource produces the following output properties:

Collection Pulumi.AzureNative.CostManagement.Outputs.ConnectorCollectionInfoResponse
Collection information
CreatedOn string
Connector definition creation datetime
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
Connector last modified datetime
Name string
Connector name
ProviderAccountId string
Connector providerAccountId (determined from credentials)
Type string
Connector type
Collection ConnectorCollectionInfoResponse
Collection information
CreatedOn string
Connector definition creation datetime
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
Connector last modified datetime
Name string
Connector name
ProviderAccountId string
Connector providerAccountId (determined from credentials)
Type string
Connector type
collection ConnectorCollectionInfoResponse
Collection information
createdOn String
Connector definition creation datetime
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
Connector last modified datetime
name String
Connector name
providerAccountId String
Connector providerAccountId (determined from credentials)
type String
Connector type
collection ConnectorCollectionInfoResponse
Collection information
createdOn string
Connector definition creation datetime
id string
The provider-assigned unique ID for this managed resource.
modifiedOn string
Connector last modified datetime
name string
Connector name
providerAccountId string
Connector providerAccountId (determined from credentials)
type string
Connector type
collection ConnectorCollectionInfoResponse
Collection information
created_on str
Connector definition creation datetime
id str
The provider-assigned unique ID for this managed resource.
modified_on str
Connector last modified datetime
name str
Connector name
provider_account_id str
Connector providerAccountId (determined from credentials)
type str
Connector type
collection Property Map
Collection information
createdOn String
Connector definition creation datetime
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
Connector last modified datetime
name String
Connector name
providerAccountId String
Connector providerAccountId (determined from credentials)
type String
Connector type

Supporting Types

ConnectorCollectionErrorInfoResponse
, ConnectorCollectionErrorInfoResponseArgs

ErrorCode This property is required. string
Short error message
ErrorMessage This property is required. string
Detailed error message
ErrorStartTime This property is required. string
Time the error started occurring (Last time error occurred in lastRun)
ErrorInnerMessage string
External Provider error message
ErrorCode This property is required. string
Short error message
ErrorMessage This property is required. string
Detailed error message
ErrorStartTime This property is required. string
Time the error started occurring (Last time error occurred in lastRun)
ErrorInnerMessage string
External Provider error message
errorCode This property is required. String
Short error message
errorMessage This property is required. String
Detailed error message
errorStartTime This property is required. String
Time the error started occurring (Last time error occurred in lastRun)
errorInnerMessage String
External Provider error message
errorCode This property is required. string
Short error message
errorMessage This property is required. string
Detailed error message
errorStartTime This property is required. string
Time the error started occurring (Last time error occurred in lastRun)
errorInnerMessage string
External Provider error message
error_code This property is required. str
Short error message
error_message This property is required. str
Detailed error message
error_start_time This property is required. str
Time the error started occurring (Last time error occurred in lastRun)
error_inner_message str
External Provider error message
errorCode This property is required. String
Short error message
errorMessage This property is required. String
Detailed error message
errorStartTime This property is required. String
Time the error started occurring (Last time error occurred in lastRun)
errorInnerMessage String
External Provider error message

ConnectorCollectionInfoResponse
, ConnectorCollectionInfoResponseArgs

LastRun This property is required. string
Last time the data acquisition process completed (even if no new data was found)
LastUpdated This property is required. string
Last time the external data was updated into Azure
SourceLastUpdated This property is required. string
Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
Error Pulumi.AzureNative.CostManagement.Inputs.ConnectorCollectionErrorInfoResponse
Error information of last collection
LastChecked string
Last time the data acquisition process initiated connecting to the external provider
LastRun This property is required. string
Last time the data acquisition process completed (even if no new data was found)
LastUpdated This property is required. string
Last time the external data was updated into Azure
SourceLastUpdated This property is required. string
Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
Error ConnectorCollectionErrorInfoResponse
Error information of last collection
LastChecked string
Last time the data acquisition process initiated connecting to the external provider
lastRun This property is required. String
Last time the data acquisition process completed (even if no new data was found)
lastUpdated This property is required. String
Last time the external data was updated into Azure
sourceLastUpdated This property is required. String
Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
error ConnectorCollectionErrorInfoResponse
Error information of last collection
lastChecked String
Last time the data acquisition process initiated connecting to the external provider
lastRun This property is required. string
Last time the data acquisition process completed (even if no new data was found)
lastUpdated This property is required. string
Last time the external data was updated into Azure
sourceLastUpdated This property is required. string
Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
error ConnectorCollectionErrorInfoResponse
Error information of last collection
lastChecked string
Last time the data acquisition process initiated connecting to the external provider
last_run This property is required. str
Last time the data acquisition process completed (even if no new data was found)
last_updated This property is required. str
Last time the external data was updated into Azure
source_last_updated This property is required. str
Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
error ConnectorCollectionErrorInfoResponse
Error information of last collection
last_checked str
Last time the data acquisition process initiated connecting to the external provider
lastRun This property is required. String
Last time the data acquisition process completed (even if no new data was found)
lastUpdated This property is required. String
Last time the external data was updated into Azure
sourceLastUpdated This property is required. String
Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
error Property Map
Error information of last collection
lastChecked String
Last time the data acquisition process initiated connecting to the external provider

ConnectorStatus
, ConnectorStatusArgs

Active
active
Error
error
Suspended
suspended
ConnectorStatusActive
active
ConnectorStatusError
error
ConnectorStatusSuspended
suspended
Active
active
Error
error
Suspended
suspended
Active
active
Error
error
Suspended
suspended
ACTIVE
active
ERROR
error
SUSPENDED
suspended
"active"
active
"error"
error
"suspended"
suspended

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:costmanagement:Connector AWSBillingAccount /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/connectors/{connectorName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi