github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/auditmanager/assessmentReport.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 auditmanager
     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  // Resource for managing an AWS Audit Manager Assessment Report.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/auditmanager"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := auditmanager.NewAssessmentReport(ctx, "test", &auditmanager.AssessmentReportArgs{
    35  //				Name:         pulumi.String("example"),
    36  //				AssessmentId: pulumi.Any(testAwsAuditmanagerAssessment.Id),
    37  //			})
    38  //			if err != nil {
    39  //				return err
    40  //			}
    41  //			return nil
    42  //		})
    43  //	}
    44  //
    45  // ```
    46  // <!--End PulumiCodeChooser -->
    47  //
    48  // ## Import
    49  //
    50  // Using `pulumi import`, import Audit Manager Assessment Reports using the assessment report `id`. For example:
    51  //
    52  // ```sh
    53  // $ pulumi import aws:auditmanager/assessmentReport:AssessmentReport example abc123-de45
    54  // ```
    55  type AssessmentReport struct {
    56  	pulumi.CustomResourceState
    57  
    58  	// Unique identifier of the assessment to create the report from.
    59  	//
    60  	// The following arguments are optional:
    61  	AssessmentId pulumi.StringOutput `pulumi:"assessmentId"`
    62  	// Name of the user who created the assessment report.
    63  	Author pulumi.StringOutput `pulumi:"author"`
    64  	// Description of the assessment report.
    65  	Description pulumi.StringPtrOutput `pulumi:"description"`
    66  	// Name of the assessment report.
    67  	Name pulumi.StringOutput `pulumi:"name"`
    68  	// Current status of the specified assessment report. Valid values are `COMPLETE`, `IN_PROGRESS`, and `FAILED`.
    69  	Status pulumi.StringOutput `pulumi:"status"`
    70  }
    71  
    72  // NewAssessmentReport registers a new resource with the given unique name, arguments, and options.
    73  func NewAssessmentReport(ctx *pulumi.Context,
    74  	name string, args *AssessmentReportArgs, opts ...pulumi.ResourceOption) (*AssessmentReport, error) {
    75  	if args == nil {
    76  		return nil, errors.New("missing one or more required arguments")
    77  	}
    78  
    79  	if args.AssessmentId == nil {
    80  		return nil, errors.New("invalid value for required argument 'AssessmentId'")
    81  	}
    82  	opts = internal.PkgResourceDefaultOpts(opts)
    83  	var resource AssessmentReport
    84  	err := ctx.RegisterResource("aws:auditmanager/assessmentReport:AssessmentReport", name, args, &resource, opts...)
    85  	if err != nil {
    86  		return nil, err
    87  	}
    88  	return &resource, nil
    89  }
    90  
    91  // GetAssessmentReport gets an existing AssessmentReport resource's state with the given name, ID, and optional
    92  // state properties that are used to uniquely qualify the lookup (nil if not required).
    93  func GetAssessmentReport(ctx *pulumi.Context,
    94  	name string, id pulumi.IDInput, state *AssessmentReportState, opts ...pulumi.ResourceOption) (*AssessmentReport, error) {
    95  	var resource AssessmentReport
    96  	err := ctx.ReadResource("aws:auditmanager/assessmentReport:AssessmentReport", name, id, state, &resource, opts...)
    97  	if err != nil {
    98  		return nil, err
    99  	}
   100  	return &resource, nil
   101  }
   102  
   103  // Input properties used for looking up and filtering AssessmentReport resources.
   104  type assessmentReportState struct {
   105  	// Unique identifier of the assessment to create the report from.
   106  	//
   107  	// The following arguments are optional:
   108  	AssessmentId *string `pulumi:"assessmentId"`
   109  	// Name of the user who created the assessment report.
   110  	Author *string `pulumi:"author"`
   111  	// Description of the assessment report.
   112  	Description *string `pulumi:"description"`
   113  	// Name of the assessment report.
   114  	Name *string `pulumi:"name"`
   115  	// Current status of the specified assessment report. Valid values are `COMPLETE`, `IN_PROGRESS`, and `FAILED`.
   116  	Status *string `pulumi:"status"`
   117  }
   118  
   119  type AssessmentReportState struct {
   120  	// Unique identifier of the assessment to create the report from.
   121  	//
   122  	// The following arguments are optional:
   123  	AssessmentId pulumi.StringPtrInput
   124  	// Name of the user who created the assessment report.
   125  	Author pulumi.StringPtrInput
   126  	// Description of the assessment report.
   127  	Description pulumi.StringPtrInput
   128  	// Name of the assessment report.
   129  	Name pulumi.StringPtrInput
   130  	// Current status of the specified assessment report. Valid values are `COMPLETE`, `IN_PROGRESS`, and `FAILED`.
   131  	Status pulumi.StringPtrInput
   132  }
   133  
   134  func (AssessmentReportState) ElementType() reflect.Type {
   135  	return reflect.TypeOf((*assessmentReportState)(nil)).Elem()
   136  }
   137  
   138  type assessmentReportArgs struct {
   139  	// Unique identifier of the assessment to create the report from.
   140  	//
   141  	// The following arguments are optional:
   142  	AssessmentId string `pulumi:"assessmentId"`
   143  	// Description of the assessment report.
   144  	Description *string `pulumi:"description"`
   145  	// Name of the assessment report.
   146  	Name *string `pulumi:"name"`
   147  }
   148  
   149  // The set of arguments for constructing a AssessmentReport resource.
   150  type AssessmentReportArgs struct {
   151  	// Unique identifier of the assessment to create the report from.
   152  	//
   153  	// The following arguments are optional:
   154  	AssessmentId pulumi.StringInput
   155  	// Description of the assessment report.
   156  	Description pulumi.StringPtrInput
   157  	// Name of the assessment report.
   158  	Name pulumi.StringPtrInput
   159  }
   160  
   161  func (AssessmentReportArgs) ElementType() reflect.Type {
   162  	return reflect.TypeOf((*assessmentReportArgs)(nil)).Elem()
   163  }
   164  
   165  type AssessmentReportInput interface {
   166  	pulumi.Input
   167  
   168  	ToAssessmentReportOutput() AssessmentReportOutput
   169  	ToAssessmentReportOutputWithContext(ctx context.Context) AssessmentReportOutput
   170  }
   171  
   172  func (*AssessmentReport) ElementType() reflect.Type {
   173  	return reflect.TypeOf((**AssessmentReport)(nil)).Elem()
   174  }
   175  
   176  func (i *AssessmentReport) ToAssessmentReportOutput() AssessmentReportOutput {
   177  	return i.ToAssessmentReportOutputWithContext(context.Background())
   178  }
   179  
   180  func (i *AssessmentReport) ToAssessmentReportOutputWithContext(ctx context.Context) AssessmentReportOutput {
   181  	return pulumi.ToOutputWithContext(ctx, i).(AssessmentReportOutput)
   182  }
   183  
   184  // AssessmentReportArrayInput is an input type that accepts AssessmentReportArray and AssessmentReportArrayOutput values.
   185  // You can construct a concrete instance of `AssessmentReportArrayInput` via:
   186  //
   187  //	AssessmentReportArray{ AssessmentReportArgs{...} }
   188  type AssessmentReportArrayInput interface {
   189  	pulumi.Input
   190  
   191  	ToAssessmentReportArrayOutput() AssessmentReportArrayOutput
   192  	ToAssessmentReportArrayOutputWithContext(context.Context) AssessmentReportArrayOutput
   193  }
   194  
   195  type AssessmentReportArray []AssessmentReportInput
   196  
   197  func (AssessmentReportArray) ElementType() reflect.Type {
   198  	return reflect.TypeOf((*[]*AssessmentReport)(nil)).Elem()
   199  }
   200  
   201  func (i AssessmentReportArray) ToAssessmentReportArrayOutput() AssessmentReportArrayOutput {
   202  	return i.ToAssessmentReportArrayOutputWithContext(context.Background())
   203  }
   204  
   205  func (i AssessmentReportArray) ToAssessmentReportArrayOutputWithContext(ctx context.Context) AssessmentReportArrayOutput {
   206  	return pulumi.ToOutputWithContext(ctx, i).(AssessmentReportArrayOutput)
   207  }
   208  
   209  // AssessmentReportMapInput is an input type that accepts AssessmentReportMap and AssessmentReportMapOutput values.
   210  // You can construct a concrete instance of `AssessmentReportMapInput` via:
   211  //
   212  //	AssessmentReportMap{ "key": AssessmentReportArgs{...} }
   213  type AssessmentReportMapInput interface {
   214  	pulumi.Input
   215  
   216  	ToAssessmentReportMapOutput() AssessmentReportMapOutput
   217  	ToAssessmentReportMapOutputWithContext(context.Context) AssessmentReportMapOutput
   218  }
   219  
   220  type AssessmentReportMap map[string]AssessmentReportInput
   221  
   222  func (AssessmentReportMap) ElementType() reflect.Type {
   223  	return reflect.TypeOf((*map[string]*AssessmentReport)(nil)).Elem()
   224  }
   225  
   226  func (i AssessmentReportMap) ToAssessmentReportMapOutput() AssessmentReportMapOutput {
   227  	return i.ToAssessmentReportMapOutputWithContext(context.Background())
   228  }
   229  
   230  func (i AssessmentReportMap) ToAssessmentReportMapOutputWithContext(ctx context.Context) AssessmentReportMapOutput {
   231  	return pulumi.ToOutputWithContext(ctx, i).(AssessmentReportMapOutput)
   232  }
   233  
   234  type AssessmentReportOutput struct{ *pulumi.OutputState }
   235  
   236  func (AssessmentReportOutput) ElementType() reflect.Type {
   237  	return reflect.TypeOf((**AssessmentReport)(nil)).Elem()
   238  }
   239  
   240  func (o AssessmentReportOutput) ToAssessmentReportOutput() AssessmentReportOutput {
   241  	return o
   242  }
   243  
   244  func (o AssessmentReportOutput) ToAssessmentReportOutputWithContext(ctx context.Context) AssessmentReportOutput {
   245  	return o
   246  }
   247  
   248  // Unique identifier of the assessment to create the report from.
   249  //
   250  // The following arguments are optional:
   251  func (o AssessmentReportOutput) AssessmentId() pulumi.StringOutput {
   252  	return o.ApplyT(func(v *AssessmentReport) pulumi.StringOutput { return v.AssessmentId }).(pulumi.StringOutput)
   253  }
   254  
   255  // Name of the user who created the assessment report.
   256  func (o AssessmentReportOutput) Author() pulumi.StringOutput {
   257  	return o.ApplyT(func(v *AssessmentReport) pulumi.StringOutput { return v.Author }).(pulumi.StringOutput)
   258  }
   259  
   260  // Description of the assessment report.
   261  func (o AssessmentReportOutput) Description() pulumi.StringPtrOutput {
   262  	return o.ApplyT(func(v *AssessmentReport) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   263  }
   264  
   265  // Name of the assessment report.
   266  func (o AssessmentReportOutput) Name() pulumi.StringOutput {
   267  	return o.ApplyT(func(v *AssessmentReport) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   268  }
   269  
   270  // Current status of the specified assessment report. Valid values are `COMPLETE`, `IN_PROGRESS`, and `FAILED`.
   271  func (o AssessmentReportOutput) Status() pulumi.StringOutput {
   272  	return o.ApplyT(func(v *AssessmentReport) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   273  }
   274  
   275  type AssessmentReportArrayOutput struct{ *pulumi.OutputState }
   276  
   277  func (AssessmentReportArrayOutput) ElementType() reflect.Type {
   278  	return reflect.TypeOf((*[]*AssessmentReport)(nil)).Elem()
   279  }
   280  
   281  func (o AssessmentReportArrayOutput) ToAssessmentReportArrayOutput() AssessmentReportArrayOutput {
   282  	return o
   283  }
   284  
   285  func (o AssessmentReportArrayOutput) ToAssessmentReportArrayOutputWithContext(ctx context.Context) AssessmentReportArrayOutput {
   286  	return o
   287  }
   288  
   289  func (o AssessmentReportArrayOutput) Index(i pulumi.IntInput) AssessmentReportOutput {
   290  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssessmentReport {
   291  		return vs[0].([]*AssessmentReport)[vs[1].(int)]
   292  	}).(AssessmentReportOutput)
   293  }
   294  
   295  type AssessmentReportMapOutput struct{ *pulumi.OutputState }
   296  
   297  func (AssessmentReportMapOutput) ElementType() reflect.Type {
   298  	return reflect.TypeOf((*map[string]*AssessmentReport)(nil)).Elem()
   299  }
   300  
   301  func (o AssessmentReportMapOutput) ToAssessmentReportMapOutput() AssessmentReportMapOutput {
   302  	return o
   303  }
   304  
   305  func (o AssessmentReportMapOutput) ToAssessmentReportMapOutputWithContext(ctx context.Context) AssessmentReportMapOutput {
   306  	return o
   307  }
   308  
   309  func (o AssessmentReportMapOutput) MapIndex(k pulumi.StringInput) AssessmentReportOutput {
   310  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssessmentReport {
   311  		return vs[0].(map[string]*AssessmentReport)[vs[1].(string)]
   312  	}).(AssessmentReportOutput)
   313  }
   314  
   315  func init() {
   316  	pulumi.RegisterInputType(reflect.TypeOf((*AssessmentReportInput)(nil)).Elem(), &AssessmentReport{})
   317  	pulumi.RegisterInputType(reflect.TypeOf((*AssessmentReportArrayInput)(nil)).Elem(), AssessmentReportArray{})
   318  	pulumi.RegisterInputType(reflect.TypeOf((*AssessmentReportMapInput)(nil)).Elem(), AssessmentReportMap{})
   319  	pulumi.RegisterOutputType(AssessmentReportOutput{})
   320  	pulumi.RegisterOutputType(AssessmentReportArrayOutput{})
   321  	pulumi.RegisterOutputType(AssessmentReportMapOutput{})
   322  }