/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the lightsail-2016-11-28.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Lightsail.Model
{
///
/// Container for the parameters to the CreateContainerService operation.
/// Creates an Amazon Lightsail container service.
///
///
///
/// A Lightsail container service is a compute resource to which you can deploy containers.
/// For more information, see Container
/// services in Amazon Lightsail in the Lightsail Dev Guide.
///
///
public partial class CreateContainerServiceRequest : AmazonLightsailRequest
{
private ContainerServiceDeploymentRequest _deployment;
private ContainerServicePowerName _power;
private PrivateRegistryAccessRequest _privateRegistryAccess;
private Dictionary> _publicDomainNames = new Dictionary>();
private int? _scale;
private string _serviceName;
private List _tags = new List();
///
/// Gets and sets the property Deployment.
///
/// An object that describes a deployment for the container service.
///
///
///
/// A deployment specifies the containers that will be launched on the container service
/// and their settings, such as the ports to open, the environment variables to apply,
/// and the launch command to run. It also specifies the container that will serve as
/// the public endpoint of the deployment and its settings, such as the HTTP or HTTPS
/// port to use, and the health check configuration.
///
///
public ContainerServiceDeploymentRequest Deployment
{
get { return this._deployment; }
set { this._deployment = value; }
}
// Check to see if Deployment property is set
internal bool IsSetDeployment()
{
return this._deployment != null;
}
///
/// Gets and sets the property Power.
///
/// The power specification for the container service.
///
///
///
/// The power specifies the amount of memory, vCPUs, and base monthly cost of each node
/// of the container service. The power
and scale
of a container
/// service makes up its configured capacity. To determine the monthly price of your container
/// service, multiply the base price of the power
with the scale
/// (the number of nodes) of the service.
///
///
///
/// Use the GetContainerServicePowers
action to get a list of power options
/// that you can specify using this parameter, and their base monthly cost.
///
///
[AWSProperty(Required=true)]
public ContainerServicePowerName Power
{
get { return this._power; }
set { this._power = value; }
}
// Check to see if Power property is set
internal bool IsSetPower()
{
return this._power != null;
}
///
/// Gets and sets the property PrivateRegistryAccess.
///
/// An object to describe the configuration for the container service to access private
/// container image repositories, such as Amazon Elastic Container Registry (Amazon ECR)
/// private repositories.
///
///
///
/// For more information, see Configuring
/// access to an Amazon ECR private repository for an Amazon Lightsail container service
/// in the Amazon Lightsail Developer Guide.
///
///
public PrivateRegistryAccessRequest PrivateRegistryAccess
{
get { return this._privateRegistryAccess; }
set { this._privateRegistryAccess = value; }
}
// Check to see if PrivateRegistryAccess property is set
internal bool IsSetPrivateRegistryAccess()
{
return this._privateRegistryAccess != null;
}
///
/// Gets and sets the property PublicDomainNames.
///
/// The public domain names to use with the container service, such as example.com
/// and www.example.com
.
///
///
///
/// You can specify up to four public domain names for a container service. The domain
/// names that you specify are used when you create a deployment with a container configured
/// as the public endpoint of your container service.
///
///
///
/// If you don't specify public domain names, then you can use the default domain of the
/// container service.
///
///
///
/// You must create and validate an SSL/TLS certificate before you can use public domain
/// names with your container service. Use the CreateCertificate
action to
/// create a certificate for the public domain names you want to use with your container
/// service.
///
///
///
/// You can specify public domain names using a string to array map as shown in the example
/// later on this page.
///
///
public Dictionary> PublicDomainNames
{
get { return this._publicDomainNames; }
set { this._publicDomainNames = value; }
}
// Check to see if PublicDomainNames property is set
internal bool IsSetPublicDomainNames()
{
return this._publicDomainNames != null && this._publicDomainNames.Count > 0;
}
///
/// Gets and sets the property Scale.
///
/// The scale specification for the container service.
///
///
///
/// The scale specifies the allocated compute nodes of the container service. The power
/// and scale
of a container service makes up its configured capacity. To
/// determine the monthly price of your container service, multiply the base price of
/// the power
with the scale
(the number of nodes) of the service.
///
///
[AWSProperty(Required=true, Min=1, Max=20)]
public int Scale
{
get { return this._scale.GetValueOrDefault(); }
set { this._scale = value; }
}
// Check to see if Scale property is set
internal bool IsSetScale()
{
return this._scale.HasValue;
}
///
/// Gets and sets the property ServiceName.
///
/// The name for the container service.
///
///
///
/// The name that you specify for your container service will make up part of its default
/// domain. The default domain of a container service is typically https://<ServiceName>.<RandomGUID>.<AWSRegion>.cs.amazonlightsail.com
.
/// If the name of your container service is container-service-1
, and it's
/// located in the US East (Ohio) Amazon Web Services Region (us-east-2
),
/// then the domain for your container service will be like the following example: https://container-service-1.ur4EXAMPLE2uq.us-east-2.cs.amazonlightsail.com
///
///
///
///
/// The following are the requirements for container service names:
///
/// -
///
/// Must be unique within each Amazon Web Services Region in your Lightsail account.
///
///
-
///
/// Must contain 1 to 63 characters.
///
///
-
///
/// Must contain only alphanumeric characters and hyphens.
///
///
-
///
/// A hyphen (-) can separate words but cannot be at the start or end of the name.
///
///
///
[AWSProperty(Required=true, Min=1, Max=63)]
public string ServiceName
{
get { return this._serviceName; }
set { this._serviceName = value; }
}
// Check to see if ServiceName property is set
internal bool IsSetServiceName()
{
return this._serviceName != null;
}
///
/// Gets and sets the property Tags.
///
/// The tag keys and optional values to add to the container service during create.
///
///
///
/// Use the TagResource
action to tag a resource after it's created.
///
///
///
/// For more information about tags in Lightsail, see the Amazon
/// Lightsail Developer Guide.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
}
}