1. Packages
  2. Azure Native
  3. API Docs
  4. costmanagement
  5. Connector
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.37.0 published on Monday, Apr 15, 2024 by Pulumi

azure-native.costmanagement.Connector

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.37.0 published on Monday, Apr 15, 2024 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,
        });
    
    });
    
    package main
    
    import (
    	"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.

    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:

    ResourceGroupName string
    Azure Resource Group Name.
    ConnectorName 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 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 string
    Azure Resource Group Name.
    ConnectorName 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 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 String
    Azure Resource Group Name.
    connectorName 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 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 string
    Azure Resource Group Name.
    connectorName 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 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 str
    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 | ConnectorStatus
    Connector status
    tags Mapping[str, str]
    Resource tags.
    resourceGroupName String
    Azure Resource Group Name.
    connectorName 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 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 string
    Short error message
    ErrorMessage string
    Detailed error message
    ErrorStartTime string
    Time the error started occurring (Last time error occurred in lastRun)
    ErrorInnerMessage string
    External Provider error message
    ErrorCode string
    Short error message
    ErrorMessage string
    Detailed error message
    ErrorStartTime string
    Time the error started occurring (Last time error occurred in lastRun)
    ErrorInnerMessage string
    External Provider error message
    errorCode String
    Short error message
    errorMessage String
    Detailed error message
    errorStartTime String
    Time the error started occurring (Last time error occurred in lastRun)
    errorInnerMessage String
    External Provider error message
    errorCode string
    Short error message
    errorMessage string
    Detailed error message
    errorStartTime string
    Time the error started occurring (Last time error occurred in lastRun)
    errorInnerMessage string
    External Provider error message
    error_code str
    Short error message
    error_message str
    Detailed error message
    error_start_time str
    Time the error started occurring (Last time error occurred in lastRun)
    error_inner_message str
    External Provider error message
    errorCode String
    Short error message
    errorMessage String
    Detailed error message
    errorStartTime String
    Time the error started occurring (Last time error occurred in lastRun)
    errorInnerMessage String
    External Provider error message

    ConnectorCollectionInfoResponse, ConnectorCollectionInfoResponseArgs

    LastRun string
    Last time the data acquisition process completed (even if no new data was found)
    LastUpdated string
    Last time the external data was updated into Azure
    SourceLastUpdated 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 string
    Last time the data acquisition process completed (even if no new data was found)
    LastUpdated string
    Last time the external data was updated into Azure
    SourceLastUpdated 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 String
    Last time the data acquisition process completed (even if no new data was found)
    lastUpdated String
    Last time the external data was updated into Azure
    sourceLastUpdated 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 string
    Last time the data acquisition process completed (even if no new data was found)
    lastUpdated string
    Last time the external data was updated into Azure
    sourceLastUpdated 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 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_updated 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 String
    Last time the data acquisition process completed (even if no new data was found)
    lastUpdated String
    Last time the external data was updated into Azure
    sourceLastUpdated 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} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.37.0 published on Monday, Apr 15, 2024 by Pulumi