flagship configuration

Configure the CLI

flagship configuration create

NAME

flagship configuration create - Manage your CLI configurations

SYNOPSIS

flagship configuration create [-n <CONFIGURATION_NAME> | --name=<CONFIGURATION_NAME>] [-i <CLIENT_ID> | --client-id=<CLIENT_ID>] [-s <CLIENT_SECRET> | --client-secret=<CLIENT_SECRET>] [-a <ACCOUNT_ID> | --account-id=<ACCOUNT_ID>] [-e <ACCOUNT_ENVIRONMENT_ID> | --account-environment-id=<ACCOUNT_ENVIRONMENT_ID>] [-p=<PATH> | --path=<PATH>]\

📘

Config file

You either insert your credentials in flags(name, client id, client secret, account id, account environment) or you use the path flag that contain these information and import them.

🚧

Access to your credentials

This feature and the access to the generation of credentials is related to the Remote Control API, it's still in Early Adoption phase, if you want to try it and have any questions, feel free to ask [email protected]

Create credentials

Create credentials

DESCRIPTION

   Create a configuration based on the credentials (name, account_id, account_env_id, client_id, client_secret).

The command creates a file with the configuration name as fileName and stores it in $HOME/.flagship/configurations/CONFIGURATION_NAME.yaml and writes the value of the flags as key-value pairs then you can use the use command to generate the access token to manage your flagship resources automatically.

EXAMPLES

flagship configuration create -n CONFIGURATION_NAME -i CLIENT_ID -s CLIENT_SECRET -a ACCOUNT_ID -e ACCOUNT_ENVIRONMENT_ID

REQUIRED FLAGS

--name = _CONFIGURATION_NAME_

    The name of the configuration

--client-id = _CLIENT_ID_

    The client id of your flagship account

--client-secret = _CLIENT_SECRET_

    The client secret of your flagship account

--account-id = _ACCOUNT_ID_

    The account id of your flagship account

-account-environment-id = _ACCOUNT_ENVIRONMENT_ID_

    The account environment id of your flagship account

--path = _PATH_FILE_

    The path for the file where you want to import credentials (name, clientID, clientSecret, accountID, accountEnvID).

Here's an example of the path file example.yaml, you must fill in the info from Flagship platform

name: configuration_name
account_id: ai
account_environment_id: aei
client_id: ci
client_secret: cs

❗️

Required information

Name, client id, client secret, account id and account environment id are required field, you either insert them as flags or import a file that contains them with the path flag.

👍

CLI usage

After adding your configuration to the CLI, you are good to use it !


flagship configuration list

NAME

flagship configuration list - List all configuration

SYNOPSIS

flagship configuration list \[--output-format = OUTPUT_FORMAT [table|json|json-pretty]]

DESCRIPTION

    List all configurations

EXAMPLES

flagship configuration list

FLAGS

--output-format = _OUTPUT_FORMAT_

    The output format for printing command output resources. The default is table. The supported formats are: json-pretty, table, json.


flagship configuration get

NAME

flagship configuration get - Get a configuration

SYNOPSIS

flagship configuration get [-n CONFIGURATION_NAME | --name=CONFIGURATION_NAME]

DESCRIPTION

    Get a configuration

EXAMPLES

flagship configuration get -n CONFIGURATION_NAME

REQUIRED FLAGS

--name = _CONFIGURATION_NAME_

    The name of the configuration you want to display

FLAGS

--output-format _OUTPUT_FORMAT_

    The output format for printing command output resources. The default is table. The supported formats are: json-pretty, table, json.


flagship configuration edit

NAME

flagship configuration edit - Edit a configuration

SYNOPSIS

flagship configuration edit [-n <CONFIGURATION_NAME> | --name=<CONFIGURATION_NAME>] [-i <CLIENT_ID> | --client-id=<CLIENT_ID>] [-s <CLIENT_SECRET> | --client-secret=<CLIENT_SECRET>] [-a <ACCOUNT_ID> | --account-id=<ACCOUNT_ID>] [-e <ACCOUNT_ENVIRONMENT_ID> | --account-environment-id=<ACCOUNT_ENVIRONMENT_ID>] [--new-name=<NEW_NAME>]

DESCRIPTION

    Edit a configuration

EXAMPLES

flagship configuration edit -n CONFIGURATION_NAME -i CLIENT_ID -s CLIENT_SECRET -a ACCOUNT_ID -e ACCOUNT_ENVIRONMENT_ID --new-name NEW_CONFIGURATION_NAME

REQUIRED FLAGS

--name = _CONFIGURATION_NAME_

    The name of the configuration you want to edit

FLAGS

--client-id = _CLIENT_ID_

    The client id of your flagship account

--client-secret = _CLIENT_SECRET_

    The client secret of your flagship account

--account-id = _ACCOUNT_ID_

    The account id of your flagship account

--account-environment-id = _ACCOUNT_ENVIRONMENT_ID_

    The account environment id of your flagship account

--new-name = _NEW_NAME_

The new name for the configuration


flagship configuration delete

NAME

flagship configuration delete - Delete a configuration

SYNOPSIS

flagship configuration delete [-n CONFIGURATION_NAME | --name = CONFIGURATION_NAME]

DESCRIPTION

    Delete a configuration

EXAMPLES

flagship configuration delete -n CONFIGURATION_NAME

REQUIRED FLAGS

--name = _CONFIGURATION_NAME_

    The name of the configuration you want to delete


flagship configuration use

❗️

Command usage

To use flagship configuration use you should create a configuration first.

NAME

flagship configuration use - use a configuration and generate a token

SYNOPSIS

flagship configuration use [-n CONFIGURATION_NAME | --name = CONFIGURATION_NAME] [--grant-type GRANT_TYPE] [--scope SCOPE] [--expiration EXPIRATION]

📘

Flag default value

The default value of grant type is client_credentials, scope is * and expiration is 86400

DESCRIPTION

    Use a configuration

EXAMPLES

flagship configuration use -n CONFIGURATION_NAME --grant-type GRANT_TYPE --scope SCOPE --expiration EXPIRATION

REQUIRED FLAGS

--name = _CONFIGURATION_NAME_

    The name of the configuration you want to use

FLAGS

--grant-type = _GRANT_TYPE

    The grant type of the token, DEFAULT value is client_credentials

--scope = _SCOPE_

    The scope of the token, DEFAULT value is *

--expiration = _EXPIRATION_

    The expiration time of the token in seconds, DEFAULT value is 86400

👍

CLI usage

After selecting a configuration, you are good to go !


flagship configuration current

NAME

flagship configuration current - list the currently used configuration

SYNOPSIS

flagship configuration current

DESCRIPTION

    List the currently used configuration

EXAMPLES

flagship configuration current