github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/apigateway/getSdk.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package apigateway 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // ## Example Usage 15 // 16 // <!--Start PulumiCodeChooser --> 17 // ```go 18 // package main 19 // 20 // import ( 21 // 22 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway" 23 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 24 // 25 // ) 26 // 27 // func main() { 28 // pulumi.Run(func(ctx *pulumi.Context) error { 29 // _, err := apigateway.GetSdk(ctx, &apigateway.GetSdkArgs{ 30 // RestApiId: exampleAwsApiGatewayStage.RestApiId, 31 // StageName: exampleAwsApiGatewayStage.StageName, 32 // SdkType: "android", 33 // Parameters: map[string]interface{}{ 34 // "groupId": "example", 35 // "artifactId": "example", 36 // "artifactVersion": "example", 37 // "invokerPackage": "example", 38 // }, 39 // }, nil) 40 // if err != nil { 41 // return err 42 // } 43 // return nil 44 // }) 45 // } 46 // 47 // ``` 48 // <!--End PulumiCodeChooser --> 49 func GetSdk(ctx *pulumi.Context, args *GetSdkArgs, opts ...pulumi.InvokeOption) (*GetSdkResult, error) { 50 opts = internal.PkgInvokeDefaultOpts(opts) 51 var rv GetSdkResult 52 err := ctx.Invoke("aws:apigateway/getSdk:getSdk", args, &rv, opts...) 53 if err != nil { 54 return nil, err 55 } 56 return &rv, nil 57 } 58 59 // A collection of arguments for invoking getSdk. 60 type GetSdkArgs struct { 61 // 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. 62 Parameters map[string]string `pulumi:"parameters"` 63 // Identifier of the associated REST API. 64 RestApiId string `pulumi:"restApiId"` 65 // Language for the generated SDK. Currently `java`, `javascript`, `android`, `objectivec` (for iOS), `swift` (for iOS), and `ruby` are supported. 66 SdkType string `pulumi:"sdkType"` 67 // Name of the Stage that will be exported. 68 StageName string `pulumi:"stageName"` 69 } 70 71 // A collection of values returned by getSdk. 72 type GetSdkResult struct { 73 // SDK as a string. 74 Body string `pulumi:"body"` 75 // Content-disposition header value in the HTTP response. 76 ContentDisposition string `pulumi:"contentDisposition"` 77 // Content-type header value in the HTTP response. 78 ContentType string `pulumi:"contentType"` 79 // The provider-assigned unique ID for this managed resource. 80 Id string `pulumi:"id"` 81 Parameters map[string]string `pulumi:"parameters"` 82 RestApiId string `pulumi:"restApiId"` 83 SdkType string `pulumi:"sdkType"` 84 StageName string `pulumi:"stageName"` 85 } 86 87 func GetSdkOutput(ctx *pulumi.Context, args GetSdkOutputArgs, opts ...pulumi.InvokeOption) GetSdkResultOutput { 88 return pulumi.ToOutputWithContext(context.Background(), args). 89 ApplyT(func(v interface{}) (GetSdkResult, error) { 90 args := v.(GetSdkArgs) 91 r, err := GetSdk(ctx, &args, opts...) 92 var s GetSdkResult 93 if r != nil { 94 s = *r 95 } 96 return s, err 97 }).(GetSdkResultOutput) 98 } 99 100 // A collection of arguments for invoking getSdk. 101 type GetSdkOutputArgs struct { 102 // 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. 103 Parameters pulumi.StringMapInput `pulumi:"parameters"` 104 // Identifier of the associated REST API. 105 RestApiId pulumi.StringInput `pulumi:"restApiId"` 106 // Language for the generated SDK. Currently `java`, `javascript`, `android`, `objectivec` (for iOS), `swift` (for iOS), and `ruby` are supported. 107 SdkType pulumi.StringInput `pulumi:"sdkType"` 108 // Name of the Stage that will be exported. 109 StageName pulumi.StringInput `pulumi:"stageName"` 110 } 111 112 func (GetSdkOutputArgs) ElementType() reflect.Type { 113 return reflect.TypeOf((*GetSdkArgs)(nil)).Elem() 114 } 115 116 // A collection of values returned by getSdk. 117 type GetSdkResultOutput struct{ *pulumi.OutputState } 118 119 func (GetSdkResultOutput) ElementType() reflect.Type { 120 return reflect.TypeOf((*GetSdkResult)(nil)).Elem() 121 } 122 123 func (o GetSdkResultOutput) ToGetSdkResultOutput() GetSdkResultOutput { 124 return o 125 } 126 127 func (o GetSdkResultOutput) ToGetSdkResultOutputWithContext(ctx context.Context) GetSdkResultOutput { 128 return o 129 } 130 131 // SDK as a string. 132 func (o GetSdkResultOutput) Body() pulumi.StringOutput { 133 return o.ApplyT(func(v GetSdkResult) string { return v.Body }).(pulumi.StringOutput) 134 } 135 136 // Content-disposition header value in the HTTP response. 137 func (o GetSdkResultOutput) ContentDisposition() pulumi.StringOutput { 138 return o.ApplyT(func(v GetSdkResult) string { return v.ContentDisposition }).(pulumi.StringOutput) 139 } 140 141 // Content-type header value in the HTTP response. 142 func (o GetSdkResultOutput) ContentType() pulumi.StringOutput { 143 return o.ApplyT(func(v GetSdkResult) string { return v.ContentType }).(pulumi.StringOutput) 144 } 145 146 // The provider-assigned unique ID for this managed resource. 147 func (o GetSdkResultOutput) Id() pulumi.StringOutput { 148 return o.ApplyT(func(v GetSdkResult) string { return v.Id }).(pulumi.StringOutput) 149 } 150 151 func (o GetSdkResultOutput) Parameters() pulumi.StringMapOutput { 152 return o.ApplyT(func(v GetSdkResult) map[string]string { return v.Parameters }).(pulumi.StringMapOutput) 153 } 154 155 func (o GetSdkResultOutput) RestApiId() pulumi.StringOutput { 156 return o.ApplyT(func(v GetSdkResult) string { return v.RestApiId }).(pulumi.StringOutput) 157 } 158 159 func (o GetSdkResultOutput) SdkType() pulumi.StringOutput { 160 return o.ApplyT(func(v GetSdkResult) string { return v.SdkType }).(pulumi.StringOutput) 161 } 162 163 func (o GetSdkResultOutput) StageName() pulumi.StringOutput { 164 return o.ApplyT(func(v GetSdkResult) string { return v.StageName }).(pulumi.StringOutput) 165 } 166 167 func init() { 168 pulumi.RegisterOutputType(GetSdkResultOutput{}) 169 }