All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.securityhub.kotlin.SecurityhubFunctions.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.securityhub.kotlin

import com.pulumi.aws.securityhub.SecurityhubFunctions.getStandardsControlAssociationsPlain
import com.pulumi.aws.securityhub.kotlin.inputs.GetStandardsControlAssociationsPlainArgs
import com.pulumi.aws.securityhub.kotlin.inputs.GetStandardsControlAssociationsPlainArgsBuilder
import com.pulumi.aws.securityhub.kotlin.outputs.GetStandardsControlAssociationsResult
import com.pulumi.aws.securityhub.kotlin.outputs.GetStandardsControlAssociationsResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

public object SecurityhubFunctions {
    /**
     * Data source for managing an AWS Security Hub Standards Control Associations.
     * ## Example Usage
     * ### Basic Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as aws from "@pulumi/aws";
     * const testAccount = new aws.securityhub.Account("test", {});
     * const test = aws.securityhub.getStandardsControlAssociations({
     *     securityControlId: "IAM.1",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_aws as aws
     * test_account = aws.securityhub.Account("test")
     * test = aws.securityhub.get_standards_control_associations(security_control_id="IAM.1")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Aws = Pulumi.Aws;
     * return await Deployment.RunAsync(() =>
     * {
     *     var testAccount = new Aws.SecurityHub.Account("test");
     *     var test = Aws.SecurityHub.GetStandardsControlAssociations.Invoke(new()
     *     {
     *         SecurityControlId = "IAM.1",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := securityhub.NewAccount(ctx, "test", nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		_, err = securityhub.GetStandardsControlAssociations(ctx, &securityhub.GetStandardsControlAssociationsArgs{
     * 			SecurityControlId: "IAM.1",
     * 		}, nil)
     * 		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.securityhub.Account;
     * import com.pulumi.aws.securityhub.SecurityhubFunctions;
     * import com.pulumi.aws.securityhub.inputs.GetStandardsControlAssociationsArgs;
     * 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 testAccount = new Account("testAccount");
     *         final var test = SecurityhubFunctions.getStandardsControlAssociations(GetStandardsControlAssociationsArgs.builder()
     *             .securityControlId("IAM.1")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * resources:
     *   testAccount:
     *     type: aws:securityhub:Account
     *     name: test
     * variables:
     *   test:
     *     fn::invoke:
     *       Function: aws:securityhub:getStandardsControlAssociations
     *       Arguments:
     *         securityControlId: IAM.1
     * ```
     * 
     * @param argument A collection of arguments for invoking getStandardsControlAssociations.
     * @return A collection of values returned by getStandardsControlAssociations.
     */
    public suspend fun getStandardsControlAssociations(argument: GetStandardsControlAssociationsPlainArgs): GetStandardsControlAssociationsResult =
        toKotlin(getStandardsControlAssociationsPlain(argument.toJava()).await())

    /**
     * @see [getStandardsControlAssociations].
     * @param securityControlId The identifier of the control (identified with `SecurityControlId`, `SecurityControlArn`, or a mix of both parameters).
     * @return A collection of values returned by getStandardsControlAssociations.
     */
    public suspend fun getStandardsControlAssociations(securityControlId: String): GetStandardsControlAssociationsResult {
        val argument = GetStandardsControlAssociationsPlainArgs(
            securityControlId = securityControlId,
        )
        return toKotlin(getStandardsControlAssociationsPlain(argument.toJava()).await())
    }

    /**
     * @see [getStandardsControlAssociations].
     * @param argument Builder for [com.pulumi.aws.securityhub.kotlin.inputs.GetStandardsControlAssociationsPlainArgs].
     * @return A collection of values returned by getStandardsControlAssociations.
     */
    public suspend fun getStandardsControlAssociations(argument: suspend GetStandardsControlAssociationsPlainArgsBuilder.() -> Unit): GetStandardsControlAssociationsResult {
        val builder = GetStandardsControlAssociationsPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return toKotlin(getStandardsControlAssociationsPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy