forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getRegisteredAsn.go
124 lines (104 loc) · 4.56 KB
/
getRegisteredAsn.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package peering
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets an existing registered ASN with the specified name under the given subscription, resource group and peering.
// Azure REST API version: 2022-10-01.
func LookupRegisteredAsn(ctx *pulumi.Context, args *LookupRegisteredAsnArgs, opts ...pulumi.InvokeOption) (*LookupRegisteredAsnResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupRegisteredAsnResult
err := ctx.Invoke("azure-native:peering:getRegisteredAsn", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupRegisteredAsnArgs struct {
// The name of the peering.
PeeringName string `pulumi:"peeringName"`
// The name of the registered ASN.
RegisteredAsnName string `pulumi:"registeredAsnName"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The customer's ASN that is registered by the peering service provider.
type LookupRegisteredAsnResult struct {
// The customer's ASN from which traffic originates.
Asn *int `pulumi:"asn"`
// The ID of the resource.
Id string `pulumi:"id"`
// The name of the resource.
Name string `pulumi:"name"`
// The peering service prefix key that is to be shared with the customer.
PeeringServicePrefixKey string `pulumi:"peeringServicePrefixKey"`
// The provisioning state of the resource.
ProvisioningState string `pulumi:"provisioningState"`
// The type of the resource.
Type string `pulumi:"type"`
}
func LookupRegisteredAsnOutput(ctx *pulumi.Context, args LookupRegisteredAsnOutputArgs, opts ...pulumi.InvokeOption) LookupRegisteredAsnResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupRegisteredAsnResult, error) {
args := v.(LookupRegisteredAsnArgs)
r, err := LookupRegisteredAsn(ctx, &args, opts...)
var s LookupRegisteredAsnResult
if r != nil {
s = *r
}
return s, err
}).(LookupRegisteredAsnResultOutput)
}
type LookupRegisteredAsnOutputArgs struct {
// The name of the peering.
PeeringName pulumi.StringInput `pulumi:"peeringName"`
// The name of the registered ASN.
RegisteredAsnName pulumi.StringInput `pulumi:"registeredAsnName"`
// The name of the resource group.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupRegisteredAsnOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRegisteredAsnArgs)(nil)).Elem()
}
// The customer's ASN that is registered by the peering service provider.
type LookupRegisteredAsnResultOutput struct{ *pulumi.OutputState }
func (LookupRegisteredAsnResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRegisteredAsnResult)(nil)).Elem()
}
func (o LookupRegisteredAsnResultOutput) ToLookupRegisteredAsnResultOutput() LookupRegisteredAsnResultOutput {
return o
}
func (o LookupRegisteredAsnResultOutput) ToLookupRegisteredAsnResultOutputWithContext(ctx context.Context) LookupRegisteredAsnResultOutput {
return o
}
// The customer's ASN from which traffic originates.
func (o LookupRegisteredAsnResultOutput) Asn() pulumi.IntPtrOutput {
return o.ApplyT(func(v LookupRegisteredAsnResult) *int { return v.Asn }).(pulumi.IntPtrOutput)
}
// The ID of the resource.
func (o LookupRegisteredAsnResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegisteredAsnResult) string { return v.Id }).(pulumi.StringOutput)
}
// The name of the resource.
func (o LookupRegisteredAsnResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegisteredAsnResult) string { return v.Name }).(pulumi.StringOutput)
}
// The peering service prefix key that is to be shared with the customer.
func (o LookupRegisteredAsnResultOutput) PeeringServicePrefixKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegisteredAsnResult) string { return v.PeeringServicePrefixKey }).(pulumi.StringOutput)
}
// The provisioning state of the resource.
func (o LookupRegisteredAsnResultOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegisteredAsnResult) string { return v.ProvisioningState }).(pulumi.StringOutput)
}
// The type of the resource.
func (o LookupRegisteredAsnResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupRegisteredAsnResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupRegisteredAsnResultOutput{})
}