Show / Hide Table of Contents

Class FunctionApp

Manages a Function App.

Example Usage (with App Service Plan)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
    {
        Location = "westus2",
    });
    var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
    });
    var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        Sku = new Azure.AppService.Inputs.PlanSkuArgs
        {
            Tier = "Standard",
            Size = "S1",
        },
    });
    var exampleFunctionApp = new Azure.AppService.FunctionApp("exampleFunctionApp", new Azure.AppService.FunctionAppArgs
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        AppServicePlanId = examplePlan.Id,
        StorageConnectionString = exampleAccount.PrimaryConnectionString,
    });
}

}

Example Usage (in a Consumption Plan)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
    {
        Location = "westus2",
    });
    var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
    });
    var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        Kind = "FunctionApp",
        Sku = new Azure.AppService.Inputs.PlanSkuArgs
        {
            Tier = "Dynamic",
            Size = "Y1",
        },
    });
    var exampleFunctionApp = new Azure.AppService.FunctionApp("exampleFunctionApp", new Azure.AppService.FunctionAppArgs
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        AppServicePlanId = examplePlan.Id,
        StorageConnectionString = exampleAccount.PrimaryConnectionString,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
FunctionApp
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.AppService
Assembly: Pulumi.Azure.dll
Syntax
public class FunctionApp : CustomResource

Constructors

View Source

FunctionApp(String, FunctionAppArgs, CustomResourceOptions)

Create a FunctionApp resource with the given unique name, arguments, and options.

Declaration
public FunctionApp(string name, FunctionAppArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

FunctionAppArgs 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

AppServicePlanId

The ID of the App Service Plan within which to create this Function App.

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

AppSettings

A key-value pair of App Settings.

Declaration
public Output<ImmutableDictionary<string, string>> AppSettings { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

AuthSettings

A auth_settings block as defined below.

Declaration
public Output<FunctionAppAuthSettings> AuthSettings { get; }
Property Value
Type Description
Output<FunctionAppAuthSettings>
View Source

ClientAffinityEnabled

Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

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

ConnectionStrings

An connection_string block as defined below.

Declaration
public Output<ImmutableArray<FunctionAppConnectionString>> ConnectionStrings { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<FunctionAppConnectionString>>
View Source

DailyMemoryTimeQuota

The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

Declaration
public Output<int?> DailyMemoryTimeQuota { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

DefaultHostname

The default hostname associated with the Function App - such as mysite.azurewebsites.net

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

EnableBuiltinLogging

Should the built-in logging of this Function App be enabled? Defaults to true.

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

Enabled

Is the Function App enabled?

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

HttpsOnly

Can the Function App only be accessed via HTTPS? Defaults to false.

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

Identity

An identity block as defined below.

Declaration
public Output<FunctionAppIdentity> Identity { get; }
Property Value
Type Description
Output<FunctionAppIdentity>
View Source

Kind

The Function App kind - such as functionapp,linux,container

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

Location

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

Name

Specifies the name of the Function App. Changing this forces a new resource to be created.

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

OsType

A string indicating the Operating System type for this function app.

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

OutboundIpAddresses

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

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

PossibleOutboundIpAddresses

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

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

ResourceGroupName

The name of the resource group in which to create the Function App.

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

SiteConfig

A site_config object as defined below.

Declaration
public Output<FunctionAppSiteConfig> SiteConfig { get; }
Property Value
Type Description
Output<FunctionAppSiteConfig>
View Source

SiteCredentials

A site_credential block as defined below, which contains the site-level credentials used to publish to this App Service.

Declaration
public Output<ImmutableArray<FunctionAppSiteCredential>> SiteCredentials { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<FunctionAppSiteCredential>>
View Source

StorageAccountAccessKey

The access key which will be used to access the backend storage account for the Function App.

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

StorageAccountName

The backend storage account name which will be used by this Function App (such as the dashboard, logs).

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

StorageConnectionString

The connection string to the backend storage account which will be used by this Function App (such as the dashboard, logs). Typically set to the primary_connection_string of a storage account resource.

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

Tags

A mapping of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

Version

The runtime version associated with the Function App. Defaults to ~1.

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

Methods

View Source

Get(String, Input<String>, FunctionAppState, CustomResourceOptions)

Get an existing FunctionApp resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static FunctionApp Get(string name, Input<string> id, FunctionAppState 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.

FunctionAppState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
FunctionApp
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.