aptible-cli 0.26.1 → 0.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 546bd229e854b1c8fb1e859d884aaace908bfb8d1c41384478e80f4867c304bf
4
- data.tar.gz: c51945840657af4bc8b8ef1f932cf851b87450c5dd2c8fdfc08161bf454563ca
3
+ metadata.gz: 800b50ac57828f37560b0a291a280fbf4e9bbf121b35fd812d662e45ef39bd45
4
+ data.tar.gz: e0c70006be582d93f6e5648fae3894a481bde9cc9b43042ee399e745790aac95
5
5
  SHA512:
6
- metadata.gz: 0401e5a7a7f621e6eee0151f2e50e568b4dd7f2458da2a34cc18789bab180868c8c6d4cbc1d008f54f9c8ab9c13cccc2c9a8b8ddcc0829caf013e45abe6cbfde
7
- data.tar.gz: c34e045d20f5edd8325d5fe1a2390ae0b304b94a227011c4ed29e57f293ddd7969c54fbc77b902b52be34e89bd44274b0215dff92165bb7f2460b4113b84349f
6
+ metadata.gz: 3653523bd6b9f944e5f88128a63c058aee80722288a44f5886393059f8b1ca2f7c506c45a7df06e0794ba75814574e36372ff02c73ee1efcd1c20ee803b1d0a1
7
+ data.tar.gz: a47e8d8f71c9ac07d5001ad65616ac123884ac97ed5ab151d6d8895564bffffa623e1ef055b32fc3d4d0c661a9e71b72859b84480bde108f645f7ce33252e81f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aptible-cli (0.26.1)
4
+ aptible-cli (0.26.2)
5
5
  activesupport (>= 4.0, < 6.0)
6
6
  aptible-api (~> 1.12)
7
7
  aptible-auth (~> 1.4)
@@ -35,7 +35,7 @@ GEM
35
35
  tzinfo (~> 1.1)
36
36
  addressable (2.8.0)
37
37
  public_suffix (>= 2.0.2, < 5.0)
38
- aptible-api (1.12.0)
38
+ aptible-api (1.12.2)
39
39
  aptible-auth
40
40
  aptible-resource
41
41
  gem_config
data/Makefile CHANGED
@@ -46,6 +46,9 @@ clean:
46
46
  ## Alias for clean
47
47
  down: clean
48
48
 
49
+ sync-readme: build
50
+ docker compose run cli bundle exec script/sync-readme-usage
51
+
49
52
  ## Show this help message
50
53
  help:
51
54
  @echo "\n\033[1;34mAvailable targets:\033[0m\n"
data/README.md CHANGED
@@ -26,89 +26,89 @@ From `aptible help`:
26
26
  <!-- BEGIN USAGE -->
27
27
  ```
28
28
  Commands:
29
- aptible apps # List all applications
30
- aptible apps:create HANDLE # Create a new application
31
- aptible apps:deprovision # Deprovision an app
32
- aptible apps:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE] # Rename an app handle. In order for the new app handle to appear in log drain and metric drain destinations, you must restart the app.
33
- aptible apps:scale SERVICE [--container-count COUNT] [--container-size SIZE_MB] [--container-profile PROFILE] # Scale a service
34
- aptible backup:list DB_HANDLE # List backups for a database
35
- aptible backup:orphaned # List backups associated with deprovisioned databases
36
- aptible backup:purge BACKUP_ID # Permanently delete a backup and any copies of it
37
- aptible backup:restore BACKUP_ID [--environment ENVIRONMENT_HANDLE] [--handle HANDLE] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN] # Restore a backup
38
- aptible backup_retention_policy [ENVIRONMENT_HANDLE] # Show the current backup retention policy for the environment
39
- aptible backup_retention_policy:set [ENVIRONMENT_HANDLE] [--daily DAILY_BACKUPS] [--monthly MONTHLY_BACKUPS] [--yearly YEARLY_BACKUPS] [--make-copy|--no-make-copy] [--keep-final|--no-keep-final] [--force] # Change the environment's backup retention policy
40
- aptible config # Print an app's current configuration
41
- aptible config:add [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
42
- aptible config:get [VAR1] # Print a specific key within an app's current configuration
43
- aptible config:rm [VAR1] [VAR2] [...] # Remove an ENV variable from an app
44
- aptible config:set [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
45
- aptible config:unset [VAR1] [VAR2] [...] # Remove an ENV variable from an app
46
- aptible db:backup HANDLE # Backup a database
47
- aptible db:clone SOURCE DEST # Clone a database to create a new one
48
- aptible db:create HANDLE [--type TYPE] [--version VERSION] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN] # Create a new database
49
- aptible db:deprovision HANDLE # Deprovision a database
50
- aptible db:dump HANDLE [pg_dump options] # Dump a remote database to file
51
- aptible db:execute HANDLE SQL_FILE [--on-error-stop] # Executes sql against a database
52
- aptible db:list # List all databases
53
- aptible db:modify HANDLE [--iops IOPS] [--volume-type [gp2, gp3]] # Modify a database disk
54
- aptible db:reload HANDLE # Reload a database
55
- aptible db:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE] # Rename a database handle. In order for the new database handle to appear in log drain and metric drain destinations, you must reload the database.
56
- aptible db:replicate HANDLE REPLICA_HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--logical --version VERSION] [--key-arn KEY_ARN] # Create a replica/follower of a database
57
- aptible db:restart HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--volume-type [gp2, gp3]] # Restart a database
58
- aptible db:tunnel HANDLE # Create a local tunnel to a database
59
- aptible db:url HANDLE # Display a database URL
60
- aptible db:versions # List available database versions
61
- aptible deploy [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...] # Deploy an app
62
- aptible endpoints:database:create DATABASE # Create a Database Endpoint
63
- aptible endpoints:database:modify --database DATABASE ENDPOINT_HOSTNAME # Modify a Database Endpoint
64
- aptible endpoints:deprovision [--app APP | --database DATABASE] ENDPOINT_HOSTNAME # Deprovision an App or Database Endpoint
65
- aptible endpoints:grpc:create [--app APP] SERVICE # Create an App gRPC Endpoint
66
- aptible endpoints:grpc:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App gRPC Endpoint
67
- aptible endpoints:https:create [--app APP] SERVICE # Create an App HTTPS Endpoint
68
- aptible endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App HTTPS Endpoint
69
- aptible endpoints:list [--app APP | --database DATABASE] # List Endpoints for an App or Database
70
- aptible endpoints:renew [--app APP] ENDPOINT_HOSTNAME # Renew an App Managed TLS Endpoint
71
- aptible endpoints:tcp:create [--app APP] SERVICE # Create an App TCP Endpoint
72
- aptible endpoints:tcp:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TCP Endpoint
73
- aptible endpoints:tls:create [--app APP] SERVICE # Create an App TLS Endpoint
74
- aptible endpoints:tls:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TLS Endpoint
75
- aptible environment:ca_cert # Retrieve the CA certificate associated with the environment
76
- aptible environment:list # List all environments
77
- aptible environment:rename OLD_HANDLE NEW_HANDLE # Rename an environment handle. In order for the new environment handle to appear in log drain/metric destinations, you must restart the apps/databases in this environment.
78
- aptible help [COMMAND] # Describe available commands or one specific command
79
- aptible log_drain:create:datadog HANDLE --url DATADOG_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Datadog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
80
- aptible log_drain:create:elasticsearch HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create an Elasticsearch Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
81
- aptible log_drain:create:https HANDLE --url URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a HTTPS Drain
82
- aptible log_drain:create:logdna HANDLE --url LOGDNA_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a LogDNA/Mezmo Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
83
- aptible log_drain:create:papertrail HANDLE --host PAPERTRAIL_HOST --port PAPERTRAIL_PORT --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Papertrail Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
84
- aptible log_drain:create:solarwinds HANDLE --host SWO_HOSTNAME --token SWO_TOKEN --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a SolarWinds Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
85
- aptible log_drain:create:sumologic HANDLE --url SUMOLOGIC_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Sumologic Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
86
- aptible log_drain:create:syslog HANDLE --host SYSLOG_HOST --port SYSLOG_PORT [--token TOKEN] --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Syslog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
87
- aptible log_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a log drain
88
- aptible log_drain:list # List all Log Drains
89
- aptible login # Log in to Aptible
90
- aptible logs [--app APP | --database DATABASE] # Follows logs from a running app or database
91
- aptible logs_from_archive --bucket NAME --region REGION --stack NAME [ --decryption-keys ONE [OR MORE] ] [ --download-location LOCATION ] [ [ --string-matches ONE [OR MORE] ] | [ --app-id ID | --database-id ID | --endpoint-id ID | --container-id ID ] [ --start-date YYYY-MM-DD --end-date YYYY-MM-DD ] ] --bucket=BUCKET --region=REGION --stack=STACK # Retrieves container logs from an S3 archive in your own AWS account. You must provide your AWS credentials via the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
92
- aptible maintenance:apps # List Apps impacted by maintenance schedules where restarts are required
93
- aptible maintenance:dbs # List Databases impacted by maintenance schedules where restarts are required
94
- aptible metric_drain:create:datadog HANDLE --api_key DATADOG_API_KEY --site DATADOG_SITE --environment ENVIRONMENT # Create a Datadog Metric Drain
95
- aptible metric_drain:create:influxdb HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT # Create an InfluxDB Metric Drain
96
- aptible metric_drain:create:influxdb:custom HANDLE --username USERNAME --password PASSWORD --url URL_INCLUDING_PORT --db INFLUX_DATABASE_NAME --environment ENVIRONMENT # Create an InfluxDB Metric Drain
97
- aptible metric_drain:create:influxdb:customv2 HANDLE --org ORGANIZATION --token INFLUX_TOKEN --url URL_INCLUDING_PORT --bucket INFLUX_BUCKET_NAME --environment ENVIRONMENT # Create an InfluxDB v2 Metric Drain
98
- aptible metric_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a Metric Drain
99
- aptible metric_drain:list # List all Metric Drains
100
- aptible operation:cancel OPERATION_ID # Cancel a running operation
101
- aptible operation:follow OPERATION_ID # Follow logs of a running operation
102
- aptible operation:logs OPERATION_ID # View logs for given operation
103
- aptible organizations # List all organizations
104
- aptible rebuild # Rebuild an app, and restart its services
105
- aptible restart # Restart all services associated with an app
106
- aptible services # List Services for an App
107
- aptible services:autoscaling_policy SERVICE # Returns the associated sizing policy, if any
108
- aptible services:autoscaling_policy:set SERVICE --autoscaling-type (horizontal|vertical) [--metric-lookback-seconds SECONDS] [--percentile PERCENTILE] [--post-scale-up-cooldown-seconds SECONDS] [--post-scale-down-cooldown-seconds SECONDS] [--post-release-cooldown-seconds SECONDS] [--mem-cpu-ratio-r-threshold RATIO] [--mem-cpu-ratio-c-threshold RATIO] [--mem-scale-up-threshold THRESHOLD] [--mem-scale-down-threshold THRESHOLD] [--minimum-memory MEMORY] [--maximum-memory MEMORY] [--min-cpu-threshold THRESHOLD] [--max-cpu-threshold THRESHOLD] [--min-containers CONTAINERS] [--max-containers CONTAINERS] [--scale-up-step STEPS] [--scale-down-step STEPS] [--restart-free-scale|--no-restart-free-scale] # Sets the sizing (autoscaling) policy for a service. This is not incremental, all arguments must be sent at once or they will be set to defaults.
109
- aptible services:settings SERVICE [--force-zero-downtime|--no-force-zero-downtime] [--simple-health-check|--no-simple-health-check] [--restart-free-scaling|--no-restart-free-scaling] [--stop-timeout SECONDS] # Modifies the deployment settings for a service
110
- aptible ssh [COMMAND] # Run a command against an app
111
- aptible version # Print Aptible CLI version
29
+ aptible apps # List all applications
30
+ aptible apps:create HANDLE # Create a new application
31
+ aptible apps:deprovision [--app APP] # Deprovision an app
32
+ aptible apps:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE] # Rename an app handle. In order for the new app handle to appear in log drain and metric drain destinations, you must restart the app.
33
+ aptible apps:scale [--app APP] SERVICE [--container-count COUNT] [--container-size SIZE_MB] [--container-profile PROFILE] # Scale a service
34
+ aptible backup:list DB_HANDLE # List backups for a database
35
+ aptible backup:orphaned # List backups associated with deprovisioned databases
36
+ aptible backup:purge BACKUP_ID # Permanently delete a backup and any copies of it
37
+ aptible backup:restore BACKUP_ID [--environment ENVIRONMENT_HANDLE] [--handle HANDLE] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN] # Restore a backup
38
+ aptible backup_retention_policy [ENVIRONMENT_HANDLE] # Show the current backup retention policy for the environment
39
+ aptible backup_retention_policy:set [ENVIRONMENT_HANDLE] [--daily DAILY_BACKUPS] [--monthly MONTHLY_BACKUPS] [--yearly YEARLY_BACKUPS] [--make-copy|--no-make-copy] [--keep-final|--no-keep-final] [--force] # Change the environment's backup retention policy
40
+ aptible config [--app APP] # Print an app's current configuration
41
+ aptible config:add [--app APP] [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
42
+ aptible config:get [--app APP] [VAR1] # Print a specific key within an app's current configuration
43
+ aptible config:rm [--app APP] [VAR1] [VAR2] [...] # Remove an ENV variable from an app
44
+ aptible config:set [--app APP] [VAR1=VAL1] [VAR2=VAL2] [...] # Add an ENV variable to an app
45
+ aptible config:unset [--app APP] [VAR1] [VAR2] [...] # Remove an ENV variable from an app
46
+ aptible db:backup HANDLE # Backup a database
47
+ aptible db:clone SOURCE DEST # Clone a database to create a new one
48
+ aptible db:create HANDLE [--type TYPE] [--version VERSION] [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--key-arn KEY_ARN] # Create a new database
49
+ aptible db:deprovision HANDLE # Deprovision a database
50
+ aptible db:dump HANDLE [pg_dump options] # Dump a remote database to file
51
+ aptible db:execute HANDLE SQL_FILE [--on-error-stop] # Executes sql against a database
52
+ aptible db:list # List all databases
53
+ aptible db:modify HANDLE [--iops IOPS] [--volume-type [gp2, gp3]] # Modify a database disk
54
+ aptible db:reload HANDLE # Reload a database
55
+ aptible db:rename OLD_HANDLE NEW_HANDLE [--environment ENVIRONMENT_HANDLE] # Rename a database handle. In order for the new database handle to appear in log drain and metric drain destinations, you must reload the database.
56
+ aptible db:replicate HANDLE REPLICA_HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--logical --version VERSION] [--key-arn KEY_ARN] # Create a replica/follower of a database
57
+ aptible db:restart HANDLE [--container-size SIZE_MB] [--disk-size SIZE_GB] [--container-profile PROFILE] [--iops IOPS] [--volume-type [gp2, gp3]] # Restart a database
58
+ aptible db:tunnel HANDLE # Create a local tunnel to a database
59
+ aptible db:url HANDLE # Display a database URL
60
+ aptible db:versions # List available database versions
61
+ aptible deploy [--app APP] [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...] # Deploy an app
62
+ aptible endpoints:database:create DATABASE # Create a Database Endpoint
63
+ aptible endpoints:database:modify --database DATABASE ENDPOINT_HOSTNAME # Modify a Database Endpoint
64
+ aptible endpoints:deprovision [--app APP | --database DATABASE] ENDPOINT_HOSTNAME # Deprovision an App or Database Endpoint
65
+ aptible endpoints:grpc:create [--app APP] SERVICE # Create an App gRPC Endpoint
66
+ aptible endpoints:grpc:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App gRPC Endpoint
67
+ aptible endpoints:https:create [--app APP] SERVICE # Create an App HTTPS Endpoint
68
+ aptible endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App HTTPS Endpoint
69
+ aptible endpoints:list [--app APP | --database DATABASE] # List Endpoints for an App or Database
70
+ aptible endpoints:renew [--app APP] ENDPOINT_HOSTNAME # Renew an App Managed TLS Endpoint
71
+ aptible endpoints:tcp:create [--app APP] SERVICE # Create an App TCP Endpoint
72
+ aptible endpoints:tcp:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TCP Endpoint
73
+ aptible endpoints:tls:create [--app APP] SERVICE # Create an App TLS Endpoint
74
+ aptible endpoints:tls:modify [--app APP] ENDPOINT_HOSTNAME # Modify an App TLS Endpoint
75
+ aptible environment:ca_cert # Retrieve the CA certificate associated with the environment
76
+ aptible environment:list # List all environments
77
+ aptible environment:rename OLD_HANDLE NEW_HANDLE # Rename an environment handle. In order for the new environment handle to appear in log drain/metric destinations, you must restart the apps/databases in this environment.
78
+ aptible help [COMMAND] # Describe available commands or one specific command
79
+ aptible log_drain:create:datadog HANDLE --url DATADOG_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Datadog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
80
+ aptible log_drain:create:elasticsearch HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create an Elasticsearch Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
81
+ aptible log_drain:create:https HANDLE --url URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a HTTPS Drain
82
+ aptible log_drain:create:logdna HANDLE --url LOGDNA_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a LogDNA/Mezmo Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
83
+ aptible log_drain:create:papertrail HANDLE --host PAPERTRAIL_HOST --port PAPERTRAIL_PORT --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Papertrail Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
84
+ aptible log_drain:create:solarwinds HANDLE --host SWO_HOSTNAME --token SWO_TOKEN --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a SolarWinds Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
85
+ aptible log_drain:create:sumologic HANDLE --url SUMOLOGIC_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Sumologic Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
86
+ aptible log_drain:create:syslog HANDLE --host SYSLOG_HOST --port SYSLOG_PORT [--token TOKEN] --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Syslog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
87
+ aptible log_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a log drain
88
+ aptible log_drain:list # List all Log Drains
89
+ aptible login # Log in to Aptible
90
+ aptible logs [--app APP | --database DATABASE] # Follows logs from a running app or database
91
+ aptible logs_from_archive --bucket NAME --region REGION --stack NAME [ --decryption-keys ONE [OR MORE] ] [ --download-location LOCATION ] [ [ --string-matches ONE [OR MORE] ] | [ --app-id ID | --database-id ID | --endpoint-id ID | --container-id ID ] [ --start-date YYYY-MM-DD --end-date YYYY-MM-DD ] ] --bucket=BUCKET --region=REGION --stack=STACK # Retrieves container logs from an S3 archive in your own AWS account. You must provide your AWS credentials via the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
92
+ aptible maintenance:apps # List Apps impacted by maintenance schedules where restarts are required
93
+ aptible maintenance:dbs # List Databases impacted by maintenance schedules where restarts are required
94
+ aptible metric_drain:create:datadog HANDLE --api_key DATADOG_API_KEY --site DATADOG_SITE --environment ENVIRONMENT # Create a Datadog Metric Drain
95
+ aptible metric_drain:create:influxdb HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT # Create an InfluxDB Metric Drain
96
+ aptible metric_drain:create:influxdb:custom HANDLE --username USERNAME --password PASSWORD --url URL_INCLUDING_PORT --db INFLUX_DATABASE_NAME --environment ENVIRONMENT # Create an InfluxDB Metric Drain
97
+ aptible metric_drain:create:influxdb:customv2 HANDLE --org ORGANIZATION --token INFLUX_TOKEN --url URL_INCLUDING_PORT --bucket INFLUX_BUCKET_NAME --environment ENVIRONMENT # Create an InfluxDB v2 Metric Drain
98
+ aptible metric_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a Metric Drain
99
+ aptible metric_drain:list # List all Metric Drains
100
+ aptible operation:cancel OPERATION_ID # Cancel a running operation
101
+ aptible operation:follow OPERATION_ID # Follow logs of a running operation
102
+ aptible operation:logs OPERATION_ID # View logs for given operation
103
+ aptible organizations # List all organizations
104
+ aptible rebuild [--app APP] # Rebuild an app, and restart its services
105
+ aptible restart [--app APP] # Restart all services associated with an app
106
+ aptible services [--app APP] # List Services for an App
107
+ aptible services:autoscaling_policy [--app APP] SERVICE # Returns the associated sizing policy, if any
108
+ aptible services:autoscaling_policy:set [--app APP] SERVICE --autoscaling-type (horizontal|vertical) [--metric-lookback-seconds SECONDS] [--percentile PERCENTILE] [--post-scale-up-cooldown-seconds SECONDS] [--post-scale-down-cooldown-seconds SECONDS] [--post-release-cooldown-seconds SECONDS] [--mem-cpu-ratio-r-threshold RATIO] [--mem-cpu-ratio-c-threshold RATIO] [--mem-scale-up-threshold THRESHOLD] [--mem-scale-down-threshold THRESHOLD] [--minimum-memory MEMORY] [--maximum-memory MEMORY] [--min-cpu-threshold THRESHOLD] [--max-cpu-threshold THRESHOLD] [--min-containers CONTAINERS] [--max-containers CONTAINERS] [--scale-up-step STEPS] [--scale-down-step STEPS] [--restart-free-scale|--no-restart-free-scale] # Sets the sizing (autoscaling) policy for a service. This is not incremental, all arguments must be sent at once or they will be set to defaults.
109
+ aptible services:settings [--app APP] SERVICE [--force-zero-downtime|--no-force-zero-downtime] [--simple-health-check|--no-simple-health-check] [--restart-free-scaling|--no-restart-free-scaling] [--stop-timeout SECONDS] # Modifies the deployment settings for a service
110
+ aptible ssh [--app APP] [COMMAND] # Run a command against an app
111
+ aptible version # Print Aptible CLI version
112
112
  ```
