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

com.pulumi.aws.codebuild.ReportGroup Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.codebuild;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.codebuild.ReportGroupArgs;
import com.pulumi.aws.codebuild.inputs.ReportGroupState;
import com.pulumi.aws.codebuild.outputs.ReportGroupExportConfig;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a CodeBuild Report Groups Resource.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.AwsFunctions;
 * import com.pulumi.aws.inputs.GetCallerIdentityArgs;
 * import com.pulumi.aws.iam.IamFunctions;
 * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
 * import com.pulumi.aws.kms.Key;
 * import com.pulumi.aws.kms.KeyArgs;
 * import com.pulumi.aws.s3.BucketV2;
 * import com.pulumi.aws.s3.BucketV2Args;
 * import com.pulumi.aws.codebuild.ReportGroup;
 * import com.pulumi.aws.codebuild.ReportGroupArgs;
 * import com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigArgs;
 * import com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigS3DestinationArgs;
 * 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) {
 *         final var current = AwsFunctions.getCallerIdentity();
 * 
 *         final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
 *             .statements(GetPolicyDocumentStatementArgs.builder()
 *                 .sid("Enable IAM User Permissions")
 *                 .effect("Allow")
 *                 .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
 *                     .type("AWS")
 *                     .identifiers(String.format("arn:aws:iam::%s:root", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId())))
 *                     .build())
 *                 .actions("kms:*")
 *                 .resources("*")
 *                 .build())
 *             .build());
 * 
 *         var exampleKey = new Key("exampleKey", KeyArgs.builder()
 *             .description("my test kms key")
 *             .deletionWindowInDays(7)
 *             .policy(example.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
 *             .build());
 * 
 *         var exampleBucketV2 = new BucketV2("exampleBucketV2", BucketV2Args.builder()
 *             .bucket("my-test")
 *             .build());
 * 
 *         var exampleReportGroup = new ReportGroup("exampleReportGroup", ReportGroupArgs.builder()
 *             .name("my test report group")
 *             .type("TEST")
 *             .exportConfig(ReportGroupExportConfigArgs.builder()
 *                 .type("S3")
 *                 .s3Destination(ReportGroupExportConfigS3DestinationArgs.builder()
 *                     .bucket(exampleBucketV2.id())
 *                     .encryptionDisabled(false)
 *                     .encryptionKey(exampleKey.arn())
 *                     .packaging("NONE")
 *                     .path("/some")
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import CodeBuild Report Group using the CodeBuild Report Group arn. For example: * * ```sh * $ pulumi import aws:codebuild/reportGroup:ReportGroup example arn:aws:codebuild:us-west-2:123456789:report-group/report-group-name * ``` * */ @ResourceType(type="aws:codebuild/reportGroup:ReportGroup") public class ReportGroup extends com.pulumi.resources.CustomResource { /** * The ARN of Report Group. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return The ARN of Report Group. * */ public Output arn() { return this.arn; } /** * The date and time this Report Group was created. * */ @Export(name="created", refs={String.class}, tree="[0]") private Output created; /** * @return The date and time this Report Group was created. * */ public Output created() { return this.created; } /** * If `true`, deletes any reports that belong to a report group before deleting the report group. If `false`, you must delete any reports in the report group before deleting it. Default value is `false`. * */ @Export(name="deleteReports", refs={Boolean.class}, tree="[0]") private Output deleteReports; /** * @return If `true`, deletes any reports that belong to a report group before deleting the report group. If `false`, you must delete any reports in the report group before deleting it. Default value is `false`. * */ public Output> deleteReports() { return Codegen.optional(this.deleteReports); } /** * Information about the destination where the raw data of this Report Group is exported. see Export Config documented below. * */ @Export(name="exportConfig", refs={ReportGroupExportConfig.class}, tree="[0]") private Output exportConfig; /** * @return Information about the destination where the raw data of this Report Group is exported. see Export Config documented below. * */ public Output exportConfig() { return this.exportConfig; } /** * The name of a Report Group. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of a Report Group. * */ public Output name() { return this.name; } /** * Key-value mapping 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. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Key-value mapping 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. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * * @deprecated * Please use `tags` instead. * */ @Deprecated /* Please use `tags` instead. */ @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tagsAll; /** * @return A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * */ public Output> tagsAll() { return this.tagsAll; } /** * The type of the Report Group. Valid value are `TEST` and `CODE_COVERAGE`. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the Report Group. Valid value are `TEST` and `CODE_COVERAGE`. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public ReportGroup(java.lang.String name) { this(name, ReportGroupArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ReportGroup(java.lang.String name, ReportGroupArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ReportGroup(java.lang.String name, ReportGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:codebuild/reportGroup:ReportGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ReportGroup(java.lang.String name, Output id, @Nullable ReportGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:codebuild/reportGroup:ReportGroup", name, state, makeResourceOptions(options, id), false); } private static ReportGroupArgs makeArgs(ReportGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ReportGroupArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ReportGroup get(java.lang.String name, Output id, @Nullable ReportGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ReportGroup(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy