1. Packages
  2. AWS Classic
  3. API Docs
  4. accessanalyzer
  5. ArchiveRule

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

aws.accessanalyzer.ArchiveRule

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

    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/v6/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:

    AnalyzerName string

    Analyzer name.

    Filters List<ArchiveRuleFilter>

    Filter criteria for the archive rule. See Filter for more details.

    RuleName string

    Rule name.

    AnalyzerName string

    Analyzer name.

    Filters []ArchiveRuleFilterArgs

    Filter criteria for the archive rule. See Filter for more details.

    RuleName string

    Rule name.

    analyzerName String

    Analyzer name.

    filters List<ArchiveRuleFilter>

    Filter criteria for the archive rule. See Filter for more details.

    ruleName String

    Rule name.

    analyzerName string

    Analyzer name.

    filters ArchiveRuleFilter[]

    Filter criteria for the archive rule. See Filter for more details.

    ruleName string

    Rule name.

    analyzer_name str

    Analyzer name.

    filters Sequence[ArchiveRuleFilterArgs]

    Filter criteria for the archive rule. See Filter for more details.

    rule_name str

    Rule name.

    analyzerName String

    Analyzer name.

    filters List<Property Map>

    Filter criteria for the archive rule. See Filter for more details.

    ruleName 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.
    The following state arguments are supported:
    AnalyzerName string

    Analyzer name.

    Filters List<ArchiveRuleFilter>

    Filter criteria for the archive rule. See Filter for more details.

    RuleName string

    Rule name.

    AnalyzerName string

    Analyzer name.

    Filters []ArchiveRuleFilterArgs

    Filter criteria for the archive rule. See Filter for more details.

    RuleName string

    Rule name.

    analyzerName String

    Analyzer name.

    filters List<ArchiveRuleFilter>

    Filter criteria for the archive rule. See Filter for more details.

    ruleName String

    Rule name.

    analyzerName string

    Analyzer name.

    filters ArchiveRuleFilter[]

    Filter criteria for the archive rule. See Filter for more details.

    ruleName string

    Rule name.

    analyzer_name str

    Analyzer name.

    filters Sequence[ArchiveRuleFilterArgs]

    Filter criteria for the archive rule. See Filter for more details.

    rule_name str

    Rule name.

    analyzerName String

    Analyzer name.

    filters List<Property Map>

    Filter criteria for the archive rule. See Filter for more details.

    ruleName String

    Rule name.

    Supporting Types

    ArchiveRuleFilter, ArchiveRuleFilterArgs

    Criteria string

    Filter criteria.

    Contains List<string>

    Contains comparator.

    Eqs List<string>

    Equals comparator.

    Exists string

    Boolean comparator.

    Neqs List<string>

    Not Equals comparator.

    Criteria string

    Filter criteria.

    Contains []string

    Contains comparator.

    Eqs []string

    Equals comparator.

    Exists string

    Boolean comparator.

    Neqs []string

    Not Equals comparator.

    criteria String

    Filter criteria.

    contains List<String>

    Contains comparator.

    eqs List<String>

    Equals comparator.

    exists String

    Boolean comparator.

    neqs List<String>

    Not Equals comparator.

    criteria string

    Filter criteria.

    contains string[]

    Contains comparator.

    eqs string[]

    Equals comparator.

    exists string

    Boolean comparator.

    neqs string[]

    Not Equals comparator.

    criteria str

    Filter criteria.

    contains Sequence[str]

    Contains comparator.

    eqs Sequence[str]

    Equals comparator.

    exists str

    Boolean comparator.

    neqs Sequence[str]

    Not Equals comparator.

    criteria String

    Filter criteria.

    contains List<String>

    Contains comparator.

    eqs List<String>

    Equals comparator.

    exists String

    Boolean comparator.

    neqs List<String>

    Not Equals comparator.

    Import

    Using pulumi import, import AccessAnalyzer ArchiveRule using the analyzer_name/rule_name. For example:

     $ 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.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi