/
getVpcCidrBlock.go
82 lines (67 loc) · 2.5 KB
/
getVpcCidrBlock.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package ec2
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource Type definition for AWS::EC2::VPCCidrBlock
func LookupVpcCidrBlock(ctx *pulumi.Context, args *LookupVpcCidrBlockArgs, opts ...pulumi.InvokeOption) (*LookupVpcCidrBlockResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupVpcCidrBlockResult
err := ctx.Invoke("aws-native:ec2:getVpcCidrBlock", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupVpcCidrBlockArgs struct {
// The Id of the VPC associated CIDR Block.
Id string `pulumi:"id"`
// The ID of the VPC.
VpcId string `pulumi:"vpcId"`
}
type LookupVpcCidrBlockResult struct {
// The Id of the VPC associated CIDR Block.
Id *string `pulumi:"id"`
}
func LookupVpcCidrBlockOutput(ctx *pulumi.Context, args LookupVpcCidrBlockOutputArgs, opts ...pulumi.InvokeOption) LookupVpcCidrBlockResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupVpcCidrBlockResult, error) {
args := v.(LookupVpcCidrBlockArgs)
r, err := LookupVpcCidrBlock(ctx, &args, opts...)
var s LookupVpcCidrBlockResult
if r != nil {
s = *r
}
return s, err
}).(LookupVpcCidrBlockResultOutput)
}
type LookupVpcCidrBlockOutputArgs struct {
// The Id of the VPC associated CIDR Block.
Id pulumi.StringInput `pulumi:"id"`
// The ID of the VPC.
VpcId pulumi.StringInput `pulumi:"vpcId"`
}
func (LookupVpcCidrBlockOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVpcCidrBlockArgs)(nil)).Elem()
}
type LookupVpcCidrBlockResultOutput struct{ *pulumi.OutputState }
func (LookupVpcCidrBlockResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVpcCidrBlockResult)(nil)).Elem()
}
func (o LookupVpcCidrBlockResultOutput) ToLookupVpcCidrBlockResultOutput() LookupVpcCidrBlockResultOutput {
return o
}
func (o LookupVpcCidrBlockResultOutput) ToLookupVpcCidrBlockResultOutputWithContext(ctx context.Context) LookupVpcCidrBlockResultOutput {
return o
}
// The Id of the VPC associated CIDR Block.
func (o LookupVpcCidrBlockResultOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupVpcCidrBlockResult) *string { return v.Id }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupVpcCidrBlockResultOutput{})
}