We recommend using Azure Native.
azure.apimanagement.Subscription
Explore with Pulumi AI
Manages a Subscription within a API Management Service.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleService = Azure.ApiManagement.GetService.Invoke(new()
{
Name = "example-apim",
ResourceGroupName = "example-resources",
});
var exampleProduct = Azure.ApiManagement.GetProduct.Invoke(new()
{
ProductId = "00000000-0000-0000-0000-000000000000",
ApiManagementName = exampleService.Apply(getServiceResult => getServiceResult.Name),
ResourceGroupName = exampleService.Apply(getServiceResult => getServiceResult.ResourceGroupName),
});
var exampleUser = Azure.ApiManagement.GetUser.Invoke(new()
{
UserId = "11111111-1111-1111-1111-111111111111",
ApiManagementName = exampleService.Apply(getServiceResult => getServiceResult.Name),
ResourceGroupName = exampleService.Apply(getServiceResult => getServiceResult.ResourceGroupName),
});
var exampleSubscription = new Azure.ApiManagement.Subscription("exampleSubscription", new()
{
ApiManagementName = exampleService.Apply(getServiceResult => getServiceResult.Name),
ResourceGroupName = exampleService.Apply(getServiceResult => getServiceResult.ResourceGroupName),
UserId = exampleUser.Apply(getUserResult => getUserResult.Id),
ProductId = exampleProduct.Apply(getProductResult => getProductResult.Id),
DisplayName = "Parser API",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleService, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
Name: "example-apim",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
exampleProduct, err := apimanagement.LookupProduct(ctx, &apimanagement.LookupProductArgs{
ProductId: "00000000-0000-0000-0000-000000000000",
ApiManagementName: exampleService.Name,
ResourceGroupName: exampleService.ResourceGroupName,
}, nil)
if err != nil {
return err
}
exampleUser, err := apimanagement.LookupUser(ctx, &apimanagement.LookupUserArgs{
UserId: "11111111-1111-1111-1111-111111111111",
ApiManagementName: exampleService.Name,
ResourceGroupName: exampleService.ResourceGroupName,
}, nil)
if err != nil {
return err
}
_, err = apimanagement.NewSubscription(ctx, "exampleSubscription", &apimanagement.SubscriptionArgs{
ApiManagementName: *pulumi.String(exampleService.Name),
ResourceGroupName: *pulumi.String(exampleService.ResourceGroupName),
UserId: *pulumi.String(exampleUser.Id),
ProductId: *pulumi.String(exampleProduct.Id),
DisplayName: pulumi.String("Parser API"),
})
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.azure.apimanagement.ApimanagementFunctions;
import com.pulumi.azure.apimanagement.inputs.GetServiceArgs;
import com.pulumi.azure.apimanagement.inputs.GetProductArgs;
import com.pulumi.azure.apimanagement.inputs.GetUserArgs;
import com.pulumi.azure.apimanagement.Subscription;
import com.pulumi.azure.apimanagement.SubscriptionArgs;
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) {
final var exampleService = ApimanagementFunctions.getService(GetServiceArgs.builder()
.name("example-apim")
.resourceGroupName("example-resources")
.build());
final var exampleProduct = ApimanagementFunctions.getProduct(GetProductArgs.builder()
.productId("00000000-0000-0000-0000-000000000000")
.apiManagementName(exampleService.applyValue(getServiceResult -> getServiceResult.name()))
.resourceGroupName(exampleService.applyValue(getServiceResult -> getServiceResult.resourceGroupName()))
.build());
final var exampleUser = ApimanagementFunctions.getUser(GetUserArgs.builder()
.userId("11111111-1111-1111-1111-111111111111")
.apiManagementName(exampleService.applyValue(getServiceResult -> getServiceResult.name()))
.resourceGroupName(exampleService.applyValue(getServiceResult -> getServiceResult.resourceGroupName()))
.build());
var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
.apiManagementName(exampleService.applyValue(getServiceResult -> getServiceResult.name()))
.resourceGroupName(exampleService.applyValue(getServiceResult -> getServiceResult.resourceGroupName()))
.userId(exampleUser.applyValue(getUserResult -> getUserResult.id()))
.productId(exampleProduct.applyValue(getProductResult -> getProductResult.id()))
.displayName("Parser API")
.build());
}
}
import pulumi
import pulumi_azure as azure
example_service = azure.apimanagement.get_service(name="example-apim",
resource_group_name="example-resources")
example_product = azure.apimanagement.get_product(product_id="00000000-0000-0000-0000-000000000000",
api_management_name=example_service.name,
resource_group_name=example_service.resource_group_name)
example_user = azure.apimanagement.get_user(user_id="11111111-1111-1111-1111-111111111111",
api_management_name=example_service.name,
resource_group_name=example_service.resource_group_name)
example_subscription = azure.apimanagement.Subscription("exampleSubscription",
api_management_name=example_service.name,
resource_group_name=example_service.resource_group_name,
user_id=example_user.id,
product_id=example_product.id,
display_name="Parser API")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleService = azure.apimanagement.getService({
name: "example-apim",
resourceGroupName: "example-resources",
});
const exampleProduct = Promise.all([exampleService, exampleService]).then(([exampleService, exampleService1]) => azure.apimanagement.getProduct({
productId: "00000000-0000-0000-0000-000000000000",
apiManagementName: exampleService.name,
resourceGroupName: exampleService1.resourceGroupName,
}));
const exampleUser = Promise.all([exampleService, exampleService]).then(([exampleService, exampleService1]) => azure.apimanagement.getUser({
userId: "11111111-1111-1111-1111-111111111111",
apiManagementName: exampleService.name,
resourceGroupName: exampleService1.resourceGroupName,
}));
const exampleSubscription = new azure.apimanagement.Subscription("exampleSubscription", {
apiManagementName: exampleService.then(exampleService => exampleService.name),
resourceGroupName: exampleService.then(exampleService => exampleService.resourceGroupName),
userId: exampleUser.then(exampleUser => exampleUser.id),
productId: exampleProduct.then(exampleProduct => exampleProduct.id),
displayName: "Parser API",
});
resources:
exampleSubscription:
type: azure:apimanagement:Subscription
properties:
apiManagementName: ${exampleService.name}
resourceGroupName: ${exampleService.resourceGroupName}
userId: ${exampleUser.id}
productId: ${exampleProduct.id}
displayName: Parser API
variables:
exampleService:
fn::invoke:
Function: azure:apimanagement:getService
Arguments:
name: example-apim
resourceGroupName: example-resources
exampleProduct:
fn::invoke:
Function: azure:apimanagement:getProduct
Arguments:
productId: 00000000-0000-0000-0000-000000000000
apiManagementName: ${exampleService.name}
resourceGroupName: ${exampleService.resourceGroupName}
exampleUser:
fn::invoke:
Function: azure:apimanagement:getUser
Arguments:
userId: 11111111-1111-1111-1111-111111111111
apiManagementName: ${exampleService.name}
resourceGroupName: ${exampleService.resourceGroupName}
Create Subscription Resource
new Subscription(name: string, args: SubscriptionArgs, opts?: CustomResourceOptions);
@overload
def Subscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
allow_tracing: Optional[bool] = None,
api_id: Optional[str] = None,
api_management_name: Optional[str] = None,
display_name: Optional[str] = None,
primary_key: Optional[str] = None,
product_id: Optional[str] = None,
resource_group_name: Optional[str] = None,
secondary_key: Optional[str] = None,
state: Optional[str] = None,
subscription_id: Optional[str] = None,
user_id: Optional[str] = None)
@overload
def Subscription(resource_name: str,
args: SubscriptionArgs,
opts: Optional[ResourceOptions] = None)
func NewSubscription(ctx *Context, name string, args SubscriptionArgs, opts ...ResourceOption) (*Subscription, error)
public Subscription(string name, SubscriptionArgs args, CustomResourceOptions? opts = null)
public Subscription(String name, SubscriptionArgs args)
public Subscription(String name, SubscriptionArgs args, CustomResourceOptions options)
type: azure:apimanagement:Subscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Subscription Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Subscription resource accepts the following input properties:
- Api
Management stringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- Display
Name string The display name of this Subscription.
- Resource
Group stringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- Allow
Tracing bool Determines whether tracing can be enabled. Defaults to
true
.- Api
Id string The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- Primary
Key string The primary subscription key to use for the subscription.
- Product
Id string The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- Secondary
Key string The secondary subscription key to use for the subscription.
- State string
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- Subscription
Id string An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- User
Id string The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- Api
Management stringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- Display
Name string The display name of this Subscription.
- Resource
Group stringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- Allow
Tracing bool Determines whether tracing can be enabled. Defaults to
true
.- Api
Id string The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- Primary
Key string The primary subscription key to use for the subscription.
- Product
Id string The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- Secondary
Key string The secondary subscription key to use for the subscription.
- State string
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- Subscription
Id string An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- User
Id string The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- api
Management StringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display
Name String The display name of this Subscription.
- resource
Group StringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- allow
Tracing Boolean Determines whether tracing can be enabled. Defaults to
true
.- api
Id String The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- primary
Key String The primary subscription key to use for the subscription.
- product
Id String The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- secondary
Key String The secondary subscription key to use for the subscription.
- state String
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription
Id String An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user
Id String The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- api
Management stringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display
Name string The display name of this Subscription.
- resource
Group stringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- allow
Tracing boolean Determines whether tracing can be enabled. Defaults to
true
.- api
Id string The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- primary
Key string The primary subscription key to use for the subscription.
- product
Id string The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- secondary
Key string The secondary subscription key to use for the subscription.
- state string
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription
Id string An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user
Id string The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- api_
management_ strname The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display_
name str The display name of this Subscription.
- resource_
group_ strname The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- allow_
tracing bool Determines whether tracing can be enabled. Defaults to
true
.- api_
id str The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- primary_
key str The primary subscription key to use for the subscription.
- product_
id str The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- secondary_
key str The secondary subscription key to use for the subscription.
- state str
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription_
id str An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user_
id str The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- api
Management StringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display
Name String The display name of this Subscription.
- resource
Group StringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- allow
Tracing Boolean Determines whether tracing can be enabled. Defaults to
true
.- api
Id String The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- primary
Key String The primary subscription key to use for the subscription.
- product
Id String The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- secondary
Key String The secondary subscription key to use for the subscription.
- state String
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription
Id String An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user
Id String The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subscription resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Subscription Resource
Get an existing Subscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SubscriptionState, opts?: CustomResourceOptions): Subscription
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_tracing: Optional[bool] = None,
api_id: Optional[str] = None,
api_management_name: Optional[str] = None,
display_name: Optional[str] = None,
primary_key: Optional[str] = None,
product_id: Optional[str] = None,
resource_group_name: Optional[str] = None,
secondary_key: Optional[str] = None,
state: Optional[str] = None,
subscription_id: Optional[str] = None,
user_id: Optional[str] = None) -> Subscription
func GetSubscription(ctx *Context, name string, id IDInput, state *SubscriptionState, opts ...ResourceOption) (*Subscription, error)
public static Subscription Get(string name, Input<string> id, SubscriptionState? state, CustomResourceOptions? opts = null)
public static Subscription get(String name, Output<String> id, SubscriptionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allow
Tracing bool Determines whether tracing can be enabled. Defaults to
true
.- Api
Id string The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- Api
Management stringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- Display
Name string The display name of this Subscription.
- Primary
Key string The primary subscription key to use for the subscription.
- Product
Id string The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- Resource
Group stringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- Secondary
Key string The secondary subscription key to use for the subscription.
- State string
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- Subscription
Id string An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- User
Id string The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- Allow
Tracing bool Determines whether tracing can be enabled. Defaults to
true
.- Api
Id string The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- Api
Management stringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- Display
Name string The display name of this Subscription.
- Primary
Key string The primary subscription key to use for the subscription.
- Product
Id string The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- Resource
Group stringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- Secondary
Key string The secondary subscription key to use for the subscription.
- State string
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- Subscription
Id string An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- User
Id string The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- allow
Tracing Boolean Determines whether tracing can be enabled. Defaults to
true
.- api
Id String The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- api
Management StringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display
Name String The display name of this Subscription.
- primary
Key String The primary subscription key to use for the subscription.
- product
Id String The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- resource
Group StringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- secondary
Key String The secondary subscription key to use for the subscription.
- state String
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription
Id String An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user
Id String The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- allow
Tracing boolean Determines whether tracing can be enabled. Defaults to
true
.- api
Id string The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- api
Management stringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display
Name string The display name of this Subscription.
- primary
Key string The primary subscription key to use for the subscription.
- product
Id string The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- resource
Group stringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- secondary
Key string The secondary subscription key to use for the subscription.
- state string
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription
Id string An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user
Id string The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- allow_
tracing bool Determines whether tracing can be enabled. Defaults to
true
.- api_
id str The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- api_
management_ strname The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display_
name str The display name of this Subscription.
- primary_
key str The primary subscription key to use for the subscription.
- product_
id str The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- resource_
group_ strname The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- secondary_
key str The secondary subscription key to use for the subscription.
- state str
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription_
id str An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user_
id str The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
- allow
Tracing Boolean Determines whether tracing can be enabled. Defaults to
true
.- api
Id String The ID of the API which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missing/apis
scope is used for the subscription and all apis are accessible.- api
Management StringName The name of the API Management Service where this Subscription should be created. Changing this forces a new resource to be created.
- display
Name String The display name of this Subscription.
- primary
Key String The primary subscription key to use for the subscription.
- product
Id String The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created.
Info: Only one of
product_id
andapi_id
can be set. If both are missingall_apis
scope is used for the subscription.- resource
Group StringName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
- secondary
Key String The secondary subscription key to use for the subscription.
- state String
The state of this Subscription. Possible values are
active
,cancelled
,expired
,rejected
,submitted
andsuspended
. Defaults tosubmitted
.- subscription
Id String An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created.
- user
Id String The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.
Import
API Management Subscriptions can be imported using the resource id
, e.g.
$ pulumi import azure:apimanagement/subscription:Subscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ApiManagement/service/example-apim/subscriptions/subscription-name
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.