-
Notifications
You must be signed in to change notification settings - Fork 51
/
getAccount.go
75 lines (70 loc) · 2.52 KB
/
getAccount.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to access information about an existing Cognitive Services Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/cognitive"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// test, err := cognitive.LookupAccount(ctx, &cognitive.LookupAccountArgs{
// Name: "example-account",
// ResourceGroupName: "cognitive_account_rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("primaryAccessKey", test.PrimaryAccessKey)
// return nil
// })
// }
// ```
func LookupAccount(ctx *pulumi.Context, args *LookupAccountArgs, opts ...pulumi.InvokeOption) (*LookupAccountResult, error) {
var rv LookupAccountResult
err := ctx.Invoke("azure:cognitive/getAccount:getAccount", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccount.
type LookupAccountArgs struct {
// Specifies the name of the Cognitive Services Account.
Name string `pulumi:"name"`
// Specifies the name of the resource group where the Cognitive Services Account resides.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAccount.
type LookupAccountResult struct {
// The endpoint of the Cognitive Services Account
Endpoint string `pulumi:"endpoint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The kind of the Cognitive Services Account
Kind string `pulumi:"kind"`
// The Azure location where the Cognitive Services Account exists
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The primary access key of the Cognitive Services Account
PrimaryAccessKey string `pulumi:"primaryAccessKey"`
// If `kind` is `QnAMaker` the link to the QNA runtime.
QnaRuntimeEndpoint string `pulumi:"qnaRuntimeEndpoint"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary access key of the Cognitive Services Account
SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
// The sku name of the Cognitive Services Account
SkuName string `pulumi:"skuName"`
// A mapping of tags to assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}