aws.accessanalyzer.ArchiveRule
Explore with Pulumi AI
Resource for managing an AWS AccessAnalyzer Archive Rule.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AccessAnalyzer.ArchiveRule("example", new()
{
AnalyzerName = "example-analyzer",
Filters = new[]
{
new Aws.AccessAnalyzer.Inputs.ArchiveRuleFilterArgs
{
Criteria = "condition.aws:UserId",
Eqs = new[]
{
"userid",
},
},
new Aws.AccessAnalyzer.Inputs.ArchiveRuleFilterArgs
{
Criteria = "error",
Exists = "true",
},
new Aws.AccessAnalyzer.Inputs.ArchiveRuleFilterArgs
{
Criteria = "isPublic",
Eqs = new[]
{
"false",
},
},
},
RuleName = "example-rule",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/accessanalyzer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := accessanalyzer.NewArchiveRule(ctx, "example", &accessanalyzer.ArchiveRuleArgs{
AnalyzerName: pulumi.String("example-analyzer"),
Filters: accessanalyzer.ArchiveRuleFilterArray{
&accessanalyzer.ArchiveRuleFilterArgs{
Criteria: pulumi.String("condition.aws:UserId"),
Eqs: pulumi.StringArray{
pulumi.String("userid"),
},
},
&accessanalyzer.ArchiveRuleFilterArgs{
Criteria: pulumi.String("error"),
Exists: pulumi.String("true"),
},
&accessanalyzer.ArchiveRuleFilterArgs{
Criteria: pulumi.String("isPublic"),
Eqs: pulumi.StringArray{
pulumi.String("false"),
},
},
},
RuleName: pulumi.String("example-rule"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.accessanalyzer.ArchiveRule;
import com.pulumi.aws.accessanalyzer.ArchiveRuleArgs;
import com.pulumi.aws.accessanalyzer.inputs.ArchiveRuleFilterArgs;
import java.util.List;
import java.util.ArrayList;
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 example = new ArchiveRule("example", ArchiveRuleArgs.builder()
.analyzerName("example-analyzer")
.filters(
ArchiveRuleFilterArgs.builder()
.criteria("condition.aws:UserId")
.eqs("userid")
.build(),
ArchiveRuleFilterArgs.builder()
.criteria("error")
.exists(true)
.build(),
ArchiveRuleFilterArgs.builder()
.criteria("isPublic")
.eqs("false")
.build())
.ruleName("example-rule")
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.accessanalyzer.ArchiveRule("example",
analyzer_name="example-analyzer",
filters=[
aws.accessanalyzer.ArchiveRuleFilterArgs(
criteria="condition.aws:UserId",
eqs=["userid"],
),
aws.accessanalyzer.ArchiveRuleFilterArgs(
criteria="error",
exists="true",
),
aws.accessanalyzer.ArchiveRuleFilterArgs(
criteria="isPublic",
eqs=["false"],
),
],
rule_name="example-rule")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.accessanalyzer.ArchiveRule("example", {
analyzerName: "example-analyzer",
filters: [
{
criteria: "condition.aws:UserId",
eqs: ["userid"],
},
{
criteria: "error",
exists: "true",
},
{
criteria: "isPublic",
eqs: ["false"],
},
],
ruleName: "example-rule",
});
resources:
example:
type: aws:accessanalyzer:ArchiveRule
properties:
analyzerName: example-analyzer
filters:
- criteria: condition.aws:UserId
eqs:
- userid
- criteria: error
exists: true
- criteria: isPublic
eqs:
- 'false'
ruleName: example-rule
Create ArchiveRule Resource
new ArchiveRule(name: string, args: ArchiveRuleArgs, opts?: CustomResourceOptions);
@overload
def ArchiveRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
analyzer_name: Optional[str] = None,
filters: Optional[Sequence[ArchiveRuleFilterArgs]] = None,
rule_name: Optional[str] = None)
@overload
def ArchiveRule(resource_name: str,
args: ArchiveRuleArgs,
opts: Optional[ResourceOptions] = None)
func NewArchiveRule(ctx *Context, name string, args ArchiveRuleArgs, opts ...ResourceOption) (*ArchiveRule, error)
public ArchiveRule(string name, ArchiveRuleArgs args, CustomResourceOptions? opts = null)
public ArchiveRule(String name, ArchiveRuleArgs args)
public ArchiveRule(String name, ArchiveRuleArgs args, CustomResourceOptions options)
type: aws:accessanalyzer:ArchiveRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ArchiveRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ArchiveRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ArchiveRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ArchiveRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ArchiveRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ArchiveRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ArchiveRule resource accepts the following input properties:
- Analyzer
Name string Analyzer name.
- Filters
List<Archive
Rule Filter Args> Filter criteria for the archive rule. See Filter for more details.
- Rule
Name string Rule name.
- Analyzer
Name string Analyzer name.
- Filters
[]Archive
Rule Filter Args Filter criteria for the archive rule. See Filter for more details.
- Rule
Name string Rule name.
- analyzer
Name String Analyzer name.
- filters
List<Archive
Rule Filter Args> Filter criteria for the archive rule. See Filter for more details.
- rule
Name String Rule name.
- analyzer
Name string Analyzer name.
- filters
Archive
Rule Filter Args[] Filter criteria for the archive rule. See Filter for more details.
- rule
Name string Rule name.
- analyzer_
name str Analyzer name.
- filters
Sequence[Archive
Rule Filter Args] Filter criteria for the archive rule. See Filter for more details.
- rule_
name str Rule name.
- analyzer
Name String Analyzer name.
- filters List<Property Map>
Filter criteria for the archive rule. See Filter for more details.
- rule
Name String Rule name.
Outputs
All input properties are implicitly available as output properties. Additionally, the ArchiveRule resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ArchiveRule Resource
Get an existing ArchiveRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ArchiveRuleState, opts?: CustomResourceOptions): ArchiveRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
analyzer_name: Optional[str] = None,
filters: Optional[Sequence[ArchiveRuleFilterArgs]] = None,
rule_name: Optional[str] = None) -> ArchiveRule
func GetArchiveRule(ctx *Context, name string, id IDInput, state *ArchiveRuleState, opts ...ResourceOption) (*ArchiveRule, error)
public static ArchiveRule Get(string name, Input<string> id, ArchiveRuleState? state, CustomResourceOptions? opts = null)
public static ArchiveRule get(String name, Output<String> id, ArchiveRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Analyzer
Name string Analyzer name.
- Filters
List<Archive
Rule Filter Args> Filter criteria for the archive rule. See Filter for more details.
- Rule
Name string Rule name.
- Analyzer
Name string Analyzer name.
- Filters
[]Archive
Rule Filter Args Filter criteria for the archive rule. See Filter for more details.
- Rule
Name string Rule name.
- analyzer
Name String Analyzer name.
- filters
List<Archive
Rule Filter Args> Filter criteria for the archive rule. See Filter for more details.
- rule
Name String Rule name.
- analyzer
Name string Analyzer name.
- filters
Archive
Rule Filter Args[] Filter criteria for the archive rule. See Filter for more details.
- rule
Name string Rule name.
- analyzer_
name str Analyzer name.
- filters
Sequence[Archive
Rule Filter Args] Filter criteria for the archive rule. See Filter for more details.
- rule_
name str Rule name.
- analyzer
Name String Analyzer name.
- filters List<Property Map>
Filter criteria for the archive rule. See Filter for more details.
- rule
Name String Rule name.
Supporting Types
ArchiveRuleFilter
Import
AccessAnalyzer ArchiveRule can be imported using the analyzer_name/rule_name
, e.g.,
$ pulumi import aws:accessanalyzer/archiveRule:ArchiveRule example example-analyzer/example-rule
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.