forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listGatewayDebugCredentials.go
103 lines (88 loc) · 4.14 KB
/
listGatewayDebugCredentials.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apimanagement
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Create new debug credentials for gateway.
// Azure REST API version: 2023-03-01-preview.
//
// Other available API versions: 2023-05-01-preview.
func ListGatewayDebugCredentials(ctx *pulumi.Context, args *ListGatewayDebugCredentialsArgs, opts ...pulumi.InvokeOption) (*ListGatewayDebugCredentialsResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv ListGatewayDebugCredentialsResult
err := ctx.Invoke("azure-native:apimanagement:listGatewayDebugCredentials", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type ListGatewayDebugCredentialsArgs struct {
// Full resource Id of an API.
ApiId string `pulumi:"apiId"`
// Credentials expiration in ISO8601 format. Maximum duration of the credentials is PT1H. When property is not specified, them value PT1H is used.
CredentialsExpireAfter *string `pulumi:"credentialsExpireAfter"`
// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
GatewayId string `pulumi:"gatewayId"`
// Purposes of debug credential.
Purposes []string `pulumi:"purposes"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the API Management service.
ServiceName string `pulumi:"serviceName"`
}
// Gateway debug credentials.
type ListGatewayDebugCredentialsResult struct {
// Gateway debug token.
Token *string `pulumi:"token"`
}
func ListGatewayDebugCredentialsOutput(ctx *pulumi.Context, args ListGatewayDebugCredentialsOutputArgs, opts ...pulumi.InvokeOption) ListGatewayDebugCredentialsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (ListGatewayDebugCredentialsResult, error) {
args := v.(ListGatewayDebugCredentialsArgs)
r, err := ListGatewayDebugCredentials(ctx, &args, opts...)
var s ListGatewayDebugCredentialsResult
if r != nil {
s = *r
}
return s, err
}).(ListGatewayDebugCredentialsResultOutput)
}
type ListGatewayDebugCredentialsOutputArgs struct {
// Full resource Id of an API.
ApiId pulumi.StringInput `pulumi:"apiId"`
// Credentials expiration in ISO8601 format. Maximum duration of the credentials is PT1H. When property is not specified, them value PT1H is used.
CredentialsExpireAfter pulumi.StringPtrInput `pulumi:"credentialsExpireAfter"`
// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
GatewayId pulumi.StringInput `pulumi:"gatewayId"`
// Purposes of debug credential.
Purposes pulumi.StringArrayInput `pulumi:"purposes"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The name of the API Management service.
ServiceName pulumi.StringInput `pulumi:"serviceName"`
}
func (ListGatewayDebugCredentialsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ListGatewayDebugCredentialsArgs)(nil)).Elem()
}
// Gateway debug credentials.
type ListGatewayDebugCredentialsResultOutput struct{ *pulumi.OutputState }
func (ListGatewayDebugCredentialsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ListGatewayDebugCredentialsResult)(nil)).Elem()
}
func (o ListGatewayDebugCredentialsResultOutput) ToListGatewayDebugCredentialsResultOutput() ListGatewayDebugCredentialsResultOutput {
return o
}
func (o ListGatewayDebugCredentialsResultOutput) ToListGatewayDebugCredentialsResultOutputWithContext(ctx context.Context) ListGatewayDebugCredentialsResultOutput {
return o
}
// Gateway debug token.
func (o ListGatewayDebugCredentialsResultOutput) Token() pulumi.StringPtrOutput {
return o.ApplyT(func(v ListGatewayDebugCredentialsResult) *string { return v.Token }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(ListGatewayDebugCredentialsResultOutput{})
}