github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/schemas/registry.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 schemas 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides an EventBridge Custom Schema Registry resource. 15 // 16 // > **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/schemas" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := schemas.NewRegistry(ctx, "test", &schemas.RegistryArgs{ 34 // Name: pulumi.String("my_own_registry"), 35 // Description: pulumi.String("A custom schema registry"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 // 47 // ## Import 48 // 49 // Using `pulumi import`, import EventBridge schema registries using the `name`. For example: 50 // 51 // ```sh 52 // $ pulumi import aws:schemas/registry:Registry test my_own_registry 53 // ``` 54 type Registry struct { 55 pulumi.CustomResourceState 56 57 // The Amazon Resource Name (ARN) of the discoverer. 58 Arn pulumi.StringOutput `pulumi:"arn"` 59 // The description of the discoverer. Maximum of 256 characters. 60 Description pulumi.StringPtrOutput `pulumi:"description"` 61 // The name of the custom event schema registry. Maximum of 64 characters consisting of lower case letters, upper case letters, 0-9, ., -, _. 62 Name pulumi.StringOutput `pulumi:"name"` 63 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 64 Tags pulumi.StringMapOutput `pulumi:"tags"` 65 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 66 // 67 // Deprecated: Please use `tags` instead. 68 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 69 } 70 71 // NewRegistry registers a new resource with the given unique name, arguments, and options. 72 func NewRegistry(ctx *pulumi.Context, 73 name string, args *RegistryArgs, opts ...pulumi.ResourceOption) (*Registry, error) { 74 if args == nil { 75 args = &RegistryArgs{} 76 } 77 78 opts = internal.PkgResourceDefaultOpts(opts) 79 var resource Registry 80 err := ctx.RegisterResource("aws:schemas/registry:Registry", name, args, &resource, opts...) 81 if err != nil { 82 return nil, err 83 } 84 return &resource, nil 85 } 86 87 // GetRegistry gets an existing Registry resource's state with the given name, ID, and optional 88 // state properties that are used to uniquely qualify the lookup (nil if not required). 89 func GetRegistry(ctx *pulumi.Context, 90 name string, id pulumi.IDInput, state *RegistryState, opts ...pulumi.ResourceOption) (*Registry, error) { 91 var resource Registry 92 err := ctx.ReadResource("aws:schemas/registry:Registry", name, id, state, &resource, opts...) 93 if err != nil { 94 return nil, err 95 } 96 return &resource, nil 97 } 98 99 // Input properties used for looking up and filtering Registry resources. 100 type registryState struct { 101 // The Amazon Resource Name (ARN) of the discoverer. 102 Arn *string `pulumi:"arn"` 103 // The description of the discoverer. Maximum of 256 characters. 104 Description *string `pulumi:"description"` 105 // The name of the custom event schema registry. Maximum of 64 characters consisting of lower case letters, upper case letters, 0-9, ., -, _. 106 Name *string `pulumi:"name"` 107 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 108 Tags map[string]string `pulumi:"tags"` 109 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 110 // 111 // Deprecated: Please use `tags` instead. 112 TagsAll map[string]string `pulumi:"tagsAll"` 113 } 114 115 type RegistryState struct { 116 // The Amazon Resource Name (ARN) of the discoverer. 117 Arn pulumi.StringPtrInput 118 // The description of the discoverer. Maximum of 256 characters. 119 Description pulumi.StringPtrInput 120 // The name of the custom event schema registry. Maximum of 64 characters consisting of lower case letters, upper case letters, 0-9, ., -, _. 121 Name pulumi.StringPtrInput 122 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 123 Tags pulumi.StringMapInput 124 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 125 // 126 // Deprecated: Please use `tags` instead. 127 TagsAll pulumi.StringMapInput 128 } 129 130 func (RegistryState) ElementType() reflect.Type { 131 return reflect.TypeOf((*registryState)(nil)).Elem() 132 } 133 134 type registryArgs struct { 135 // The description of the discoverer. Maximum of 256 characters. 136 Description *string `pulumi:"description"` 137 // The name of the custom event schema registry. Maximum of 64 characters consisting of lower case letters, upper case letters, 0-9, ., -, _. 138 Name *string `pulumi:"name"` 139 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 140 Tags map[string]string `pulumi:"tags"` 141 } 142 143 // The set of arguments for constructing a Registry resource. 144 type RegistryArgs struct { 145 // The description of the discoverer. Maximum of 256 characters. 146 Description pulumi.StringPtrInput 147 // The name of the custom event schema registry. Maximum of 64 characters consisting of lower case letters, upper case letters, 0-9, ., -, _. 148 Name pulumi.StringPtrInput 149 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 150 Tags pulumi.StringMapInput 151 } 152 153 func (RegistryArgs) ElementType() reflect.Type { 154 return reflect.TypeOf((*registryArgs)(nil)).Elem() 155 } 156 157 type RegistryInput interface { 158 pulumi.Input 159 160 ToRegistryOutput() RegistryOutput 161 ToRegistryOutputWithContext(ctx context.Context) RegistryOutput 162 } 163 164 func (*Registry) ElementType() reflect.Type { 165 return reflect.TypeOf((**Registry)(nil)).Elem() 166 } 167 168 func (i *Registry) ToRegistryOutput() RegistryOutput { 169 return i.ToRegistryOutputWithContext(context.Background()) 170 } 171 172 func (i *Registry) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput { 173 return pulumi.ToOutputWithContext(ctx, i).(RegistryOutput) 174 } 175 176 // RegistryArrayInput is an input type that accepts RegistryArray and RegistryArrayOutput values. 177 // You can construct a concrete instance of `RegistryArrayInput` via: 178 // 179 // RegistryArray{ RegistryArgs{...} } 180 type RegistryArrayInput interface { 181 pulumi.Input 182 183 ToRegistryArrayOutput() RegistryArrayOutput 184 ToRegistryArrayOutputWithContext(context.Context) RegistryArrayOutput 185 } 186 187 type RegistryArray []RegistryInput 188 189 func (RegistryArray) ElementType() reflect.Type { 190 return reflect.TypeOf((*[]*Registry)(nil)).Elem() 191 } 192 193 func (i RegistryArray) ToRegistryArrayOutput() RegistryArrayOutput { 194 return i.ToRegistryArrayOutputWithContext(context.Background()) 195 } 196 197 func (i RegistryArray) ToRegistryArrayOutputWithContext(ctx context.Context) RegistryArrayOutput { 198 return pulumi.ToOutputWithContext(ctx, i).(RegistryArrayOutput) 199 } 200 201 // RegistryMapInput is an input type that accepts RegistryMap and RegistryMapOutput values. 202 // You can construct a concrete instance of `RegistryMapInput` via: 203 // 204 // RegistryMap{ "key": RegistryArgs{...} } 205 type RegistryMapInput interface { 206 pulumi.Input 207 208 ToRegistryMapOutput() RegistryMapOutput 209 ToRegistryMapOutputWithContext(context.Context) RegistryMapOutput 210 } 211 212 type RegistryMap map[string]RegistryInput 213 214 func (RegistryMap) ElementType() reflect.Type { 215 return reflect.TypeOf((*map[string]*Registry)(nil)).Elem() 216 } 217 218 func (i RegistryMap) ToRegistryMapOutput() RegistryMapOutput { 219 return i.ToRegistryMapOutputWithContext(context.Background()) 220 } 221 222 func (i RegistryMap) ToRegistryMapOutputWithContext(ctx context.Context) RegistryMapOutput { 223 return pulumi.ToOutputWithContext(ctx, i).(RegistryMapOutput) 224 } 225 226 type RegistryOutput struct{ *pulumi.OutputState } 227 228 func (RegistryOutput) ElementType() reflect.Type { 229 return reflect.TypeOf((**Registry)(nil)).Elem() 230 } 231 232 func (o RegistryOutput) ToRegistryOutput() RegistryOutput { 233 return o 234 } 235 236 func (o RegistryOutput) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput { 237 return o 238 } 239 240 // The Amazon Resource Name (ARN) of the discoverer. 241 func (o RegistryOutput) Arn() pulumi.StringOutput { 242 return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 243 } 244 245 // The description of the discoverer. Maximum of 256 characters. 246 func (o RegistryOutput) Description() pulumi.StringPtrOutput { 247 return o.ApplyT(func(v *Registry) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 248 } 249 250 // The name of the custom event schema registry. Maximum of 64 characters consisting of lower case letters, upper case letters, 0-9, ., -, _. 251 func (o RegistryOutput) Name() pulumi.StringOutput { 252 return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 253 } 254 255 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 256 func (o RegistryOutput) Tags() pulumi.StringMapOutput { 257 return o.ApplyT(func(v *Registry) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 258 } 259 260 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 261 // 262 // Deprecated: Please use `tags` instead. 263 func (o RegistryOutput) TagsAll() pulumi.StringMapOutput { 264 return o.ApplyT(func(v *Registry) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 265 } 266 267 type RegistryArrayOutput struct{ *pulumi.OutputState } 268 269 func (RegistryArrayOutput) ElementType() reflect.Type { 270 return reflect.TypeOf((*[]*Registry)(nil)).Elem() 271 } 272 273 func (o RegistryArrayOutput) ToRegistryArrayOutput() RegistryArrayOutput { 274 return o 275 } 276 277 func (o RegistryArrayOutput) ToRegistryArrayOutputWithContext(ctx context.Context) RegistryArrayOutput { 278 return o 279 } 280 281 func (o RegistryArrayOutput) Index(i pulumi.IntInput) RegistryOutput { 282 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Registry { 283 return vs[0].([]*Registry)[vs[1].(int)] 284 }).(RegistryOutput) 285 } 286 287 type RegistryMapOutput struct{ *pulumi.OutputState } 288 289 func (RegistryMapOutput) ElementType() reflect.Type { 290 return reflect.TypeOf((*map[string]*Registry)(nil)).Elem() 291 } 292 293 func (o RegistryMapOutput) ToRegistryMapOutput() RegistryMapOutput { 294 return o 295 } 296 297 func (o RegistryMapOutput) ToRegistryMapOutputWithContext(ctx context.Context) RegistryMapOutput { 298 return o 299 } 300 301 func (o RegistryMapOutput) MapIndex(k pulumi.StringInput) RegistryOutput { 302 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Registry { 303 return vs[0].(map[string]*Registry)[vs[1].(string)] 304 }).(RegistryOutput) 305 } 306 307 func init() { 308 pulumi.RegisterInputType(reflect.TypeOf((*RegistryInput)(nil)).Elem(), &Registry{}) 309 pulumi.RegisterInputType(reflect.TypeOf((*RegistryArrayInput)(nil)).Elem(), RegistryArray{}) 310 pulumi.RegisterInputType(reflect.TypeOf((*RegistryMapInput)(nil)).Elem(), RegistryMap{}) 311 pulumi.RegisterOutputType(RegistryOutput{}) 312 pulumi.RegisterOutputType(RegistryArrayOutput{}) 313 pulumi.RegisterOutputType(RegistryMapOutput{}) 314 }