com.pulumi.aws.accessanalyzer.kotlin.AnalyzerArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.accessanalyzer.kotlin
import com.pulumi.aws.accessanalyzer.AnalyzerArgs.builder
import com.pulumi.aws.accessanalyzer.kotlin.inputs.AnalyzerConfigurationArgs
import com.pulumi.aws.accessanalyzer.kotlin.inputs.AnalyzerConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an Access Analyzer Analyzer. More information can be found in the [Access Analyzer User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html).
* ## Example Usage
* ### Account Analyzer
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.accessanalyzer.Analyzer("example", {analyzerName: "example"});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.accessanalyzer.Analyzer("example", analyzer_name="example")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.AccessAnalyzer.Analyzer("example", new()
* {
* AnalyzerName = "example",
* });
* });
* ```
* ```go
* 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.NewAnalyzer(ctx, "example", &accessanalyzer.AnalyzerArgs{
* AnalyzerName: pulumi.String("example"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.accessanalyzer.Analyzer;
* import com.pulumi.aws.accessanalyzer.AnalyzerArgs;
* 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 Analyzer("example", AnalyzerArgs.builder()
* .analyzerName("example")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:accessanalyzer:Analyzer
* properties:
* analyzerName: example
* ```
*
* ### Organization Analyzer
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.organizations.Organization("example", {awsServiceAccessPrincipals: ["access-analyzer.amazonaws.com"]});
* const exampleAnalyzer = new aws.accessanalyzer.Analyzer("example", {
* analyzerName: "example",
* type: "ORGANIZATION",
* }, {
* dependsOn: [example],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.organizations.Organization("example", aws_service_access_principals=["access-analyzer.amazonaws.com"])
* example_analyzer = aws.accessanalyzer.Analyzer("example",
* analyzer_name="example",
* type="ORGANIZATION",
* opts = pulumi.ResourceOptions(depends_on=[example]))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Organizations.Organization("example", new()
* {
* AwsServiceAccessPrincipals = new[]
* {
* "access-analyzer.amazonaws.com",
* },
* });
* var exampleAnalyzer = new Aws.AccessAnalyzer.Analyzer("example", new()
* {
* AnalyzerName = "example",
* Type = "ORGANIZATION",
* }, new CustomResourceOptions
* {
* DependsOn =
* {
* example,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/accessanalyzer"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := organizations.NewOrganization(ctx, "example", &organizations.OrganizationArgs{
* AwsServiceAccessPrincipals: pulumi.StringArray{
* pulumi.String("access-analyzer.amazonaws.com"),
* },
* })
* if err != nil {
* return err
* }
* _, err = accessanalyzer.NewAnalyzer(ctx, "example", &accessanalyzer.AnalyzerArgs{
* AnalyzerName: pulumi.String("example"),
* Type: pulumi.String("ORGANIZATION"),
* }, pulumi.DependsOn([]pulumi.Resource{
* example,
* }))
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.organizations.Organization;
* import com.pulumi.aws.organizations.OrganizationArgs;
* import com.pulumi.aws.accessanalyzer.Analyzer;
* import com.pulumi.aws.accessanalyzer.AnalyzerArgs;
* import com.pulumi.resources.CustomResourceOptions;
* 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 Organization("example", OrganizationArgs.builder()
* .awsServiceAccessPrincipals("access-analyzer.amazonaws.com")
* .build());
* var exampleAnalyzer = new Analyzer("exampleAnalyzer", AnalyzerArgs.builder()
* .analyzerName("example")
* .type("ORGANIZATION")
* .build(), CustomResourceOptions.builder()
* .dependsOn(example)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:organizations:Organization
* properties:
* awsServiceAccessPrincipals:
* - access-analyzer.amazonaws.com
* exampleAnalyzer:
* type: aws:accessanalyzer:Analyzer
* name: example
* properties:
* analyzerName: example
* type: ORGANIZATION
* options:
* dependson:
* - ${example}
* ```
*
* ## Import
* Using `pulumi import`, import Access Analyzer Analyzers using the `analyzer_name`. For example:
* ```sh
* $ pulumi import aws:accessanalyzer/analyzer:Analyzer example example
* ```
* @property analyzerName Name of the Analyzer.
* The following arguments are optional:
* @property configuration A block that specifies the configuration of the analyzer. Documented below
* @property tags Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
* @property type Type of Analyzer. Valid values are `ACCOUNT`, `ORGANIZATION`, `ACCOUNT_UNUSED_ACCESS `, `ORGANIZATION_UNUSED_ACCESS`. Defaults to `ACCOUNT`.
*/
public data class AnalyzerArgs(
public val analyzerName: Output? = null,
public val configuration: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy