/
getServiceendpointAzurecr.go
223 lines (193 loc) · 9.21 KB
/
getServiceendpointAzurecr.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// 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 azuredevops
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Azure Container Registry Service Endpoint.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := azuredevops.GetServiceendpointAzurecr(ctx, &azuredevops.GetServiceendpointAzurecrArgs{
// ProjectId: azuredevops_project.Example.Id,
// ServiceEndpointName: pulumi.StringRef("Example Azure Container Registry"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("serviceEndpointId", example.Id)
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func GetServiceendpointAzurecr(ctx *pulumi.Context, args *GetServiceendpointAzurecrArgs, opts ...pulumi.InvokeOption) (*GetServiceendpointAzurecrResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetServiceendpointAzurecrResult
err := ctx.Invoke("azuredevops:index/getServiceendpointAzurecr:getServiceendpointAzurecr", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getServiceendpointAzurecr.
type GetServiceendpointAzurecrArgs struct {
// The ID of the project.
ProjectId string `pulumi:"projectId"`
// the ID of the Service Endpoint.
ServiceEndpointId *string `pulumi:"serviceEndpointId"`
// the Name of the Service Endpoint.
//
// > **NOTE:** One of either `serviceEndpointId` or `serviceEndpointName` must be specified.
ServiceEndpointName *string `pulumi:"serviceEndpointName"`
}
// A collection of values returned by getServiceendpointAzurecr.
type GetServiceendpointAzurecrResult struct {
// The Object ID of the Service Principal.
AppObjectId string `pulumi:"appObjectId"`
// Specifies the Authorization Scheme Map.
Authorization map[string]string `pulumi:"authorization"`
// The ID of Service Principal Role Assignment.
AzSpnRoleAssignmentId string `pulumi:"azSpnRoleAssignmentId"`
// The Service Principal Role Permissions.
AzSpnRolePermissions string `pulumi:"azSpnRolePermissions"`
// The Azure Container Registry name.
AzurecrName string `pulumi:"azurecrName"`
// The Tenant ID of the service principal.
AzurecrSpnTenantid string `pulumi:"azurecrSpnTenantid"`
// The Subscription ID of the Azure targets.
AzurecrSubscriptionId string `pulumi:"azurecrSubscriptionId"`
// The Subscription Name of the Azure targets.
AzurecrSubscriptionName string `pulumi:"azurecrSubscriptionName"`
// The Service Endpoint description.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
ProjectId string `pulumi:"projectId"`
// The Resource Group to which the Container Registry belongs.
ResourceGroup string `pulumi:"resourceGroup"`
ServiceEndpointId string `pulumi:"serviceEndpointId"`
ServiceEndpointName string `pulumi:"serviceEndpointName"`
// The Application(Client) ID of the Service Principal.
ServicePrincipalId string `pulumi:"servicePrincipalId"`
// The ID of the Service Principal.
SpnObjectId string `pulumi:"spnObjectId"`
}
func GetServiceendpointAzurecrOutput(ctx *pulumi.Context, args GetServiceendpointAzurecrOutputArgs, opts ...pulumi.InvokeOption) GetServiceendpointAzurecrResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetServiceendpointAzurecrResult, error) {
args := v.(GetServiceendpointAzurecrArgs)
r, err := GetServiceendpointAzurecr(ctx, &args, opts...)
var s GetServiceendpointAzurecrResult
if r != nil {
s = *r
}
return s, err
}).(GetServiceendpointAzurecrResultOutput)
}
// A collection of arguments for invoking getServiceendpointAzurecr.
type GetServiceendpointAzurecrOutputArgs struct {
// The ID of the project.
ProjectId pulumi.StringInput `pulumi:"projectId"`
// the ID of the Service Endpoint.
ServiceEndpointId pulumi.StringPtrInput `pulumi:"serviceEndpointId"`
// the Name of the Service Endpoint.
//
// > **NOTE:** One of either `serviceEndpointId` or `serviceEndpointName` must be specified.
ServiceEndpointName pulumi.StringPtrInput `pulumi:"serviceEndpointName"`
}
func (GetServiceendpointAzurecrOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceendpointAzurecrArgs)(nil)).Elem()
}
// A collection of values returned by getServiceendpointAzurecr.
type GetServiceendpointAzurecrResultOutput struct{ *pulumi.OutputState }
func (GetServiceendpointAzurecrResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceendpointAzurecrResult)(nil)).Elem()
}
func (o GetServiceendpointAzurecrResultOutput) ToGetServiceendpointAzurecrResultOutput() GetServiceendpointAzurecrResultOutput {
return o
}
func (o GetServiceendpointAzurecrResultOutput) ToGetServiceendpointAzurecrResultOutputWithContext(ctx context.Context) GetServiceendpointAzurecrResultOutput {
return o
}
// The Object ID of the Service Principal.
func (o GetServiceendpointAzurecrResultOutput) AppObjectId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.AppObjectId }).(pulumi.StringOutput)
}
// Specifies the Authorization Scheme Map.
func (o GetServiceendpointAzurecrResultOutput) Authorization() pulumi.StringMapOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) map[string]string { return v.Authorization }).(pulumi.StringMapOutput)
}
// The ID of Service Principal Role Assignment.
func (o GetServiceendpointAzurecrResultOutput) AzSpnRoleAssignmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.AzSpnRoleAssignmentId }).(pulumi.StringOutput)
}
// The Service Principal Role Permissions.
func (o GetServiceendpointAzurecrResultOutput) AzSpnRolePermissions() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.AzSpnRolePermissions }).(pulumi.StringOutput)
}
// The Azure Container Registry name.
func (o GetServiceendpointAzurecrResultOutput) AzurecrName() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.AzurecrName }).(pulumi.StringOutput)
}
// The Tenant ID of the service principal.
func (o GetServiceendpointAzurecrResultOutput) AzurecrSpnTenantid() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.AzurecrSpnTenantid }).(pulumi.StringOutput)
}
// The Subscription ID of the Azure targets.
func (o GetServiceendpointAzurecrResultOutput) AzurecrSubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.AzurecrSubscriptionId }).(pulumi.StringOutput)
}
// The Subscription Name of the Azure targets.
func (o GetServiceendpointAzurecrResultOutput) AzurecrSubscriptionName() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.AzurecrSubscriptionName }).(pulumi.StringOutput)
}
// The Service Endpoint description.
func (o GetServiceendpointAzurecrResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.Description }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetServiceendpointAzurecrResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetServiceendpointAzurecrResultOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.ProjectId }).(pulumi.StringOutput)
}
// The Resource Group to which the Container Registry belongs.
func (o GetServiceendpointAzurecrResultOutput) ResourceGroup() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.ResourceGroup }).(pulumi.StringOutput)
}
func (o GetServiceendpointAzurecrResultOutput) ServiceEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.ServiceEndpointId }).(pulumi.StringOutput)
}
func (o GetServiceendpointAzurecrResultOutput) ServiceEndpointName() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.ServiceEndpointName }).(pulumi.StringOutput)
}
// The Application(Client) ID of the Service Principal.
func (o GetServiceendpointAzurecrResultOutput) ServicePrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.ServicePrincipalId }).(pulumi.StringOutput)
}
// The ID of the Service Principal.
func (o GetServiceendpointAzurecrResultOutput) SpnObjectId() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceendpointAzurecrResult) string { return v.SpnObjectId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetServiceendpointAzurecrResultOutput{})
}