/
getServiceProfiles.go
152 lines (133 loc) · 5.49 KB
/
getServiceProfiles.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
// 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 fabric
import (
"context"
"reflect"
"github.com/equinix/pulumi-equinix/sdk/go/equinix/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Fabric V4 API compatible data resource that allow user to fetch Service Profile by name filter criteria
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := fabric.GetServiceProfiles(ctx, &fabric.GetServiceProfilesArgs{
// Filter: fabric.GetServiceProfilesFilter{
// Operator: pulumi.StringRef("="),
// Property: pulumi.StringRef("/name"),
// Values: []string{
// "<list_of_profiles_to_return>",
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func GetServiceProfiles(ctx *pulumi.Context, args *GetServiceProfilesArgs, opts ...pulumi.InvokeOption) (*GetServiceProfilesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetServiceProfilesResult
err := ctx.Invoke("equinix:fabric/getServiceProfiles:getServiceProfiles", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getServiceProfiles.
type GetServiceProfilesArgs struct {
// Service Profile Search Filter
Filter *GetServiceProfilesFilter `pulumi:"filter"`
// Service Profile Sort criteria for Search Request response payload
Sort []GetServiceProfilesSort `pulumi:"sort"`
// flips view between buyer and seller representation. Available values : aSide, zSide. Default value : aSide
ViewPoint *string `pulumi:"viewPoint"`
}
// A collection of values returned by getServiceProfiles.
type GetServiceProfilesResult struct {
// List of Service Profiles
Data []GetServiceProfilesDatum `pulumi:"data"`
// Service Profile Search Filter
Filter *GetServiceProfilesFilter `pulumi:"filter"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Service Profile Sort criteria for Search Request response payload
Sort []GetServiceProfilesSort `pulumi:"sort"`
// flips view between buyer and seller representation. Available values : aSide, zSide. Default value : aSide
ViewPoint *string `pulumi:"viewPoint"`
}
func GetServiceProfilesOutput(ctx *pulumi.Context, args GetServiceProfilesOutputArgs, opts ...pulumi.InvokeOption) GetServiceProfilesResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetServiceProfilesResult, error) {
args := v.(GetServiceProfilesArgs)
r, err := GetServiceProfiles(ctx, &args, opts...)
var s GetServiceProfilesResult
if r != nil {
s = *r
}
return s, err
}).(GetServiceProfilesResultOutput)
}
// A collection of arguments for invoking getServiceProfiles.
type GetServiceProfilesOutputArgs struct {
// Service Profile Search Filter
Filter GetServiceProfilesFilterPtrInput `pulumi:"filter"`
// Service Profile Sort criteria for Search Request response payload
Sort GetServiceProfilesSortArrayInput `pulumi:"sort"`
// flips view between buyer and seller representation. Available values : aSide, zSide. Default value : aSide
ViewPoint pulumi.StringPtrInput `pulumi:"viewPoint"`
}
func (GetServiceProfilesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceProfilesArgs)(nil)).Elem()
}
// A collection of values returned by getServiceProfiles.
type GetServiceProfilesResultOutput struct{ *pulumi.OutputState }
func (GetServiceProfilesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceProfilesResult)(nil)).Elem()
}
func (o GetServiceProfilesResultOutput) ToGetServiceProfilesResultOutput() GetServiceProfilesResultOutput {
return o
}
func (o GetServiceProfilesResultOutput) ToGetServiceProfilesResultOutputWithContext(ctx context.Context) GetServiceProfilesResultOutput {
return o
}
// List of Service Profiles
func (o GetServiceProfilesResultOutput) Data() GetServiceProfilesDatumArrayOutput {
return o.ApplyT(func(v GetServiceProfilesResult) []GetServiceProfilesDatum { return v.Data }).(GetServiceProfilesDatumArrayOutput)
}
// Service Profile Search Filter
func (o GetServiceProfilesResultOutput) Filter() GetServiceProfilesFilterPtrOutput {
return o.ApplyT(func(v GetServiceProfilesResult) *GetServiceProfilesFilter { return v.Filter }).(GetServiceProfilesFilterPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetServiceProfilesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceProfilesResult) string { return v.Id }).(pulumi.StringOutput)
}
// Service Profile Sort criteria for Search Request response payload
func (o GetServiceProfilesResultOutput) Sort() GetServiceProfilesSortArrayOutput {
return o.ApplyT(func(v GetServiceProfilesResult) []GetServiceProfilesSort { return v.Sort }).(GetServiceProfilesSortArrayOutput)
}
// flips view between buyer and seller representation. Available values : aSide, zSide. Default value : aSide
func (o GetServiceProfilesResultOutput) ViewPoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetServiceProfilesResult) *string { return v.ViewPoint }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetServiceProfilesResultOutput{})
}