Class InstanceIamPolicy


  • public class InstanceIamPolicy
    extends com.pulumi.resources.CustomResource
    Represents a Data Fusion instance. To get more information about Instance, see: * [API documentation](https://cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances) * How-to Guides * [Official Documentation](https://cloud.google.com/data-fusion/docs/) ## Example Usage ### Data Fusion Instance Basic <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.datafusion.Instance; import com.pulumi.gcp.datafusion.InstanceArgs; 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 basicInstance = new Instance("basicInstance", InstanceArgs.builder() .name("my-instance") .region("us-central1") .type("BASIC") .build()); } } ``` <!--End PulumiCodeChooser --> ### Data Fusion Instance Full <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.appengine.AppengineFunctions; import com.pulumi.gcp.appengine.inputs.GetDefaultServiceAccountArgs; import com.pulumi.gcp.compute.Network; import com.pulumi.gcp.compute.NetworkArgs; import com.pulumi.gcp.compute.GlobalAddress; import com.pulumi.gcp.compute.GlobalAddressArgs; import com.pulumi.gcp.datafusion.Instance; import com.pulumi.gcp.datafusion.InstanceArgs; import com.pulumi.gcp.datafusion.inputs.InstanceNetworkConfigArgs; import com.pulumi.gcp.datafusion.inputs.InstanceAcceleratorArgs; 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 default = AppengineFunctions.getDefaultServiceAccount(); var network = new Network("network", NetworkArgs.builder() .name("datafusion-full-network") .build()); var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder() .name("datafusion-ip-alloc") .addressType("INTERNAL") .purpose("VPC_PEERING") .prefixLength(22) .network(network.id()) .build()); var extendedInstance = new Instance("extendedInstance", InstanceArgs.builder() .name("my-instance") .description("My Data Fusion instance") .displayName("My Data Fusion instance") .region("us-central1") .type("BASIC") .enableStackdriverLogging(true) .enableStackdriverMonitoring(true) .privateInstance(true) .dataprocServiceAccount(default_.email()) .labels(Map.of("example_key", "example_value")) .networkConfig(InstanceNetworkConfigArgs.builder() .network("default") .ipAllocation(Output.tuple(privateIpAlloc.address(), privateIpAlloc.prefixLength()).applyValue(values -> { var address = values.t1; var prefixLength = values.t2; return String.format("%s/%s", address,prefixLength); })) .build()) .accelerators(InstanceAcceleratorArgs.builder() .acceleratorType("CDC") .state("ENABLED") .build()) .build()); } } ``` <!--End PulumiCodeChooser --> ### Data Fusion Instance Cmek <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KeyRing; import com.pulumi.gcp.kms.KeyRingArgs; import com.pulumi.gcp.kms.CryptoKey; import com.pulumi.gcp.kms.CryptoKeyArgs; import com.pulumi.gcp.datafusion.Instance; import com.pulumi.gcp.datafusion.InstanceArgs; import com.pulumi.gcp.datafusion.inputs.InstanceCryptoKeyConfigArgs; import com.pulumi.gcp.organizations.OrganizationsFunctions; import com.pulumi.gcp.organizations.inputs.GetProjectArgs; import com.pulumi.gcp.kms.CryptoKeyIAMMember; import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs; 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 keyRing = new KeyRing("keyRing", KeyRingArgs.builder() .name("my-instance") .location("us-central1") .build()); var cryptoKey = new CryptoKey("cryptoKey", CryptoKeyArgs.builder() .name("my-instance") .keyRing(keyRing.id()) .build()); var cmek = new Instance("cmek", InstanceArgs.builder() .name("my-instance") .region("us-central1") .type("BASIC") .cryptoKeyConfig(InstanceCryptoKeyConfigArgs.builder() .keyReference(cryptoKey.id()) .build()) .build()); final var project = OrganizationsFunctions.getProject(); var cryptoKeyMember = new CryptoKeyIAMMember("cryptoKeyMember", CryptoKeyIAMMemberArgs.builder() .cryptoKeyId(cryptoKey.id()) .role("roles/cloudkms.cryptoKeyEncrypterDecrypter") .member(String.format("serviceAccount:service-%[email protected]", project.applyValue(getProjectResult -> getProjectResult.number()))) .build()); } } ``` <!--End PulumiCodeChooser --> ### Data Fusion Instance Enterprise <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.datafusion.Instance; import com.pulumi.gcp.datafusion.InstanceArgs; 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 enterpriseInstance = new Instance("enterpriseInstance", InstanceArgs.builder() .name("my-instance") .region("us-central1") .type("ENTERPRISE") .enableRbac(true) .build()); } } ``` <!--End PulumiCodeChooser --> ### Data Fusion Instance Event <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.pubsub.Topic; import com.pulumi.gcp.pubsub.TopicArgs; import com.pulumi.gcp.datafusion.Instance; import com.pulumi.gcp.datafusion.InstanceArgs; import com.pulumi.gcp.datafusion.inputs.InstanceEventPublishConfigArgs; 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 eventTopic = new Topic("eventTopic", TopicArgs.builder() .name("my-instance") .build()); var event = new Instance("event", InstanceArgs.builder() .name("my-instance") .region("us-central1") .type("BASIC") .eventPublishConfig(InstanceEventPublishConfigArgs.builder() .enabled(true) .topic(eventTopic.id()) .build()) .build()); } } ``` <!--End PulumiCodeChooser --> ### Data Fusion Instance Zone <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.datafusion.Instance; import com.pulumi.gcp.datafusion.InstanceArgs; 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 zone = new Instance("zone", InstanceArgs.builder() .name("my-instance") .region("us-central1") .zone("us-central1-a") .type("DEVELOPER") .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Instance can be imported using any of these accepted formats: * `projects/{{project}}/locations/{{region}}/instances/{{name}}` * `{{project}}/{{region}}/{{name}}` * `{{region}}/{{name}}` * `{{name}}` When using the `pulumi import` command, Instance can be imported using one of the formats above. For example: ```sh $ pulumi import gcp:securitycenter/instanceIamPolicy:InstanceIamPolicy default projects/{{project}}/locations/{{region}}/instances/{{name}} ``` ```sh $ pulumi import gcp:securitycenter/instanceIamPolicy:InstanceIamPolicy default {{project}}/{{region}}/{{name}} ``` ```sh $ pulumi import gcp:securitycenter/instanceIamPolicy:InstanceIamPolicy default {{region}}/{{name}} ``` ```sh $ pulumi import gcp:securitycenter/instanceIamPolicy:InstanceIamPolicy default {{name}} ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> etag()  
      static InstanceIamPolicy get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, InstanceIamPolicyState 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> policyData()  
      com.pulumi.core.Output<java.lang.String> project()  
      com.pulumi.core.Output<java.lang.String> region()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InstanceIamPolicy

        public InstanceIamPolicy​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • InstanceIamPolicy

        public InstanceIamPolicy​(java.lang.String name,
                                 InstanceIamPolicyArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • InstanceIamPolicy

        public InstanceIamPolicy​(java.lang.String name,
                                 InstanceIamPolicyArgs 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

      • etag

        public com.pulumi.core.Output<java.lang.String> etag()
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The ID of the instance or a fully qualified identifier for the instance.
      • policyData

        public com.pulumi.core.Output<java.lang.String> policyData()
      • project

        public com.pulumi.core.Output<java.lang.String> project()
        Returns:
        The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        The region of the Data Fusion instance.
      • get

        public static InstanceIamPolicy get​(java.lang.String name,
                                            com.pulumi.core.Output<java.lang.String> id,
                                            @Nullable
                                            InstanceIamPolicyState 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.