Show / Hide Table of Contents

Class Servicev1

Provides a Fastly Service, representing the configuration for a website, app, API, or anything else to be served through Fastly. A Service encompasses Domains and Backends.

The Service resource requires a domain name that is correctly set up to direct traffic to the Fastly service. See Fastly's guide on [Adding CNAME Records][fastly-cname] on their documentation site for guidance.

Example Usage

Basic usage

using Pulumi;
using Fastly = Pulumi.Fastly;

class MyStack : Stack
{
public MyStack()
{
    var demo = new Fastly.Servicev1("demo", new Fastly.Servicev1Args
    {
        Backends = 
        {
            new Fastly.Inputs.Servicev1BackendArgs
            {
                Address = "127.0.0.1",
                Name = "localhost",
                Port = 80,
            },
        },
        Domains = 
        {
            new Fastly.Inputs.Servicev1DomainArgs
            {
                Comment = "demo",
                Name = "demo.notexample.com",
            },
        },
        ForceDestroy = true,
    });
}

}

Basic usage with custom VCL:

using System.IO;
using Pulumi;
using Fastly = Pulumi.Fastly;

class MyStack : Stack
{
public MyStack()
{
    var demo = new Fastly.Servicev1("demo", new Fastly.Servicev1Args
    {
        Backends = 
        {
            new Fastly.Inputs.Servicev1BackendArgs
            {
                Address = "127.0.0.1",
                Name = "localhost",
                Port = 80,
            },
        },
        Domains = 
        {
            new Fastly.Inputs.Servicev1DomainArgs
            {
                Comment = "demo",
                Name = "demo.notexample.com",
            },
        },
        ForceDestroy = true,
        Vcls = 
        {
            new Fastly.Inputs.Servicev1VclArgs
            {
                Content = File.ReadAllText($"{path.Module}/my_custom_main.vcl"),
                Main = true,
                Name = "my_custom_main_vcl",
            },
            new Fastly.Inputs.Servicev1VclArgs
            {
                Content = File.ReadAllText($"{path.Module}/my_custom_library.vcl"),
                Name = "my_custom_library_vcl",
            },
        },
    });
}

}

Basic usage with custom Director

using Pulumi;
using Fastly = Pulumi.Fastly;

class MyStack : Stack
{
public MyStack()
{
    var demo = new Fastly.Servicev1("demo", new Fastly.Servicev1Args
    {
        Backends = 
        {
            new Fastly.Inputs.Servicev1BackendArgs
            {
                Address = "127.0.0.1",
                Name = "origin1",
                Port = 80,
            },
            new Fastly.Inputs.Servicev1BackendArgs
            {
                Address = "127.0.0.2",
                Name = "origin2",
                Port = 80,
            },
        },
        Directors = 
        {
            new Fastly.Inputs.Servicev1DirectorArgs
            {
                Backends = 
                {
                    "origin1",
                    "origin2",
                },
                Name = "mydirector",
                Quorum = 0,
                Type = 3,
            },
        },
        Domains = 
        {
            new Fastly.Inputs.Servicev1DomainArgs
            {
                Comment = "demo",
                Name = "demo.notexample.com",
            },
        },
        ForceDestroy = true,
    });
}

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

Constructors

View Source

Servicev1(String, Servicev1Args, CustomResourceOptions)

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

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

The unique name of the resource

Servicev1Args 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

Acls

A set of ACL configuration blocks. Defined below.

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

Activate

Conditionally prevents the Service from being activated. The apply step will continue to create a new draft version but will not activate it if this is set to false. Default true.

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

ActiveVersion

The currently active version of your Fastly Service.

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

Backends

A set of Backends to service requests from your Domains. Defined below. Backends must be defined in this argument, or defined in the vcl argument below

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

Bigqueryloggings

A BigQuery endpoint to send streaming logs too. Defined below.

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

Blobstorageloggings

An Azure Blob Storage endpoint to send streaming logs too. Defined below.

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

CacheSettings

A set of Cache Settings, allowing you to override

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

ClonedVersion

The latest cloned version by the provider. The value gets only set after running pulumi up.

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

Comment

An optional comment about the Director.

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

Conditions

A set of conditions to add logic to any basic configuration object in this service. Defined below.

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

DefaultHost

Sets the host header.

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

DefaultTtl

The default Time-to-live (TTL) for requests.

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

Dictionaries

A set of dictionaries that allow the storing of key values pair for use within VCL functions. Defined below.

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

Directors

A director to allow more control over balancing traffic over backends. when an item is not to be cached based on an above condition. Defined below

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

Domains

If you created the S3 bucket outside of us-east-1, then specify the corresponding bucket endpoint. Example: s3-us-west-2.amazonaws.com.

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

Dynamicsnippets

A set of custom, "dynamic" VCL Snippet configuration blocks. Defined below.

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

ForceDestroy

Services that are active cannot be destroyed. In order to destroy the Service, set force_destroy to true. Default false.

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

Gcsloggings

A gcs endpoint to send streaming logs too. Defined below.

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

Gzips

A set of gzip rules to control automatic gzipping of content. Defined below.

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

Headers

A set of Headers to manipulate for each request. Defined below.

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

Healthchecks

Name of a defined healthcheck to assign to this backend.

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

Httpsloggings

An HTTPS endpoint to send streaming logs to. Defined below.

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

Logentries

A logentries endpoint to send streaming logs too. Defined below.

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

Name

A unique name to identify this dictionary.

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

Papertrails

A Papertrail endpoint to send streaming logs too. Defined below.

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

RequestSettings

A set of Request modifiers. Defined below

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

ResponseObjects

Allows you to create synthetic responses that exist entirely on the varnish machine. Useful for creating error or maintenance pages that exists outside the scope of your datacenter. Best when used with Condition objects.

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

S3loggings

A set of S3 Buckets to send streaming logs too. Defined below.

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

Snippets

A set of custom, "regular" (non-dynamic) VCL Snippet configuration blocks. Defined below.

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

Splunks

A Splunk endpoint to send streaming logs too. Defined below.

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

Sumologics

A Sumologic endpoint to send streaming logs too. Defined below.

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

Syslogs

A syslog endpoint to send streaming logs too. Defined below.

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

Vcls

A set of custom VCL configuration blocks. The ability to upload custom VCL code is not enabled by default for new Fastly accounts (see the Fastly documentation for details).

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

VersionComment

Description field for the version.

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

Methods

View Source

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

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

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

Servicev1State state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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