Assessment class

Resource for managing an AWS Audit Manager Assessment.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.auditmanager.Assessment("test", {
    assessmentReportsDestination: {
        destination: `s3://${testAwsS3Bucket.id}`,
        destinationType: "S3",
    },
    scope: {
        awsAccounts: [{
            id: current.accountId,
        }],
        awsServices: [{
            serviceName: "S3",
        }],
    },
    roles: [{
        roleArn: testAwsIamRole.arn,
        roleType: "PROCESS_OWNER",
    }],
    name: "example",
    frameworkId: testAwsAuditmanagerFramework.id,
});
import pulumi
import pulumi_aws as aws

test = aws.auditmanager.Assessment("test",
    assessment_reports_destination={
        "destination": f"s3://{test_aws_s3_bucket['id']}",
        "destination_type": "S3",
    },
    scope={
        "aws_accounts": [{
            "id": current["accountId"],
        }],
        "aws_services": [{
            "service_name": "S3",
        }],
    },
    roles=[{
        "role_arn": test_aws_iam_role["arn"],
        "role_type": "PROCESS_OWNER",
    }],
    name="example",
    framework_id=test_aws_auditmanager_framework["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var test = new Aws.Auditmanager.Assessment("test", new()
    {
        AssessmentReportsDestination = new Aws.Auditmanager.Inputs.AssessmentAssessmentReportsDestinationArgs
        {
            Destination = $"s3://{testAwsS3Bucket.Id}",
            DestinationType = "S3",
        },
        Scope = new Aws.Auditmanager.Inputs.AssessmentScopeArgs
        {
            AwsAccounts = new[]
            {
                new Aws.Auditmanager.Inputs.AssessmentScopeAwsAccountArgs
                {
                    Id = current.AccountId,
                },
            },
            AwsServices = new[]
            {
                new Aws.Auditmanager.Inputs.AssessmentScopeAwsServiceArgs
                {
                    ServiceName = "S3",
                },
            },
        },
        Roles = new[]
        {
            new Aws.Auditmanager.Inputs.AssessmentRoleArgs
            {
                RoleArn = testAwsIamRole.Arn,
                RoleType = "PROCESS_OWNER",
            },
        },
        Name = "example",
        FrameworkId = testAwsAuditmanagerFramework.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/auditmanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := auditmanager.NewAssessment(ctx, "test", &auditmanager.AssessmentArgs{
			AssessmentReportsDestination: &auditmanager.AssessmentAssessmentReportsDestinationArgs{
				Destination:     pulumi.Sprintf("s3://%v", testAwsS3Bucket.Id),
				DestinationType: pulumi.String("S3"),
			},
			Scope: &auditmanager.AssessmentScopeArgs{
				AwsAccounts: auditmanager.AssessmentScopeAwsAccountArray{
					&auditmanager.AssessmentScopeAwsAccountArgs{
						Id: pulumi.Any(current.AccountId),
					},
				},
				AwsServices: auditmanager.AssessmentScopeAwsServiceArray{
					&auditmanager.AssessmentScopeAwsServiceArgs{
						ServiceName: pulumi.String("S3"),
					},
				},
			},
			Roles: auditmanager.AssessmentRoleArray{
				&auditmanager.AssessmentRoleArgs{
					RoleArn:  pulumi.Any(testAwsIamRole.Arn),
					RoleType: pulumi.String("PROCESS_OWNER"),
				},
			},
			Name:        pulumi.String("example"),
			FrameworkId: pulumi.Any(testAwsAuditmanagerFramework.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_auditmanager_assessment" "test" {
  assessment_reports_destination = {
    destination      ="s3://${testAwsS3Bucket.id}"
    destination_type = "S3"
  }
  scope = {
    aws_accounts = [{
      "id" = current.accountId
    }]
    aws_services = [{
      "serviceName" = "S3"
    }]
  }
  roles {
    role_arn  = testAwsIamRole.arn
    role_type = "PROCESS_OWNER"
  }
  name         = "example"
  framework_id = testAwsAuditmanagerFramework.id
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.auditmanager.Assessment;
import com.pulumi.aws.auditmanager.AssessmentArgs;
import com.pulumi.aws.auditmanager.inputs.AssessmentAssessmentReportsDestinationArgs;
import com.pulumi.aws.auditmanager.inputs.AssessmentScopeArgs;
import com.pulumi.aws.auditmanager.inputs.AssessmentScopeAwsAccountArgs;
import com.pulumi.aws.auditmanager.inputs.AssessmentScopeAwsServiceArgs;
import com.pulumi.aws.auditmanager.inputs.AssessmentRoleArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new Assessment("test", AssessmentArgs.builder()
            .assessmentReportsDestination(AssessmentAssessmentReportsDestinationArgs.builder()
                .destination(String.format("s3://%s", testAwsS3Bucket.id()))
                .destinationType("S3")
                .build())
            .scope(AssessmentScopeArgs.builder()
                .awsAccounts(AssessmentScopeAwsAccountArgs.builder()
                    .id(current.accountId())
                    .build())
                .awsServices(AssessmentScopeAwsServiceArgs.builder()
                    .serviceName("S3")
                    .build())
                .build())
            .roles(AssessmentRoleArgs.builder()
                .roleArn(testAwsIamRole.arn())
                .roleType("PROCESS_OWNER")
                .build())
            .name("example")
            .frameworkId(testAwsAuditmanagerFramework.id())
            .build());

    }
}
resources:
  test:
    type: aws:auditmanager:Assessment
    properties:
      assessmentReportsDestination:
        destination: s3://${testAwsS3Bucket.id}
        destinationType: S3
      scope:
        awsAccounts:
          - id: ${current.accountId}
        awsServices:
          - serviceName: S3
      roles:
        - roleArn: ${testAwsIamRole.arn}
          roleType: PROCESS_OWNER
      name: example
      frameworkId: ${testAwsAuditmanagerFramework.id}

Import

Identity Schema

Required

  • id (String) Unique identifier for the assessment.

Optional

  • accountId (String) AWS Account where this resource is managed.
  • region (String) Region where this resource is managed.

Using pulumi import, import Audit Manager Assessments using the assessment id. For example:

$ pulumi import aws:auditmanager/assessment:Assessment example abc123-de45

Constructors

Assessment(String name, {AssessmentArgs? args, CustomResourceOptions? options})
Creates a new Assessment. name The Pulumi resource name. args Arguments used to configure this Assessment. The set of arguments for Assessment. options Resource options controlling this resource's behavior.
Assessment.reference(String urn)
Creates a typed reference to an existing Assessment resource.

Properties

arn ↔ Output<String>
ARN of the assessment.
latefinal
assessmentReportsDestination ↔ Output<AssessmentAssessmentReportsDestination?>
Assessment report storage destination configuration. See assessmentReportsDestination below.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
description ↔ Output<String?>
Description of the assessment.
latefinal
frameworkId ↔ Output<String>
Unique identifier of the framework the assessment will be created from.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
Name of the assessment.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
roles ↔ Output<List<AssessmentRole>>
List of roles for the assessment. See roles below.
latefinal
rolesAlls ↔ Output<List<AssessmentRolesAll>>
Complete list of all roles with access to the assessment. This includes both roles explicitly configured via the roles block, and any roles which have access to all Audit Manager assessments by default.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope ↔ Output<AssessmentScope?>
Amazon Web Services accounts and services that are in scope for the assessment. See scope below.
latefinal
status ↔ Output<String>
Status of the assessment. Valid values are ACTIVE and INACTIVE.
latefinal
tags ↔ Output<Map<String, String>?>
A map of tags to assign to the assessment. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {AssessmentState? state, CustomResourceOptions? options}) → Assessment
Gets an existing Assessment resource's state with the given name and id.