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

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

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show 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.azure.iot;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final EndpointCosmosdbAccountArgs Empty = new EndpointCosmosdbAccountArgs();

    /**
     * The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
     * 
     */
    @Import(name="authenticationType")
    private @Nullable Output authenticationType;

    /**
     * @return The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
     * 
     */
    public Optional> authenticationType() {
        return Optional.ofNullable(this.authenticationType);
    }

    /**
     * The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="containerName", required=true)
    private Output containerName;

    /**
     * @return The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
     * 
     */
    public Output containerName() {
        return this.containerName;
    }

    /**
     * The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="databaseName", required=true)
    private Output databaseName;

    /**
     * @return The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
     * 
     */
    public Output databaseName() {
        return this.databaseName;
    }

    /**
     * The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="endpointUri", required=true)
    private Output endpointUri;

    /**
     * @return The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
     * 
     */
    public Output endpointUri() {
        return this.endpointUri;
    }

    /**
     * The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.
     * 
     * > **NOTE:** `identity_id` can only be specified when `authentication_type` is `identityBased`. It must be one of the `identity_ids` of the Iot Hub. If not specified when `authentication_type` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
     * 
     */
    @Import(name="identityId")
    private @Nullable Output identityId;

    /**
     * @return The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.
     * 
     * > **NOTE:** `identity_id` can only be specified when `authentication_type` is `identityBased`. It must be one of the `identity_ids` of the Iot Hub. If not specified when `authentication_type` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
     * 
     */
    public Optional> identityId() {
        return Optional.ofNullable(this.identityId);
    }

    /**
     * The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="iothubId", required=true)
    private Output iothubId;

    /**
     * @return The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
     * 
     */
    public Output iothubId() {
        return this.iothubId;
    }

    /**
     * The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The name of the partition key associated with the Cosmos DB Container.
     * 
     */
    @Import(name="partitionKeyName")
    private @Nullable Output partitionKeyName;

    /**
     * @return The name of the partition key associated with the Cosmos DB Container.
     * 
     */
    public Optional> partitionKeyName() {
        return Optional.ofNullable(this.partitionKeyName);
    }

    /**
     * The template for generating a synthetic partition key value for use within the Cosmos DB Container.
     * 
     */
    @Import(name="partitionKeyTemplate")
    private @Nullable Output partitionKeyTemplate;

    /**
     * @return The template for generating a synthetic partition key value for use within the Cosmos DB Container.
     * 
     */
    public Optional> partitionKeyTemplate() {
        return Optional.ofNullable(this.partitionKeyTemplate);
    }

    /**
     * The primary key of the Cosmos DB Account.
     * 
     * > **NOTE:** `primary_key` must and can only be specified when `authentication_type` is `keyBased`.
     * 
     */
    @Import(name="primaryKey")
    private @Nullable Output primaryKey;

    /**
     * @return The primary key of the Cosmos DB Account.
     * 
     * > **NOTE:** `primary_key` must and can only be specified when `authentication_type` is `keyBased`.
     * 
     */
    public Optional> primaryKey() {
        return Optional.ofNullable(this.primaryKey);
    }

    /**
     * The name of the resource group under which the Cosmos DB Account has been 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 Cosmos DB Account has been created. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The secondary key of the Cosmos DB Account.
     * 
     * > **NOTE:** `secondary_key` must and can only be specified when `authentication_type` is `keyBased`.
     * 
     */
    @Import(name="secondaryKey")
    private @Nullable Output secondaryKey;

    /**
     * @return The secondary key of the Cosmos DB Account.
     * 
     * > **NOTE:** `secondary_key` must and can only be specified when `authentication_type` is `keyBased`.
     * 
     */
    public Optional> secondaryKey() {
        return Optional.ofNullable(this.secondaryKey);
    }

    private EndpointCosmosdbAccountArgs() {}

    private EndpointCosmosdbAccountArgs(EndpointCosmosdbAccountArgs $) {
        this.authenticationType = $.authenticationType;
        this.containerName = $.containerName;
        this.databaseName = $.databaseName;
        this.endpointUri = $.endpointUri;
        this.identityId = $.identityId;
        this.iothubId = $.iothubId;
        this.name = $.name;
        this.partitionKeyName = $.partitionKeyName;
        this.partitionKeyTemplate = $.partitionKeyTemplate;
        this.primaryKey = $.primaryKey;
        this.resourceGroupName = $.resourceGroupName;
        this.secondaryKey = $.secondaryKey;
    }

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

    public static final class Builder {
        private EndpointCosmosdbAccountArgs $;

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

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

        /**
         * @param authenticationType The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
         * 
         * @return builder
         * 
         */
        public Builder authenticationType(@Nullable Output authenticationType) {
            $.authenticationType = authenticationType;
            return this;
        }

        /**
         * @param authenticationType The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
         * 
         * @return builder
         * 
         */
        public Builder authenticationType(String authenticationType) {
            return authenticationType(Output.of(authenticationType));
        }

        /**
         * @param containerName The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder containerName(Output containerName) {
            $.containerName = containerName;
            return this;
        }

        /**
         * @param containerName The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder containerName(String containerName) {
            return containerName(Output.of(containerName));
        }

        /**
         * @param databaseName The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(Output databaseName) {
            $.databaseName = databaseName;
            return this;
        }

        /**
         * @param databaseName The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(String databaseName) {
            return databaseName(Output.of(databaseName));
        }

        /**
         * @param endpointUri The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder endpointUri(Output endpointUri) {
            $.endpointUri = endpointUri;
            return this;
        }

        /**
         * @param endpointUri The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder endpointUri(String endpointUri) {
            return endpointUri(Output.of(endpointUri));
        }

        /**
         * @param identityId The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.
         * 
         * > **NOTE:** `identity_id` can only be specified when `authentication_type` is `identityBased`. It must be one of the `identity_ids` of the Iot Hub. If not specified when `authentication_type` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
         * 
         * @return builder
         * 
         */
        public Builder identityId(@Nullable Output identityId) {
            $.identityId = identityId;
            return this;
        }

        /**
         * @param identityId The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.
         * 
         * > **NOTE:** `identity_id` can only be specified when `authentication_type` is `identityBased`. It must be one of the `identity_ids` of the Iot Hub. If not specified when `authentication_type` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
         * 
         * @return builder
         * 
         */
        public Builder identityId(String identityId) {
            return identityId(Output.of(identityId));
        }

        /**
         * @param iothubId The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder iothubId(Output iothubId) {
            $.iothubId = iothubId;
            return this;
        }

        /**
         * @param iothubId The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder iothubId(String iothubId) {
            return iothubId(Output.of(iothubId));
        }

        /**
         * @param name The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param partitionKeyName The name of the partition key associated with the Cosmos DB Container.
         * 
         * @return builder
         * 
         */
        public Builder partitionKeyName(@Nullable Output partitionKeyName) {
            $.partitionKeyName = partitionKeyName;
            return this;
        }

        /**
         * @param partitionKeyName The name of the partition key associated with the Cosmos DB Container.
         * 
         * @return builder
         * 
         */
        public Builder partitionKeyName(String partitionKeyName) {
            return partitionKeyName(Output.of(partitionKeyName));
        }

        /**
         * @param partitionKeyTemplate The template for generating a synthetic partition key value for use within the Cosmos DB Container.
         * 
         * @return builder
         * 
         */
        public Builder partitionKeyTemplate(@Nullable Output partitionKeyTemplate) {
            $.partitionKeyTemplate = partitionKeyTemplate;
            return this;
        }

        /**
         * @param partitionKeyTemplate The template for generating a synthetic partition key value for use within the Cosmos DB Container.
         * 
         * @return builder
         * 
         */
        public Builder partitionKeyTemplate(String partitionKeyTemplate) {
            return partitionKeyTemplate(Output.of(partitionKeyTemplate));
        }

        /**
         * @param primaryKey The primary key of the Cosmos DB Account.
         * 
         * > **NOTE:** `primary_key` must and can only be specified when `authentication_type` is `keyBased`.
         * 
         * @return builder
         * 
         */
        public Builder primaryKey(@Nullable Output primaryKey) {
            $.primaryKey = primaryKey;
            return this;
        }

        /**
         * @param primaryKey The primary key of the Cosmos DB Account.
         * 
         * > **NOTE:** `primary_key` must and can only be specified when `authentication_type` is `keyBased`.
         * 
         * @return builder
         * 
         */
        public Builder primaryKey(String primaryKey) {
            return primaryKey(Output.of(primaryKey));
        }

        /**
         * @param resourceGroupName The name of the resource group under which the Cosmos DB Account has been 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 Cosmos DB Account has been created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param secondaryKey The secondary key of the Cosmos DB Account.
         * 
         * > **NOTE:** `secondary_key` must and can only be specified when `authentication_type` is `keyBased`.
         * 
         * @return builder
         * 
         */
        public Builder secondaryKey(@Nullable Output secondaryKey) {
            $.secondaryKey = secondaryKey;
            return this;
        }

        /**
         * @param secondaryKey The secondary key of the Cosmos DB Account.
         * 
         * > **NOTE:** `secondary_key` must and can only be specified when `authentication_type` is `keyBased`.
         * 
         * @return builder
         * 
         */
        public Builder secondaryKey(String secondaryKey) {
            return secondaryKey(Output.of(secondaryKey));
        }

        public EndpointCosmosdbAccountArgs build() {
            if ($.containerName == null) {
                throw new MissingRequiredPropertyException("EndpointCosmosdbAccountArgs", "containerName");
            }
            if ($.databaseName == null) {
                throw new MissingRequiredPropertyException("EndpointCosmosdbAccountArgs", "databaseName");
            }
            if ($.endpointUri == null) {
                throw new MissingRequiredPropertyException("EndpointCosmosdbAccountArgs", "endpointUri");
            }
            if ($.iothubId == null) {
                throw new MissingRequiredPropertyException("EndpointCosmosdbAccountArgs", "iothubId");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("EndpointCosmosdbAccountArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy