def METHOD_NAME(device_security_group_name: Optional[str] = None,
                              resource_id: Optional[str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDeviceSecurityGroupResult:
    """
    Use this method to get the device security group for the specified IoT Hub resource.
    :param str device_security_group_name: The name of the device security group. Note that the name of the device security group is case insensitive.
    :param str resource_id: The identifier of the resource.
    """
    __args__ = dict()
    __args__['deviceSecurityGroupName'] = device_security_group_name
    __args__['resourceId'] = resource_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:security/v20190801:getDeviceSecurityGroup', __args__, opts=opts, typ=GetDeviceSecurityGroupResult).value
    return AwaitableGetDeviceSecurityGroupResult(
        allowlist_rules=pulumi.get(__ret__, 'allowlist_rules'),
        denylist_rules=pulumi.get(__ret__, 'denylist_rules'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        threshold_rules=pulumi.get(__ret__, 'threshold_rules'),
        time_window_rules=pulumi.get(__ret__, 'time_window_rules'),
        type=pulumi.get(__ret__, 'type'))