|
| 1 | +.. This file is automatically generated. Do not edit this file directly. |
| 2 | +
|
| 3 | +Cloud Healthcare API Python Samples |
| 4 | +=============================================================================== |
| 5 | + |
| 6 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 7 | + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=healthcare/api-client/v1/consent/README.rst |
| 8 | + |
| 9 | + |
| 10 | +This directory contains samples for Cloud Healthcare API. `Cloud Healthcare API`_ implements healthcare-native protocols and formats to accelerate ingestion, storage, analysis, and integration of healthcare data with cloud-based applications. |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +.. _Cloud Healthcare API: https://cloud.google.com/healthcare/docs |
| 16 | + |
| 17 | +To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/healthcare.googleapis.com |
| 18 | + |
| 19 | +To run the sample, you need to have `Healthcare Consent Store Administrator` role. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +Setup |
| 25 | +------------------------------------------------------------------------------- |
| 26 | + |
| 27 | + |
| 28 | +Authentication |
| 29 | +++++++++++++++ |
| 30 | + |
| 31 | +This sample requires you to have authentication setup. Refer to the |
| 32 | +`Authentication Getting Started Guide`_ for instructions on setting up |
| 33 | +credentials for applications. |
| 34 | + |
| 35 | +.. _Authentication Getting Started Guide: |
| 36 | + https://cloud.google.com/docs/authentication/getting-started |
| 37 | + |
| 38 | +Install Dependencies |
| 39 | +++++++++++++++++++++ |
| 40 | + |
| 41 | +#. Clone python-docs-samples and change directory to the sample directory you want to use. |
| 42 | + |
| 43 | + .. code-block:: bash |
| 44 | +
|
| 45 | + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git |
| 46 | +
|
| 47 | +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. |
| 48 | + |
| 49 | + .. _Python Development Environment Setup Guide: |
| 50 | + https://cloud.google.com/python/setup |
| 51 | + |
| 52 | +#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. |
| 53 | + |
| 54 | + .. code-block:: bash |
| 55 | +
|
| 56 | + $ virtualenv env |
| 57 | + $ source env/bin/activate |
| 58 | +
|
| 59 | +#. Install the dependencies needed to run the samples. |
| 60 | + |
| 61 | + .. code-block:: bash |
| 62 | +
|
| 63 | + $ pip install -r requirements.txt |
| 64 | +
|
| 65 | +.. _pip: https://pip.pypa.io/ |
| 66 | +.. _virtualenv: https://virtualenv.pypa.io/ |
| 67 | + |
| 68 | +Samples |
| 69 | +------------------------------------------------------------------------------- |
| 70 | + |
| 71 | +Datasets |
| 72 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 73 | + |
| 74 | +.. image:: https://gstatic.com/cloudssh/images/open-btn.png |
| 75 | + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=healthcare/api-client/v1/consents/consent_stores.py,healthcare/api-client/v1/consents/README.rst |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +To run this sample: |
| 81 | + |
| 82 | +.. code-block:: bash |
| 83 | +
|
| 84 | + $ python consent_stores.py |
| 85 | +
|
| 86 | + usage: consent_stores.py [-h] [--project_id PROJECT_ID] [--location LOCATION] |
| 87 | + [--consent_store_id DATASET_ID] |
| 88 | + [--default_consent_ttl DEFAULT_CONSENT_TTL] |
| 89 | + [--member MEMBER] [--role ROLE] |
| 90 | + {create-consent-store,delete-consent-store,get-consent-store,list-consent-stores,patch-consent-store,get_iam_policy,set_iam_policy} |
| 91 | + ... |
| 92 | +
|
| 93 | + positional arguments: |
| 94 | + {create-consent-store,delete-consent-store,get-consent-store,list-consent-stores,patch-consent-store,get_iam_policy,set_iam_policy} |
| 95 | + create-consent-store Creates a consent store. See |
| 96 | + https://github.com/GoogleCloudPlatform/python-docs- |
| 97 | + samples/tree/main/healthcare/api-client/v1/consents |
| 98 | + before running the sample. |
| 99 | + delete-consent-store Deletes a consent store. See |
| 100 | + https://github.com/GoogleCloudPlatform/python-docs- |
| 101 | + samples/tree/main/healthcare/api-client/v1/consents |
| 102 | + before running the sample. |
| 103 | + get-consent-store Gets the specified consent store. See |
| 104 | + https://github.com/GoogleCloudPlatform/python-docs- |
| 105 | + samples/tree/main/healthcare/api-client/v1/consents |
| 106 | + before running the sample. |
| 107 | + list-consent-stores Lists the consent stores in the given dataset. See |
| 108 | + https://github.com/GoogleCloudPlatform/python-docs- |
| 109 | + samples/tree/main/healthcare/api-client/v1/consents |
| 110 | + before running the sample. |
| 111 | + patch-consent-store Updates the consent store. See |
| 112 | + https://github.com/GoogleCloudPlatform/python-docs- |
| 113 | + samples/tree/main/healthcare/api-client/v1/consents |
| 114 | + before running the sample. |
| 115 | + get_iam_policy Gets the IAM policy for the specified consent store. See |
| 116 | + https://github.com/GoogleCloudPlatform/python-docs- |
| 117 | + samples/tree/main/healthcare/api-client/v1/consents |
| 118 | + before running the sample. |
| 119 | + set_iam_policy Sets the IAM policy for the specified consent store. A |
| 120 | + single member will be assigned a single role. A member |
| 121 | + can be any of: - allUsers, that is, anyone - |
| 122 | + allAuthenticatedUsers, anyone authenticated with a |
| 123 | + Google account - user:email, as in |
| 124 | + 'user:[email protected]' - group:email, as in |
| 125 | + 'group:[email protected]' - domain:domainname, as in |
| 126 | + 'domain:example.com' - serviceAccount:email, as in |
| 127 | + 'serviceAccount:my-other- |
| 128 | + [email protected]' A role can be any IAM |
| 129 | + role, such as 'roles/viewer', 'roles/owner', or |
| 130 | + 'roles/editor' See |
| 131 | + https://github.com/GoogleCloudPlatform/python-docs- |
| 132 | + samples/tree/main/healthcare/api-client/v1/consents |
| 133 | + before running the sample. |
| 134 | +
|
| 135 | + optional arguments: |
| 136 | + -h, --help show this help message and exit |
| 137 | + --project_id PROJECT_ID |
| 138 | + GCP project name |
| 139 | + --location LOCATION GCP cloud region |
| 140 | + --consent_store_id DATASET_ID |
| 141 | + Name of consent |
| 142 | + --default_consent_ttl DEFAULT_CONSENT_TTL |
| 143 | + The default time-to-live (TTL) of consents in the consent store. |
| 144 | + --member MEMBER Member to add to IAM policy (e.g. |
| 145 | + "domain:example.com") |
| 146 | + --role ROLE IAM Role to give to member (e.g. "roles/viewer") |
| 147 | +
|
| 148 | +
|
| 149 | +
|
| 150 | +
|
| 151 | +
|
| 152 | +The client library |
| 153 | +------------------------------------------------------------------------------- |
| 154 | + |
| 155 | +This sample uses the `Google Cloud Client Library for Python`_. |
| 156 | +You can read the documentation for more details on API usage and use GitHub |
| 157 | +to `browse the source`_ and `report issues`_. |
| 158 | + |
| 159 | +.. _Google Cloud Client Library for Python: |
| 160 | + https://googlecloudplatform.github.io/google-cloud-python/ |
| 161 | +.. _browse the source: |
| 162 | + https://github.com/GoogleCloudPlatform/google-cloud-python |
| 163 | +.. _report issues: |
| 164 | + https://github.com/GoogleCloudPlatform/google-cloud-python/issues |
| 165 | + |
| 166 | + |
| 167 | +.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
0 commit comments