WorkspaceSubscription

class WorkspaceSubscription : KotlinCustomResource

Subscription details. Uses Azure REST API version 2022-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-09-01-preview. Other available API versions: 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native apimanagement [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

ApiManagementCreateWorkspaceSubscription

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspaceSubscription = new AzureNative.ApiManagement.WorkspaceSubscription("workspaceSubscription", new()
{
DisplayName = "testsub",
OwnerId = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7",
ResourceGroupName = "rg1",
Scope = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002",
ServiceName = "apimService1",
Sid = "testsub",
WorkspaceId = "wks1",
});
});
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.NewWorkspaceSubscription(ctx, "workspaceSubscription", &apimanagement.WorkspaceSubscriptionArgs{
DisplayName: pulumi.String("testsub"),
OwnerId: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7"),
ResourceGroupName: pulumi.String("rg1"),
Scope: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002"),
ServiceName: pulumi.String("apimService1"),
Sid: pulumi.String("testsub"),
WorkspaceId: pulumi.String("wks1"),
})
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.apimanagement.WorkspaceSubscription;
import com.pulumi.azurenative.apimanagement.WorkspaceSubscriptionArgs;
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 workspaceSubscription = new WorkspaceSubscription("workspaceSubscription", WorkspaceSubscriptionArgs.builder()
.displayName("testsub")
.ownerId("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7")
.resourceGroupName("rg1")
.scope("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002")
.serviceName("apimService1")
.sid("testsub")
.workspaceId("wks1")
.build());
}
}

Import

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

$ pulumi import azure-native:apimanagement:WorkspaceSubscription testsub /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}

Properties

Link copied to clipboard
val allowTracing: Output<Boolean>?

Determines whether tracing is enabled

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val createdDate: Output<String>

Subscription creation date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

Link copied to clipboard
val displayName: Output<String>?

The name of the subscription, or null if the subscription has no name.

Link copied to clipboard
val endDate: Output<String>?

Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

Link copied to clipboard
val expirationDate: Output<String>?

Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val notificationDate: Output<String>?

Upcoming subscription expiration notification date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

Link copied to clipboard
val ownerId: Output<String>?

The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.

Link copied to clipboard
val primaryKey: Output<String>?

Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scope: Output<String>

Scope like /products/{productId} or /apis or /apis/{apiId}.

Link copied to clipboard
val secondaryKey: Output<String>?

Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.

Link copied to clipboard
val startDate: Output<String>?

Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

Link copied to clipboard
val state: Output<String>

Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.

Link copied to clipboard
val stateComment: Output<String>?

Optional subscription comment added by an administrator when the state is changed to the 'rejected'.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>