/
getSdk.go
165 lines (143 loc) · 5.97 KB
/
getSdk.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package apigateway
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/apigateway"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := apigateway.GetSdk(ctx, &apigateway.GetSdkArgs{
// RestApiId: aws_api_gateway_stage.Example.Rest_api_id,
// StageName: aws_api_gateway_stage.Example.Stage_name,
// SdkType: "android",
// Parameters: map[string]interface{}{
// "groupId": "example",
// "artifactId": "example",
// "artifactVersion": "example",
// "invokerPackage": "example",
// },
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetSdk(ctx *pulumi.Context, args *GetSdkArgs, opts ...pulumi.InvokeOption) (*GetSdkResult, error) {
var rv GetSdkResult
err := ctx.Invoke("aws:apigateway/getSdk:getSdk", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSdk.
type GetSdkArgs struct {
// Key-value map of query string parameters `sdkType` properties of the SDK. For SDK Type of `objectivec` or `swift`, a parameter named `classPrefix` is required. For SDK Type of `android`, parameters named `groupId`, `artifactId`, `artifactVersion`, and `invokerPackage` are required. For SDK Type of `java`, parameters named `serviceName` and `javaPackageName` are required.
Parameters map[string]string `pulumi:"parameters"`
// Identifier of the associated REST API.
RestApiId string `pulumi:"restApiId"`
// Language for the generated SDK. Currently `java`, `javascript`, `android`, `objectivec` (for iOS), `swift` (for iOS), and `ruby` are supported.
SdkType string `pulumi:"sdkType"`
// Name of the Stage that will be exported.
StageName string `pulumi:"stageName"`
}
// A collection of values returned by getSdk.
type GetSdkResult struct {
// SDK as a string.
Body string `pulumi:"body"`
// Content-disposition header value in the HTTP response.
ContentDisposition string `pulumi:"contentDisposition"`
// Content-type header value in the HTTP response.
ContentType string `pulumi:"contentType"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Parameters map[string]string `pulumi:"parameters"`
RestApiId string `pulumi:"restApiId"`
SdkType string `pulumi:"sdkType"`
StageName string `pulumi:"stageName"`
}
func GetSdkOutput(ctx *pulumi.Context, args GetSdkOutputArgs, opts ...pulumi.InvokeOption) GetSdkResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetSdkResult, error) {
args := v.(GetSdkArgs)
r, err := GetSdk(ctx, &args, opts...)
var s GetSdkResult
if r != nil {
s = *r
}
return s, err
}).(GetSdkResultOutput)
}
// A collection of arguments for invoking getSdk.
type GetSdkOutputArgs struct {
// Key-value map of query string parameters `sdkType` properties of the SDK. For SDK Type of `objectivec` or `swift`, a parameter named `classPrefix` is required. For SDK Type of `android`, parameters named `groupId`, `artifactId`, `artifactVersion`, and `invokerPackage` are required. For SDK Type of `java`, parameters named `serviceName` and `javaPackageName` are required.
Parameters pulumi.StringMapInput `pulumi:"parameters"`
// Identifier of the associated REST API.
RestApiId pulumi.StringInput `pulumi:"restApiId"`
// Language for the generated SDK. Currently `java`, `javascript`, `android`, `objectivec` (for iOS), `swift` (for iOS), and `ruby` are supported.
SdkType pulumi.StringInput `pulumi:"sdkType"`
// Name of the Stage that will be exported.
StageName pulumi.StringInput `pulumi:"stageName"`
}
func (GetSdkOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSdkArgs)(nil)).Elem()
}
// A collection of values returned by getSdk.
type GetSdkResultOutput struct{ *pulumi.OutputState }
func (GetSdkResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSdkResult)(nil)).Elem()
}
func (o GetSdkResultOutput) ToGetSdkResultOutput() GetSdkResultOutput {
return o
}
func (o GetSdkResultOutput) ToGetSdkResultOutputWithContext(ctx context.Context) GetSdkResultOutput {
return o
}
// SDK as a string.
func (o GetSdkResultOutput) Body() pulumi.StringOutput {
return o.ApplyT(func(v GetSdkResult) string { return v.Body }).(pulumi.StringOutput)
}
// Content-disposition header value in the HTTP response.
func (o GetSdkResultOutput) ContentDisposition() pulumi.StringOutput {
return o.ApplyT(func(v GetSdkResult) string { return v.ContentDisposition }).(pulumi.StringOutput)
}
// Content-type header value in the HTTP response.
func (o GetSdkResultOutput) ContentType() pulumi.StringOutput {
return o.ApplyT(func(v GetSdkResult) string { return v.ContentType }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSdkResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSdkResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetSdkResultOutput) Parameters() pulumi.StringMapOutput {
return o.ApplyT(func(v GetSdkResult) map[string]string { return v.Parameters }).(pulumi.StringMapOutput)
}
func (o GetSdkResultOutput) RestApiId() pulumi.StringOutput {
return o.ApplyT(func(v GetSdkResult) string { return v.RestApiId }).(pulumi.StringOutput)
}
func (o GetSdkResultOutput) SdkType() pulumi.StringOutput {
return o.ApplyT(func(v GetSdkResult) string { return v.SdkType }).(pulumi.StringOutput)
}
func (o GetSdkResultOutput) StageName() pulumi.StringOutput {
return o.ApplyT(func(v GetSdkResult) string { return v.StageName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSdkResultOutput{})
}