azure-native.costmanagement.Connector
Explore with Pulumi AI
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,
});
});
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
})
}
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());
}
}
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)
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,
});
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
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 string
- The unique name of the resource.
- args ConnectorArgs
- 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 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 string
- The unique name of the resource.
- args ConnectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConnectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 connectorResource = new AzureNative.CostManagement.Connector("connectorResource", new()
{
ResourceGroupName = "string",
ConnectorName = "string",
CredentialsKey = "string",
CredentialsSecret = "string",
DisplayName = "string",
Kind = "string",
Location = "string",
ReportId = "string",
Status = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := costmanagement.NewConnector(ctx, "connectorResource", &costmanagement.ConnectorArgs{
ResourceGroupName: pulumi.String("string"),
ConnectorName: pulumi.String("string"),
CredentialsKey: pulumi.String("string"),
CredentialsSecret: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Kind: pulumi.String("string"),
Location: pulumi.String("string"),
ReportId: pulumi.String("string"),
Status: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var connectorResource = new Connector("connectorResource", ConnectorArgs.builder()
.resourceGroupName("string")
.connectorName("string")
.credentialsKey("string")
.credentialsSecret("string")
.displayName("string")
.kind("string")
.location("string")
.reportId("string")
.status("string")
.tags(Map.of("string", "string"))
.build());
connector_resource = azure_native.costmanagement.Connector("connectorResource",
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",
})
const connectorResource = new azure_native.costmanagement.Connector("connectorResource", {
resourceGroupName: "string",
connectorName: "string",
credentialsKey: "string",
credentialsSecret: "string",
displayName: "string",
kind: "string",
location: "string",
reportId: "string",
status: "string",
tags: {
string: "string",
},
});
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
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
The Connector resource accepts the following input properties:
- Resource
Group stringName - Azure Resource Group Name.
- Connector
Name string - Connector Name.
- Credentials
Key string - Credentials authentication key (eg AWS ARN)
- Credentials
Secret string - Credentials secret (eg AWS ExternalId)
- Display
Name string - Connector DisplayName (defaults to Name)
- Kind string
- Connector kind (eg aws)
- Location string
- Connector location
- Report
Id string - Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
- Status
string | Pulumi.
Azure Native. Cost Management. Connector Status - Connector status
- Dictionary<string, string>
- Resource tags.
- Resource
Group stringName - Azure Resource Group Name.
- Connector
Name string - Connector Name.
- Credentials
Key string - Credentials authentication key (eg AWS ARN)
- Credentials
Secret string - Credentials secret (eg AWS ExternalId)
- Display
Name string - Connector DisplayName (defaults to Name)
- Kind string
- Connector kind (eg aws)
- Location string
- Connector location
- Report
Id string - Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
- Status
string | Connector
Status - Connector status
- map[string]string
- Resource tags.
- resource
Group StringName - Azure Resource Group Name.
- connector
Name String - Connector Name.
- credentials
Key String - Credentials authentication key (eg AWS ARN)
- credentials
Secret String - Credentials secret (eg AWS ExternalId)
- display
Name String - Connector DisplayName (defaults to Name)
- kind String
- Connector kind (eg aws)
- location String
- Connector location
- report
Id String - Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
- status
String | Connector
Status - Connector status
- Map<String,String>
- Resource tags.
- resource
Group stringName - Azure Resource Group Name.
- connector
Name string - Connector Name.
- credentials
Key string - Credentials authentication key (eg AWS ARN)
- credentials
Secret string - Credentials secret (eg AWS ExternalId)
- display
Name string - Connector DisplayName (defaults to Name)
- kind string
- Connector kind (eg aws)
- location string
- Connector location
- report
Id string - Identifying source report. (For AWS this is a CUR report name, defined with Daily and with Resources)
- status
string | Connector
Status - Connector status
- {[key: string]: string}
- Resource tags.
- resource_
group_ strname - Azure Resource Group Name.
- connector_
name 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 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 | Connector
Status - Connector status
- Mapping[str, str]
- Resource tags.
- resource
Group StringName - Azure Resource Group Name.
- connector
Name String - Connector Name.
- credentials
Key String - Credentials authentication key (eg AWS ARN)
- credentials
Secret String - Credentials secret (eg AWS ExternalId)
- display
Name String - Connector DisplayName (defaults to Name)
- kind String
- Connector kind (eg aws)
- location String
- Connector location
- report
Id 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
- 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.
Azure Native. Cost Management. Outputs. Connector Collection Info Response - Collection information
- Created
On string - Connector definition creation datetime
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Connector last modified datetime
- Name string
- Connector name
- Provider
Account stringId - Connector providerAccountId (determined from credentials)
- Type string
- Connector type
- Collection
Connector
Collection Info Response - Collection information
- Created
On string - Connector definition creation datetime
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Connector last modified datetime
- Name string
- Connector name
- Provider
Account stringId - Connector providerAccountId (determined from credentials)
- Type string
- Connector type
- collection
Connector
Collection Info Response - Collection information
- created
On String - Connector definition creation datetime
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - Connector last modified datetime
- name String
- Connector name
- provider
Account StringId - Connector providerAccountId (determined from credentials)
- type String
- Connector type
- collection
Connector
Collection Info Response - Collection information
- created
On string - Connector definition creation datetime
- id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - Connector last modified datetime
- name string
- Connector name
- provider
Account stringId - Connector providerAccountId (determined from credentials)
- type string
- Connector type
- collection
Connector
Collection Info Response - 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_ strid - Connector providerAccountId (determined from credentials)
- type str
- Connector type
- collection Property Map
- Collection information
- created
On String - Connector definition creation datetime
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - Connector last modified datetime
- name String
- Connector name
- provider
Account StringId - Connector providerAccountId (determined from credentials)
- type String
- Connector type
Supporting Types
ConnectorCollectionErrorInfoResponse, ConnectorCollectionErrorInfoResponseArgs
- Error
Code string - Short error message
- Error
Message string - Detailed error message
- Error
Start stringTime - Time the error started occurring (Last time error occurred in lastRun)
- Error
Inner stringMessage - External Provider error message
- Error
Code string - Short error message
- Error
Message string - Detailed error message
- Error
Start stringTime - Time the error started occurring (Last time error occurred in lastRun)
- Error
Inner stringMessage - External Provider error message
- error
Code String - Short error message
- error
Message String - Detailed error message
- error
Start StringTime - Time the error started occurring (Last time error occurred in lastRun)
- error
Inner StringMessage - External Provider error message
- error
Code string - Short error message
- error
Message string - Detailed error message
- error
Start stringTime - Time the error started occurring (Last time error occurred in lastRun)
- error
Inner stringMessage - External Provider error message
- error_
code str - Short error message
- error_
message str - Detailed error message
- error_
start_ strtime - Time the error started occurring (Last time error occurred in lastRun)
- error_
inner_ strmessage - External Provider error message
- error
Code String - Short error message
- error
Message String - Detailed error message
- error
Start StringTime - Time the error started occurring (Last time error occurred in lastRun)
- error
Inner StringMessage - External Provider error message
ConnectorCollectionInfoResponse, ConnectorCollectionInfoResponseArgs
- Last
Run string - Last time the data acquisition process completed (even if no new data was found)
- Last
Updated string - Last time the external data was updated into Azure
- Source
Last stringUpdated - Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
- Error
Pulumi.
Azure Native. Cost Management. Inputs. Connector Collection Error Info Response - Error information of last collection
- Last
Checked string - Last time the data acquisition process initiated connecting to the external provider
- Last
Run string - Last time the data acquisition process completed (even if no new data was found)
- Last
Updated string - Last time the external data was updated into Azure
- Source
Last stringUpdated - Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
- Error
Connector
Collection Error Info Response - Error information of last collection
- Last
Checked string - Last time the data acquisition process initiated connecting to the external provider
- last
Run String - Last time the data acquisition process completed (even if no new data was found)
- last
Updated String - Last time the external data was updated into Azure
- source
Last StringUpdated - Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
- error
Connector
Collection Error Info Response - Error information of last collection
- last
Checked String - Last time the data acquisition process initiated connecting to the external provider
- last
Run string - Last time the data acquisition process completed (even if no new data was found)
- last
Updated string - Last time the external data was updated into Azure
- source
Last stringUpdated - Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
- error
Connector
Collection Error Info Response - Error information of last collection
- last
Checked string - Last time the data acquisition process initiated connecting to the external provider
- last_
run str - Last time the data acquisition process completed (even if no new data was found)
- last_
updated str - Last time the external data was updated into Azure
- source_
last_ strupdated - Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
- error
Connector
Collection Error Info Response - Error information of last collection
- last_
checked str - Last time the data acquisition process initiated connecting to the external provider
- last
Run String - Last time the data acquisition process completed (even if no new data was found)
- last
Updated String - Last time the external data was updated into Azure
- source
Last StringUpdated - Source timestamp of external data currently available in Azure (eg AWS last processed CUR file timestamp)
- error Property Map
- Error information of last collection
- last
Checked String - Last time the data acquisition process initiated connecting to the external provider
ConnectorStatus, ConnectorStatusArgs
- Active
- active
- Error
- error
- Suspended
- suspended
- Connector
Status Active - active
- Connector
Status Error - error
- Connector
Status Suspended - 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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0