All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.iot.IoTHubArgs Maven / Gradle / Ivy

// *** 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.azure.iot;

import com.pulumi.azure.iot.inputs.IoTHubCloudToDeviceArgs;
import com.pulumi.azure.iot.inputs.IoTHubEndpointArgs;
import com.pulumi.azure.iot.inputs.IoTHubEnrichmentArgs;
import com.pulumi.azure.iot.inputs.IoTHubFallbackRouteArgs;
import com.pulumi.azure.iot.inputs.IoTHubFileUploadArgs;
import com.pulumi.azure.iot.inputs.IoTHubIdentityArgs;
import com.pulumi.azure.iot.inputs.IoTHubNetworkRuleSetArgs;
import com.pulumi.azure.iot.inputs.IoTHubRouteArgs;
import com.pulumi.azure.iot.inputs.IoTHubSkuArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class IoTHubArgs extends com.pulumi.resources.ResourceArgs {

    public static final IoTHubArgs Empty = new IoTHubArgs();

    @Import(name="cloudToDevice")
    private @Nullable Output cloudToDevice;

    public Optional> cloudToDevice() {
        return Optional.ofNullable(this.cloudToDevice);
    }

    /**
     * An `endpoint` block as defined below.
     * 
     */
    @Import(name="endpoints")
    private @Nullable Output> endpoints;

    /**
     * @return An `endpoint` block as defined below.
     * 
     */
    public Optional>> endpoints() {
        return Optional.ofNullable(this.endpoints);
    }

    @Import(name="enrichments")
    private @Nullable Output> enrichments;

    public Optional>> enrichments() {
        return Optional.ofNullable(this.enrichments);
    }

    /**
     * The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
     * 
     */
    @Import(name="eventHubPartitionCount")
    private @Nullable Output eventHubPartitionCount;

    /**
     * @return The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
     * 
     */
    public Optional> eventHubPartitionCount() {
        return Optional.ofNullable(this.eventHubPartitionCount);
    }

    /**
     * The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
     * 
     */
    @Import(name="eventHubRetentionInDays")
    private @Nullable Output eventHubRetentionInDays;

    /**
     * @return The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
     * 
     */
    public Optional> eventHubRetentionInDays() {
        return Optional.ofNullable(this.eventHubRetentionInDays);
    }

    /**
     * A `fallback_route` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
     * 
     * > **NOTE:** If `fallback_route` isn't explicitly specified, the fallback route wouldn't be enabled by default.
     * 
     */
    @Import(name="fallbackRoute")
    private @Nullable Output fallbackRoute;

    /**
     * @return A `fallback_route` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
     * 
     * > **NOTE:** If `fallback_route` isn't explicitly specified, the fallback route wouldn't be enabled by default.
     * 
     */
    public Optional> fallbackRoute() {
        return Optional.ofNullable(this.fallbackRoute);
    }

    /**
     * A `file_upload` block as defined below.
     * 
     */
    @Import(name="fileUpload")
    private @Nullable Output fileUpload;

    /**
     * @return A `file_upload` block as defined below.
     * 
     */
    public Optional> fileUpload() {
        return Optional.ofNullable(this.fileUpload);
    }

    /**
     * An `identity` block as defined below.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return An `identity` block as defined below.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
     * 
     */
    @Import(name="localAuthenticationEnabled")
    private @Nullable Output localAuthenticationEnabled;

    /**
     * @return If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
     * 
     */
    public Optional> localAuthenticationEnabled() {
        return Optional.ofNullable(this.localAuthenticationEnabled);
    }

    /**
     * Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    @Import(name="minTlsVersion")
    private @Nullable Output minTlsVersion;

    public Optional> minTlsVersion() {
        return Optional.ofNullable(this.minTlsVersion);
    }

    /**
     * Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A `network_rule_set` block as defined below.
     * 
     */
    @Import(name="networkRuleSets")
    private @Nullable Output> networkRuleSets;

    /**
     * @return A `network_rule_set` block as defined below.
     * 
     */
    public Optional>> networkRuleSets() {
        return Optional.ofNullable(this.networkRuleSets);
    }

    @Import(name="publicNetworkAccessEnabled")
    private @Nullable Output publicNetworkAccessEnabled;

    public Optional> publicNetworkAccessEnabled() {
        return Optional.ofNullable(this.publicNetworkAccessEnabled);
    }

    /**
     * The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    @Import(name="routes")
    private @Nullable Output> routes;

    public Optional>> routes() {
        return Optional.ofNullable(this.routes);
    }

    /**
     * A `sku` block as defined below.
     * 
     */
    @Import(name="sku", required=true)
    private Output sku;

    /**
     * @return A `sku` block as defined below.
     * 
     */
    public Output sku() {
        return this.sku;
    }

    @Import(name="tags")
    private @Nullable Output> tags;

    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private IoTHubArgs() {}

    private IoTHubArgs(IoTHubArgs $) {
        this.cloudToDevice = $.cloudToDevice;
        this.endpoints = $.endpoints;
        this.enrichments = $.enrichments;
        this.eventHubPartitionCount = $.eventHubPartitionCount;
        this.eventHubRetentionInDays = $.eventHubRetentionInDays;
        this.fallbackRoute = $.fallbackRoute;
        this.fileUpload = $.fileUpload;
        this.identity = $.identity;
        this.localAuthenticationEnabled = $.localAuthenticationEnabled;
        this.location = $.location;
        this.minTlsVersion = $.minTlsVersion;
        this.name = $.name;
        this.networkRuleSets = $.networkRuleSets;
        this.publicNetworkAccessEnabled = $.publicNetworkAccessEnabled;
        this.resourceGroupName = $.resourceGroupName;
        this.routes = $.routes;
        this.sku = $.sku;
        this.tags = $.tags;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(IoTHubArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private IoTHubArgs $;

        public Builder() {
            $ = new IoTHubArgs();
        }

        public Builder(IoTHubArgs defaults) {
            $ = new IoTHubArgs(Objects.requireNonNull(defaults));
        }

        public Builder cloudToDevice(@Nullable Output cloudToDevice) {
            $.cloudToDevice = cloudToDevice;
            return this;
        }

        public Builder cloudToDevice(IoTHubCloudToDeviceArgs cloudToDevice) {
            return cloudToDevice(Output.of(cloudToDevice));
        }

        /**
         * @param endpoints An `endpoint` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder endpoints(@Nullable Output> endpoints) {
            $.endpoints = endpoints;
            return this;
        }

        /**
         * @param endpoints An `endpoint` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder endpoints(List endpoints) {
            return endpoints(Output.of(endpoints));
        }

        /**
         * @param endpoints An `endpoint` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder endpoints(IoTHubEndpointArgs... endpoints) {
            return endpoints(List.of(endpoints));
        }

        public Builder enrichments(@Nullable Output> enrichments) {
            $.enrichments = enrichments;
            return this;
        }

        public Builder enrichments(List enrichments) {
            return enrichments(Output.of(enrichments));
        }

        public Builder enrichments(IoTHubEnrichmentArgs... enrichments) {
            return enrichments(List.of(enrichments));
        }

        /**
         * @param eventHubPartitionCount The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
         * 
         * @return builder
         * 
         */
        public Builder eventHubPartitionCount(@Nullable Output eventHubPartitionCount) {
            $.eventHubPartitionCount = eventHubPartitionCount;
            return this;
        }

        /**
         * @param eventHubPartitionCount The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
         * 
         * @return builder
         * 
         */
        public Builder eventHubPartitionCount(Integer eventHubPartitionCount) {
            return eventHubPartitionCount(Output.of(eventHubPartitionCount));
        }

        /**
         * @param eventHubRetentionInDays The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
         * 
         * @return builder
         * 
         */
        public Builder eventHubRetentionInDays(@Nullable Output eventHubRetentionInDays) {
            $.eventHubRetentionInDays = eventHubRetentionInDays;
            return this;
        }

        /**
         * @param eventHubRetentionInDays The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
         * 
         * @return builder
         * 
         */
        public Builder eventHubRetentionInDays(Integer eventHubRetentionInDays) {
            return eventHubRetentionInDays(Output.of(eventHubRetentionInDays));
        }

        /**
         * @param fallbackRoute A `fallback_route` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
         * 
         * > **NOTE:** If `fallback_route` isn't explicitly specified, the fallback route wouldn't be enabled by default.
         * 
         * @return builder
         * 
         */
        public Builder fallbackRoute(@Nullable Output fallbackRoute) {
            $.fallbackRoute = fallbackRoute;
            return this;
        }

        /**
         * @param fallbackRoute A `fallback_route` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
         * 
         * > **NOTE:** If `fallback_route` isn't explicitly specified, the fallback route wouldn't be enabled by default.
         * 
         * @return builder
         * 
         */
        public Builder fallbackRoute(IoTHubFallbackRouteArgs fallbackRoute) {
            return fallbackRoute(Output.of(fallbackRoute));
        }

        /**
         * @param fileUpload A `file_upload` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder fileUpload(@Nullable Output fileUpload) {
            $.fileUpload = fileUpload;
            return this;
        }

        /**
         * @param fileUpload A `file_upload` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder fileUpload(IoTHubFileUploadArgs fileUpload) {
            return fileUpload(Output.of(fileUpload));
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(IoTHubIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param localAuthenticationEnabled If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder localAuthenticationEnabled(@Nullable Output localAuthenticationEnabled) {
            $.localAuthenticationEnabled = localAuthenticationEnabled;
            return this;
        }

        /**
         * @param localAuthenticationEnabled If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder localAuthenticationEnabled(Boolean localAuthenticationEnabled) {
            return localAuthenticationEnabled(Output.of(localAuthenticationEnabled));
        }

        /**
         * @param location Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        public Builder minTlsVersion(@Nullable Output minTlsVersion) {
            $.minTlsVersion = minTlsVersion;
            return this;
        }

        public Builder minTlsVersion(String minTlsVersion) {
            return minTlsVersion(Output.of(minTlsVersion));
        }

        /**
         * @param name Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param networkRuleSets A `network_rule_set` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder networkRuleSets(@Nullable Output> networkRuleSets) {
            $.networkRuleSets = networkRuleSets;
            return this;
        }

        /**
         * @param networkRuleSets A `network_rule_set` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder networkRuleSets(List networkRuleSets) {
            return networkRuleSets(Output.of(networkRuleSets));
        }

        /**
         * @param networkRuleSets A `network_rule_set` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder networkRuleSets(IoTHubNetworkRuleSetArgs... networkRuleSets) {
            return networkRuleSets(List.of(networkRuleSets));
        }

        public Builder publicNetworkAccessEnabled(@Nullable Output publicNetworkAccessEnabled) {
            $.publicNetworkAccessEnabled = publicNetworkAccessEnabled;
            return this;
        }

        public Builder publicNetworkAccessEnabled(Boolean publicNetworkAccessEnabled) {
            return publicNetworkAccessEnabled(Output.of(publicNetworkAccessEnabled));
        }

        /**
         * @param resourceGroupName The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        public Builder routes(@Nullable Output> routes) {
            $.routes = routes;
            return this;
        }

        public Builder routes(List routes) {
            return routes(Output.of(routes));
        }

        public Builder routes(IoTHubRouteArgs... routes) {
            return routes(List.of(routes));
        }

        /**
         * @param sku A `sku` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder sku(Output sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku A `sku` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder sku(IoTHubSkuArgs sku) {
            return sku(Output.of(sku));
        }

        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public IoTHubArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("IoTHubArgs", "resourceGroupName");
            }
            if ($.sku == null) {
                throw new MissingRequiredPropertyException("IoTHubArgs", "sku");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy