BrokerAuthenticationArgs

data class BrokerAuthenticationArgs(val authenticationName: Output<String>? = null, val brokerName: Output<String>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val instanceName: Output<String>? = null, val properties: Output<BrokerAuthenticationPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null) : ConvertibleToJava<BrokerAuthenticationArgs>

Instance broker authentication resource Uses Azure REST API version 2024-11-01. In version 2.x of the Azure Native provider, it used API version 2024-07-01-preview. Other available API versions: 2024-07-01-preview, 2024-08-15-preview, 2024-09-15-preview, 2025-04-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native iotoperations [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

BrokerAuthentication_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var brokerAuthentication = new AzureNative.IoTOperations.BrokerAuthentication("brokerAuthentication", new()
{
AuthenticationName = "resource-name123",
BrokerName = "resource-name123",
ExtendedLocation = new AzureNative.IoTOperations.Inputs.ExtendedLocationArgs
{
Name = "qmbrfwcpwwhggszhrdjv",
Type = AzureNative.IoTOperations.ExtendedLocationType.CustomLocation,
},
InstanceName = "resource-name123",
Properties = new AzureNative.IoTOperations.Inputs.BrokerAuthenticationPropertiesArgs
{
AuthenticationMethods = new[]
{
new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodsArgs
{
CustomSettings = new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodCustomArgs
{
Auth = new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorCustomAuthArgs
{
X509 = new AzureNative.IoTOperations.Inputs.X509ManualCertificateArgs
{
SecretRef = "secret-name",
},
},
CaCertConfigMap = "pdecudefqyolvncbus",
Endpoint = "https://www.example.com",
Headers =
{
{ "key8518", "bwityjy" },
},
},
Method = AzureNative.IoTOperations.BrokerAuthenticationMethod.Custom,
ServiceAccountTokenSettings = new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodSatArgs
{
Audiences = new[]
{
"jqyhyqatuydg",
},
},
X509Settings = new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodX509Args
{
AuthorizationAttributes =
{
{ "key3384", new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodX509AttributesArgs
{
Attributes =
{
{ "key186", "ucpajramsz" },
},
Subject = "jpgwctfeixitptfgfnqhua",
} },
},
TrustedClientCaCert = "vlctsqddl",
},
},
},
},
ResourceGroupName = "rgiotoperations",
});
});
package main
import (
iotoperations "github.com/pulumi/pulumi-azure-native-sdk/iotoperations/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iotoperations.NewBrokerAuthentication(ctx, "brokerAuthentication", &iotoperations.BrokerAuthenticationArgs{
AuthenticationName: pulumi.String("resource-name123"),
BrokerName: pulumi.String("resource-name123"),
ExtendedLocation: &iotoperations.ExtendedLocationArgs{
Name: pulumi.String("qmbrfwcpwwhggszhrdjv"),
Type: pulumi.String(iotoperations.ExtendedLocationTypeCustomLocation),
},
InstanceName: pulumi.String("resource-name123"),
Properties: &iotoperations.BrokerAuthenticationPropertiesArgs{
AuthenticationMethods: iotoperations.BrokerAuthenticatorMethodsArray{
&iotoperations.BrokerAuthenticatorMethodsArgs{
CustomSettings: &iotoperations.BrokerAuthenticatorMethodCustomArgs{
Auth: &iotoperations.BrokerAuthenticatorCustomAuthArgs{
X509: &iotoperations.X509ManualCertificateArgs{
SecretRef: pulumi.String("secret-name"),
},
},
CaCertConfigMap: pulumi.String("pdecudefqyolvncbus"),
Endpoint: pulumi.String("https://www.example.com"),
Headers: pulumi.StringMap{
"key8518": pulumi.String("bwityjy"),
},
},
Method: pulumi.String(iotoperations.BrokerAuthenticationMethodCustom),
ServiceAccountTokenSettings: &iotoperations.BrokerAuthenticatorMethodSatArgs{
Audiences: pulumi.StringArray{
pulumi.String("jqyhyqatuydg"),
},
},
X509Settings: &iotoperations.BrokerAuthenticatorMethodX509Args{
AuthorizationAttributes: iotoperations.BrokerAuthenticatorMethodX509AttributesMap{
"key3384": &iotoperations.BrokerAuthenticatorMethodX509AttributesArgs{
Attributes: pulumi.StringMap{
"key186": pulumi.String("ucpajramsz"),
},
Subject: pulumi.String("jpgwctfeixitptfgfnqhua"),
},
},
TrustedClientCaCert: pulumi.String("vlctsqddl"),
},
},
},
},
ResourceGroupName: pulumi.String("rgiotoperations"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.iotoperations.BrokerAuthentication;
import com.pulumi.azurenative.iotoperations.BrokerAuthenticationArgs;
import com.pulumi.azurenative.iotoperations.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.iotoperations.inputs.BrokerAuthenticationPropertiesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var brokerAuthentication = new BrokerAuthentication("brokerAuthentication", BrokerAuthenticationArgs.builder()
.authenticationName("resource-name123")
.brokerName("resource-name123")
.extendedLocation(ExtendedLocationArgs.builder()
.name("qmbrfwcpwwhggszhrdjv")
.type("CustomLocation")
.build())
.instanceName("resource-name123")
.properties(BrokerAuthenticationPropertiesArgs.builder()
.authenticationMethods(BrokerAuthenticatorMethodsArgs.builder()
.customSettings(BrokerAuthenticatorMethodCustomArgs.builder()
.auth(BrokerAuthenticatorCustomAuthArgs.builder()
.x509(X509ManualCertificateArgs.builder()
.secretRef("secret-name")
.build())
.build())
.caCertConfigMap("pdecudefqyolvncbus")
.endpoint("https://www.example.com")
.headers(Map.of("key8518", "bwityjy"))
.build())
.method("Custom")
.serviceAccountTokenSettings(BrokerAuthenticatorMethodSatArgs.builder()
.audiences("jqyhyqatuydg")
.build())
.x509Settings(BrokerAuthenticatorMethodX509Args.builder()
.authorizationAttributes(Map.of("key3384", Map.ofEntries(
Map.entry("attributes", Map.of("key186", "ucpajramsz")),
Map.entry("subject", "jpgwctfeixitptfgfnqhua")
)))
.trustedClientCaCert("vlctsqddl")
.build())
.build())
.build())
.resourceGroupName("rgiotoperations")
.build());
}
}

