github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/codeguruprofiler/profilingGroup.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 codeguruprofiler 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 // Resource for managing an AWS CodeGuru Profiler Profiling Group. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codeguruprofiler" 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 := codeguruprofiler.NewProfilingGroup(ctx, "example", &codeguruprofiler.ProfilingGroupArgs{ 34 // Name: pulumi.String("example"), 35 // ComputePlatform: pulumi.String("Default"), 36 // AgentOrchestrationConfig: &codeguruprofiler.ProfilingGroupAgentOrchestrationConfigArgs{ 37 // ProfilingEnabled: pulumi.Bool(true), 38 // }, 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // return nil 44 // }) 45 // } 46 // 47 // ``` 48 // <!--End PulumiCodeChooser --> 49 // 50 // ## Import 51 // 52 // Using `pulumi import`, import CodeGuru Profiler Profiling Group using the `id`. For example: 53 // 54 // ```sh 55 // $ pulumi import aws:codeguruprofiler/profilingGroup:ProfilingGroup example profiling_group-name-12345678 56 // ``` 57 type ProfilingGroup struct { 58 pulumi.CustomResourceState 59 60 // Specifies whether profiling is enabled or disabled for the created profiling. See Agent Orchestration Config for more details. 61 AgentOrchestrationConfig ProfilingGroupAgentOrchestrationConfigPtrOutput `pulumi:"agentOrchestrationConfig"` 62 // ARN of the profiling group. 63 Arn pulumi.StringOutput `pulumi:"arn"` 64 // Compute platform of the profiling group. 65 ComputePlatform pulumi.StringOutput `pulumi:"computePlatform"` 66 // Name of the profiling group. 67 // 68 // The following arguments are optional: 69 Name pulumi.StringOutput `pulumi:"name"` 70 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 71 Tags pulumi.StringMapOutput `pulumi:"tags"` 72 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 73 // 74 // Deprecated: Please use `tags` instead. 75 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 76 } 77 78 // NewProfilingGroup registers a new resource with the given unique name, arguments, and options. 79 func NewProfilingGroup(ctx *pulumi.Context, 80 name string, args *ProfilingGroupArgs, opts ...pulumi.ResourceOption) (*ProfilingGroup, error) { 81 if args == nil { 82 args = &ProfilingGroupArgs{} 83 } 84 85 opts = internal.PkgResourceDefaultOpts(opts) 86 var resource ProfilingGroup 87 err := ctx.RegisterResource("aws:codeguruprofiler/profilingGroup:ProfilingGroup", name, args, &resource, opts...) 88 if err != nil { 89 return nil, err 90 } 91 return &resource, nil 92 } 93 94 // GetProfilingGroup gets an existing ProfilingGroup resource's state with the given name, ID, and optional 95 // state properties that are used to uniquely qualify the lookup (nil if not required). 96 func GetProfilingGroup(ctx *pulumi.Context, 97 name string, id pulumi.IDInput, state *ProfilingGroupState, opts ...pulumi.ResourceOption) (*ProfilingGroup, error) { 98 var resource ProfilingGroup 99 err := ctx.ReadResource("aws:codeguruprofiler/profilingGroup:ProfilingGroup", name, id, state, &resource, opts...) 100 if err != nil { 101 return nil, err 102 } 103 return &resource, nil 104 } 105 106 // Input properties used for looking up and filtering ProfilingGroup resources. 107 type profilingGroupState struct { 108 // Specifies whether profiling is enabled or disabled for the created profiling. See Agent Orchestration Config for more details. 109 AgentOrchestrationConfig *ProfilingGroupAgentOrchestrationConfig `pulumi:"agentOrchestrationConfig"` 110 // ARN of the profiling group. 111 Arn *string `pulumi:"arn"` 112 // Compute platform of the profiling group. 113 ComputePlatform *string `pulumi:"computePlatform"` 114 // Name of the profiling group. 115 // 116 // The following arguments are optional: 117 Name *string `pulumi:"name"` 118 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 119 Tags map[string]string `pulumi:"tags"` 120 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 121 // 122 // Deprecated: Please use `tags` instead. 123 TagsAll map[string]string `pulumi:"tagsAll"` 124 } 125 126 type ProfilingGroupState struct { 127 // Specifies whether profiling is enabled or disabled for the created profiling. See Agent Orchestration Config for more details. 128 AgentOrchestrationConfig ProfilingGroupAgentOrchestrationConfigPtrInput 129 // ARN of the profiling group. 130 Arn pulumi.StringPtrInput 131 // Compute platform of the profiling group. 132 ComputePlatform pulumi.StringPtrInput 133 // Name of the profiling group. 134 // 135 // The following arguments are optional: 136 Name pulumi.StringPtrInput 137 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 138 Tags pulumi.StringMapInput 139 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 140 // 141 // Deprecated: Please use `tags` instead. 142 TagsAll pulumi.StringMapInput 143 } 144 145 func (ProfilingGroupState) ElementType() reflect.Type { 146 return reflect.TypeOf((*profilingGroupState)(nil)).Elem() 147 } 148 149 type profilingGroupArgs struct { 150 // Specifies whether profiling is enabled or disabled for the created profiling. See Agent Orchestration Config for more details. 151 AgentOrchestrationConfig *ProfilingGroupAgentOrchestrationConfig `pulumi:"agentOrchestrationConfig"` 152 // Compute platform of the profiling group. 153 ComputePlatform *string `pulumi:"computePlatform"` 154 // Name of the profiling group. 155 // 156 // The following arguments are optional: 157 Name *string `pulumi:"name"` 158 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 159 Tags map[string]string `pulumi:"tags"` 160 } 161 162 // The set of arguments for constructing a ProfilingGroup resource. 163 type ProfilingGroupArgs struct { 164 // Specifies whether profiling is enabled or disabled for the created profiling. See Agent Orchestration Config for more details. 165 AgentOrchestrationConfig ProfilingGroupAgentOrchestrationConfigPtrInput 166 // Compute platform of the profiling group. 167 ComputePlatform pulumi.StringPtrInput 168 // Name of the profiling group. 169 // 170 // The following arguments are optional: 171 Name pulumi.StringPtrInput 172 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 173 Tags pulumi.StringMapInput 174 } 175 176 func (ProfilingGroupArgs) ElementType() reflect.Type { 177 return reflect.TypeOf((*profilingGroupArgs)(nil)).Elem() 178 } 179 180 type ProfilingGroupInput interface { 181 pulumi.Input 182 183 ToProfilingGroupOutput() ProfilingGroupOutput 184 ToProfilingGroupOutputWithContext(ctx context.Context) ProfilingGroupOutput 185 } 186 187 func (*ProfilingGroup) ElementType() reflect.Type { 188 return reflect.TypeOf((**ProfilingGroup)(nil)).Elem() 189 } 190 191 func (i *ProfilingGroup) ToProfilingGroupOutput() ProfilingGroupOutput { 192 return i.ToProfilingGroupOutputWithContext(context.Background()) 193 } 194 195 func (i *ProfilingGroup) ToProfilingGroupOutputWithContext(ctx context.Context) ProfilingGroupOutput { 196 return pulumi.ToOutputWithContext(ctx, i).(ProfilingGroupOutput) 197 } 198 199 // ProfilingGroupArrayInput is an input type that accepts ProfilingGroupArray and ProfilingGroupArrayOutput values. 200 // You can construct a concrete instance of `ProfilingGroupArrayInput` via: 201 // 202 // ProfilingGroupArray{ ProfilingGroupArgs{...} } 203 type ProfilingGroupArrayInput interface { 204 pulumi.Input 205 206 ToProfilingGroupArrayOutput() ProfilingGroupArrayOutput 207 ToProfilingGroupArrayOutputWithContext(context.Context) ProfilingGroupArrayOutput 208 } 209 210 type ProfilingGroupArray []ProfilingGroupInput 211 212 func (ProfilingGroupArray) ElementType() reflect.Type { 213 return reflect.TypeOf((*[]*ProfilingGroup)(nil)).Elem() 214 } 215 216 func (i ProfilingGroupArray) ToProfilingGroupArrayOutput() ProfilingGroupArrayOutput { 217 return i.ToProfilingGroupArrayOutputWithContext(context.Background()) 218 } 219 220 func (i ProfilingGroupArray) ToProfilingGroupArrayOutputWithContext(ctx context.Context) ProfilingGroupArrayOutput { 221 return pulumi.ToOutputWithContext(ctx, i).(ProfilingGroupArrayOutput) 222 } 223 224 // ProfilingGroupMapInput is an input type that accepts ProfilingGroupMap and ProfilingGroupMapOutput values. 225 // You can construct a concrete instance of `ProfilingGroupMapInput` via: 226 // 227 // ProfilingGroupMap{ "key": ProfilingGroupArgs{...} } 228 type ProfilingGroupMapInput interface { 229 pulumi.Input 230 231 ToProfilingGroupMapOutput() ProfilingGroupMapOutput 232 ToProfilingGroupMapOutputWithContext(context.Context) ProfilingGroupMapOutput 233 } 234 235 type ProfilingGroupMap map[string]ProfilingGroupInput 236 237 func (ProfilingGroupMap) ElementType() reflect.Type { 238 return reflect.TypeOf((*map[string]*ProfilingGroup)(nil)).Elem() 239 } 240 241 func (i ProfilingGroupMap) ToProfilingGroupMapOutput() ProfilingGroupMapOutput { 242 return i.ToProfilingGroupMapOutputWithContext(context.Background()) 243 } 244 245 func (i ProfilingGroupMap) ToProfilingGroupMapOutputWithContext(ctx context.Context) ProfilingGroupMapOutput { 246 return pulumi.ToOutputWithContext(ctx, i).(ProfilingGroupMapOutput) 247 } 248 249 type ProfilingGroupOutput struct{ *pulumi.OutputState } 250 251 func (ProfilingGroupOutput) ElementType() reflect.Type { 252 return reflect.TypeOf((**ProfilingGroup)(nil)).Elem() 253 } 254 255 func (o ProfilingGroupOutput) ToProfilingGroupOutput() ProfilingGroupOutput { 256 return o 257 } 258 259 func (o ProfilingGroupOutput) ToProfilingGroupOutputWithContext(ctx context.Context) ProfilingGroupOutput { 260 return o 261 } 262 263 // Specifies whether profiling is enabled or disabled for the created profiling. See Agent Orchestration Config for more details. 264 func (o ProfilingGroupOutput) AgentOrchestrationConfig() ProfilingGroupAgentOrchestrationConfigPtrOutput { 265 return o.ApplyT(func(v *ProfilingGroup) ProfilingGroupAgentOrchestrationConfigPtrOutput { 266 return v.AgentOrchestrationConfig 267 }).(ProfilingGroupAgentOrchestrationConfigPtrOutput) 268 } 269 270 // ARN of the profiling group. 271 func (o ProfilingGroupOutput) Arn() pulumi.StringOutput { 272 return o.ApplyT(func(v *ProfilingGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 273 } 274 275 // Compute platform of the profiling group. 276 func (o ProfilingGroupOutput) ComputePlatform() pulumi.StringOutput { 277 return o.ApplyT(func(v *ProfilingGroup) pulumi.StringOutput { return v.ComputePlatform }).(pulumi.StringOutput) 278 } 279 280 // Name of the profiling group. 281 // 282 // The following arguments are optional: 283 func (o ProfilingGroupOutput) Name() pulumi.StringOutput { 284 return o.ApplyT(func(v *ProfilingGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 285 } 286 287 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 288 func (o ProfilingGroupOutput) Tags() pulumi.StringMapOutput { 289 return o.ApplyT(func(v *ProfilingGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 290 } 291 292 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 293 // 294 // Deprecated: Please use `tags` instead. 295 func (o ProfilingGroupOutput) TagsAll() pulumi.StringMapOutput { 296 return o.ApplyT(func(v *ProfilingGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 297 } 298 299 type ProfilingGroupArrayOutput struct{ *pulumi.OutputState } 300 301 func (ProfilingGroupArrayOutput) ElementType() reflect.Type { 302 return reflect.TypeOf((*[]*ProfilingGroup)(nil)).Elem() 303 } 304 305 func (o ProfilingGroupArrayOutput) ToProfilingGroupArrayOutput() ProfilingGroupArrayOutput { 306 return o 307 } 308 309 func (o ProfilingGroupArrayOutput) ToProfilingGroupArrayOutputWithContext(ctx context.Context) ProfilingGroupArrayOutput { 310 return o 311 } 312 313 func (o ProfilingGroupArrayOutput) Index(i pulumi.IntInput) ProfilingGroupOutput { 314 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProfilingGroup { 315 return vs[0].([]*ProfilingGroup)[vs[1].(int)] 316 }).(ProfilingGroupOutput) 317 } 318 319 type ProfilingGroupMapOutput struct{ *pulumi.OutputState } 320 321 func (ProfilingGroupMapOutput) ElementType() reflect.Type { 322 return reflect.TypeOf((*map[string]*ProfilingGroup)(nil)).Elem() 323 } 324 325 func (o ProfilingGroupMapOutput) ToProfilingGroupMapOutput() ProfilingGroupMapOutput { 326 return o 327 } 328 329 func (o ProfilingGroupMapOutput) ToProfilingGroupMapOutputWithContext(ctx context.Context) ProfilingGroupMapOutput { 330 return o 331 } 332 333 func (o ProfilingGroupMapOutput) MapIndex(k pulumi.StringInput) ProfilingGroupOutput { 334 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProfilingGroup { 335 return vs[0].(map[string]*ProfilingGroup)[vs[1].(string)] 336 }).(ProfilingGroupOutput) 337 } 338 339 func init() { 340 pulumi.RegisterInputType(reflect.TypeOf((*ProfilingGroupInput)(nil)).Elem(), &ProfilingGroup{}) 341 pulumi.RegisterInputType(reflect.TypeOf((*ProfilingGroupArrayInput)(nil)).Elem(), ProfilingGroupArray{}) 342 pulumi.RegisterInputType(reflect.TypeOf((*ProfilingGroupMapInput)(nil)).Elem(), ProfilingGroupMap{}) 343 pulumi.RegisterOutputType(ProfilingGroupOutput{}) 344 pulumi.RegisterOutputType(ProfilingGroupArrayOutput{}) 345 pulumi.RegisterOutputType(ProfilingGroupMapOutput{}) 346 }