AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the CreateAssessmentTemplate operation. Creates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the service-linked role isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Inspector.AmazonInspectorRequest
      Amazon.Inspector.Model.CreateAssessmentTemplateRequest

Namespace: Amazon.Inspector.Model
Assembly: AWSSDK.Inspector.dll
Version: 3.x.y.z

Syntax

C#
public class CreateAssessmentTemplateRequest : AmazonInspectorRequest
         IAmazonWebServiceRequest

The CreateAssessmentTemplateRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AssessmentTargetArn System.String

Gets and sets the property AssessmentTargetArn.

The ARN that specifies the assessment target for which you want to create the assessment template.

Public Property AssessmentTemplateName System.String

Gets and sets the property AssessmentTemplateName.

The user-defined name that identifies the assessment template that you want to create. You can create several assessment templates for an assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.

Public Property DurationInSeconds System.Int32

Gets and sets the property DurationInSeconds.

The duration of the assessment run in seconds.

Public Property RulesPackageArns System.Collections.Generic.List<System.String>

Gets and sets the property RulesPackageArns.

The ARNs that specify the rules packages that you want to attach to the assessment template.

Public Property UserAttributesForFindings System.Collections.Generic.List<Amazon.Inspector.Model.Attribute>

Gets and sets the property UserAttributesForFindings.

The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template. An attribute is a key and value pair (an Attribute object). Within an assessment template, each key must be unique.

Examples

Creates an assessment template for the assessment target that is specified by the ARN of the assessment target.

Create assessment template


var client = new AmazonInspectorClient();
var response = client.CreateAssessmentTemplate(new CreateAssessmentTemplateRequest 
{
    AssessmentTargetArn = "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX",
    AssessmentTemplateName = "ExampleAssessmentTemplate",
    DurationInSeconds = 180,
    RulesPackageArns = new List<string> {
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-11B9DBXp"
    },
    UserAttributesForFindings = new List<Attribute> {
        new Attribute {
            Key = "Example",
            Value = "example"
        }
    }
});

string assessmentTemplateArn = response.AssessmentTemplateArn;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5