113
113
  <!-- END USAGE -->
114
114
 
@@ -165,6 +165,13 @@ module Aptible
165
165
 
166
166
  u2f = (e.response.parsed['exception_context'] || {})['u2f']
167
167
 
168
+ failed_login_attempt_id = e.response.parsed.dig(
169
+ 'exception_context', 'failed_login_attempt_id'
170
+ )
171
+ if failed_login_attempt_id
172
+ token_options[:previous_login_attempt_id] = failed_login_attempt_id
173
+ end
174
+
168
175
  q = Queue.new
169
176
  mfa_threads = []
170
177
 
@@ -203,8 +203,8 @@ module Aptible
203
203
  node.value('type', 'https')
204
204
  node.value('port', port)
205
205
  node.value('load_balancing_algorithm_type', vhost
206
- .load_balancing_algorithm_type)
207
- node.value('shared', vhost.shared)
206
+ .load_balancing_algorithm_type || 'round_robin')
207
+ node.value('shared', vhost.shared || 'false')
208
208
  end
209
209
 
210
210
  node.value('internal', vhost.internal)
@@ -65,7 +65,7 @@ module Aptible
65
65
  end
66
66
  end
67
67
 
68
- desc 'apps:scale SERVICE ' \
68
+ desc 'apps:scale [--app APP] SERVICE ' \
69
69
  '[--container-count COUNT] [--container-size SIZE_MB] ' \
