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,
});
}
}
Inherited Members
Namespace: Pulumi.Fastly
Assembly: Pulumi.Fastly.dll
Syntax
public class Servicev1 : CustomResource
Constructors
View SourceServicev1(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 SourceAcls
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>> |
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>> |
ActiveVersion
The currently active version of your Fastly Service.
Declaration
public Output<int> ActiveVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
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>> |
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>> |
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>> |
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>> |
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> |
Comment
An optional comment about the Director.
Declaration
public Output<string> Comment { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
DefaultHost
Sets the host header.
Declaration
public Output<string> DefaultHost { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultTtl
The default Time-to-live (TTL) for requests.
Declaration
public Output<int?> DefaultTtl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
Name
A unique name to identify this dictionary.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
VersionComment
Description field for the version.
Declaration
public Output<string> VersionComment { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |