Documentation ¶
Index ¶
- type AssessmentTarget
- type AssessmentTargetArgs
- type AssessmentTargetInput
- type AssessmentTargetOutput
- type AssessmentTargetState
- type AssessmentTemplate
- type AssessmentTemplateArgs
- type AssessmentTemplateInput
- type AssessmentTemplateOutput
- type AssessmentTemplateState
- type GetRulesPackagesResult
- type ResourceGroup
- type ResourceGroupArgs
- type ResourceGroupInput
- type ResourceGroupOutput
- type ResourceGroupState
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 a Inspector assessment target
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/inspector" "github.com/pulumi/pulumi/sdk/v2/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 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 ¶ added in v3.13.0
func (AssessmentTarget) ElementType() reflect.Type
func (AssessmentTarget) ToAssessmentTargetOutput ¶ added in v3.13.0
func (i AssessmentTarget) ToAssessmentTargetOutput() AssessmentTargetOutput
func (AssessmentTarget) ToAssessmentTargetOutputWithContext ¶ added in v3.13.0
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 AssessmentTargetInput ¶ added in v3.13.0
type AssessmentTargetInput interface { pulumi.Input ToAssessmentTargetOutput() AssessmentTargetOutput ToAssessmentTargetOutputWithContext(ctx context.Context) AssessmentTargetOutput }
type AssessmentTargetOutput ¶ added in v3.13.0
type AssessmentTargetOutput struct {
*pulumi.OutputState
}
func (AssessmentTargetOutput) ElementType ¶ added in v3.13.0
func (AssessmentTargetOutput) ElementType() reflect.Type
func (AssessmentTargetOutput) ToAssessmentTargetOutput ¶ added in v3.13.0
func (o AssessmentTargetOutput) ToAssessmentTargetOutput() AssessmentTargetOutput
func (AssessmentTargetOutput) ToAssessmentTargetOutputWithContext ¶ added in v3.13.0
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"` // 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. Tags pulumi.StringMapOutput `pulumi:"tags"` // The assessment target ARN to attach the template to. TargetArn pulumi.StringOutput `pulumi:"targetArn"` }
Provides a Inspector assessment template
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/inspector" "github.com/pulumi/pulumi/sdk/v2/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"), }, }) 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 ¶ added in v3.13.0
func (AssessmentTemplate) ElementType() reflect.Type
func (AssessmentTemplate) ToAssessmentTemplateOutput ¶ added in v3.13.0
func (i AssessmentTemplate) ToAssessmentTemplateOutput() AssessmentTemplateOutput
func (AssessmentTemplate) ToAssessmentTemplateOutputWithContext ¶ added in v3.13.0
func (i AssessmentTemplate) ToAssessmentTemplateOutputWithContext(ctx context.Context) AssessmentTemplateOutput
type AssessmentTemplateArgs ¶
type AssessmentTemplateArgs struct { // The duration of the inspector run. Duration pulumi.IntInput // 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. 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 AssessmentTemplateInput ¶ added in v3.13.0
type AssessmentTemplateInput interface { pulumi.Input ToAssessmentTemplateOutput() AssessmentTemplateOutput ToAssessmentTemplateOutputWithContext(ctx context.Context) AssessmentTemplateOutput }
type AssessmentTemplateOutput ¶ added in v3.13.0
type AssessmentTemplateOutput struct {
*pulumi.OutputState
}
func (AssessmentTemplateOutput) ElementType ¶ added in v3.13.0
func (AssessmentTemplateOutput) ElementType() reflect.Type
func (AssessmentTemplateOutput) ToAssessmentTemplateOutput ¶ added in v3.13.0
func (o AssessmentTemplateOutput) ToAssessmentTemplateOutput() AssessmentTemplateOutput
func (AssessmentTemplateOutput) ToAssessmentTemplateOutputWithContext ¶ added in v3.13.0
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 // 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. Tags 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 { // A list of the AWS Inspector 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 AWS Inspector Rules Packages data source allows access to the list of AWS Inspector Rules Packages which can be used by AWS Inspector within the region configured in the provider.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/inspector" "github.com/pulumi/pulumi/sdk/v2/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: toPulumiStringArray(rules.Arns), }) if err != nil { return err } return nil }) }
func toPulumiStringArray(arr []string) pulumi.StringArray { var pulumiArr pulumi.StringArray for _, v := range arr { pulumiArr = append(pulumiArr, pulumi.String(v)) } return pulumiArr }
```
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` resource. Tags pulumi.StringMapOutput `pulumi:"tags"` }
Provides an Amazon Inspector resource group resource.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/inspector" "github.com/pulumi/pulumi/sdk/v2/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 ¶ added in v3.13.0
func (ResourceGroup) ElementType() reflect.Type
func (ResourceGroup) ToResourceGroupOutput ¶ added in v3.13.0
func (i ResourceGroup) ToResourceGroupOutput() ResourceGroupOutput
func (ResourceGroup) ToResourceGroupOutputWithContext ¶ added in v3.13.0
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` resource. Tags pulumi.StringMapInput }
The set of arguments for constructing a ResourceGroup resource.
func (ResourceGroupArgs) ElementType ¶
func (ResourceGroupArgs) ElementType() reflect.Type
type ResourceGroupInput ¶ added in v3.13.0
type ResourceGroupInput interface { pulumi.Input ToResourceGroupOutput() ResourceGroupOutput ToResourceGroupOutputWithContext(ctx context.Context) ResourceGroupOutput }
type ResourceGroupOutput ¶ added in v3.13.0
type ResourceGroupOutput struct {
*pulumi.OutputState
}
func (ResourceGroupOutput) ElementType ¶ added in v3.13.0
func (ResourceGroupOutput) ElementType() reflect.Type
func (ResourceGroupOutput) ToResourceGroupOutput ¶ added in v3.13.0
func (o ResourceGroupOutput) ToResourceGroupOutput() ResourceGroupOutput
func (ResourceGroupOutput) ToResourceGroupOutputWithContext ¶ added in v3.13.0
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` resource. Tags pulumi.StringMapInput }
func (ResourceGroupState) ElementType ¶
func (ResourceGroupState) ElementType() reflect.Type