Show / Hide Table of Contents

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",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Api
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.ApiManagement
Assembly: Pulumi.Azure.dll
Syntax
public class Api : CustomResource

Constructors

View Source

Api(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 Source

ApiManagementName

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>
View Source

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>
View Source

DisplayName

The display name of the API.

Declaration
public Output<string> DisplayName { get; }
Property Value
Type Description
Output<System.String>
View Source

Import

A import block as documented below.

Declaration
public Output<ApiImport> Import { get; }
Property Value
Type Description
Output<ApiImport>
View Source

IsCurrent

Is this the current API Revision?

Declaration
public Output<bool> IsCurrent { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

IsOnline

Is this API Revision online/accessible via the Gateway?

Declaration
public Output<bool> IsOnline { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

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>
View Source

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>
View Source

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>>
View Source

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>
View Source

Revision

The Revision which used for this API.

Declaration
public Output<string> Revision { get; }
Property Value
Type Description
Output<System.String>
View Source

ServiceUrl

Absolute URL of the backend service implementing this API.

Declaration
public Output<string> ServiceUrl { get; }
Property Value
Type Description
Output<System.String>
View Source

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>>
View Source

SubscriptionKeyParameterNames

A subscription_key_parameter_names block as documented below.

Declaration
public Output<ApiSubscriptionKeyParameterNames> SubscriptionKeyParameterNames { get; }
Property Value
Type Description
Output<ApiSubscriptionKeyParameterNames>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.