GetAccount
Use this data source to access information about an existing CosmosDB (formally DocumentDB) Account.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.CosmosDB.GetAccount.InvokeAsync(new Azure.CosmosDB.GetAccountArgs
{
Name = "tfex-cosmosdb-account",
ResourceGroupName = "tfex-cosmosdb-account-rg",
}));
this.CosmosdbAccountEndpoint = data.Azurerm_cosmosdb_account.Jobs.Endpoint;
}
[Output("cosmosdbAccountEndpoint")]
public Output<string> CosmosdbAccountEndpoint { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/cosmosdb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cosmosdb.LookupAccount(ctx, &cosmosdb.LookupAccountArgs{
Name: "tfex-cosmosdb-account",
ResourceGroupName: "tfex-cosmosdb-account-rg",
}, nil)
if err != nil {
return err
}
ctx.Export("cosmosdbAccountEndpoint", data.Azurerm_cosmosdb_account.Jobs.Endpoint)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
resource_group_name="tfex-cosmosdb-account-rg")
pulumi.export("cosmosdbAccountEndpoint", data["azurerm_cosmosdb_account"]["jobs"]["endpoint"])import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.cosmosdb.getAccount({
name: "tfex-cosmosdb-account",
resourceGroupName: "tfex-cosmosdb-account-rg",
});
export const cosmosdbAccountEndpoint = data.azurerm_cosmosdb_account.jobs.endpoint;Using GetAccount
function getAccount(args: GetAccountArgs, opts?: InvokeOptions): Promise<GetAccountResult>function get_account(name=None, resource_group_name=None, opts=None)func LookupAccount(ctx *Context, args *LookupAccountArgs, opts ...InvokeOption) (*LookupAccountResult, error)Note: This function is named
LookupAccountin the Go SDK.
public static class GetAccount {
public static Task<GetAccountResult> InvokeAsync(GetAccountArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the CosmosDB Account.
- Resource
Group stringName Specifies the name of the resource group in which the CosmosDB Account resides.
- Name string
Specifies the name of the CosmosDB Account.
- Resource
Group stringName Specifies the name of the resource group in which the CosmosDB Account resides.
- name string
Specifies the name of the CosmosDB Account.
- resource
Group stringName Specifies the name of the resource group in which the CosmosDB Account resides.
- name str
Specifies the name of the CosmosDB Account.
- resource_
group_ strname Specifies the name of the resource group in which the CosmosDB Account resides.
GetAccount Result
The following output properties are available:
- Capabilities
List<Get
Account Capability> Capabilities enabled on this Cosmos DB account.
- Consistency
Policies List<GetAccount Consistency Policy> - Enable
Automatic boolFailover If automatic failover is enabled for this CosmosDB Account.
- Enable
Multiple boolWrite Locations If multi-master is enabled for this Cosmos DB account.
- Endpoint string
The endpoint used to connect to the CosmosDB account.
- Geo
Locations List<GetAccount Geo Location> - Id string
The provider-assigned unique ID for this managed resource.
- Ip
Range stringFilter The current IP Filter for this CosmosDB account
- Is
Virtual boolNetwork Filter Enabled If virtual network filtering is enabled for this Cosmos DB account.
- Kind string
The Kind of the CosmosDB account.
- Location string
The name of the Azure region hosting replicated data.
- Name string
- Offer
Type string The Offer Type to used by this CosmosDB Account.
- Primary
Master stringKey The Primary master key for the CosmosDB Account.
- Primary
Readonly stringMaster Key The Primary read-only master Key for the CosmosDB Account.
- Read
Endpoints List<string> A list of read endpoints available for this CosmosDB account.
- Resource
Group stringName - Secondary
Master stringKey The Secondary master key for the CosmosDB Account.
- Secondary
Readonly stringMaster Key The Secondary read-only master key for the CosmosDB Account.
- Dictionary<string, string>
A mapping of tags assigned to the resource.
- Virtual
Network List<GetRules Account Virtual Network Rule> Subnets that are allowed to access this CosmosDB account.
- Write
Endpoints List<string> A list of write endpoints available for this CosmosDB account.
- Capabilities
[]Get
Account Capability Capabilities enabled on this Cosmos DB account.
- Consistency
Policies []GetAccount Consistency Policy - Enable
Automatic boolFailover If automatic failover is enabled for this CosmosDB Account.
- Enable
Multiple boolWrite Locations If multi-master is enabled for this Cosmos DB account.
- Endpoint string
The endpoint used to connect to the CosmosDB account.
- Geo
Locations []GetAccount Geo Location - Id string
The provider-assigned unique ID for this managed resource.
- Ip
Range stringFilter The current IP Filter for this CosmosDB account
- Is
Virtual boolNetwork Filter Enabled If virtual network filtering is enabled for this Cosmos DB account.
- Kind string
The Kind of the CosmosDB account.
- Location string
The name of the Azure region hosting replicated data.
- Name string
- Offer
Type string The Offer Type to used by this CosmosDB Account.
- Primary
Master stringKey The Primary master key for the CosmosDB Account.
- Primary
Readonly stringMaster Key The Primary read-only master Key for the CosmosDB Account.
- Read
Endpoints []string A list of read endpoints available for this CosmosDB account.
- Resource
Group stringName - Secondary
Master stringKey The Secondary master key for the CosmosDB Account.
- Secondary
Readonly stringMaster Key The Secondary read-only master key for the CosmosDB Account.
- map[string]string
A mapping of tags assigned to the resource.
- Virtual
Network []GetRules Account Virtual Network Rule Subnets that are allowed to access this CosmosDB account.
- Write
Endpoints []string A list of write endpoints available for this CosmosDB account.
- capabilities
Get
Account Capability[] Capabilities enabled on this Cosmos DB account.
- consistency
Policies GetAccount Consistency Policy[] - enable
Automatic booleanFailover If automatic failover is enabled for this CosmosDB Account.
- enable
Multiple booleanWrite Locations If multi-master is enabled for this Cosmos DB account.
- endpoint string
The endpoint used to connect to the CosmosDB account.
- geo
Locations GetAccount Geo Location[] - id string
The provider-assigned unique ID for this managed resource.
- ip
Range stringFilter The current IP Filter for this CosmosDB account
- is
Virtual booleanNetwork Filter Enabled If virtual network filtering is enabled for this Cosmos DB account.
- kind string
The Kind of the CosmosDB account.
- location string
The name of the Azure region hosting replicated data.
- name string
- offer
Type string The Offer Type to used by this CosmosDB Account.
- primary
Master stringKey The Primary master key for the CosmosDB Account.
- primary
Readonly stringMaster Key The Primary read-only master Key for the CosmosDB Account.
- read
Endpoints string[] A list of read endpoints available for this CosmosDB account.
- resource
Group stringName - secondary
Master stringKey The Secondary master key for the CosmosDB Account.
- secondary
Readonly stringMaster Key The Secondary read-only master key for the CosmosDB Account.
- {[key: string]: string}
A mapping of tags assigned to the resource.
- virtual
Network GetRules Account Virtual Network Rule[] Subnets that are allowed to access this CosmosDB account.
- write
Endpoints string[] A list of write endpoints available for this CosmosDB account.
- capabilities
List[Get
Account Capability] Capabilities enabled on this Cosmos DB account.
- consistency_
policies List[GetAccount Consistency Policy] - enable_
automatic_ boolfailover If automatic failover is enabled for this CosmosDB Account.
- enable_
multiple_ boolwrite_ locations If multi-master is enabled for this Cosmos DB account.
- endpoint str
The endpoint used to connect to the CosmosDB account.
- geo_
locations List[GetAccount Geo Location] - id str
The provider-assigned unique ID for this managed resource.
- ip_
range_ strfilter The current IP Filter for this CosmosDB account
- is_
virtual_ boolnetwork_ filter_ enabled If virtual network filtering is enabled for this Cosmos DB account.
- kind str
The Kind of the CosmosDB account.
- location str
The name of the Azure region hosting replicated data.
- name str
- offer_
type str The Offer Type to used by this CosmosDB Account.
- primary_
master_ strkey The Primary master key for the CosmosDB Account.
- primary_
readonly_ strmaster_ key The Primary read-only master Key for the CosmosDB Account.
- read_
endpoints List[str] A list of read endpoints available for this CosmosDB account.
- resource_
group_ strname - secondary_
master_ strkey The Secondary master key for the CosmosDB Account.
- secondary_
readonly_ strmaster_ key The Secondary read-only master key for the CosmosDB Account.
- Dict[str, str]
A mapping of tags assigned to the resource.
- virtual_
network_ List[Getrules Account Virtual Network Rule] Subnets that are allowed to access this CosmosDB account.
- write_
endpoints List[str] A list of write endpoints available for this CosmosDB account.
Supporting Types
GetAccountCapability
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetAccountConsistencyPolicy
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Consistency
Level string The Consistency Level used by this CosmosDB Account.
- Max
Interval intIn Seconds The amount of staleness (in seconds) tolerated when the consistency level is Bounded Staleness.
- Max
Staleness intPrefix The number of stale requests tolerated when the consistency level is Bounded Staleness.
- Consistency
Level string The Consistency Level used by this CosmosDB Account.
- Max
Interval intIn Seconds The amount of staleness (in seconds) tolerated when the consistency level is Bounded Staleness.
- Max
Staleness intPrefix The number of stale requests tolerated when the consistency level is Bounded Staleness.
- consistency
Level string The Consistency Level used by this CosmosDB Account.
- max
Interval numberIn Seconds The amount of staleness (in seconds) tolerated when the consistency level is Bounded Staleness.
- max
Staleness numberPrefix The number of stale requests tolerated when the consistency level is Bounded Staleness.
- consistency
Level str The Consistency Level used by this CosmosDB Account.
- max
Interval floatIn Seconds The amount of staleness (in seconds) tolerated when the consistency level is Bounded Staleness.
- max
Staleness floatPrefix The number of stale requests tolerated when the consistency level is Bounded Staleness.
GetAccountGeoLocation
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetAccountVirtualNetworkRule
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.