Package com.pulumi.aws.codebuild
Class ReportGroup
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.codebuild.ReportGroup
-
public class ReportGroup extends com.pulumi.resources.CustomResourceProvides a CodeBuild Report Groups Resource. ## Example Usage
## Import ### Identity Schema #### Required - `arn` (String) ARN of the CodeBuild report group. 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 ```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.iam.inputs.GetPolicyDocumentStatementArgs; import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementPrincipalArgs; import com.pulumi.aws.kms.Key; import com.pulumi.aws.kms.KeyArgs; import com.pulumi.aws.s3.Bucket; import com.pulumi.aws.s3.BucketArgs; 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.ArrayList; import java.util.Arrays; 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(GetCallerIdentityArgs.builder() .build()); final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .principals(GetPolicyDocumentStatementPrincipalArgs.builder() .type("AWS") .identifiers(String.format("arn:aws:iam::%s:root", current.accountId())) .build()) .sid("Enable IAM User Permissions") .effect("Allow") .actions("kms:*") .resources("*") .build()) .build()); var exampleKey = new Key("exampleKey", KeyArgs.builder() .description("my test kms key") .deletionWindowInDays(7) .policy(example.json()) .build()); var exampleBucket = new Bucket("exampleBucket", BucketArgs.builder() .bucket("my-test") .build()); var exampleReportGroup = new ReportGroup("exampleReportGroup", ReportGroupArgs.builder() .exportConfig(ReportGroupExportConfigArgs.builder() .s3Destination(ReportGroupExportConfigS3DestinationArgs.builder() .bucket(exampleBucket.id()) .encryptionDisabled(false) .encryptionKey(exampleKey.arn()) .packaging("NONE") .path("/some") .build()) .type("S3") .build()) .name("my test report group") .type("TEST") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ReportGroup(java.lang.String name)ReportGroup(java.lang.String name, ReportGroupArgs args)ReportGroup(java.lang.String name, ReportGroupArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.String>created()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>deleteReports()com.pulumi.core.Output<ReportGroupExportConfig>exportConfig()static ReportGroupget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ReportGroupState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.lang.String>type()
-
-
-
Constructor Detail
-
ReportGroup
public ReportGroup(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ReportGroup
public ReportGroup(java.lang.String name, ReportGroupArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ReportGroup
public ReportGroup(java.lang.String name, ReportGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- The ARN of Report Group.
-
created
public com.pulumi.core.Output<java.lang.String> created()
- Returns:
- The date and time this Report Group was created.
-
deleteReports
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> deleteReports()
- Returns:
- 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`.
-
exportConfig
public com.pulumi.core.Output<ReportGroupExportConfig> exportConfig()
- Returns:
- Information about the destination where the raw data of this Report Group is exported. see Export Config documented below.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of a Report Group.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Key-value mapping of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- The type of the Report Group. Valid value are `TEST` and `CODE_COVERAGE`.
-
get
public static ReportGroup get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ReportGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-