import * as pulumi from "@pulumi/pulumi"; /** * Manages an IotHub Storage Container Endpoint * * > **Note:** Endpoints can be defined either directly on the `azure.iot.IoTHub` resource, or using the `azurerm_iothub_endpoint_*` resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining a `azurerm_iothub_endpoint_*` resource and another endpoint of a different type directly on the `azure.iot.IoTHub` resource is not supported. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleAccount = new azure.storage.Account("example", { * name: "example", * resourceGroupName: example.name, * location: example.location, * accountTier: "Standard", * accountReplicationType: "LRS", * }); * const exampleContainer = new azure.storage.Container("example", { * name: "acctestcont", * storageAccountName: exampleAccount.name, * containerAccessType: "private", * }); * const exampleIoTHub = new azure.iot.IoTHub("example", { * name: "example", * resourceGroupName: example.name, * location: example.location, * sku: { * name: "S1", * capacity: 1, * }, * }); * const exampleEndpointStorageContainer = new azure.iot.EndpointStorageContainer("example", { * resourceGroupName: example.name, * iothubId: exampleIoTHub.id, * name: "acctest", * containerName: "acctestcont", * connectionString: exampleAccount.primaryBlobConnectionString, * fileNameFormat: "{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}", * batchFrequencyInSeconds: 60, * maxChunkSizeInBytes: 10485760, * encoding: "JSON", * }); * ``` * * ## Import * * IoTHub Storage Container Endpoint can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:iot/endpointStorageContainer:EndpointStorageContainer storage_container1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/storage_container_endpoint1 * ``` */ export declare class EndpointStorageContainer extends pulumi.CustomResource { /** * Get an existing EndpointStorageContainer 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: EndpointStorageContainerState, opts?: pulumi.CustomResourceOptions): EndpointStorageContainer; /** * Returns true if the given object is an instance of EndpointStorageContainer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is EndpointStorageContainer; /** * Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. */ readonly authenticationType: pulumi.Output; /** * Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. */ readonly batchFrequencyInSeconds: pulumi.Output; /** * The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. */ readonly connectionString: pulumi.Output; /** * The name of storage container in the storage account. */ readonly containerName: pulumi.Output; /** * Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. */ readonly encoding: pulumi.Output; /** * URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. */ readonly endpointUri: pulumi.Output; /** * File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. */ readonly fileNameFormat: pulumi.Output; /** * ID of the User Managed Identity used to authenticate against the storage endpoint. * * > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used. */ readonly identityId: pulumi.Output; /** * The IoTHub ID for the endpoint. Changing this forces a new resource to be created. */ readonly iothubId: pulumi.Output; /** * Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). */ readonly maxChunkSizeInBytes: pulumi.Output; /** * 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. */ readonly name: pulumi.Output; /** * The name of the resource group under which the Storage Container has been created. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The subscription ID for the endpoint. * * > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource. */ readonly subscriptionId: pulumi.Output; /** * Create a EndpointStorageContainer resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: EndpointStorageContainerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EndpointStorageContainer resources. */ export interface EndpointStorageContainerState { /** * Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. */ authenticationType?: pulumi.Input; /** * Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. */ batchFrequencyInSeconds?: pulumi.Input; /** * The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. */ connectionString?: pulumi.Input; /** * The name of storage container in the storage account. */ containerName?: pulumi.Input; /** * Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. */ encoding?: pulumi.Input; /** * URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. */ endpointUri?: pulumi.Input; /** * File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. */ fileNameFormat?: pulumi.Input; /** * ID of the User Managed Identity used to authenticate against the storage endpoint. * * > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used. */ identityId?: pulumi.Input; /** * The IoTHub ID for the endpoint. Changing this forces a new resource to be created. */ iothubId?: pulumi.Input; /** * Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). */ maxChunkSizeInBytes?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * The name of the resource group under which the Storage Container has been created. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The subscription ID for the endpoint. * * > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource. */ subscriptionId?: pulumi.Input; } /** * The set of arguments for constructing a EndpointStorageContainer resource. */ export interface EndpointStorageContainerArgs { /** * Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. */ authenticationType?: pulumi.Input; /** * Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. */ batchFrequencyInSeconds?: pulumi.Input; /** * The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. */ connectionString?: pulumi.Input; /** * The name of storage container in the storage account. */ containerName: pulumi.Input; /** * Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. */ encoding?: pulumi.Input; /** * URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. */ endpointUri?: pulumi.Input; /** * File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. */ fileNameFormat?: pulumi.Input; /** * ID of the User Managed Identity used to authenticate against the storage endpoint. * * > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used. */ identityId?: pulumi.Input; /** * The IoTHub ID for the endpoint. Changing this forces a new resource to be created. */ iothubId: pulumi.Input; /** * Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). */ maxChunkSizeInBytes?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * The name of the resource group under which the Storage Container has been created. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The subscription ID for the endpoint. * * > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource. */ subscriptionId?: pulumi.Input; }