Skip to main content

Stacklet Platform Client

Project description

Stacklet CLI

Installation

$ pip install stacklet.client.platform

Configuration

To get started, use the auto-configure command to initialize the CLI configuration by supplying the prefix or URL associated with an instance of the Stacklet platform:

# Using a complete console URL
stacklet-admin auto-configure --url https://console.myorg.stacklet.io

# Using a base domain
stacklet-admin auto-configure --url myorg.stacklet.io

# Using just a deployment prefix (assumes a .stacklet.io suffix)
stacklet-admin auto-configure --prefix myorg

This will create a configuration file in ~/.stacklet/config.json.

Logging In

With Single Sign-On

Use the login command with no arguments to start an SSO login:

stacklet-admin login

This will open a browser window and log in via SSO. Once the login is successful in the browser, the window may automatically close.

Without Single Sign-On

Provide a username to the login command to bypass SSO:

stacklet-admin login --username test-user

This will prompt for a password. It is also possible to use the --password argument to avoid the prompt, though that is a less secure option as it can expose the password through command history and process listings.

Running Commands

Commands are grouped into command groups, for example, all the commands relating to accounts can be found by running the following command:

stacklet-admin account --help
Usage: stacklet-admin account [OPTIONS] COMMAND [ARGS]...

  Query against and Run mutations against Account objects in Stacklet.

  Define a custom config file with the --config option

  Specify a different output format with the --output option

  Example:

      $ stacklet account --output json list

Options:
  -v                           Verbosity level, increase verbosity by
                               appending v, e.g. -vvv

  --api TEXT                   If set, --cognito-user-pool-id, --cognito-
                               client-id, --cognito-region, and --api must
                               also be set.

  --cognito-region TEXT        If set, --cognito-user-pool-id, --cognito-
                               client-id, --cognito-region, and --api must
                               also be set.

  --cognito-client-id TEXT     If set, --cognito-user-pool-id, --cognito-
                               client-id, --cognito-region, and --api must
                               also be set.

  --cognito-user-pool-id TEXT  If set, --cognito-user-pool-id, --cognito-
                               client-id, --cognito-region, and --api must
                               also be set.

  --output [|plain|json|yaml]  Ouput type
  --config TEXT
  --help                       Show this message and exit.

Commands:
  add     Add an account to Stacklet
  list    List cloud accounts in Stacklet
  remove  Remove an account from Stacklet
  show    Show an account in Stacklet

Then run the command:

stacklet-admin account list
data:
  accounts:
    edges:
    - node:
        description: null
        email: sonny@stacklet.io
        id: account:aws:123456789012
        key: '123456789012'
        name: Sandbox Sonny
        path: null
        provider: AWS
        securityContext: arn:aws:iam::123456789012:role/dev-stacklet-execution
        shortName: null
        tags: null
        variables: null
    pageInfo:
      endCursor: eJxTMlQCAADtAHY=
      hasNextPage: false
      hasPreviousPage: false
      startCursor: eJxTMlQCAADtAHY=

Pagination

For commands that utilize pagination, select the next page by running the following command:

stacklet-admin account list --after "eJxTMlQCAADtAHY="
data:
  accounts:
    edges: []
    pageInfo:
      endCursor: ''
      hasNextPage: false
      hasPreviousPage: true
      startCursor: ''

The value of --after should be the value of the endCursor key under the pageInfo section in the response. For results with multiple pages, continue to use the endCursor value to progress through the pages. Additionally, use the --before option to move back one page.

--first and --last are numerical options used to select the first n or last n results of a response. For example, to return the first account:

stacklet-admin account list --first 1

To return the last account:

stacklet-admin account list --last 1

Development

Installation

$ just install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stacklet_client_platform-0.1.3.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

stacklet_client_platform-0.1.3-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file stacklet_client_platform-0.1.3.tar.gz.

File metadata

File hashes

Hashes for stacklet_client_platform-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b84db7fc31101d08339191e24a553eaaf59de2b55a3d1427c22ca015d95c08d7
MD5 a959f92e3f2607a8b2898b8acfadbefd
BLAKE2b-256 9cb90c6d1e50c87effc40e76dd09a608a6aa6c56fcebe65a6d90c880c6d8df04

See more details on using hashes here.

File details

Details for the file stacklet_client_platform-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for stacklet_client_platform-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 34364a3d4c1891755769787d97a8c72a2132159a9d06125f78dfb427c6595b1a
MD5 b6954b7049aafcf2c3822b009f9debe2
BLAKE2b-256 89448af89aaafd6e67699a60122bbb0e7396ac120872508334e98388e0f0845f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page