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.

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. The default value is 3600 seconds (one hour).

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

string assessmentTemplateArn = response.AssessmentTemplateArn;

            

Version Information

.NET Standard:
Supported in: 1.3

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

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms