src/modules/grafana/cleanup_grafana_dashboard_role.py [10:38]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sys.path.append(os.path.join(os.path.dirname(__file__), '../../libs'))
import deploy_utils

'''
This utility creates an IAM role with necessary permissions for the CookieFactory workspace in Grafana
'''

def parse_args():
    parser = argparse.ArgumentParser(
        description='Creates a role for the AWS IoT TwinMaker workspace for this CookieFactory sample to be used in Grafana.')
    parser.add_argument('--workspace-id',
                        help='workspace to be used on a Grafana dashboard',
                        required=True, default='CookieFactory')
    parser.add_argument('--region',
                        help="(optional) AWS region you are creating the sample in. Defaults to 'us-east-1'",
                        required=False, default='us-east-1')
    parser.add_argument('--profile',
                        help="(optional) AWS profile to access your account with. See your configured profiles with "
                             "`~/.aws/credentials`. Defaults to 'None'",
                        required=False, default=None)
    parser.add_argument('--endpoint-url', required=False, default=None, help='AWS IoT TwinMaker service endpoint')
    return parser.parse_args()


def main():
    args = parse_args()
    region = args.region
    profile = args.profile
    workspaceId = args.workspace_id
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/modules/grafana/create_grafana_dashboard_role.py [10:38]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sys.path.append(os.path.join(os.path.dirname(__file__), '../../libs'))
import deploy_utils

'''
This utility creates an IAM role with necessary permissions for the CookieFactory workspace in Grafana
'''

def parse_args():
    parser = argparse.ArgumentParser(
        description='Creates a role for the AWS IoT TwinMaker workspace for this CookieFactory sample to be used in Grafana.')
    parser.add_argument('--workspace-id',
                        help='workspace to be used on a Grafana dashboard',
                        required=True, default='CookieFactory')
    parser.add_argument('--region',
                        help="(optional) AWS region you are creating the sample in. Defaults to 'us-east-1'",
                        required=False, default='us-east-1')
    parser.add_argument('--profile',
                        help="(optional) AWS profile to access your account with. See your configured profiles with "
                             "`~/.aws/credentials`. Defaults to 'None'",
                        required=False, default=None)
    parser.add_argument('--endpoint-url', required=False, default=None, help='AWS IoT TwinMaker service endpoint')
    return parser.parse_args()


def main():
    args = parse_args()
    region = args.region
    profile = args.profile
    workspaceId = args.workspace_id
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