70
70
  '[--container-profile PROFILE]',
71
71
  'Scale a service'
@@ -107,7 +107,7 @@ module Aptible
107
107
  attach_to_operation_logs(op)
108
108
  end
109
109
 
110
- desc 'apps:deprovision', 'Deprovision an app'
110
+ desc 'apps:deprovision [--app APP]', 'Deprovision an app'
111
111
  app_options
112
112
  define_method 'apps:deprovision' do
113
113
  telemetry(__method__, options)
@@ -9,7 +9,7 @@ module Aptible
9
9
  include Helpers::App
10
10
  include Helpers::Telemetry
11
11
 
12
- desc 'config', "Print an app's current configuration"
12
+ desc 'config [--app APP]', "Print an app's current configuration"
13
13
  app_options
14
14
  def config
15
15
  telemetry(__method__, options)
@@ -31,7 +31,7 @@ module Aptible
31
31
  end
32
32
  end
33
33
 
34
- desc 'config:get [VAR1]',
34
+ desc 'config:get [--app APP] [VAR1]',
35
35
  "Print a specific key within an app's current configuration"
36
36
  app_options
37
37
  define_method 'config:get' do |*args|
@@ -50,7 +50,7 @@ module Aptible
50
50
  end
51
51
  end
52
52
 
53
- desc 'config:add [VAR1=VAL1] [VAR2=VAL2] [...]',
53
+ desc 'config:add [--app APP] [VAR1=VAL1] [VAR2=VAL2] [...]',
54
54
  'Add an ENV variable to an app'
55
55
  app_options
56
56
  define_method 'config:add' do |*args|
@@ -64,7 +64,7 @@ module Aptible
64
64
  attach_to_operation_logs(operation)
65
65
  end
66
66
 
67
- desc 'config:set [VAR1=VAL1] [VAR2=VAL2] [...]',
67
+ desc 'config:set [--app APP] [VAR1=VAL1] [VAR2=VAL2] [...]',
68
68
  'Add an ENV variable to an app'
69
69
  app_options
70
70
  define_method 'config:set' do |*args|
@@ -72,7 +72,7 @@ module Aptible
72
72
  send('config:add', *args)
73
73
  end
74
74
 
75
- desc 'config:rm [VAR1] [VAR2] [...]',
75
+ desc 'config:rm [--app APP] [VAR1] [VAR2] [...]',
76
76
  'Remove an ENV variable from an app'
77
77
  app_options
78
78
  define_method 'config:rm' do |*args|
@@ -90,7 +90,7 @@ module Aptible
90
90
  attach_to_operation_logs(operation)
91
91
  end
92
92
 
93
- desc 'config:unset [VAR1] [VAR2] [...]',
93
+ desc 'config:unset [--app APP] [VAR1] [VAR2] [...]',
94
94
  'Remove an ENV variable from an app'
