github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/gamelift/matchmakingRuleSet.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 gamelift 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 GameLift Matchmaking Rule Set resources. 16 // 17 // ## Import 18 // 19 // GameLift Matchmaking Rule Sets can be imported using the ID, e.g., 20 // 21 // ```sh 22 // $ pulumi import aws:gamelift/matchmakingRuleSet:MatchmakingRuleSet example <ruleset-id> 23 // ``` 24 type MatchmakingRuleSet struct { 25 pulumi.CustomResourceState 26 27 // Rule Set ARN. 28 Arn pulumi.StringOutput `pulumi:"arn"` 29 // Name of the matchmaking rule set. 30 Name pulumi.StringOutput `pulumi:"name"` 31 // JSON encoded string containing rule set data. 32 RuleSetBody pulumi.StringOutput `pulumi:"ruleSetBody"` 33 Tags pulumi.StringMapOutput `pulumi:"tags"` 34 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 35 // 36 // Deprecated: Please use `tags` instead. 37 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 38 } 39 40 // NewMatchmakingRuleSet registers a new resource with the given unique name, arguments, and options. 41 func NewMatchmakingRuleSet(ctx *pulumi.Context, 42 name string, args *MatchmakingRuleSetArgs, opts ...pulumi.ResourceOption) (*MatchmakingRuleSet, error) { 43 if args == nil { 44 return nil, errors.New("missing one or more required arguments") 45 } 46 47 if args.RuleSetBody == nil { 48 return nil, errors.New("invalid value for required argument 'RuleSetBody'") 49 } 50 opts = internal.PkgResourceDefaultOpts(opts) 51 var resource MatchmakingRuleSet 52 err := ctx.RegisterResource("aws:gamelift/matchmakingRuleSet:MatchmakingRuleSet", name, args, &resource, opts...) 53 if err != nil { 54 return nil, err 55 } 56 return &resource, nil 57 } 58 59 // GetMatchmakingRuleSet gets an existing MatchmakingRuleSet resource's state with the given name, ID, and optional 60 // state properties that are used to uniquely qualify the lookup (nil if not required). 61 func GetMatchmakingRuleSet(ctx *pulumi.Context, 62 name string, id pulumi.IDInput, state *MatchmakingRuleSetState, opts ...pulumi.ResourceOption) (*MatchmakingRuleSet, error) { 63 var resource MatchmakingRuleSet 64 err := ctx.ReadResource("aws:gamelift/matchmakingRuleSet:MatchmakingRuleSet", name, id, state, &resource, opts...) 65 if err != nil { 66 return nil, err 67 } 68 return &resource, nil 69 } 70 71 // Input properties used for looking up and filtering MatchmakingRuleSet resources. 72 type matchmakingRuleSetState struct { 73 // Rule Set ARN. 74 Arn *string `pulumi:"arn"` 75 // Name of the matchmaking rule set. 76 Name *string `pulumi:"name"` 77 // JSON encoded string containing rule set data. 78 RuleSetBody *string `pulumi:"ruleSetBody"` 79 Tags map[string]string `pulumi:"tags"` 80 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 81 // 82 // Deprecated: Please use `tags` instead. 83 TagsAll map[string]string `pulumi:"tagsAll"` 84 } 85 86 type MatchmakingRuleSetState struct { 87 // Rule Set ARN. 88 Arn pulumi.StringPtrInput 89 // Name of the matchmaking rule set. 90 Name pulumi.StringPtrInput 91 // JSON encoded string containing rule set data. 92 RuleSetBody pulumi.StringPtrInput 93 Tags pulumi.StringMapInput 94 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 95 // 96 // Deprecated: Please use `tags` instead. 97 TagsAll pulumi.StringMapInput 98 } 99 100 func (MatchmakingRuleSetState) ElementType() reflect.Type { 101 return reflect.TypeOf((*matchmakingRuleSetState)(nil)).Elem() 102 } 103 104 type matchmakingRuleSetArgs struct { 105 // Name of the matchmaking rule set. 106 Name *string `pulumi:"name"` 107 // JSON encoded string containing rule set data. 108 RuleSetBody string `pulumi:"ruleSetBody"` 109 Tags map[string]string `pulumi:"tags"` 110 } 111 112 // The set of arguments for constructing a MatchmakingRuleSet resource. 113 type MatchmakingRuleSetArgs struct { 114 // Name of the matchmaking rule set. 115 Name pulumi.StringPtrInput 116 // JSON encoded string containing rule set data. 117 RuleSetBody pulumi.StringInput 118 Tags pulumi.StringMapInput 119 } 120 121 func (MatchmakingRuleSetArgs) ElementType() reflect.Type { 122 return reflect.TypeOf((*matchmakingRuleSetArgs)(nil)).Elem() 123 } 124 125 type MatchmakingRuleSetInput interface { 126 pulumi.Input 127 128 ToMatchmakingRuleSetOutput() MatchmakingRuleSetOutput 129 ToMatchmakingRuleSetOutputWithContext(ctx context.Context) MatchmakingRuleSetOutput 130 } 131 132 func (*MatchmakingRuleSet) ElementType() reflect.Type { 133 return reflect.TypeOf((**MatchmakingRuleSet)(nil)).Elem() 134 } 135 136 func (i *MatchmakingRuleSet) ToMatchmakingRuleSetOutput() MatchmakingRuleSetOutput { 137 return i.ToMatchmakingRuleSetOutputWithContext(context.Background()) 138 } 139 140 func (i *MatchmakingRuleSet) ToMatchmakingRuleSetOutputWithContext(ctx context.Context) MatchmakingRuleSetOutput { 141 return pulumi.ToOutputWithContext(ctx, i).(MatchmakingRuleSetOutput) 142 } 143 144 // MatchmakingRuleSetArrayInput is an input type that accepts MatchmakingRuleSetArray and MatchmakingRuleSetArrayOutput values. 145 // You can construct a concrete instance of `MatchmakingRuleSetArrayInput` via: 146 // 147 // MatchmakingRuleSetArray{ MatchmakingRuleSetArgs{...} } 148 type MatchmakingRuleSetArrayInput interface { 149 pulumi.Input 150 151 ToMatchmakingRuleSetArrayOutput() MatchmakingRuleSetArrayOutput 152 ToMatchmakingRuleSetArrayOutputWithContext(context.Context) MatchmakingRuleSetArrayOutput 153 } 154 155 type MatchmakingRuleSetArray []MatchmakingRuleSetInput 156 157 func (MatchmakingRuleSetArray) ElementType() reflect.Type { 158 return reflect.TypeOf((*[]*MatchmakingRuleSet)(nil)).Elem() 159 } 160 161 func (i MatchmakingRuleSetArray) ToMatchmakingRuleSetArrayOutput() MatchmakingRuleSetArrayOutput { 162 return i.ToMatchmakingRuleSetArrayOutputWithContext(context.Background()) 163 } 164 165 func (i MatchmakingRuleSetArray) ToMatchmakingRuleSetArrayOutputWithContext(ctx context.Context) MatchmakingRuleSetArrayOutput { 166 return pulumi.ToOutputWithContext(ctx, i).(MatchmakingRuleSetArrayOutput) 167 } 168 169 // MatchmakingRuleSetMapInput is an input type that accepts MatchmakingRuleSetMap and MatchmakingRuleSetMapOutput values. 170 // You can construct a concrete instance of `MatchmakingRuleSetMapInput` via: 171 // 172 // MatchmakingRuleSetMap{ "key": MatchmakingRuleSetArgs{...} } 173 type MatchmakingRuleSetMapInput interface { 174 pulumi.Input 175 176 ToMatchmakingRuleSetMapOutput() MatchmakingRuleSetMapOutput 177 ToMatchmakingRuleSetMapOutputWithContext(context.Context) MatchmakingRuleSetMapOutput 178 } 179 180 type MatchmakingRuleSetMap map[string]MatchmakingRuleSetInput 181 182 func (MatchmakingRuleSetMap) ElementType() reflect.Type { 183 return reflect.TypeOf((*map[string]*MatchmakingRuleSet)(nil)).Elem() 184 } 185 186 func (i MatchmakingRuleSetMap) ToMatchmakingRuleSetMapOutput() MatchmakingRuleSetMapOutput { 187 return i.ToMatchmakingRuleSetMapOutputWithContext(context.Background()) 188 } 189 190 func (i MatchmakingRuleSetMap) ToMatchmakingRuleSetMapOutputWithContext(ctx context.Context) MatchmakingRuleSetMapOutput { 191 return pulumi.ToOutputWithContext(ctx, i).(MatchmakingRuleSetMapOutput) 192 } 193 194 type MatchmakingRuleSetOutput struct{ *pulumi.OutputState } 195 196 func (MatchmakingRuleSetOutput) ElementType() reflect.Type { 197 return reflect.TypeOf((**MatchmakingRuleSet)(nil)).Elem() 198 } 199 200 func (o MatchmakingRuleSetOutput) ToMatchmakingRuleSetOutput() MatchmakingRuleSetOutput { 201 return o 202 } 203 204 func (o MatchmakingRuleSetOutput) ToMatchmakingRuleSetOutputWithContext(ctx context.Context) MatchmakingRuleSetOutput { 205 return o 206 } 207 208 // Rule Set ARN. 209 func (o MatchmakingRuleSetOutput) Arn() pulumi.StringOutput { 210 return o.ApplyT(func(v *MatchmakingRuleSet) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 211 } 212 213 // Name of the matchmaking rule set. 214 func (o MatchmakingRuleSetOutput) Name() pulumi.StringOutput { 215 return o.ApplyT(func(v *MatchmakingRuleSet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 216 } 217 218 // JSON encoded string containing rule set data. 219 func (o MatchmakingRuleSetOutput) RuleSetBody() pulumi.StringOutput { 220 return o.ApplyT(func(v *MatchmakingRuleSet) pulumi.StringOutput { return v.RuleSetBody }).(pulumi.StringOutput) 221 } 222 223 func (o MatchmakingRuleSetOutput) Tags() pulumi.StringMapOutput { 224 return o.ApplyT(func(v *MatchmakingRuleSet) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 225 } 226 227 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 228 // 229 // Deprecated: Please use `tags` instead. 230 func (o MatchmakingRuleSetOutput) TagsAll() pulumi.StringMapOutput { 231 return o.ApplyT(func(v *MatchmakingRuleSet) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 232 } 233 234 type MatchmakingRuleSetArrayOutput struct{ *pulumi.OutputState } 235 236 func (MatchmakingRuleSetArrayOutput) ElementType() reflect.Type { 237 return reflect.TypeOf((*[]*MatchmakingRuleSet)(nil)).Elem() 238 } 239 240 func (o MatchmakingRuleSetArrayOutput) ToMatchmakingRuleSetArrayOutput() MatchmakingRuleSetArrayOutput { 241 return o 242 } 243 244 func (o MatchmakingRuleSetArrayOutput) ToMatchmakingRuleSetArrayOutputWithContext(ctx context.Context) MatchmakingRuleSetArrayOutput { 245 return o 246 } 247 248 func (o MatchmakingRuleSetArrayOutput) Index(i pulumi.IntInput) MatchmakingRuleSetOutput { 249 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MatchmakingRuleSet { 250 return vs[0].([]*MatchmakingRuleSet)[vs[1].(int)] 251 }).(MatchmakingRuleSetOutput) 252 } 253 254 type MatchmakingRuleSetMapOutput struct{ *pulumi.OutputState } 255 256 func (MatchmakingRuleSetMapOutput) ElementType() reflect.Type { 257 return reflect.TypeOf((*map[string]*MatchmakingRuleSet)(nil)).Elem() 258 } 259 260 func (o MatchmakingRuleSetMapOutput) ToMatchmakingRuleSetMapOutput() MatchmakingRuleSetMapOutput { 261 return o 262 } 263 264 func (o MatchmakingRuleSetMapOutput) ToMatchmakingRuleSetMapOutputWithContext(ctx context.Context) MatchmakingRuleSetMapOutput { 265 return o 266 } 267 268 func (o MatchmakingRuleSetMapOutput) MapIndex(k pulumi.StringInput) MatchmakingRuleSetOutput { 269 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MatchmakingRuleSet { 270 return vs[0].(map[string]*MatchmakingRuleSet)[vs[1].(string)] 271 }).(MatchmakingRuleSetOutput) 272 } 273 274 func init() { 275 pulumi.RegisterInputType(reflect.TypeOf((*MatchmakingRuleSetInput)(nil)).Elem(), &MatchmakingRuleSet{}) 276 pulumi.RegisterInputType(reflect.TypeOf((*MatchmakingRuleSetArrayInput)(nil)).Elem(), MatchmakingRuleSetArray{}) 277 pulumi.RegisterInputType(reflect.TypeOf((*MatchmakingRuleSetMapInput)(nil)).Elem(), MatchmakingRuleSetMap{}) 278 pulumi.RegisterOutputType(MatchmakingRuleSetOutput{}) 279 pulumi.RegisterOutputType(MatchmakingRuleSetArrayOutput{}) 280 pulumi.RegisterOutputType(MatchmakingRuleSetMapOutput{}) 281 }