Exemple #1
0
 public Task <CreateTargetGroupResponse> CreateTargetGroupAsync(
     string name,
     int port,
     ProtocolEnum protocol,
     string vpcId,
     TargetTypeEnum targetType,
     string healthCheckPath,
     int healthCheckIntervalSeconds,
     int healthyThresholdCount,
     int unhealthyThresholdCount,
     int healthCheckTimeoutSeconds,
     ProtocolEnum healthCheckProtocol,
     int?healthCheckPort,
     CancellationToken cancellationToken = default(CancellationToken))
 => _clientV2.CreateTargetGroupAsync(
     new CreateTargetGroupRequest()
 {
     Name                       = name,
     Port                       = port,
     Protocol                   = protocol,
     VpcId                      = vpcId,
     TargetType                 = targetType,
     HealthCheckPath            = healthCheckPath,
     HealthCheckIntervalSeconds = healthCheckIntervalSeconds,
     HealthyThresholdCount      = healthyThresholdCount,
     UnhealthyThresholdCount    = unhealthyThresholdCount,
     HealthCheckTimeoutSeconds  = healthCheckTimeoutSeconds,
     HealthCheckProtocol        = healthCheckProtocol,
     HealthCheckPort            = (healthCheckPort == null ? null : $"{healthCheckPort.Value}")
 }
     , cancellationToken).EnsureSuccessAsync();
Exemple #2
0
        public async Task <SA_TargetGroup> CreateTargetGroup(
            string name, string vpcId, string protocol, int port)
        {
            var request = new CreateTargetGroupRequest()
            {
                Name     = name,
                VpcId    = vpcId,
                Protocol = new ProtocolEnum(protocol),
                Port     = 80
            };
            var response = await client.CreateTargetGroupAsync(request);

            return(ModelTransformer <TargetGroup, SA_TargetGroup> .TransformAwsModelToSafeArrivalModel(response.TargetGroups[0]));
        }