/
getApp.go
81 lines (76 loc) · 2.58 KB
/
getApp.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
76
77
78
79
80
81
// *** 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 app
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to retrieve an application from Okta.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-okta/sdk/v2/go/okta/app"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// opt0 := "Example App"
// _, err := app.GetApp(ctx, &app.GetAppArgs{
// Label: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func GetApp(ctx *pulumi.Context, args *GetAppArgs, opts ...pulumi.InvokeOption) (*GetAppResult, error) {
var rv GetAppResult
err := ctx.Invoke("okta:app/getApp:getApp", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApp.
type GetAppArgs struct {
// tells the provider to query for only `ACTIVE` applications.
ActiveOnly *bool `pulumi:"activeOnly"`
// List of groups IDs assigned to the application.
Groups []string `pulumi:"groups"`
// `id` of application to retrieve, conflicts with `label` and `labelPrefix`.
Id *string `pulumi:"id"`
// The label of the app to retrieve, conflicts with `labelPrefix` and `id`. Label uses
// the `?q=<label>` query parameter exposed by Okta's API. It should be noted that at this time this searches both `name`
// and `label`. This is used to avoid paginating through all applications.
Label *string `pulumi:"label"`
// Label prefix of the app to retrieve, conflicts with `label` and `id`. This will tell the
// provider to do a `starts with` query as opposed to an `equals` query.
LabelPrefix *string `pulumi:"labelPrefix"`
// List of users IDs assigned to the application.
Users []string `pulumi:"users"`
}
// A collection of values returned by getApp.
type GetAppResult struct {
ActiveOnly *bool `pulumi:"activeOnly"`
// List of groups IDs assigned to the application.
Groups []string `pulumi:"groups"`
// `id` of application.
Id *string `pulumi:"id"`
// `label` of application.
Label *string `pulumi:"label"`
LabelPrefix *string `pulumi:"labelPrefix"`
// Generic JSON containing discoverable resources related to the app
Links string `pulumi:"links"`
// `name` of application.
Name string `pulumi:"name"`
// `status` of application.
Status string `pulumi:"status"`
// List of users IDs assigned to the application.
Users []string `pulumi:"users"`
}