/// <summary> /// Initializes a new instance of the ContainerCodePackageProperties class. /// </summary> /// <param name="name">The name of the code package.</param> /// <param name="image">The Container image to use.</param> /// <param name="resources">The resources required by this container.</param> /// <param name="imageRegistryCredential">Image registry credential.</param> /// <param name="entrypoint">Override for the default entry point in the container.</param> /// <param name="commands">Command array to execute within the container in exec form.</param> /// <param name="environmentVariables">The environment variables to set in this container</param> /// <param name="settings">The settings to set in this container. The setting file path can be fetched from environment /// variable "Fabric_SettingPath". The path for Windows container is "C:\\secrets". The path for Linux container is /// "/var/secrets".</param> /// <param name="labels">The labels to set in this container.</param> /// <param name="endpoints">The endpoints exposed by this container.</param> /// <param name="volumeRefs">Volumes to be attached to the container. The lifetime of these volumes is independent of /// the application's lifetime.</param> /// <param name="volumes">Volumes to be attached to the container. The lifetime of these volumes is scoped to the /// application's lifetime.</param> /// <param name="diagnostics">Reference to sinks in DiagnosticsDescription.</param> /// <param name="reliableCollectionsRefs">A list of ReliableCollection resources used by this particular code package. /// Please refer to ReliablecollectionsRef for more details.</param> public ContainerCodePackageProperties( string name, string image, ResourceRequirements resources, ImageRegistryCredential imageRegistryCredential = default(ImageRegistryCredential), string entrypoint = default(string), IEnumerable <string> commands = default(IEnumerable <string>), IEnumerable <EnvironmentVariable> environmentVariables = default(IEnumerable <EnvironmentVariable>), IEnumerable <Setting> settings = default(IEnumerable <Setting>), IEnumerable <ContainerLabel> labels = default(IEnumerable <ContainerLabel>), IEnumerable <EndpointProperties> endpoints = default(IEnumerable <EndpointProperties>), IEnumerable <VolumeReference> volumeRefs = default(IEnumerable <VolumeReference>), IEnumerable <ApplicationScopedVolume> volumes = default(IEnumerable <ApplicationScopedVolume>), DiagnosticsRef diagnostics = default(DiagnosticsRef), IEnumerable <ReliableCollectionsRef> reliableCollectionsRefs = default(IEnumerable <ReliableCollectionsRef>)) { name.ThrowIfNull(nameof(name)); image.ThrowIfNull(nameof(image)); resources.ThrowIfNull(nameof(resources)); this.Name = name; this.Image = image; this.Resources = resources; this.ImageRegistryCredential = imageRegistryCredential; this.Entrypoint = entrypoint; this.Commands = commands; this.EnvironmentVariables = environmentVariables; this.Settings = settings; this.Labels = labels; this.Endpoints = endpoints; this.VolumeRefs = volumeRefs; this.Volumes = volumes; this.Diagnostics = diagnostics; this.ReliableCollectionsRefs = reliableCollectionsRefs; }
/// <summary> /// Initializes a new instance of the ServiceResourceProperties class. /// </summary> /// <param name="osType">The operation system required by the code in service. Possible values include: 'Linux', /// 'Windows'</param> /// <param name="codePackages">Describes the set of code packages that forms the service. A code package describes the /// container and the properties for running it. All the code packages are started together on the same host and share /// the same context (network, process etc.). /// </param> /// <param name="networkRefs">The names of the private networks that this service needs to be part of.</param> /// <param name="diagnostics">Reference to sinks in DiagnosticsDescription.</param> /// <param name="description">User readable description of the service.</param> /// <param name="replicaCount">The number of replicas of the service to create. Defaults to 1 if not specified.</param> /// <param name="executionPolicy">The execution policy of the service</param> /// <param name="autoScalingPolicies">Auto scaling policies</param> /// <param name="identityRefs">The service identity list.</param> /// <param name="dnsName">Dns name of the service.</param> public ServiceResourceProperties( OperatingSystemType?osType, IEnumerable <ContainerCodePackageProperties> codePackages, IEnumerable <NetworkRef> networkRefs = default(IEnumerable <NetworkRef>), DiagnosticsRef diagnostics = default(DiagnosticsRef), string description = default(string), int?replicaCount = default(int?), ExecutionPolicy executionPolicy = default(ExecutionPolicy), IEnumerable <AutoScalingPolicy> autoScalingPolicies = default(IEnumerable <AutoScalingPolicy>), IEnumerable <ServiceIdentity> identityRefs = default(IEnumerable <ServiceIdentity>), string dnsName = default(string)) { osType.ThrowIfNull(nameof(osType)); codePackages.ThrowIfNull(nameof(codePackages)); this.OsType = osType; this.CodePackages = codePackages; this.NetworkRefs = networkRefs; this.Diagnostics = diagnostics; this.Description = description; this.ReplicaCount = replicaCount; this.ExecutionPolicy = executionPolicy; this.AutoScalingPolicies = autoScalingPolicies; this.IdentityRefs = identityRefs; this.DnsName = dnsName; }
/// <summary> /// Initializes a new instance of the ServiceReplicaProperties class. /// </summary> /// <param name="osType">The operation system required by the code in service. Possible values include: 'Linux', /// 'Windows'</param> /// <param name="codePackages">Describes the set of code packages that forms the service. A code package describes the /// container and the properties for running it. All the code packages are started together on the same host and share /// the same context (network, process etc.). /// </param> /// <param name="networkRefs">The names of the private networks that this service needs to be part of.</param> /// <param name="diagnostics">Reference to sinks in DiagnosticsDescription.</param> public ServiceReplicaProperties( OperatingSystemType?osType, IEnumerable <ContainerCodePackageProperties> codePackages, IEnumerable <NetworkRef> networkRefs = default(IEnumerable <NetworkRef>), DiagnosticsRef diagnostics = default(DiagnosticsRef)) { osType.ThrowIfNull(nameof(osType)); codePackages.ThrowIfNull(nameof(codePackages)); this.OsType = osType; this.CodePackages = codePackages; this.NetworkRefs = networkRefs; this.Diagnostics = diagnostics; }
/// <summary> /// Initializes a new instance of the ServiceReplicaDescription class. /// </summary> /// <param name="osType">The operation system required by the code in service. Possible values include: 'Linux', /// 'Windows'</param> /// <param name="codePackages">Describes the set of code packages that forms the service. A code package describes the /// container and the properties for running it. All the code packages are started together on the same host and share /// the same context (network, process etc.). /// </param> /// <param name="replicaName">Name of the replica.</param> /// <param name="networkRefs">The names of the private networks that this service needs to be part of.</param> /// <param name="diagnostics">Reference to sinks in DiagnosticsDescription.</param> public ServiceReplicaDescription( OperatingSystemType?osType, IEnumerable <ContainerCodePackageProperties> codePackages, string replicaName, IEnumerable <NetworkRef> networkRefs = default(IEnumerable <NetworkRef>), DiagnosticsRef diagnostics = default(DiagnosticsRef)) : base( osType, codePackages, networkRefs, diagnostics) { replicaName.ThrowIfNull(nameof(replicaName)); this.ReplicaName = replicaName; }
/// <summary> /// Initializes a new instance of the ServiceResourceProperties class. /// </summary> /// <param name="osType">The Operating system type required by the code in service. /// . Possible values include: 'Linux', 'Windows'</param> /// <param name="codePackages">Describes the set of code packages that forms the service. A code package describes the /// container and the properties for running it. All the code packages are started together on the same host and share /// the same context (network, process etc.). /// </param> /// <param name="networkRefs">The names of the private networks that this service needs to be part of.</param> /// <param name="diagnostics">Reference to sinks in DiagnosticsDescription.</param> /// <param name="description">User readable description of the service.</param> /// <param name="replicaCount">The number of replicas of the service to create. Defaults to 1 if not specified.</param> /// <param name="healthState">Describes the health state of an services resource. Possible values include: 'Invalid', /// 'Ok', 'Warning', 'Error', 'Unknown' /// /// The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. /// </param> /// <param name="status">Represents the status of the service. Possible values include: 'Unknown', 'Active', /// 'Upgrading', 'Deleting', 'Creating', 'Failed'</param> public ServiceResourceProperties( OperatingSystemTypes?osType, IEnumerable <ContainerCodePackageProperties> codePackages, IEnumerable <NetworkRef> networkRefs = default(IEnumerable <NetworkRef>), DiagnosticsRef diagnostics = default(DiagnosticsRef), string description = default(string), int?replicaCount = default(int?), HealthState?healthState = default(HealthState?), ServiceResourceStatus?status = default(ServiceResourceStatus?)) : base( osType, codePackages, networkRefs, diagnostics) { this.Description = description; this.ReplicaCount = replicaCount; this.HealthState = healthState; this.Status = status; }