Class Api
Manages an API within an API Management Service.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleService = new Azure.ApiManagement.Service("exampleService", new Azure.ApiManagement.ServiceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
PublisherName = "My Company",
PublisherEmail = "company@exmaple.com",
SkuName = "Developer_1",
});
var exampleApi = new Azure.ApiManagement.Api("exampleApi", new Azure.ApiManagement.ApiArgs
{
ResourceGroupName = exampleResourceGroup.Name,
ApiManagementName = exampleService.Name,
Revision = "1",
DisplayName = "Example API",
Path = "example",
Protocols =
{
"https",
},
Import = new Azure.ApiManagement.Inputs.ApiImportArgs
{
ContentFormat = "swagger-link-json",
ContentValue = "http://conferenceapi.azurewebsites.net/?format=json",
},
});
}
}
Inherited Members
Namespace: Pulumi.Azure.ApiManagement
Assembly: Pulumi.Azure.dll
Syntax
public class Api : CustomResource
Constructors
View SourceApi(String, ApiArgs, CustomResourceOptions)
Create a Api resource with the given unique name, arguments, and options.
Declaration
public Api(string name, ApiArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ApiArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceApiManagementName
The Name of the API Management Service where this API should be created. Changing this forces a new resource to be created.
Declaration
public Output<string> ApiManagementName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
A description of the API Management API, which may include HTML formatting tags.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DisplayName
The display name of the API.
Declaration
public Output<string> DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Import
A import block as documented below.
Declaration
public Output<ApiImport> Import { get; }
Property Value
| Type | Description |
|---|---|
| Output<ApiImport> |
IsCurrent
Is this the current API Revision?
Declaration
public Output<bool> IsCurrent { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
IsOnline
Is this API Revision online/accessible via the Gateway?
Declaration
public Output<bool> IsOnline { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Name
The name of the API Management API. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Path
The Path for this API Management API, which is a relative URL which uniquely identifies this API and all of it's resource paths within the API Management Service.
Declaration
public Output<string> Path { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Protocols
A list of protocols the operations in this API can be invoked. Possible values are http and https.
Declaration
public Output<ImmutableArray<string>> Protocols { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ResourceGroupName
The Name of the Resource Group where the API Management API exists. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Revision
The Revision which used for this API.
Declaration
public Output<string> Revision { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceUrl
Absolute URL of the backend service implementing this API.
Declaration
public Output<string> ServiceUrl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SoapPassThrough
Should this API expose a SOAP frontend, rather than a HTTP frontend? Defaults to false.
Declaration
public Output<bool?> SoapPassThrough { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
SubscriptionKeyParameterNames
A subscription_key_parameter_names block as documented below.
Declaration
public Output<ApiSubscriptionKeyParameterNames> SubscriptionKeyParameterNames { get; }
Property Value
| Type | Description |
|---|---|
| Output<ApiSubscriptionKeyParameterNames> |
Version
The Version number of this API, if this API is versioned.
Declaration
public Output<string> Version { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VersionSetId
The ID of the Version Set which this API is associated with.
Declaration
public Output<string> VersionSetId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ApiState, CustomResourceOptions)
Get an existing Api resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Api Get(string name, Input<string> id, ApiState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ApiState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Api |