com.pulumi.azurenative.eventhub.EventHub 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.
The newest version!
// *** 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.eventhub;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.eventhub.EventHubArgs;
import com.pulumi.azurenative.eventhub.outputs.CaptureDescriptionResponse;
import com.pulumi.azurenative.eventhub.outputs.RetentionDescriptionResponse;
import com.pulumi.azurenative.eventhub.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.Double;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Single item in List or Get Event Hub operation
* Azure REST API version: 2022-10-01-preview. Prior API version in Azure Native 1.x: 2017-04-01.
*
* Other available API versions: 2015-08-01, 2023-01-01-preview, 2024-01-01, 2024-05-01-preview.
*
* ## Example Usage
* ### EventHubCreate
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.eventhub.EventHub;
* import com.pulumi.azurenative.eventhub.EventHubArgs;
* import com.pulumi.azurenative.eventhub.inputs.CaptureDescriptionArgs;
* import com.pulumi.azurenative.eventhub.inputs.DestinationArgs;
* import com.pulumi.azurenative.eventhub.inputs.RetentionDescriptionArgs;
* 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 eventHub = new EventHub("eventHub", EventHubArgs.builder()
* .captureDescription(CaptureDescriptionArgs.builder()
* .destination(DestinationArgs.builder()
* .archiveNameFormat("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}")
* .blobContainer("container")
* .name("EventHubArchive.AzureBlockBlob")
* .storageAccountResourceId("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage")
* .build())
* .enabled(true)
* .encoding("Avro")
* .intervalInSeconds(120)
* .sizeLimitInBytes(10485763)
* .build())
* .eventHubName("sdk-EventHub-6547")
* .messageRetentionInDays(4)
* .namespaceName("sdk-Namespace-5357")
* .partitionCount(4)
* .resourceGroupName("Default-NotificationHubs-AustraliaEast")
* .retentionDescription(RetentionDescriptionArgs.builder()
* .cleanupPolicy("Compact")
* .retentionTimeInHours(96)
* .tombstoneRetentionTimeInHours(1)
* .build())
* .status("Active")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:eventhub:EventHub sdk-EventHub-10 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}
* ```
*
*/
@ResourceType(type="azure-native:eventhub:EventHub")
public class EventHub extends com.pulumi.resources.CustomResource {
/**
* Properties of capture description
*
*/
@Export(name="captureDescription", refs={CaptureDescriptionResponse.class}, tree="[0]")
private Output* @Nullable */ CaptureDescriptionResponse> captureDescription;
/**
* @return Properties of capture description
*
*/
public Output> captureDescription() {
return Codegen.optional(this.captureDescription);
}
/**
* Exact time the Event Hub was created.
*
*/
@Export(name="createdAt", refs={String.class}, tree="[0]")
private Output createdAt;
/**
* @return Exact time the Event Hub was created.
*
*/
public Output createdAt() {
return this.createdAt;
}
/**
* The geo-location where the resource lives
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The geo-location where the resource lives
*
*/
public Output location() {
return this.location;
}
/**
* Number of days to retain the events for this Event Hub, value should be 1 to 7 days
*
*/
@Export(name="messageRetentionInDays", refs={Double.class}, tree="[0]")
private Output* @Nullable */ Double> messageRetentionInDays;
/**
* @return Number of days to retain the events for this Event Hub, value should be 1 to 7 days
*
*/
public Output> messageRetentionInDays() {
return Codegen.optional(this.messageRetentionInDays);
}
/**
* 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;
}
/**
* Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.
*
*/
@Export(name="partitionCount", refs={Double.class}, tree="[0]")
private Output* @Nullable */ Double> partitionCount;
/**
* @return Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.
*
*/
public Output> partitionCount() {
return Codegen.optional(this.partitionCount);
}
/**
* Current number of shards on the Event Hub.
*
*/
@Export(name="partitionIds", refs={List.class,String.class}, tree="[0,1]")
private Output> partitionIds;
/**
* @return Current number of shards on the Event Hub.
*
*/
public Output> partitionIds() {
return this.partitionIds;
}
/**
* Event Hub retention settings
*
*/
@Export(name="retentionDescription", refs={RetentionDescriptionResponse.class}, tree="[0]")
private Output* @Nullable */ RetentionDescriptionResponse> retentionDescription;
/**
* @return Event Hub retention settings
*
*/
public Output> retentionDescription() {
return Codegen.optional(this.retentionDescription);
}
/**
* Enumerates the possible values for the status of the Event Hub.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> status;
/**
* @return Enumerates the possible values for the status of the Event Hub.
*
*/
public Output> status() {
return Codegen.optional(this.status);
}
/**
* The system meta data relating to this resource.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return The system meta data relating to this resource.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
*
*/
public Output type() {
return this.type;
}
/**
* The exact time the message was updated.
*
*/
@Export(name="updatedAt", refs={String.class}, tree="[0]")
private Output updatedAt;
/**
* @return The exact time the message was updated.
*
*/
public Output updatedAt() {
return this.updatedAt;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public EventHub(java.lang.String name) {
this(name, EventHubArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public EventHub(java.lang.String name, EventHubArgs 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 EventHub(java.lang.String name, EventHubArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:eventhub:EventHub", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private EventHub(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:eventhub:EventHub", name, null, makeResourceOptions(options, id), false);
}
private static EventHubArgs makeArgs(EventHubArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? EventHubArgs.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:eventhub/v20140901:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20150801:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20170401:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20180101preview:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20210101preview:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20210601preview:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20211101:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20220101preview:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20221001preview:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20230101preview:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20240101:EventHub").build()),
Output.of(Alias.builder().type("azure-native:eventhub/v20240501preview:EventHub").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 EventHub get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new EventHub(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy