Workspace Subscription
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/v3"
"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
Determines whether tracing is enabled
The Azure API version of the resource.
Subscription creation date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
as specified by the ISO 8601 standard.
The name of the subscription, or null if the subscription has no name.
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.
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.
Upcoming subscription expiration notification date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
as specified by the ISO 8601 standard.
Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
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.
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.
Optional subscription comment added by an administrator when the state is changed to the 'rejected'.