95
95
  app_options
96
96
  define_method 'config:unset' do |*args|
@@ -19,7 +19,7 @@ module Aptible
19
19
  include Helpers::App
20
20
  include Helpers::Telemetry
21
21
 
22
- desc 'deploy [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...]',
22
+ desc 'deploy [--app APP] [OPTIONS] [VAR1=VAL1] [VAR2=VAL2] [...]',
23
23
  'Deploy an app'
24
24
  option :git_commitish,
25
25
  desc: 'Deploy a specific git commit or branch: the ' \
@@ -8,7 +8,8 @@ module Aptible
8
8
  include Helpers::App
9
9
  include Helpers::Telemetry
10
10
 
11
- desc 'rebuild', 'Rebuild an app, and restart its services'
11
+ desc 'rebuild [--app APP]',
12
+ 'Rebuild an app, and restart its services'
12
13
  app_options
13
14
  def rebuild
14
15
  telemetry(__method__, options)
@@ -8,7 +8,8 @@ module Aptible
8
8
  include Helpers::App
9
9
  include Helpers::Telemetry
10
10
 
11
- desc 'restart', 'Restart all services associated with an app'
11
+ desc 'restart [--app APP]',
12
+ 'Restart all services associated with an app'
12
13
  option :simulate_oom,
13
14
  type: :boolean,
14
15
  desc: 'Add this flag to simulate an OOM restart and test ' \
@@ -7,7 +7,7 @@ module Aptible
7
7
  include Helpers::App
8
8
  include Helpers::Telemetry
9
9
 
10
- desc 'services', 'List Services for an App'
10
+ desc 'services [--app APP]', 'List Services for an App'
11
11
  app_options
12
12
  def services
13
13
  telemetry(__method__, options)
@@ -25,7 +25,7 @@ module Aptible
25
25
  end
26
26
  end
27
27
 
28
- desc 'services:settings SERVICE'\
28
+ desc 'services:settings [--app APP] SERVICE'\
29
29
  ' [--force-zero-downtime|--no-force-zero-downtime]'\
30
30
  ' [--simple-health-check|--no-simple-health-check]'\
31
31
  ' [--restart-free-scaling|--no-restart-free-scaling]'\
@@ -69,7 +69,7 @@ module Aptible
69
69
  service.update!(**updates) if updates.any?
70
70
  end
71
71
 
72
- desc 'services:autoscaling_policy SERVICE',
72
+ desc 'services:autoscaling_policy [--app APP] SERVICE',
73
73
  'Returns the associated sizing policy, if any'
74
74
  app_options
75
75
  define_method 'services:autoscaling_policy' do |service|
