github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/directconnect/connectionConfirmation.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package directconnect 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a confirmation of the creation of the specified hosted connection on an interconnect. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := directconnect.NewConnectionConfirmation(ctx, "confirmation", &directconnect.ConnectionConfirmationArgs{ 33 // ConnectionId: pulumi.String("dxcon-ffabc123"), 34 // }) 35 // if err != nil { 36 // return err 37 // } 38 // return nil 39 // }) 40 // } 41 // 42 // ``` 43 // <!--End PulumiCodeChooser --> 44 type ConnectionConfirmation struct { 45 pulumi.CustomResourceState 46 47 // The ID of the hosted connection. 48 ConnectionId pulumi.StringOutput `pulumi:"connectionId"` 49 } 50 51 // NewConnectionConfirmation registers a new resource with the given unique name, arguments, and options. 52 func NewConnectionConfirmation(ctx *pulumi.Context, 53 name string, args *ConnectionConfirmationArgs, opts ...pulumi.ResourceOption) (*ConnectionConfirmation, error) { 54 if args == nil { 55 return nil, errors.New("missing one or more required arguments") 56 } 57 58 if args.ConnectionId == nil { 59 return nil, errors.New("invalid value for required argument 'ConnectionId'") 60 } 61 opts = internal.PkgResourceDefaultOpts(opts) 62 var resource ConnectionConfirmation 63 err := ctx.RegisterResource("aws:directconnect/connectionConfirmation:ConnectionConfirmation", name, args, &resource, opts...) 64 if err != nil { 65 return nil, err 66 } 67 return &resource, nil 68 } 69 70 // GetConnectionConfirmation gets an existing ConnectionConfirmation resource's state with the given name, ID, and optional 71 // state properties that are used to uniquely qualify the lookup (nil if not required). 72 func GetConnectionConfirmation(ctx *pulumi.Context, 73 name string, id pulumi.IDInput, state *ConnectionConfirmationState, opts ...pulumi.ResourceOption) (*ConnectionConfirmation, error) { 74 var resource ConnectionConfirmation 75 err := ctx.ReadResource("aws:directconnect/connectionConfirmation:ConnectionConfirmation", name, id, state, &resource, opts...) 76 if err != nil { 77 return nil, err 78 } 79 return &resource, nil 80 } 81 82 // Input properties used for looking up and filtering ConnectionConfirmation resources. 83 type connectionConfirmationState struct { 84 // The ID of the hosted connection. 85 ConnectionId *string `pulumi:"connectionId"` 86 } 87 88 type ConnectionConfirmationState struct { 89 // The ID of the hosted connection. 90 ConnectionId pulumi.StringPtrInput 91 } 92 93 func (ConnectionConfirmationState) ElementType() reflect.Type { 94 return reflect.TypeOf((*connectionConfirmationState)(nil)).Elem() 95 } 96 97 type connectionConfirmationArgs struct { 98 // The ID of the hosted connection. 99 ConnectionId string `pulumi:"connectionId"` 100 } 101 102 // The set of arguments for constructing a ConnectionConfirmation resource. 103 type ConnectionConfirmationArgs struct { 104 // The ID of the hosted connection. 105 ConnectionId pulumi.StringInput 106 } 107 108 func (ConnectionConfirmationArgs) ElementType() reflect.Type { 109 return reflect.TypeOf((*connectionConfirmationArgs)(nil)).Elem() 110 } 111 112 type ConnectionConfirmationInput interface { 113 pulumi.Input 114 115 ToConnectionConfirmationOutput() ConnectionConfirmationOutput 116 ToConnectionConfirmationOutputWithContext(ctx context.Context) ConnectionConfirmationOutput 117 } 118 119 func (*ConnectionConfirmation) ElementType() reflect.Type { 120 return reflect.TypeOf((**ConnectionConfirmation)(nil)).Elem() 121 } 122 123 func (i *ConnectionConfirmation) ToConnectionConfirmationOutput() ConnectionConfirmationOutput { 124 return i.ToConnectionConfirmationOutputWithContext(context.Background()) 125 } 126 127 func (i *ConnectionConfirmation) ToConnectionConfirmationOutputWithContext(ctx context.Context) ConnectionConfirmationOutput { 128 return pulumi.ToOutputWithContext(ctx, i).(ConnectionConfirmationOutput) 129 } 130 131 // ConnectionConfirmationArrayInput is an input type that accepts ConnectionConfirmationArray and ConnectionConfirmationArrayOutput values. 132 // You can construct a concrete instance of `ConnectionConfirmationArrayInput` via: 133 // 134 // ConnectionConfirmationArray{ ConnectionConfirmationArgs{...} } 135 type ConnectionConfirmationArrayInput interface { 136 pulumi.Input 137 138 ToConnectionConfirmationArrayOutput() ConnectionConfirmationArrayOutput 139 ToConnectionConfirmationArrayOutputWithContext(context.Context) ConnectionConfirmationArrayOutput 140 } 141 142 type ConnectionConfirmationArray []ConnectionConfirmationInput 143 144 func (ConnectionConfirmationArray) ElementType() reflect.Type { 145 return reflect.TypeOf((*[]*ConnectionConfirmation)(nil)).Elem() 146 } 147 148 func (i ConnectionConfirmationArray) ToConnectionConfirmationArrayOutput() ConnectionConfirmationArrayOutput { 149 return i.ToConnectionConfirmationArrayOutputWithContext(context.Background()) 150 } 151 152 func (i ConnectionConfirmationArray) ToConnectionConfirmationArrayOutputWithContext(ctx context.Context) ConnectionConfirmationArrayOutput { 153 return pulumi.ToOutputWithContext(ctx, i).(ConnectionConfirmationArrayOutput) 154 } 155 156 // ConnectionConfirmationMapInput is an input type that accepts ConnectionConfirmationMap and ConnectionConfirmationMapOutput values. 157 // You can construct a concrete instance of `ConnectionConfirmationMapInput` via: 158 // 159 // ConnectionConfirmationMap{ "key": ConnectionConfirmationArgs{...} } 160 type ConnectionConfirmationMapInput interface { 161 pulumi.Input 162 163 ToConnectionConfirmationMapOutput() ConnectionConfirmationMapOutput 164 ToConnectionConfirmationMapOutputWithContext(context.Context) ConnectionConfirmationMapOutput 165 } 166 167 type ConnectionConfirmationMap map[string]ConnectionConfirmationInput 168 169 func (ConnectionConfirmationMap) ElementType() reflect.Type { 170 return reflect.TypeOf((*map[string]*ConnectionConfirmation)(nil)).Elem() 171 } 172 173 func (i ConnectionConfirmationMap) ToConnectionConfirmationMapOutput() ConnectionConfirmationMapOutput { 174 return i.ToConnectionConfirmationMapOutputWithContext(context.Background()) 175 } 176 177 func (i ConnectionConfirmationMap) ToConnectionConfirmationMapOutputWithContext(ctx context.Context) ConnectionConfirmationMapOutput { 178 return pulumi.ToOutputWithContext(ctx, i).(ConnectionConfirmationMapOutput) 179 } 180 181 type ConnectionConfirmationOutput struct{ *pulumi.OutputState } 182 183 func (ConnectionConfirmationOutput) ElementType() reflect.Type { 184 return reflect.TypeOf((**ConnectionConfirmation)(nil)).Elem() 185 } 186 187 func (o ConnectionConfirmationOutput) ToConnectionConfirmationOutput() ConnectionConfirmationOutput { 188 return o 189 } 190 191 func (o ConnectionConfirmationOutput) ToConnectionConfirmationOutputWithContext(ctx context.Context) ConnectionConfirmationOutput { 192 return o 193 } 194 195 // The ID of the hosted connection. 196 func (o ConnectionConfirmationOutput) ConnectionId() pulumi.StringOutput { 197 return o.ApplyT(func(v *ConnectionConfirmation) pulumi.StringOutput { return v.ConnectionId }).(pulumi.StringOutput) 198 } 199 200 type ConnectionConfirmationArrayOutput struct{ *pulumi.OutputState } 201 202 func (ConnectionConfirmationArrayOutput) ElementType() reflect.Type { 203 return reflect.TypeOf((*[]*ConnectionConfirmation)(nil)).Elem() 204 } 205 206 func (o ConnectionConfirmationArrayOutput) ToConnectionConfirmationArrayOutput() ConnectionConfirmationArrayOutput { 207 return o 208 } 209 210 func (o ConnectionConfirmationArrayOutput) ToConnectionConfirmationArrayOutputWithContext(ctx context.Context) ConnectionConfirmationArrayOutput { 211 return o 212 } 213 214 func (o ConnectionConfirmationArrayOutput) Index(i pulumi.IntInput) ConnectionConfirmationOutput { 215 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConnectionConfirmation { 216 return vs[0].([]*ConnectionConfirmation)[vs[1].(int)] 217 }).(ConnectionConfirmationOutput) 218 } 219 220 type ConnectionConfirmationMapOutput struct{ *pulumi.OutputState } 221 222 func (ConnectionConfirmationMapOutput) ElementType() reflect.Type { 223 return reflect.TypeOf((*map[string]*ConnectionConfirmation)(nil)).Elem() 224 } 225 226 func (o ConnectionConfirmationMapOutput) ToConnectionConfirmationMapOutput() ConnectionConfirmationMapOutput { 227 return o 228 } 229 230 func (o ConnectionConfirmationMapOutput) ToConnectionConfirmationMapOutputWithContext(ctx context.Context) ConnectionConfirmationMapOutput { 231 return o 232 } 233 234 func (o ConnectionConfirmationMapOutput) MapIndex(k pulumi.StringInput) ConnectionConfirmationOutput { 235 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConnectionConfirmation { 236 return vs[0].(map[string]*ConnectionConfirmation)[vs[1].(string)] 237 }).(ConnectionConfirmationOutput) 238 } 239 240 func init() { 241 pulumi.RegisterInputType(reflect.TypeOf((*ConnectionConfirmationInput)(nil)).Elem(), &ConnectionConfirmation{}) 242 pulumi.RegisterInputType(reflect.TypeOf((*ConnectionConfirmationArrayInput)(nil)).Elem(), ConnectionConfirmationArray{}) 243 pulumi.RegisterInputType(reflect.TypeOf((*ConnectionConfirmationMapInput)(nil)).Elem(), ConnectionConfirmationMap{}) 244 pulumi.RegisterOutputType(ConnectionConfirmationOutput{}) 245 pulumi.RegisterOutputType(ConnectionConfirmationArrayOutput{}) 246 pulumi.RegisterOutputType(ConnectionConfirmationMapOutput{}) 247 }