1. Packages
  2. Azure Native v2
  3. API Docs
  4. devices
  5. listIotHubResourceKeysForKeyName
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.82.0 published on Friday, Jan 10, 2025 by Pulumi

azure-native-v2.devices.listIotHubResourceKeysForKeyName

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.82.0 published on Friday, Jan 10, 2025 by Pulumi

Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. Azure REST API version: 2022-04-30-preview.

Other available API versions: 2022-11-15-preview, 2023-06-30, 2023-06-30-preview.

Using listIotHubResourceKeysForKeyName

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function listIotHubResourceKeysForKeyName(args: ListIotHubResourceKeysForKeyNameArgs, opts?: InvokeOptions): Promise<ListIotHubResourceKeysForKeyNameResult>
function listIotHubResourceKeysForKeyNameOutput(args: ListIotHubResourceKeysForKeyNameOutputArgs, opts?: InvokeOptions): Output<ListIotHubResourceKeysForKeyNameResult>
Copy
def list_iot_hub_resource_keys_for_key_name(key_name: Optional[str] = None,
                                            resource_group_name: Optional[str] = None,
                                            resource_name: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> ListIotHubResourceKeysForKeyNameResult
def list_iot_hub_resource_keys_for_key_name_output(key_name: Optional[pulumi.Input[str]] = None,
                                            resource_group_name: Optional[pulumi.Input[str]] = None,
                                            resource_name: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[ListIotHubResourceKeysForKeyNameResult]
Copy
func ListIotHubResourceKeysForKeyName(ctx *Context, args *ListIotHubResourceKeysForKeyNameArgs, opts ...InvokeOption) (*ListIotHubResourceKeysForKeyNameResult, error)
func ListIotHubResourceKeysForKeyNameOutput(ctx *Context, args *ListIotHubResourceKeysForKeyNameOutputArgs, opts ...InvokeOption) ListIotHubResourceKeysForKeyNameResultOutput
Copy

> Note: This function is named ListIotHubResourceKeysForKeyName in the Go SDK.

public static class ListIotHubResourceKeysForKeyName 
{
    public static Task<ListIotHubResourceKeysForKeyNameResult> InvokeAsync(ListIotHubResourceKeysForKeyNameArgs args, InvokeOptions? opts = null)
    public static Output<ListIotHubResourceKeysForKeyNameResult> Invoke(ListIotHubResourceKeysForKeyNameInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<ListIotHubResourceKeysForKeyNameResult> listIotHubResourceKeysForKeyName(ListIotHubResourceKeysForKeyNameArgs args, InvokeOptions options)
public static Output<ListIotHubResourceKeysForKeyNameResult> listIotHubResourceKeysForKeyName(ListIotHubResourceKeysForKeyNameArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:devices:listIotHubResourceKeysForKeyName
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

KeyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the shared access policy.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the IoT hub.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the IoT hub.
KeyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the shared access policy.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the IoT hub.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the IoT hub.
keyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the shared access policy.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the IoT hub.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the IoT hub.
keyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the shared access policy.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the IoT hub.
resourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the IoT hub.
key_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the shared access policy.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group that contains the IoT hub.
resource_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the IoT hub.
keyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the shared access policy.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the IoT hub.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the IoT hub.

listIotHubResourceKeysForKeyName Result

The following output properties are available:

KeyName string
The name of the shared access policy.
Rights string
The permissions assigned to the shared access policy.
PrimaryKey string
The primary key.
SecondaryKey string
The secondary key.
KeyName string
The name of the shared access policy.
Rights string
The permissions assigned to the shared access policy.
PrimaryKey string
The primary key.
SecondaryKey string
The secondary key.
keyName String
The name of the shared access policy.
rights String
The permissions assigned to the shared access policy.
primaryKey String
The primary key.
secondaryKey String
The secondary key.
keyName string
The name of the shared access policy.
rights string
The permissions assigned to the shared access policy.
primaryKey string
The primary key.
secondaryKey string
The secondary key.
key_name str
The name of the shared access policy.
rights str
The permissions assigned to the shared access policy.
primary_key str
The primary key.
secondary_key str
The secondary key.
keyName String
The name of the shared access policy.
rights String
The permissions assigned to the shared access policy.
primaryKey String
The primary key.
secondaryKey String
The secondary key.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.82.0 published on Friday, Jan 10, 2025 by Pulumi