@@ -99,7 +99,7 @@ module Aptible
99
99
 
100
100
  map 'services:sizing_policy' => 'services:autoscaling_policy'
101
101
 
102
- desc 'services:autoscaling_policy:set SERVICE '\
102
+ desc 'services:autoscaling_policy:set [--app APP] SERVICE '\
103
103
  '--autoscaling-type (horizontal|vertical) '\
104
104
  '[--metric-lookback-seconds SECONDS] '\
105
105
  '[--percentile PERCENTILE] '\
@@ -10,7 +10,7 @@ module Aptible
10
10
  include Helpers::App
11
11
  include Helpers::Telemetry
12
12
 
13
- desc 'ssh [COMMAND]', 'Run a command against an app'
13
+ desc 'ssh [--app APP] [COMMAND]', 'Run a command against an app'
14
14
  long_desc <<-LONGDESC
15
15
  Runs an interactive command against a remote Aptible app
16
16
 
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.26.1'.freeze
3
+ VERSION = '0.26.2'.freeze
4
4
  end
5
5
  end
@@ -428,6 +428,76 @@ describe Aptible::CLI::Agent do
428
428
  end
429
429
  end
430
430
 
431
+ context 'failed_login_attempt_id handling' do
432
+ before do
433
+ allow(subject).to receive(:options)
434
+ .and_return(email: email, password: password)
435
+ expect(subject).to receive(:ask).with('2FA Token: ')
436
+ .once
437
+ .and_return(token)
438
+ end
439
+
440
+ it 'should extract failed_login_attempt_id when present' do
441
+ e = make_oauth2_error(
442
+ 'otp_token_required',
443
+ 'failed_login_attempt_id' => 'attempt-123'
444
+ )
445
+
446
+ expect(Aptible::Auth::Token).to receive(:create)
447
+ .with(email: email, password: password, expires_in: 1.week.seconds)
448
+ .once
449
+ .and_raise(e)
450
+
451
+ expect(Aptible::Auth::Token).to receive(:create)
452
+ .with(email: email, password: password, otp_token: token,
453
+ previous_login_attempt_id: 'attempt-123',
454
+ expires_in: 12.hours.seconds)
455
+ .once
456
+ .and_return(token)
457
+
458
+ subject.login
459
+ end
460
+
461
+ it 'should handle nil exception_context gracefully' do
462
+ parsed = { 'error' => 'otp_token_required' }
463
+ response = double('response',
464
+ parsed: parsed,
465
+ body: 'error otp_token_required')
466
+ allow(response).to receive(:error=)
467
+ e = OAuth2::Error.new(response)
468
+
469
+ expect(Aptible::Auth::Token).to receive(:create)
470
+ .with(email: email, password: password, expires_in: 1.week.seconds)
471
+ .once
472
+ .and_raise(e)
473
+
474
+ expect(Aptible::Auth::Token).to receive(:create)
475
+ .with(email: email, password: password, otp_token: token,
476
+ expires_in: 12.hours.seconds)
477
+ .once
478
+ .and_return(token)
479
+
480
+ subject.login
481
+ end
482
+
483
+ it 'should handle missing failed_login_attempt_id gracefully' do
484
+ e = make_oauth2_error('otp_token_required', {})
485
+
486
+ expect(Aptible::Auth::Token).to receive(:create)
487
+ .with(email: email, password: password, expires_in: 1.week.seconds)
488
+ .once
489
+ .and_raise(e)
490
+
491
+ expect(Aptible::Auth::Token).to receive(:create)
492
+ .with(email: email, password: password, otp_token: token,
493
+ expires_in: 12.hours.seconds)
494
+ .once
495
+ .and_return(token)
496
+
497
+ subject.login
498
+ end
499
+ end
500
+
431
501
  context 'SSO logins' do
432
502
  let(:token) { 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJpZCI6I' }
433
503
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.1
4
+ version: 0.26.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-13 00:00:00.000000000 Z
11
+ date: 2026-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport