inspector

package
v5.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssessmentTarget

type AssessmentTarget struct {
	pulumi.CustomResourceState

	// The target assessment ARN.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The name of the assessment target.
	Name pulumi.StringOutput `pulumi:"name"`
	// Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.
	ResourceGroupArn pulumi.StringPtrOutput `pulumi:"resourceGroupArn"`
}

Provides an Inspector Classic Assessment Target

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/inspector"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		bar, err := inspector.NewResourceGroup(ctx, "bar", &inspector.ResourceGroupArgs{
			Tags: pulumi.StringMap{
				"Name": pulumi.String("foo"),
				"Env":  pulumi.String("bar"),
			},
		})
		if err != nil {
			return err
		}
		_, err = inspector.NewAssessmentTarget(ctx, "foo", &inspector.AssessmentTargetArgs{
			ResourceGroupArn: bar.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Inspector Classic Assessment Targets can be imported via their Amazon Resource Name (ARN), e.g.,

```sh

$ pulumi import aws:inspector/assessmentTarget:AssessmentTarget example arn:aws:inspector:us-east-1:123456789012:target/0-xxxxxxx

```

func GetAssessmentTarget

func GetAssessmentTarget(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssessmentTargetState, opts ...pulumi.ResourceOption) (*AssessmentTarget, error)

GetAssessmentTarget gets an existing AssessmentTarget resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssessmentTarget

func NewAssessmentTarget(ctx *pulumi.Context,
	name string, args *AssessmentTargetArgs, opts ...pulumi.ResourceOption) (*AssessmentTarget, error)

NewAssessmentTarget registers a new resource with the given unique name, arguments, and options.

func (*AssessmentTarget) ElementType

func (*AssessmentTarget) ElementType() reflect.Type

func (*AssessmentTarget) ToAssessmentTargetOutput

func (i *AssessmentTarget) ToAssessmentTargetOutput() AssessmentTargetOutput

func (*AssessmentTarget) ToAssessmentTargetOutputWithContext

func (i *AssessmentTarget) ToAssessmentTargetOutputWithContext(ctx context.Context) AssessmentTargetOutput

type AssessmentTargetArgs

type AssessmentTargetArgs struct {
	// The name of the assessment target.
	Name pulumi.StringPtrInput
	// Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.
	ResourceGroupArn pulumi.StringPtrInput
}

The set of arguments for constructing a AssessmentTarget resource.

func (AssessmentTargetArgs) ElementType

func (AssessmentTargetArgs) ElementType() reflect.Type

type AssessmentTargetArray

type AssessmentTargetArray []AssessmentTargetInput

func (AssessmentTargetArray) ElementType

func (AssessmentTargetArray) ElementType() reflect.Type

func (AssessmentTargetArray) ToAssessmentTargetArrayOutput

func (i AssessmentTargetArray) ToAssessmentTargetArrayOutput() AssessmentTargetArrayOutput

func (AssessmentTargetArray) ToAssessmentTargetArrayOutputWithContext

func (i AssessmentTargetArray) ToAssessmentTargetArrayOutputWithContext(ctx context.Context) AssessmentTargetArrayOutput

type AssessmentTargetArrayInput

type AssessmentTargetArrayInput interface {
	pulumi.Input

	ToAssessmentTargetArrayOutput() AssessmentTargetArrayOutput
	ToAssessmentTargetArrayOutputWithContext(context.Context) AssessmentTargetArrayOutput
}

AssessmentTargetArrayInput is an input type that accepts AssessmentTargetArray and AssessmentTargetArrayOutput values. You can construct a concrete instance of `AssessmentTargetArrayInput` via:

AssessmentTargetArray{ AssessmentTargetArgs{...} }

type AssessmentTargetArrayOutput

type AssessmentTargetArrayOutput struct{ *pulumi.OutputState }

func (AssessmentTargetArrayOutput) ElementType

func (AssessmentTargetArrayOutput) Index

func (AssessmentTargetArrayOutput) ToAssessmentTargetArrayOutput

func (o AssessmentTargetArrayOutput) ToAssessmentTargetArrayOutput() AssessmentTargetArrayOutput

func (AssessmentTargetArrayOutput) ToAssessmentTargetArrayOutputWithContext

func (o AssessmentTargetArrayOutput) ToAssessmentTargetArrayOutputWithContext(ctx context.Context) AssessmentTargetArrayOutput

type AssessmentTargetInput

type AssessmentTargetInput interface {
	pulumi.Input

	ToAssessmentTargetOutput() AssessmentTargetOutput
	ToAssessmentTargetOutputWithContext(ctx context.Context) AssessmentTargetOutput
}

type AssessmentTargetMap

type AssessmentTargetMap map[string]AssessmentTargetInput

func (AssessmentTargetMap) ElementType

func (AssessmentTargetMap) ElementType() reflect.Type

func (AssessmentTargetMap) ToAssessmentTargetMapOutput

func (i AssessmentTargetMap) ToAssessmentTargetMapOutput() AssessmentTargetMapOutput

func (AssessmentTargetMap) ToAssessmentTargetMapOutputWithContext

func (i AssessmentTargetMap) ToAssessmentTargetMapOutputWithContext(ctx context.Context) AssessmentTargetMapOutput

type AssessmentTargetMapInput

type AssessmentTargetMapInput interface {
	pulumi.Input

	ToAssessmentTargetMapOutput() AssessmentTargetMapOutput
	ToAssessmentTargetMapOutputWithContext(context.Context) AssessmentTargetMapOutput
}

AssessmentTargetMapInput is an input type that accepts AssessmentTargetMap and AssessmentTargetMapOutput values. You can construct a concrete instance of `AssessmentTargetMapInput` via:

AssessmentTargetMap{ "key": AssessmentTargetArgs{...} }

type AssessmentTargetMapOutput

type AssessmentTargetMapOutput struct{ *pulumi.OutputState }

func (AssessmentTargetMapOutput) ElementType

func (AssessmentTargetMapOutput) ElementType() reflect.Type

func (AssessmentTargetMapOutput) MapIndex

func (AssessmentTargetMapOutput) ToAssessmentTargetMapOutput

func (o AssessmentTargetMapOutput) ToAssessmentTargetMapOutput() AssessmentTargetMapOutput

func (AssessmentTargetMapOutput) ToAssessmentTargetMapOutputWithContext

func (o AssessmentTargetMapOutput) ToAssessmentTargetMapOutputWithContext(ctx context.Context) AssessmentTargetMapOutput

type AssessmentTargetOutput

type AssessmentTargetOutput struct{ *pulumi.OutputState }

func (AssessmentTargetOutput) Arn added in v5.4.0

The target assessment ARN.

func (AssessmentTargetOutput) ElementType

func (AssessmentTargetOutput) ElementType() reflect.Type

func (AssessmentTargetOutput) Name added in v5.4.0

The name of the assessment target.

func (AssessmentTargetOutput) ResourceGroupArn added in v5.4.0

func (o AssessmentTargetOutput) ResourceGroupArn() pulumi.StringPtrOutput

Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.

func (AssessmentTargetOutput) ToAssessmentTargetOutput

func (o AssessmentTargetOutput) ToAssessmentTargetOutput() AssessmentTargetOutput

func (AssessmentTargetOutput) ToAssessmentTargetOutputWithContext

func (o AssessmentTargetOutput) ToAssessmentTargetOutputWithContext(ctx context.Context) AssessmentTargetOutput

type AssessmentTargetState

type AssessmentTargetState struct {
	// The target assessment ARN.
	Arn pulumi.StringPtrInput
	// The name of the assessment target.
	Name pulumi.StringPtrInput
	// Inspector Resource Group Amazon Resource Name (ARN) stating tags for instance matching. If not specified, all EC2 instances in the current AWS account and region are included in the assessment target.
	ResourceGroupArn pulumi.StringPtrInput
}

func (AssessmentTargetState) ElementType

func (AssessmentTargetState) ElementType() reflect.Type

type AssessmentTemplate

type AssessmentTemplate struct {
	pulumi.CustomResourceState

	// The template assessment ARN.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The duration of the inspector run.
	Duration pulumi.IntOutput `pulumi:"duration"`
	// A block that enables sending notifications about a specified assessment template event to a designated SNS topic. See Event Subscriptions for details.
	EventSubscriptions AssessmentTemplateEventSubscriptionArrayOutput `pulumi:"eventSubscriptions"`
	// The name of the assessment template.
	Name pulumi.StringOutput `pulumi:"name"`
	// The rules to be used during the run.
	RulesPackageArns pulumi.StringArrayOutput `pulumi:"rulesPackageArns"`
	// Key-value map of tags for the Inspector assessment template. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
	// The assessment target ARN to attach the template to.
	TargetArn pulumi.StringOutput `pulumi:"targetArn"`
}

Provides an Inspector Classic Assessment Template

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/inspector"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := inspector.NewAssessmentTemplate(ctx, "example", &inspector.AssessmentTemplateArgs{
			TargetArn: pulumi.Any(aws_inspector_assessment_target.Example.Arn),
			Duration:  pulumi.Int(3600),
			RulesPackageArns: pulumi.StringArray{
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p"),
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc"),
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ"),
				pulumi.String("arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD"),
			},
			EventSubscriptions: inspector.AssessmentTemplateEventSubscriptionArray{
				&inspector.AssessmentTemplateEventSubscriptionArgs{
					Event:    pulumi.String("ASSESSMENT_RUN_COMPLETED"),
					TopicArn: pulumi.Any(aws_sns_topic.Example.Arn),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

`aws_inspector_assessment_template` can be imported by using the template assessment ARN, e.g.,

```sh

$ pulumi import aws:inspector/assessmentTemplate:AssessmentTemplate example arn:aws:inspector:us-west-2:123456789012:target/0-9IaAzhGR/template/0-WEcjR8CH

```

func GetAssessmentTemplate

func GetAssessmentTemplate(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssessmentTemplateState, opts ...pulumi.ResourceOption) (*AssessmentTemplate, error)

GetAssessmentTemplate gets an existing AssessmentTemplate resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssessmentTemplate

func NewAssessmentTemplate(ctx *pulumi.Context,
	name string, args *AssessmentTemplateArgs, opts ...pulumi.ResourceOption) (*AssessmentTemplate, error)

NewAssessmentTemplate registers a new resource with the given unique name, arguments, and options.

func (*AssessmentTemplate) ElementType

func (*AssessmentTemplate) ElementType() reflect.Type

func (*AssessmentTemplate) ToAssessmentTemplateOutput

func (i *AssessmentTemplate) ToAssessmentTemplateOutput() AssessmentTemplateOutput

func (*AssessmentTemplate) ToAssessmentTemplateOutputWithContext

func (i *AssessmentTemplate) ToAssessmentTemplateOutputWithContext(ctx context.Context) AssessmentTemplateOutput

type AssessmentTemplateArgs

type AssessmentTemplateArgs struct {
	// The duration of the inspector run.
	Duration pulumi.IntInput
	// A block that enables sending notifications about a specified assessment template event to a designated SNS topic. See Event Subscriptions for details.
	EventSubscriptions AssessmentTemplateEventSubscriptionArrayInput
	// The name of the assessment template.
	Name pulumi.StringPtrInput
	// The rules to be used during the run.
	RulesPackageArns pulumi.StringArrayInput
	// Key-value map of tags for the Inspector assessment template. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// The assessment target ARN to attach the template to.
	TargetArn pulumi.StringInput
}

The set of arguments for constructing a AssessmentTemplate resource.

func (AssessmentTemplateArgs) ElementType

func (AssessmentTemplateArgs) ElementType() reflect.Type

type AssessmentTemplateArray

type AssessmentTemplateArray []AssessmentTemplateInput

func (AssessmentTemplateArray) ElementType

func (AssessmentTemplateArray) ElementType() reflect.Type

func (AssessmentTemplateArray) ToAssessmentTemplateArrayOutput

func (i AssessmentTemplateArray) ToAssessmentTemplateArrayOutput() AssessmentTemplateArrayOutput

func (AssessmentTemplateArray) ToAssessmentTemplateArrayOutputWithContext

func (i AssessmentTemplateArray) ToAssessmentTemplateArrayOutputWithContext(ctx context.Context) AssessmentTemplateArrayOutput

type AssessmentTemplateArrayInput

type AssessmentTemplateArrayInput interface {
	pulumi.Input

	ToAssessmentTemplateArrayOutput() AssessmentTemplateArrayOutput
	ToAssessmentTemplateArrayOutputWithContext(context.Context) AssessmentTemplateArrayOutput
}

AssessmentTemplateArrayInput is an input type that accepts AssessmentTemplateArray and AssessmentTemplateArrayOutput values. You can construct a concrete instance of `AssessmentTemplateArrayInput` via:

AssessmentTemplateArray{ AssessmentTemplateArgs{...} }

type AssessmentTemplateArrayOutput

type AssessmentTemplateArrayOutput struct{ *pulumi.OutputState }

func (AssessmentTemplateArrayOutput) ElementType

func (AssessmentTemplateArrayOutput) Index

func (AssessmentTemplateArrayOutput) ToAssessmentTemplateArrayOutput

func (o AssessmentTemplateArrayOutput) ToAssessmentTemplateArrayOutput() AssessmentTemplateArrayOutput

func (AssessmentTemplateArrayOutput) ToAssessmentTemplateArrayOutputWithContext

func (o AssessmentTemplateArrayOutput) ToAssessmentTemplateArrayOutputWithContext(ctx context.Context) AssessmentTemplateArrayOutput

type AssessmentTemplateEventSubscription added in v5.12.1

type AssessmentTemplateEventSubscription struct {
	// The event for which you want to receive SNS notifications. Valid values are `ASSESSMENT_RUN_STARTED`, `ASSESSMENT_RUN_COMPLETED`, `ASSESSMENT_RUN_STATE_CHANGED`, and `FINDING_REPORTED`.
	Event string `pulumi:"event"`
	// The ARN of the SNS topic to which notifications are sent.
	TopicArn string `pulumi:"topicArn"`
}

type AssessmentTemplateEventSubscriptionArgs added in v5.12.1

type AssessmentTemplateEventSubscriptionArgs struct {
	// The event for which you want to receive SNS notifications. Valid values are `ASSESSMENT_RUN_STARTED`, `ASSESSMENT_RUN_COMPLETED`, `ASSESSMENT_RUN_STATE_CHANGED`, and `FINDING_REPORTED`.
	Event pulumi.StringInput `pulumi:"event"`
	// The ARN of the SNS topic to which notifications are sent.
	TopicArn pulumi.StringInput `pulumi:"topicArn"`
}

func (AssessmentTemplateEventSubscriptionArgs) ElementType added in v5.12.1

func (AssessmentTemplateEventSubscriptionArgs) ToAssessmentTemplateEventSubscriptionOutput added in v5.12.1

func (i AssessmentTemplateEventSubscriptionArgs) ToAssessmentTemplateEventSubscriptionOutput() AssessmentTemplateEventSubscriptionOutput

func (AssessmentTemplateEventSubscriptionArgs) ToAssessmentTemplateEventSubscriptionOutputWithContext added in v5.12.1

func (i AssessmentTemplateEventSubscriptionArgs) ToAssessmentTemplateEventSubscriptionOutputWithContext(ctx context.Context) AssessmentTemplateEventSubscriptionOutput

type AssessmentTemplateEventSubscriptionArray added in v5.12.1

type AssessmentTemplateEventSubscriptionArray []AssessmentTemplateEventSubscriptionInput

func (AssessmentTemplateEventSubscriptionArray) ElementType added in v5.12.1

func (AssessmentTemplateEventSubscriptionArray) ToAssessmentTemplateEventSubscriptionArrayOutput added in v5.12.1

func (i AssessmentTemplateEventSubscriptionArray) ToAssessmentTemplateEventSubscriptionArrayOutput() AssessmentTemplateEventSubscriptionArrayOutput

func (AssessmentTemplateEventSubscriptionArray) ToAssessmentTemplateEventSubscriptionArrayOutputWithContext added in v5.12.1

func (i AssessmentTemplateEventSubscriptionArray) ToAssessmentTemplateEventSubscriptionArrayOutputWithContext(ctx context.Context) AssessmentTemplateEventSubscriptionArrayOutput

type AssessmentTemplateEventSubscriptionArrayInput added in v5.12.1

type AssessmentTemplateEventSubscriptionArrayInput interface {
	pulumi.Input

	ToAssessmentTemplateEventSubscriptionArrayOutput() AssessmentTemplateEventSubscriptionArrayOutput
	ToAssessmentTemplateEventSubscriptionArrayOutputWithContext(context.Context) AssessmentTemplateEventSubscriptionArrayOutput
}

AssessmentTemplateEventSubscriptionArrayInput is an input type that accepts AssessmentTemplateEventSubscriptionArray and AssessmentTemplateEventSubscriptionArrayOutput values. You can construct a concrete instance of `AssessmentTemplateEventSubscriptionArrayInput` via:

AssessmentTemplateEventSubscriptionArray{ AssessmentTemplateEventSubscriptionArgs{...} }

type AssessmentTemplateEventSubscriptionArrayOutput added in v5.12.1

type AssessmentTemplateEventSubscriptionArrayOutput struct{ *pulumi.OutputState }

func (AssessmentTemplateEventSubscriptionArrayOutput) ElementType added in v5.12.1

func (AssessmentTemplateEventSubscriptionArrayOutput) Index added in v5.12.1

func (AssessmentTemplateEventSubscriptionArrayOutput) ToAssessmentTemplateEventSubscriptionArrayOutput added in v5.12.1

func (o AssessmentTemplateEventSubscriptionArrayOutput) ToAssessmentTemplateEventSubscriptionArrayOutput() AssessmentTemplateEventSubscriptionArrayOutput

func (AssessmentTemplateEventSubscriptionArrayOutput) ToAssessmentTemplateEventSubscriptionArrayOutputWithContext added in v5.12.1

func (o AssessmentTemplateEventSubscriptionArrayOutput) ToAssessmentTemplateEventSubscriptionArrayOutputWithContext(ctx context.Context) AssessmentTemplateEventSubscriptionArrayOutput

type AssessmentTemplateEventSubscriptionInput added in v5.12.1

type AssessmentTemplateEventSubscriptionInput interface {
	pulumi.Input

	ToAssessmentTemplateEventSubscriptionOutput() AssessmentTemplateEventSubscriptionOutput
	ToAssessmentTemplateEventSubscriptionOutputWithContext(context.Context) AssessmentTemplateEventSubscriptionOutput
}

AssessmentTemplateEventSubscriptionInput is an input type that accepts AssessmentTemplateEventSubscriptionArgs and AssessmentTemplateEventSubscriptionOutput values. You can construct a concrete instance of `AssessmentTemplateEventSubscriptionInput` via:

AssessmentTemplateEventSubscriptionArgs{...}

type AssessmentTemplateEventSubscriptionOutput added in v5.12.1

type AssessmentTemplateEventSubscriptionOutput struct{ *pulumi.OutputState }

func (AssessmentTemplateEventSubscriptionOutput) ElementType added in v5.12.1

func (AssessmentTemplateEventSubscriptionOutput) Event added in v5.12.1

The event for which you want to receive SNS notifications. Valid values are `ASSESSMENT_RUN_STARTED`, `ASSESSMENT_RUN_COMPLETED`, `ASSESSMENT_RUN_STATE_CHANGED`, and `FINDING_REPORTED`.

func (AssessmentTemplateEventSubscriptionOutput) ToAssessmentTemplateEventSubscriptionOutput added in v5.12.1

func (o AssessmentTemplateEventSubscriptionOutput) ToAssessmentTemplateEventSubscriptionOutput() AssessmentTemplateEventSubscriptionOutput

func (AssessmentTemplateEventSubscriptionOutput) ToAssessmentTemplateEventSubscriptionOutputWithContext added in v5.12.1

func (o AssessmentTemplateEventSubscriptionOutput) ToAssessmentTemplateEventSubscriptionOutputWithContext(ctx context.Context) AssessmentTemplateEventSubscriptionOutput

func (AssessmentTemplateEventSubscriptionOutput) TopicArn added in v5.12.1

The ARN of the SNS topic to which notifications are sent.

type AssessmentTemplateInput

type AssessmentTemplateInput interface {
	pulumi.Input

	ToAssessmentTemplateOutput() AssessmentTemplateOutput
	ToAssessmentTemplateOutputWithContext(ctx context.Context) AssessmentTemplateOutput
}

type AssessmentTemplateMap

type AssessmentTemplateMap map[string]AssessmentTemplateInput

func (AssessmentTemplateMap) ElementType

func (AssessmentTemplateMap) ElementType() reflect.Type

func (AssessmentTemplateMap) ToAssessmentTemplateMapOutput

func (i AssessmentTemplateMap) ToAssessmentTemplateMapOutput() AssessmentTemplateMapOutput

func (AssessmentTemplateMap) ToAssessmentTemplateMapOutputWithContext

func (i AssessmentTemplateMap) ToAssessmentTemplateMapOutputWithContext(ctx context.Context) AssessmentTemplateMapOutput

type AssessmentTemplateMapInput

type AssessmentTemplateMapInput interface {
	pulumi.Input

	ToAssessmentTemplateMapOutput() AssessmentTemplateMapOutput
	ToAssessmentTemplateMapOutputWithContext(context.Context) AssessmentTemplateMapOutput
}

AssessmentTemplateMapInput is an input type that accepts AssessmentTemplateMap and AssessmentTemplateMapOutput values. You can construct a concrete instance of `AssessmentTemplateMapInput` via:

AssessmentTemplateMap{ "key": AssessmentTemplateArgs{...} }

type AssessmentTemplateMapOutput

type AssessmentTemplateMapOutput struct{ *pulumi.OutputState }

func (AssessmentTemplateMapOutput) ElementType

func (AssessmentTemplateMapOutput) MapIndex

func (AssessmentTemplateMapOutput) ToAssessmentTemplateMapOutput

func (o AssessmentTemplateMapOutput) ToAssessmentTemplateMapOutput() AssessmentTemplateMapOutput

func (AssessmentTemplateMapOutput) ToAssessmentTemplateMapOutputWithContext

func (o AssessmentTemplateMapOutput) ToAssessmentTemplateMapOutputWithContext(ctx context.Context) AssessmentTemplateMapOutput

type AssessmentTemplateOutput

type AssessmentTemplateOutput struct{ *pulumi.OutputState }

func (AssessmentTemplateOutput) Arn added in v5.4.0

The template assessment ARN.

func (AssessmentTemplateOutput) Duration added in v5.4.0

The duration of the inspector run.

func (AssessmentTemplateOutput) ElementType

func (AssessmentTemplateOutput) ElementType() reflect.Type

func (AssessmentTemplateOutput) EventSubscriptions added in v5.12.1

A block that enables sending notifications about a specified assessment template event to a designated SNS topic. See Event Subscriptions for details.

func (AssessmentTemplateOutput) Name added in v5.4.0

The name of the assessment template.

func (AssessmentTemplateOutput) RulesPackageArns added in v5.4.0

func (o AssessmentTemplateOutput) RulesPackageArns() pulumi.StringArrayOutput

The rules to be used during the run.

func (AssessmentTemplateOutput) Tags added in v5.4.0

Key-value map of tags for the Inspector assessment template. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.

func (AssessmentTemplateOutput) TagsAll added in v5.4.0

A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.

func (AssessmentTemplateOutput) TargetArn added in v5.4.0

The assessment target ARN to attach the template to.

func (AssessmentTemplateOutput) ToAssessmentTemplateOutput

func (o AssessmentTemplateOutput) ToAssessmentTemplateOutput() AssessmentTemplateOutput

func (AssessmentTemplateOutput) ToAssessmentTemplateOutputWithContext

func (o AssessmentTemplateOutput) ToAssessmentTemplateOutputWithContext(ctx context.Context) AssessmentTemplateOutput

type AssessmentTemplateState

type AssessmentTemplateState struct {
	// The template assessment ARN.
	Arn pulumi.StringPtrInput
	// The duration of the inspector run.
	Duration pulumi.IntPtrInput
	// A block that enables sending notifications about a specified assessment template event to a designated SNS topic. See Event Subscriptions for details.
	EventSubscriptions AssessmentTemplateEventSubscriptionArrayInput
	// The name of the assessment template.
	Name pulumi.StringPtrInput
	// The rules to be used during the run.
	RulesPackageArns pulumi.StringArrayInput
	// Key-value map of tags for the Inspector assessment template. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	TagsAll pulumi.StringMapInput
	// The assessment target ARN to attach the template to.
	TargetArn pulumi.StringPtrInput
}

func (AssessmentTemplateState) ElementType

func (AssessmentTemplateState) ElementType() reflect.Type

type GetRulesPackagesResult

type GetRulesPackagesResult struct {
	// List of the Amazon Inspector Classic Rules Packages arns available in the AWS region.
	Arns []string `pulumi:"arns"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
}

A collection of values returned by getRulesPackages.

func GetRulesPackages

func GetRulesPackages(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetRulesPackagesResult, error)

The Amazon Inspector Classic Rules Packages data source allows access to the list of AWS Inspector Rules Packages which can be used by Amazon Inspector Classic within the region configured in the provider.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/inspector"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		rules, err := inspector.GetRulesPackages(ctx, nil, nil)
		if err != nil {
			return err
		}
		group, err := inspector.NewResourceGroup(ctx, "group", &inspector.ResourceGroupArgs{
			Tags: pulumi.StringMap{
				"test": pulumi.String("test"),
			},
		})
		if err != nil {
			return err
		}
		assessmentAssessmentTarget, err := inspector.NewAssessmentTarget(ctx, "assessmentAssessmentTarget", &inspector.AssessmentTargetArgs{
			ResourceGroupArn: group.Arn,
		})
		if err != nil {
			return err
		}
		_, err = inspector.NewAssessmentTemplate(ctx, "assessmentAssessmentTemplate", &inspector.AssessmentTemplateArgs{
			TargetArn:        assessmentAssessmentTarget.Arn,
			Duration:         pulumi.Int(60),
			RulesPackageArns: interface{}(rules.Arns),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

type ResourceGroup

type ResourceGroup struct {
	pulumi.CustomResourceState

	// The resource group ARN.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Key-value map of tags that are used to select the EC2 instances to be included in an Amazon Inspector assessment target.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Provides an Amazon Inspector Classic Resource Group.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/inspector"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := inspector.NewResourceGroup(ctx, "example", &inspector.ResourceGroupArgs{
			Tags: pulumi.StringMap{
				"Env":  pulumi.String("bar"),
				"Name": pulumi.String("foo"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetResourceGroup

func GetResourceGroup(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ResourceGroupState, opts ...pulumi.ResourceOption) (*ResourceGroup, error)

GetResourceGroup gets an existing ResourceGroup resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewResourceGroup

func NewResourceGroup(ctx *pulumi.Context,
	name string, args *ResourceGroupArgs, opts ...pulumi.ResourceOption) (*ResourceGroup, error)

NewResourceGroup registers a new resource with the given unique name, arguments, and options.

func (*ResourceGroup) ElementType

func (*ResourceGroup) ElementType() reflect.Type

func (*ResourceGroup) ToResourceGroupOutput

func (i *ResourceGroup) ToResourceGroupOutput() ResourceGroupOutput

func (*ResourceGroup) ToResourceGroupOutputWithContext

func (i *ResourceGroup) ToResourceGroupOutputWithContext(ctx context.Context) ResourceGroupOutput

type ResourceGroupArgs

type ResourceGroupArgs struct {
	// Key-value map of tags that are used to select the EC2 instances to be included in an Amazon Inspector assessment target.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a ResourceGroup resource.

func (ResourceGroupArgs) ElementType

func (ResourceGroupArgs) ElementType() reflect.Type

type ResourceGroupArray

type ResourceGroupArray []ResourceGroupInput

func (ResourceGroupArray) ElementType

func (ResourceGroupArray) ElementType() reflect.Type

func (ResourceGroupArray) ToResourceGroupArrayOutput

func (i ResourceGroupArray) ToResourceGroupArrayOutput() ResourceGroupArrayOutput

func (ResourceGroupArray) ToResourceGroupArrayOutputWithContext

func (i ResourceGroupArray) ToResourceGroupArrayOutputWithContext(ctx context.Context) ResourceGroupArrayOutput

type ResourceGroupArrayInput

type ResourceGroupArrayInput interface {
	pulumi.Input

	ToResourceGroupArrayOutput() ResourceGroupArrayOutput
	ToResourceGroupArrayOutputWithContext(context.Context) ResourceGroupArrayOutput
}

ResourceGroupArrayInput is an input type that accepts ResourceGroupArray and ResourceGroupArrayOutput values. You can construct a concrete instance of `ResourceGroupArrayInput` via:

ResourceGroupArray{ ResourceGroupArgs{...} }

type ResourceGroupArrayOutput

type ResourceGroupArrayOutput struct{ *pulumi.OutputState }

func (ResourceGroupArrayOutput) ElementType

func (ResourceGroupArrayOutput) ElementType() reflect.Type

func (ResourceGroupArrayOutput) Index

func (ResourceGroupArrayOutput) ToResourceGroupArrayOutput

func (o ResourceGroupArrayOutput) ToResourceGroupArrayOutput() ResourceGroupArrayOutput

func (ResourceGroupArrayOutput) ToResourceGroupArrayOutputWithContext

func (o ResourceGroupArrayOutput) ToResourceGroupArrayOutputWithContext(ctx context.Context) ResourceGroupArrayOutput

type ResourceGroupInput

type ResourceGroupInput interface {
	pulumi.Input

	ToResourceGroupOutput() ResourceGroupOutput
	ToResourceGroupOutputWithContext(ctx context.Context) ResourceGroupOutput
}

type ResourceGroupMap

type ResourceGroupMap map[string]ResourceGroupInput

func (ResourceGroupMap) ElementType

func (ResourceGroupMap) ElementType() reflect.Type

func (ResourceGroupMap) ToResourceGroupMapOutput

func (i ResourceGroupMap) ToResourceGroupMapOutput() ResourceGroupMapOutput

func (ResourceGroupMap) ToResourceGroupMapOutputWithContext

func (i ResourceGroupMap) ToResourceGroupMapOutputWithContext(ctx context.Context) ResourceGroupMapOutput

type ResourceGroupMapInput

type ResourceGroupMapInput interface {
	pulumi.Input

	ToResourceGroupMapOutput() ResourceGroupMapOutput
	ToResourceGroupMapOutputWithContext(context.Context) ResourceGroupMapOutput
}

ResourceGroupMapInput is an input type that accepts ResourceGroupMap and ResourceGroupMapOutput values. You can construct a concrete instance of `ResourceGroupMapInput` via:

ResourceGroupMap{ "key": ResourceGroupArgs{...} }

type ResourceGroupMapOutput

type ResourceGroupMapOutput struct{ *pulumi.OutputState }

func (ResourceGroupMapOutput) ElementType

func (ResourceGroupMapOutput) ElementType() reflect.Type

func (ResourceGroupMapOutput) MapIndex

func (ResourceGroupMapOutput) ToResourceGroupMapOutput

func (o ResourceGroupMapOutput) ToResourceGroupMapOutput() ResourceGroupMapOutput

func (ResourceGroupMapOutput) ToResourceGroupMapOutputWithContext

func (o ResourceGroupMapOutput) ToResourceGroupMapOutputWithContext(ctx context.Context) ResourceGroupMapOutput

type ResourceGroupOutput

type ResourceGroupOutput struct{ *pulumi.OutputState }

func (ResourceGroupOutput) Arn added in v5.4.0

The resource group ARN.

func (ResourceGroupOutput) ElementType

func (ResourceGroupOutput) ElementType() reflect.Type

func (ResourceGroupOutput) Tags added in v5.4.0

Key-value map of tags that are used to select the EC2 instances to be included in an Amazon Inspector assessment target.

func (ResourceGroupOutput) ToResourceGroupOutput

func (o ResourceGroupOutput) ToResourceGroupOutput() ResourceGroupOutput

func (ResourceGroupOutput) ToResourceGroupOutputWithContext

func (o ResourceGroupOutput) ToResourceGroupOutputWithContext(ctx context.Context) ResourceGroupOutput

type ResourceGroupState

type ResourceGroupState struct {
	// The resource group ARN.
	Arn pulumi.StringPtrInput
	// Key-value map of tags that are used to select the EC2 instances to be included in an Amazon Inspector assessment target.
	Tags pulumi.StringMapInput
}

func (ResourceGroupState) ElementType

func (ResourceGroupState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL