Show / Hide Table of Contents

Class Service

(experimental) The App Runner Service.

Inheritance
object
Resource
Service
Implements
IService
IResource
IConstruct
IDependable
IGrantable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.AppRunner.Alpha
Assembly: Amazon.CDK.AWS.AppRunner.Alpha.dll
Syntax (csharp)
public class Service : Resource, IService, IResource, IConstruct, IDependable, IGrantable
Syntax (vb)
Public Class Service Inherits Resource Implements IService, IResource, IConstruct, IDependable, IGrantable
Remarks

Stability: Experimental

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.IAM;


             var service = new Service(this, "Service", new ServiceProps {
                 Source = Source.FromEcrPublic(new EcrPublicProps {
                     ImageConfiguration = new ImageConfiguration { Port = 8000 },
                     ImageIdentifier = "public.ecr.aws/aws-containers/hello-app-runner:latest"
                 })
             });

             service.AddToRolePolicy(new PolicyStatement(new PolicyStatementProps {
                 Effect = Effect.ALLOW,
                 Actions = new [] { "s3:GetObject" },
                 Resources = new [] { "*" }
             }));

Synopsis

Constructors

Service(Construct, string, IServiceProps)

(experimental) The App Runner Service.

Properties

Environment

(deprecated) Environment variables for this service.

GrantPrincipal

(experimental) The principal to grant permissions to.

PROPERTY_INJECTION_ID

(experimental) Uniquely identifies this class.

ServiceArn

(experimental) The ARN of the Service.

ServiceId

(experimental) The ID of the Service.

ServiceName

(experimental) The name of the service.

ServiceStatus

(experimental) The status of the Service.

ServiceUrl

(experimental) The URL of the Service.

Methods

AddEnvironmentVariable(string, string)

(experimental) This method adds an environment variable to the App Runner service.

AddSecret(string, Secret)

(experimental) This method adds a secret as environment variable to the App Runner service.

AddToRolePolicy(PolicyStatement)

(experimental) Adds a statement to the instance role.

FromServiceAttributes(Construct, string, IServiceAttributes)

(experimental) Import from service attributes.

FromServiceName(Construct, string, string)

(experimental) Import from service name.

Constructors

Service(Construct, string, IServiceProps)

(experimental) The App Runner Service.

public Service(Construct scope, string id, IServiceProps props)
Parameters
scope Construct
id string
props IServiceProps
Remarks

Stability: Experimental

Properties

Environment

(deprecated) Environment variables for this service.

[Obsolete("use environmentVariables.")]
public virtual IDictionary<string, string> Environment { get; }
Property Value

IDictionary<string, string>

Remarks

Stability: Deprecated

GrantPrincipal

(experimental) The principal to grant permissions to.

public virtual IPrincipal GrantPrincipal { get; }
Property Value

IPrincipal

Remarks

Stability: Experimental

PROPERTY_INJECTION_ID

(experimental) Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Stability: Experimental

ServiceArn

(experimental) The ARN of the Service.

public virtual string ServiceArn { get; }
Property Value

string

Remarks

Stability: Experimental

Attribute: true

ServiceId

(experimental) The ID of the Service.

public virtual string ServiceId { get; }
Property Value

string

Remarks

Stability: Experimental

Attribute: true

ServiceName

(experimental) The name of the service.

public virtual string ServiceName { get; }
Property Value

string

Remarks

Stability: Experimental

ServiceStatus

(experimental) The status of the Service.

public virtual string ServiceStatus { get; }
Property Value

string

Remarks

Stability: Experimental

Attribute: true

ServiceUrl

(experimental) The URL of the Service.

public virtual string ServiceUrl { get; }
Property Value

string

Remarks

Stability: Experimental

Attribute: true

Methods

AddEnvironmentVariable(string, string)

(experimental) This method adds an environment variable to the App Runner service.

public virtual void AddEnvironmentVariable(string name, string value)
Parameters
name string
value string
Remarks

Stability: Experimental

AddSecret(string, Secret)

(experimental) This method adds a secret as environment variable to the App Runner service.

public virtual void AddSecret(string name, Secret secret)
Parameters
name string
secret Secret
Remarks

Stability: Experimental

AddToRolePolicy(PolicyStatement)

(experimental) Adds a statement to the instance role.

public virtual void AddToRolePolicy(PolicyStatement statement)
Parameters
statement PolicyStatement
Remarks

Stability: Experimental

FromServiceAttributes(Construct, string, IServiceAttributes)

(experimental) Import from service attributes.

public static IService FromServiceAttributes(Construct scope, string id, IServiceAttributes attrs)
Parameters
scope Construct
id string
attrs IServiceAttributes
Returns

IService

Remarks

Stability: Experimental

FromServiceName(Construct, string, string)

(experimental) Import from service name.

public static IService FromServiceName(Construct scope, string id, string serviceName)
Parameters
scope Construct
id string
serviceName string
Returns

IService

Remarks

Stability: Experimental

Implements

IService
IResource
Constructs.IConstruct
Constructs.IDependable
IGrantable
Back to top Generated by DocFX