BrokerAuthentication_CreateOrUpdate_Complex

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var brokerAuthentication = new AzureNative.IoTOperations.BrokerAuthentication("brokerAuthentication", new()
{
AuthenticationName = "resource-name123",
BrokerName = "resource-name123",
ExtendedLocation = new AzureNative.IoTOperations.Inputs.ExtendedLocationArgs
{
Name = "qmbrfwcpwwhggszhrdjv",
Type = AzureNative.IoTOperations.ExtendedLocationType.CustomLocation,
},
InstanceName = "resource-name123",
Properties = new AzureNative.IoTOperations.Inputs.BrokerAuthenticationPropertiesArgs
{
AuthenticationMethods = new[]
{
new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodsArgs
{
Method = AzureNative.IoTOperations.BrokerAuthenticationMethod.ServiceAccountToken,
ServiceAccountTokenSettings = new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodSatArgs
{
Audiences = new[]
{
"aio-internal",
},
},
},
new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodsArgs
{
Method = AzureNative.IoTOperations.BrokerAuthenticationMethod.X509,
X509Settings = new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodX509Args
{
AuthorizationAttributes =
{
{ "intermediate", new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodX509AttributesArgs
{
Attributes =
{
{ "city", "seattle" },
{ "foo", "bar" },
},
Subject = "CN = Contoso Intermediate CA",
} },
{ "root", new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodX509AttributesArgs
{
Attributes =
{
{ "organization", "contoso" },
},
Subject = "CN = Contoso Root CA Cert, OU = Engineering, C = US",
} },
{ "smart-fan", new AzureNative.IoTOperations.Inputs.BrokerAuthenticatorMethodX509AttributesArgs
{
Attributes =
{
{ "building", "17" },
},
Subject = "CN = smart-fan",
} },
},
TrustedClientCaCert = "my-ca",
},
},
},
},
ResourceGroupName = "rgiotoperations",
});
});
package main
import (
iotoperations "github.com/pulumi/pulumi-azure-native-sdk/iotoperations/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iotoperations.NewBrokerAuthentication(ctx, "brokerAuthentication", &iotoperations.BrokerAuthenticationArgs{
AuthenticationName: pulumi.String("resource-name123"),
BrokerName: pulumi.String("resource-name123"),
ExtendedLocation: &iotoperations.ExtendedLocationArgs{
Name: pulumi.String("qmbrfwcpwwhggszhrdjv"),
Type: pulumi.String(iotoperations.ExtendedLocationTypeCustomLocation),
},
InstanceName: pulumi.String("resource-name123"),
Properties: &iotoperations.BrokerAuthenticationPropertiesArgs{
AuthenticationMethods: iotoperations.BrokerAuthenticatorMethodsArray{
&iotoperations.BrokerAuthenticatorMethodsArgs{
Method: pulumi.String(iotoperations.BrokerAuthenticationMethodServiceAccountToken),
ServiceAccountTokenSettings: &iotoperations.BrokerAuthenticatorMethodSatArgs{
Audiences: pulumi.StringArray{
pulumi.String("aio-internal"),
},
},
},
&iotoperations.BrokerAuthenticatorMethodsArgs{
Method: pulumi.String(iotoperations.BrokerAuthenticationMethodX509),
X509Settings: &iotoperations.BrokerAuthenticatorMethodX509Args{
AuthorizationAttributes: iotoperations.BrokerAuthenticatorMethodX509AttributesMap{
"intermediate": &iotoperations.BrokerAuthenticatorMethodX509AttributesArgs{
Attributes: pulumi.StringMap{
"city": pulumi.String("seattle"),
"foo": pulumi.String("bar"),
},
Subject: pulumi.String("CN = Contoso Intermediate CA"),
},
"root": &iotoperations.BrokerAuthenticatorMethodX509AttributesArgs{
Attributes: pulumi.StringMap{
"organization": pulumi.String("contoso"),
},
Subject: pulumi.String("CN = Contoso Root CA Cert, OU = Engineering, C = US"),
},
"smart-fan": &iotoperations.BrokerAuthenticatorMethodX509AttributesArgs{
Attributes: pulumi.StringMap{
"building": pulumi.String("17"),
},
Subject: pulumi.String("CN = smart-fan"),
},
},
TrustedClientCaCert: pulumi.String("my-ca"),
},
},
},
},
ResourceGroupName: pulumi.String("rgiotoperations"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.iotoperations.BrokerAuthentication;
import com.pulumi.azurenative.iotoperations.BrokerAuthenticationArgs;
import com.pulumi.azurenative.iotoperations.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.iotoperations.inputs.BrokerAuthenticationPropertiesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var brokerAuthentication = new BrokerAuthentication("brokerAuthentication", BrokerAuthenticationArgs.builder()
.authenticationName("resource-name123")
.brokerName("resource-name123")
.extendedLocation(ExtendedLocationArgs.builder()
.name("qmbrfwcpwwhggszhrdjv")
.type("CustomLocation")
.build())
.instanceName("resource-name123")
.properties(BrokerAuthenticationPropertiesArgs.builder()
.authenticationMethods(
BrokerAuthenticatorMethodsArgs.builder()
.method("ServiceAccountToken")
.serviceAccountTokenSettings(BrokerAuthenticatorMethodSatArgs.builder()
.audiences("aio-internal")
.build())
.build(),
BrokerAuthenticatorMethodsArgs.builder()
.method("X509")
.x509Settings(BrokerAuthenticatorMethodX509Args.builder()
.authorizationAttributes(Map.ofEntries(
Map.entry("intermediate", Map.ofEntries(
Map.entry("attributes", Map.ofEntries(
Map.entry("city", "seattle"),
Map.entry("foo", "bar")
)),
Map.entry("subject", "CN = Contoso Intermediate CA")
)),
Map.entry("root", Map.ofEntries(
Map.entry("attributes", Map.of("organization", "contoso")),
Map.entry("subject", "CN = Contoso Root CA Cert, OU = Engineering, C = US")
)),
Map.entry("smart-fan", Map.ofEntries(
Map.entry("attributes", Map.of("building", "17")),
Map.entry("subject", "CN = smart-fan")
))
))
.trustedClientCaCert("my-ca")
.build())
.build())
.build())
.resourceGroupName("rgiotoperations")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:iotoperations:BrokerAuthentication lwucizfvtsdpx /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}

Constructors

Link copied to clipboard
constructor(authenticationName: Output<String>? = null, brokerName: Output<String>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, instanceName: Output<String>? = null, properties: Output<BrokerAuthenticationPropertiesArgs>? = null, resourceGroupName: Output<String>? = null)

Properties

Link copied to clipboard
val authenticationName: Output<String>? = null

Name of Instance broker authentication resource

Link copied to clipboard
val brokerName: Output<String>? = null

Name of broker.

Link copied to clipboard

Edge location of the resource.

Link copied to clipboard
val instanceName: Output<String>? = null

Name of instance.

Link copied to clipboard

The resource-specific properties for this resource.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Functions

Link copied to clipboard
open override fun toJava(): BrokerAuthenticationArgs