github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53recoveryreadiness/cell.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 route53recoveryreadiness 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 an AWS Route 53 Recovery Readiness Cell. 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/route53recoveryreadiness" 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 := route53recoveryreadiness.NewCell(ctx, "example", &route53recoveryreadiness.CellArgs{ 33 // CellName: pulumi.String("us-west-2-failover-cell"), 34 // }) 35 // if err != nil { 36 // return err 37 // } 38 // return nil 39 // }) 40 // } 41 // 42 // ``` 43 // <!--End PulumiCodeChooser --> 44 // 45 // ## Import 46 // 47 // Using `pulumi import`, import Route53 Recovery Readiness cells using the cell name. For example: 48 // 49 // ```sh 50 // $ pulumi import aws:route53recoveryreadiness/cell:Cell us-west-2-failover-cell us-west-2-failover-cell 51 // ``` 52 type Cell struct { 53 pulumi.CustomResourceState 54 55 // ARN of the cell 56 Arn pulumi.StringOutput `pulumi:"arn"` 57 // Unique name describing the cell. 58 // 59 // The following arguments are optional: 60 CellName pulumi.StringOutput `pulumi:"cellName"` 61 // List of cell arns to add as nested fault domains within this cell. 62 Cells pulumi.StringArrayOutput `pulumi:"cells"` 63 // List of readiness scopes (recovery groups or cells) that contain this cell. 64 ParentReadinessScopes pulumi.StringArrayOutput `pulumi:"parentReadinessScopes"` 65 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 66 Tags pulumi.StringMapOutput `pulumi:"tags"` 67 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 68 // 69 // Deprecated: Please use `tags` instead. 70 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 71 } 72 73 // NewCell registers a new resource with the given unique name, arguments, and options. 74 func NewCell(ctx *pulumi.Context, 75 name string, args *CellArgs, opts ...pulumi.ResourceOption) (*Cell, error) { 76 if args == nil { 77 return nil, errors.New("missing one or more required arguments") 78 } 79 80 if args.CellName == nil { 81 return nil, errors.New("invalid value for required argument 'CellName'") 82 } 83 opts = internal.PkgResourceDefaultOpts(opts) 84 var resource Cell 85 err := ctx.RegisterResource("aws:route53recoveryreadiness/cell:Cell", name, args, &resource, opts...) 86 if err != nil { 87 return nil, err 88 } 89 return &resource, nil 90 } 91 92 // GetCell gets an existing Cell resource's state with the given name, ID, and optional 93 // state properties that are used to uniquely qualify the lookup (nil if not required). 94 func GetCell(ctx *pulumi.Context, 95 name string, id pulumi.IDInput, state *CellState, opts ...pulumi.ResourceOption) (*Cell, error) { 96 var resource Cell 97 err := ctx.ReadResource("aws:route53recoveryreadiness/cell:Cell", name, id, state, &resource, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return &resource, nil 102 } 103 104 // Input properties used for looking up and filtering Cell resources. 105 type cellState struct { 106 // ARN of the cell 107 Arn *string `pulumi:"arn"` 108 // Unique name describing the cell. 109 // 110 // The following arguments are optional: 111 CellName *string `pulumi:"cellName"` 112 // List of cell arns to add as nested fault domains within this cell. 113 Cells []string `pulumi:"cells"` 114 // List of readiness scopes (recovery groups or cells) that contain this cell. 115 ParentReadinessScopes []string `pulumi:"parentReadinessScopes"` 116 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 117 Tags map[string]string `pulumi:"tags"` 118 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 119 // 120 // Deprecated: Please use `tags` instead. 121 TagsAll map[string]string `pulumi:"tagsAll"` 122 } 123 124 type CellState struct { 125 // ARN of the cell 126 Arn pulumi.StringPtrInput 127 // Unique name describing the cell. 128 // 129 // The following arguments are optional: 130 CellName pulumi.StringPtrInput 131 // List of cell arns to add as nested fault domains within this cell. 132 Cells pulumi.StringArrayInput 133 // List of readiness scopes (recovery groups or cells) that contain this cell. 134 ParentReadinessScopes pulumi.StringArrayInput 135 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 136 Tags pulumi.StringMapInput 137 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 138 // 139 // Deprecated: Please use `tags` instead. 140 TagsAll pulumi.StringMapInput 141 } 142 143 func (CellState) ElementType() reflect.Type { 144 return reflect.TypeOf((*cellState)(nil)).Elem() 145 } 146 147 type cellArgs struct { 148 // Unique name describing the cell. 149 // 150 // The following arguments are optional: 151 CellName string `pulumi:"cellName"` 152 // List of cell arns to add as nested fault domains within this cell. 153 Cells []string `pulumi:"cells"` 154 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 155 Tags map[string]string `pulumi:"tags"` 156 } 157 158 // The set of arguments for constructing a Cell resource. 159 type CellArgs struct { 160 // Unique name describing the cell. 161 // 162 // The following arguments are optional: 163 CellName pulumi.StringInput 164 // List of cell arns to add as nested fault domains within this cell. 165 Cells pulumi.StringArrayInput 166 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 167 Tags pulumi.StringMapInput 168 } 169 170 func (CellArgs) ElementType() reflect.Type { 171 return reflect.TypeOf((*cellArgs)(nil)).Elem() 172 } 173 174 type CellInput interface { 175 pulumi.Input 176 177 ToCellOutput() CellOutput 178 ToCellOutputWithContext(ctx context.Context) CellOutput 179 } 180 181 func (*Cell) ElementType() reflect.Type { 182 return reflect.TypeOf((**Cell)(nil)).Elem() 183 } 184 185 func (i *Cell) ToCellOutput() CellOutput { 186 return i.ToCellOutputWithContext(context.Background()) 187 } 188 189 func (i *Cell) ToCellOutputWithContext(ctx context.Context) CellOutput { 190 return pulumi.ToOutputWithContext(ctx, i).(CellOutput) 191 } 192 193 // CellArrayInput is an input type that accepts CellArray and CellArrayOutput values. 194 // You can construct a concrete instance of `CellArrayInput` via: 195 // 196 // CellArray{ CellArgs{...} } 197 type CellArrayInput interface { 198 pulumi.Input 199 200 ToCellArrayOutput() CellArrayOutput 201 ToCellArrayOutputWithContext(context.Context) CellArrayOutput 202 } 203 204 type CellArray []CellInput 205 206 func (CellArray) ElementType() reflect.Type { 207 return reflect.TypeOf((*[]*Cell)(nil)).Elem() 208 } 209 210 func (i CellArray) ToCellArrayOutput() CellArrayOutput { 211 return i.ToCellArrayOutputWithContext(context.Background()) 212 } 213 214 func (i CellArray) ToCellArrayOutputWithContext(ctx context.Context) CellArrayOutput { 215 return pulumi.ToOutputWithContext(ctx, i).(CellArrayOutput) 216 } 217 218 // CellMapInput is an input type that accepts CellMap and CellMapOutput values. 219 // You can construct a concrete instance of `CellMapInput` via: 220 // 221 // CellMap{ "key": CellArgs{...} } 222 type CellMapInput interface { 223 pulumi.Input 224 225 ToCellMapOutput() CellMapOutput 226 ToCellMapOutputWithContext(context.Context) CellMapOutput 227 } 228 229 type CellMap map[string]CellInput 230 231 func (CellMap) ElementType() reflect.Type { 232 return reflect.TypeOf((*map[string]*Cell)(nil)).Elem() 233 } 234 235 func (i CellMap) ToCellMapOutput() CellMapOutput { 236 return i.ToCellMapOutputWithContext(context.Background()) 237 } 238 239 func (i CellMap) ToCellMapOutputWithContext(ctx context.Context) CellMapOutput { 240 return pulumi.ToOutputWithContext(ctx, i).(CellMapOutput) 241 } 242 243 type CellOutput struct{ *pulumi.OutputState } 244 245 func (CellOutput) ElementType() reflect.Type { 246 return reflect.TypeOf((**Cell)(nil)).Elem() 247 } 248 249 func (o CellOutput) ToCellOutput() CellOutput { 250 return o 251 } 252 253 func (o CellOutput) ToCellOutputWithContext(ctx context.Context) CellOutput { 254 return o 255 } 256 257 // ARN of the cell 258 func (o CellOutput) Arn() pulumi.StringOutput { 259 return o.ApplyT(func(v *Cell) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 260 } 261 262 // Unique name describing the cell. 263 // 264 // The following arguments are optional: 265 func (o CellOutput) CellName() pulumi.StringOutput { 266 return o.ApplyT(func(v *Cell) pulumi.StringOutput { return v.CellName }).(pulumi.StringOutput) 267 } 268 269 // List of cell arns to add as nested fault domains within this cell. 270 func (o CellOutput) Cells() pulumi.StringArrayOutput { 271 return o.ApplyT(func(v *Cell) pulumi.StringArrayOutput { return v.Cells }).(pulumi.StringArrayOutput) 272 } 273 274 // List of readiness scopes (recovery groups or cells) that contain this cell. 275 func (o CellOutput) ParentReadinessScopes() pulumi.StringArrayOutput { 276 return o.ApplyT(func(v *Cell) pulumi.StringArrayOutput { return v.ParentReadinessScopes }).(pulumi.StringArrayOutput) 277 } 278 279 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 280 func (o CellOutput) Tags() pulumi.StringMapOutput { 281 return o.ApplyT(func(v *Cell) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 282 } 283 284 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 285 // 286 // Deprecated: Please use `tags` instead. 287 func (o CellOutput) TagsAll() pulumi.StringMapOutput { 288 return o.ApplyT(func(v *Cell) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 289 } 290 291 type CellArrayOutput struct{ *pulumi.OutputState } 292 293 func (CellArrayOutput) ElementType() reflect.Type { 294 return reflect.TypeOf((*[]*Cell)(nil)).Elem() 295 } 296 297 func (o CellArrayOutput) ToCellArrayOutput() CellArrayOutput { 298 return o 299 } 300 301 func (o CellArrayOutput) ToCellArrayOutputWithContext(ctx context.Context) CellArrayOutput { 302 return o 303 } 304 305 func (o CellArrayOutput) Index(i pulumi.IntInput) CellOutput { 306 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cell { 307 return vs[0].([]*Cell)[vs[1].(int)] 308 }).(CellOutput) 309 } 310 311 type CellMapOutput struct{ *pulumi.OutputState } 312 313 func (CellMapOutput) ElementType() reflect.Type { 314 return reflect.TypeOf((*map[string]*Cell)(nil)).Elem() 315 } 316 317 func (o CellMapOutput) ToCellMapOutput() CellMapOutput { 318 return o 319 } 320 321 func (o CellMapOutput) ToCellMapOutputWithContext(ctx context.Context) CellMapOutput { 322 return o 323 } 324 325 func (o CellMapOutput) MapIndex(k pulumi.StringInput) CellOutput { 326 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cell { 327 return vs[0].(map[string]*Cell)[vs[1].(string)] 328 }).(CellOutput) 329 } 330 331 func init() { 332 pulumi.RegisterInputType(reflect.TypeOf((*CellInput)(nil)).Elem(), &Cell{}) 333 pulumi.RegisterInputType(reflect.TypeOf((*CellArrayInput)(nil)).Elem(), CellArray{}) 334 pulumi.RegisterInputType(reflect.TypeOf((*CellMapInput)(nil)).Elem(), CellMap{}) 335 pulumi.RegisterOutputType(CellOutput{}) 336 pulumi.RegisterOutputType(CellArrayOutput{}) 337 pulumi.RegisterOutputType(CellMapOutput{}) 338 }