com.pulumi.azurenative.policyinsights.AttestationAtResourceGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.azurenative.policyinsights;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.policyinsights.AttestationAtResourceGroupArgs;
import com.pulumi.azurenative.policyinsights.outputs.AttestationEvidenceResponse;
import com.pulumi.azurenative.policyinsights.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* An attestation resource.
* Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2021-01-01.
*
* ## Example Usage
* ### Create attestation at resource group scope
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.policyinsights.AttestationAtResourceGroup;
* import com.pulumi.azurenative.policyinsights.AttestationAtResourceGroupArgs;
* import com.pulumi.azurenative.policyinsights.inputs.AttestationEvidenceArgs;
* 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 attestationAtResourceGroup = new AttestationAtResourceGroup("attestationAtResourceGroup", AttestationAtResourceGroupArgs.builder()
* .assessmentDate("2021-06-10T00:00:00Z")
* .attestationName("790996e6-9871-4b1f-9cd9-ec42cd6ced1e")
* .comments("This subscription has passed a security audit.")
* .complianceState("Compliant")
* .evidence(AttestationEvidenceArgs.builder()
* .description("The results of the security audit.")
* .sourceUri("https://gist.github.com/contoso/9573e238762c60166c090ae16b814011")
* .build())
* .expiresOn("2021-06-15T00:00:00Z")
* .metadata(Map.of("departmentId", "NYC-MARKETING-1"))
* .owner("55a32e28-3aa5-4eea-9b5a-4cd85153b966")
* .policyAssignmentId("/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5")
* .policyDefinitionReferenceId("0b158b46-ff42-4799-8e39-08a5c23b4551")
* .resourceGroupName("myRg")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:policyinsights:AttestationAtResourceGroup 790996e6-9871-4b1f-9cd9-ec42cd6ced1e /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/attestations/{attestationName}
* ```
*
*/
@ResourceType(type="azure-native:policyinsights:AttestationAtResourceGroup")
public class AttestationAtResourceGroup extends com.pulumi.resources.CustomResource {
/**
* The time the evidence was assessed
*
*/
@Export(name="assessmentDate", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> assessmentDate;
/**
* @return The time the evidence was assessed
*
*/
public Output> assessmentDate() {
return Codegen.optional(this.assessmentDate);
}
/**
* Comments describing why this attestation was created.
*
*/
@Export(name="comments", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> comments;
/**
* @return Comments describing why this attestation was created.
*
*/
public Output> comments() {
return Codegen.optional(this.comments);
}
/**
* The compliance state that should be set on the resource.
*
*/
@Export(name="complianceState", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> complianceState;
/**
* @return The compliance state that should be set on the resource.
*
*/
public Output> complianceState() {
return Codegen.optional(this.complianceState);
}
/**
* The evidence supporting the compliance state set in this attestation.
*
*/
@Export(name="evidence", refs={List.class,AttestationEvidenceResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> evidence;
/**
* @return The evidence supporting the compliance state set in this attestation.
*
*/
public Output>> evidence() {
return Codegen.optional(this.evidence);
}
/**
* The time the compliance state should expire.
*
*/
@Export(name="expiresOn", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> expiresOn;
/**
* @return The time the compliance state should expire.
*
*/
public Output> expiresOn() {
return Codegen.optional(this.expiresOn);
}
/**
* The time the compliance state was last changed in this attestation.
*
*/
@Export(name="lastComplianceStateChangeAt", refs={String.class}, tree="[0]")
private Output lastComplianceStateChangeAt;
/**
* @return The time the compliance state was last changed in this attestation.
*
*/
public Output lastComplianceStateChangeAt() {
return this.lastComplianceStateChangeAt;
}
/**
* Additional metadata for this attestation
*
*/
@Export(name="metadata", refs={Object.class}, tree="[0]")
private Output* @Nullable */ Object> metadata;
/**
* @return Additional metadata for this attestation
*
*/
public Output> metadata() {
return Codegen.optional(this.metadata);
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* The person responsible for setting the state of the resource. This value is typically an Azure Active Directory object ID.
*
*/
@Export(name="owner", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> owner;
/**
* @return The person responsible for setting the state of the resource. This value is typically an Azure Active Directory object ID.
*
*/
public Output> owner() {
return Codegen.optional(this.owner);
}
/**
* The resource ID of the policy assignment that the attestation is setting the state for.
*
*/
@Export(name="policyAssignmentId", refs={String.class}, tree="[0]")
private Output policyAssignmentId;
/**
* @return The resource ID of the policy assignment that the attestation is setting the state for.
*
*/
public Output policyAssignmentId() {
return this.policyAssignmentId;
}
/**
* The policy definition reference ID from a policy set definition that the attestation is setting the state for. If the policy assignment assigns a policy set definition the attestation can choose a definition within the set definition with this property or omit this and set the state for the entire set definition.
*
*/
@Export(name="policyDefinitionReferenceId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> policyDefinitionReferenceId;
/**
* @return The policy definition reference ID from a policy set definition that the attestation is setting the state for. If the policy assignment assigns a policy set definition the attestation can choose a definition within the set definition with this property or omit this and set the state for the entire set definition.
*
*/
public Output> policyDefinitionReferenceId() {
return Codegen.optional(this.policyDefinitionReferenceId);
}
/**
* The status of the attestation.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The status of the attestation.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public AttestationAtResourceGroup(java.lang.String name) {
this(name, AttestationAtResourceGroupArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public AttestationAtResourceGroup(java.lang.String name, AttestationAtResourceGroupArgs 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 AttestationAtResourceGroup(java.lang.String name, AttestationAtResourceGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:policyinsights:AttestationAtResourceGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private AttestationAtResourceGroup(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:policyinsights:AttestationAtResourceGroup", name, null, makeResourceOptions(options, id), false);
}
private static AttestationAtResourceGroupArgs makeArgs(AttestationAtResourceGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? AttestationAtResourceGroupArgs.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())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:policyinsights/v20210101:AttestationAtResourceGroup").build()),
Output.of(Alias.builder().type("azure-native:policyinsights/v20220901:AttestationAtResourceGroup").build())
))
.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 options Optional settings to control the behavior of the CustomResource.
*/
public static AttestationAtResourceGroup get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new AttestationAtResourceGroup(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy