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

Add rdb and nas protocol for date #44

Merged
merged 1 commit into from
Sep 7, 2020

Conversation

tunakyonn
Copy link
Contributor

@tunakyonn tunakyonn commented Sep 3, 2020

Summary

fixed #20

Tests

  • Please test samples
from nifcloud import session
import datetime

client = session.get_session().create_client(
    "rdb",
    region_name="jp-east-1",
    aws_access_key_id="XXXX",
    aws_secret_access_key="YYYY"
)

td_3m = datetime.timedelta(minutes=3)
td_9h = datetime.timedelta(hours=9)
end = datetime.datetime.now() - td_9h
start = end - td_3m

print(client.nifty_get_metric_statistics(
    Dimensions=[
        {
            'Name': 'DBInstanceIdentifier',
            'Value': 'sdktestdb001'
        },
    ],
    MetricName='CPUUtilization',
    StartTime=start,
    EndTime=end
))
from nifcloud import session
import datetime

client = session.get_session().create_client(
    "nas",
    region_name="jp-east-1",
    aws_access_key_id="XXXX",
    aws_secret_access_key="YYYY"
)

td_3m = datetime.timedelta(minutes=3)
end = datetime.datetime.now()
start = end - td_3m

print(client.get_metric_statistics(
    Dimensions=[
        {
            'Name': 'NASInstanceIdentifier',
            'Value': 'sdktestnas001'
        },
    ],
    MetricName='FreeStorageSpace',
    StartTime=start,
    EndTime=end
))

@tunakyonn tunakyonn force-pushed the feature/add_rdb_nas_protocol_for_date branch from f04703a to 1cd7b1d Compare September 7, 2020 04:36
@fuku2014
Copy link
Member

fuku2014 commented Sep 7, 2020

Thanks for contributing!
LGTM

@fuku2014 fuku2014 merged commit 28e05e0 into master Sep 7, 2020
@fuku2014 fuku2014 deleted the feature/add_rdb_nas_protocol_for_date branch September 7, 2020 05: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.

RDB と NAS の日付フォーマットが SDK と異なる
2 participants