Class Channel


  • public class Channel
    extends com.pulumi.resources.CustomResource
    The Eventarc Channel resource ## Example Usage ### Basic ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.organizations.OrganizationsFunctions; import com.pulumi.gcp.organizations.inputs.GetProjectArgs; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import com.pulumi.gcp.kms.CryptoKeyIAMMember; import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs; import com.pulumi.gcp.eventarc.Channel; import com.pulumi.gcp.eventarc.ChannelArgs; import com.pulumi.resources.CustomResourceOptions; 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 testProject = OrganizationsFunctions.getProject(GetProjectArgs.builder() .projectId("my-project-name") .build()); final var testKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("keyring") .location("us-west1") .build()); final var key = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("key") .keyRing(testKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); var key1Member = new CryptoKeyIAMMember("key1Member", CryptoKeyIAMMemberArgs.builder() .cryptoKeyId(data.google_kms_crypto_key().key1().id()) .role("roles/cloudkms.cryptoKeyEncrypterDecrypter") .member(String.format("serviceAccount:service-%[email protected]", testProject.applyValue(getProjectResult -> getProjectResult.number()))) .build()); var primary = new Channel("primary", ChannelArgs.builder() .location("us-west1") .project(testProject.applyValue(getProjectResult -> getProjectResult.projectId())) .cryptoKeyName(data.google_kms_crypto_key().key1().id()) .thirdPartyProvider(String.format("projects/%s/locations/us-west1/providers/datadog", testProject.applyValue(getProjectResult -> getProjectResult.projectId()))) .build(), CustomResourceOptions.builder() .dependsOn(key1Member) .build()); } } ``` ## Import Channel can be imported using any of these accepted formats ```sh $ pulumi import gcp:eventarc/channel:Channel default projects/{{project}}/locations/{{location}}/channels/{{name}} ``` ```sh $ pulumi import gcp:eventarc/channel:Channel default {{project}}/{{location}}/{{name}} ``` ```sh $ pulumi import gcp:eventarc/channel:Channel default {{location}}/{{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
    • Constructor Summary

      Constructors 
      Constructor Description
      Channel​(java.lang.String name)  
      Channel​(java.lang.String name, ChannelArgs args)  
      Channel​(java.lang.String name, ChannelArgs 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> activationToken()  
      com.pulumi.core.Output<java.lang.String> createTime()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> cryptoKeyName()  
      static Channel get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ChannelState 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> location()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> project()  
      com.pulumi.core.Output<java.lang.String> pubsubTopic()  
      com.pulumi.core.Output<java.lang.String> state()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> thirdPartyProvider()  
      com.pulumi.core.Output<java.lang.String> uid()  
      com.pulumi.core.Output<java.lang.String> updateTime()  
      • 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

      • Channel

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

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

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

      • activationToken

        public com.pulumi.core.Output<java.lang.String> activationToken()
        Returns:
        Output only. The activation token for the channel. The token must be used by the provider to register the channel for publishing.
      • createTime

        public com.pulumi.core.Output<java.lang.String> createTime()
        Returns:
        Output only. The creation time.
      • cryptoKeyName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> cryptoKeyName()
        Returns:
        Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
      • location

        public com.pulumi.core.Output<java.lang.String> location()
        Returns:
        The location for the resource
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Required. The resource name of the channel. Must be unique within the location on the project. ***
      • project

        public com.pulumi.core.Output<java.lang.String> project()
        Returns:
        The project for the resource
      • pubsubTopic

        public com.pulumi.core.Output<java.lang.String> pubsubTopic()
        Returns:
        Output only. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format: `projects/{project}/topics/{topic_id}`.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        Output only. The state of a Channel. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE, INACTIVE
      • thirdPartyProvider

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> thirdPartyProvider()
        Returns:
        The name of the event provider (e.g. Eventarc SaaS partner) associated with the channel. This provider will be granted permissions to publish events to the channel. Format: `projects/{project}/locations/{location}/providers/{provider_id}`.
      • uid

        public com.pulumi.core.Output<java.lang.String> uid()
        Returns:
        Output only. Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
      • updateTime

        public com.pulumi.core.Output<java.lang.String> updateTime()
        Returns:
        Output only. The last-modified time.
      • get

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