github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/output-funcs/go/mypkg/getBastionShareableLink.go (about) 1 // Code generated by test DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package mypkg 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 11 ) 12 13 // Response for all the Bastion Shareable Link endpoints. 14 // API Version: 2020-11-01. 15 func GetBastionShareableLink(ctx *pulumi.Context, args *GetBastionShareableLinkArgs, opts ...pulumi.InvokeOption) (*GetBastionShareableLinkResult, error) { 16 var rv GetBastionShareableLinkResult 17 err := ctx.Invoke("mypkg::getBastionShareableLink", args, &rv, opts...) 18 if err != nil { 19 return nil, err 20 } 21 return &rv, nil 22 } 23 24 type GetBastionShareableLinkArgs struct { 25 // The name of the Bastion Host. 26 BastionHostName string `pulumi:"bastionHostName"` 27 // The name of the resource group. 28 ResourceGroupName string `pulumi:"resourceGroupName"` 29 // List of VM references. 30 Vms []BastionShareableLink `pulumi:"vms"` 31 } 32 33 // Response for all the Bastion Shareable Link endpoints. 34 type GetBastionShareableLinkResult struct { 35 // The URL to get the next set of results. 36 NextLink *string `pulumi:"nextLink"` 37 } 38 39 func GetBastionShareableLinkOutput(ctx *pulumi.Context, args GetBastionShareableLinkOutputArgs, opts ...pulumi.InvokeOption) GetBastionShareableLinkResultOutput { 40 return pulumi.ToOutputWithContext(context.Background(), args). 41 ApplyT(func(v interface{}) (GetBastionShareableLinkResult, error) { 42 args := v.(GetBastionShareableLinkArgs) 43 r, err := GetBastionShareableLink(ctx, &args, opts...) 44 var s GetBastionShareableLinkResult 45 if r != nil { 46 s = *r 47 } 48 return s, err 49 }).(GetBastionShareableLinkResultOutput) 50 } 51 52 type GetBastionShareableLinkOutputArgs struct { 53 // The name of the Bastion Host. 54 BastionHostName pulumi.StringInput `pulumi:"bastionHostName"` 55 // The name of the resource group. 56 ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` 57 // List of VM references. 58 Vms BastionShareableLinkArrayInput `pulumi:"vms"` 59 } 60 61 func (GetBastionShareableLinkOutputArgs) ElementType() reflect.Type { 62 return reflect.TypeOf((*GetBastionShareableLinkArgs)(nil)).Elem() 63 } 64 65 // Response for all the Bastion Shareable Link endpoints. 66 type GetBastionShareableLinkResultOutput struct{ *pulumi.OutputState } 67 68 func (GetBastionShareableLinkResultOutput) ElementType() reflect.Type { 69 return reflect.TypeOf((*GetBastionShareableLinkResult)(nil)).Elem() 70 } 71 72 func (o GetBastionShareableLinkResultOutput) ToGetBastionShareableLinkResultOutput() GetBastionShareableLinkResultOutput { 73 return o 74 } 75 76 func (o GetBastionShareableLinkResultOutput) ToGetBastionShareableLinkResultOutputWithContext(ctx context.Context) GetBastionShareableLinkResultOutput { 77 return o 78 } 79 80 // The URL to get the next set of results. 81 func (o GetBastionShareableLinkResultOutput) NextLink() pulumi.StringPtrOutput { 82 return o.ApplyT(func(v GetBastionShareableLinkResult) *string { return v.NextLink }).(pulumi.StringPtrOutput) 83 } 84 85 func init() { 86 pulumi.RegisterOutputType(GetBastionShareableLinkResultOutput{}) 87 }