Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace 'AWS_' with 'NIFCLOUD_' #73

Merged
merged 1 commit into from
Sep 6, 2021
Merged

Conversation

aokumasan
Copy link
Member

@aokumasan aokumasan commented Sep 6, 2021

Summary

  • AWS_ (aws_) -> NIFCLOUD_ (nifcloud_)

Tests

  • using SDK with hard-coded credentials
from nifcloud import session

client = session.get_session().create_client(
    "computing",
    region_name="jp-east-1",
    nifcloud_access_key_id="<Your NIFCLOUD Access Key ID>",
    nifcloud_secret_access_key="<Your NIFCLOUD Secret Access Key>"
)

print(client.describe_instances())
  • read credential values from environment variable.
from nifcloud import session

client = session.get_session().create_client(
    "computing",
)

print(client.describe_instances())
$ export NIFCLOUD_ACCESS_KEY_ID=<Your NIFCLOUD Access Key ID>
$ export NIFCLOUD_SECRET_ACCESS_KEY=<Your NIFCLOUD Secret Access Key>
$ export NIFCLOUD_DEFAULT_REGION=jp-east-1
$ python test.py
  • using CLI with environment variable
$ export NIFCLOUD_ACCESS_KEY_ID=<Your NIFCLOUD Access Key ID>
$ export NIFCLOUD_SECRET_ACCESS_KEY=<Your NIFCLOUD Secret Access Key>
$ export NIFCLOUD_DEFAULT_REGION=jp-east-1

$ nifcloud-debugcli computing describe-instances
  • using CLI with credential file
$ cat ~/.nifcloud/credentials
$ cat ~/.nifcloud/config
$ export NIFCLOUD_DEFAULT_PROFILE=<Your profile name>

# cleanup environment variables
$ export NIFCLOUD_ACCESS_KEY_ID=
$ export NIFCLOUD_SECRET_ACCESS_KEY=
$ export NIFCLOUD_DEFAULT_REGION=

$ nifcloud-debugcli computing describe-instances

@o108minmin
Copy link
Contributor

lgtm

@o108minmin o108minmin merged commit 3831c96 into main Sep 6, 2021
@o108minmin o108minmin deleted the feature/use_nifcloud_prefix branch September 6, 2021 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants