Workspace Backend
Backend details. Uses Azure REST API version 2023-09-01-preview. Other available API versions: 2024-05-01, 2024-06-01-preview.
Example Usage
ApiManagementCreateWorkspaceBackendProxyBackend
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspaceBackend = new AzureNative.ApiManagement.WorkspaceBackend("workspaceBackend", new()
{
BackendId = "proxybackend",
Credentials = new AzureNative.ApiManagement.Inputs.BackendCredentialsContractArgs
{
Authorization = new AzureNative.ApiManagement.Inputs.BackendAuthorizationHeaderCredentialsArgs
{
Parameter = "opensesma",
Scheme = "Basic",
},
Header =
{
{ "x-my-1", new[]
{
"val1",
"val2",
} },
},
Query =
{
{ "sv", new[]
{
"xx",
"bb",
"cc",
} },
},
},
Description = "description5308",
Protocol = AzureNative.ApiManagement.BackendProtocol.Http,
Proxy = new AzureNative.ApiManagement.Inputs.BackendProxyContractArgs
{
Password = "<password>",
Url = "http://192.168.1.1:8080",
Username = "Contoso\\admin",
},
ResourceGroupName = "rg1",
ServiceName = "apimService1",
Tls = new AzureNative.ApiManagement.Inputs.BackendTlsPropertiesArgs
{
ValidateCertificateChain = true,
ValidateCertificateName = true,
},
Url = "https://backendname2644/",
WorkspaceId = "wks1",
});
});
Content copied to clipboard
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewWorkspaceBackend(ctx, "workspaceBackend", &apimanagement.WorkspaceBackendArgs{
BackendId: pulumi.String("proxybackend"),
Credentials: &apimanagement.BackendCredentialsContractArgs{
Authorization: &apimanagement.BackendAuthorizationHeaderCredentialsArgs{
Parameter: pulumi.String("opensesma"),
Scheme: pulumi.String("Basic"),
},
Header: pulumi.StringArrayMap{
"x-my-1": pulumi.StringArray{
pulumi.String("val1"),
pulumi.String("val2"),
},
},
Query: pulumi.StringArrayMap{
"sv": pulumi.StringArray{
pulumi.String("xx"),
pulumi.String("bb"),
pulumi.String("cc"),
},
},
},
Description: pulumi.String("description5308"),
Protocol: pulumi.String(apimanagement.BackendProtocolHttp),
Proxy: &apimanagement.BackendProxyContractArgs{
Password: pulumi.String("<password>"),
Url: pulumi.String("http://192.168.1.1:8080"),
Username: pulumi.String("Contoso\\admin"),
},
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
Tls: &apimanagement.BackendTlsPropertiesArgs{
ValidateCertificateChain: pulumi.Bool(true),
ValidateCertificateName: pulumi.Bool(true),
},
Url: pulumi.String("https://backendname2644/"),
WorkspaceId: pulumi.String("wks1"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.WorkspaceBackend;
import com.pulumi.azurenative.apimanagement.WorkspaceBackendArgs;
import com.pulumi.azurenative.apimanagement.inputs.BackendCredentialsContractArgs;
import com.pulumi.azurenative.apimanagement.inputs.BackendAuthorizationHeaderCredentialsArgs;
import com.pulumi.azurenative.apimanagement.inputs.BackendProxyContractArgs;
import com.pulumi.azurenative.apimanagement.inputs.BackendTlsPropertiesArgs;
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 workspaceBackend = new WorkspaceBackend("workspaceBackend", WorkspaceBackendArgs.builder()
.backendId("proxybackend")
.credentials(BackendCredentialsContractArgs.builder()
.authorization(BackendAuthorizationHeaderCredentialsArgs.builder()
.parameter("opensesma")
.scheme("Basic")
.build())
.header(Map.of("x-my-1",
"val1",
"val2"))
.query(Map.of("sv",
"xx",
"bb",
"cc"))
.build())
.description("description5308")
.protocol("http")
.proxy(BackendProxyContractArgs.builder()
.password("<password>")
.url("http://192.168.1.1:8080")
.username("Contoso\\admin")
.build())
.resourceGroupName("rg1")
.serviceName("apimService1")
.tls(BackendTlsPropertiesArgs.builder()
.validateCertificateChain(true)
.validateCertificateName(true)
.build())
.url("https://backendname2644/")
.workspaceId("wks1")
.build());
}
}
Content copied to clipboard
ApiManagementCreateWorkspaceBackendServiceFabric
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspaceBackend = new AzureNative.ApiManagement.WorkspaceBackend("workspaceBackend", new()
{
BackendId = "sfbackend",
Description = "Service Fabric Test App 1",
Properties = new AzureNative.ApiManagement.Inputs.BackendPropertiesArgs
{
ServiceFabricCluster = new AzureNative.ApiManagement.Inputs.BackendServiceFabricClusterPropertiesArgs
{
ClientCertificateId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1",
ManagementEndpoints = new[]
{
"https://somecluster.com",
},
MaxPartitionResolutionRetries = 5,
ServerX509Names = new[]
{
new AzureNative.ApiManagement.Inputs.X509CertificateNameArgs
{
IssuerCertificateThumbprint = "IssuerCertificateThumbprint1",
Name = "ServerCommonName1",
},
},
},
},
Protocol = AzureNative.ApiManagement.BackendProtocol.Http,
ResourceGroupName = "rg1",
ServiceName = "apimService1",
Url = "fabric:/mytestapp/mytestservice",
WorkspaceId = "wks1",
});
});
Content copied to clipboard
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewWorkspaceBackend(ctx, "workspaceBackend", &apimanagement.WorkspaceBackendArgs{
BackendId: pulumi.String("sfbackend"),
Description: pulumi.String("Service Fabric Test App 1"),
Properties: &apimanagement.BackendPropertiesArgs{
ServiceFabricCluster: &apimanagement.BackendServiceFabricClusterPropertiesArgs{
ClientCertificateId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1"),
ManagementEndpoints: pulumi.StringArray{
pulumi.String("https://somecluster.com"),
},
MaxPartitionResolutionRetries: pulumi.Int(5),
ServerX509Names: apimanagement.X509CertificateNameArray{
&apimanagement.X509CertificateNameArgs{
IssuerCertificateThumbprint: pulumi.String("IssuerCertificateThumbprint1"),
Name: pulumi.String("ServerCommonName1"),
},
},
},
},
Protocol: pulumi.String(apimanagement.BackendProtocolHttp),
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
Url: pulumi.String("fabric:/mytestapp/mytestservice"),
WorkspaceId: pulumi.String("wks1"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.WorkspaceBackend;
import com.pulumi.azurenative.apimanagement.WorkspaceBackendArgs;
import com.pulumi.azurenative.apimanagement.inputs.BackendPropertiesArgs;
import com.pulumi.azurenative.apimanagement.inputs.BackendServiceFabricClusterPropertiesArgs;
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 workspaceBackend = new WorkspaceBackend("workspaceBackend", WorkspaceBackendArgs.builder()
.backendId("sfbackend")
.description("Service Fabric Test App 1")
.properties(BackendPropertiesArgs.builder()
.serviceFabricCluster(BackendServiceFabricClusterPropertiesArgs.builder()
.clientCertificateId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1")
.managementEndpoints("https://somecluster.com")
.maxPartitionResolutionRetries(5)
.serverX509Names(X509CertificateNameArgs.builder()
.issuerCertificateThumbprint("IssuerCertificateThumbprint1")
.name("ServerCommonName1")
.build())
.build())
.build())
.protocol("http")
.resourceGroupName("rg1")
.serviceName("apimService1")
.url("fabric:/mytestapp/mytestservice")
.workspaceId("wks1")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:WorkspaceBackend sfbackend /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}
Content copied to clipboard
Properties
Link copied to clipboard
Backend Circuit Breaker Configuration
Link copied to clipboard
Backend Credentials Contract Properties
Link copied to clipboard
Backend Description.
Link copied to clipboard
Link copied to clipboard
Backend Properties contract
Link copied to clipboard
Backend gateway Contract Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps.
Link copied to clipboard
Backend TLS Properties