Home | History | Annotate | Download | only in dyn
      1 <html><body>
      2 <style>
      3 
      4 body, h1, h2, h3, div, span, p, pre, a {
      5   margin: 0;
      6   padding: 0;
      7   border: 0;
      8   font-weight: inherit;
      9   font-style: inherit;
     10   font-size: 100%;
     11   font-family: inherit;
     12   vertical-align: baseline;
     13 }
     14 
     15 body {
     16   font-size: 13px;
     17   padding: 1em;
     18 }
     19 
     20 h1 {
     21   font-size: 26px;
     22   margin-bottom: 1em;
     23 }
     24 
     25 h2 {
     26   font-size: 24px;
     27   margin-bottom: 1em;
     28 }
     29 
     30 h3 {
     31   font-size: 20px;
     32   margin-bottom: 1em;
     33   margin-top: 1em;
     34 }
     35 
     36 pre, code {
     37   line-height: 1.5;
     38   font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
     39 }
     40 
     41 pre {
     42   margin-top: 0.5em;
     43 }
     44 
     45 h1, h2, h3, p {
     46   font-family: Arial, sans serif;
     47 }
     48 
     49 h1, h2, h3 {
     50   border-bottom: solid #CCC 1px;
     51 }
     52 
     53 .toc_element {
     54   margin-top: 0.5em;
     55 }
     56 
     57 .firstline {
     58   margin-left: 2 em;
     59 }
     60 
     61 .method  {
     62   margin-top: 1em;
     63   border: solid 1px #CCC;
     64   padding: 1em;
     65   background: #EEE;
     66 }
     67 
     68 .details {
     69   font-weight: bold;
     70   font-size: 14px;
     71 }
     72 
     73 </style>
     74 
     75 <h1><a href="pubsub_v1.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1.projects.html">projects</a> . <a href="pubsub_v1.projects.snapshots.html">snapshots</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
     79 <p class="firstline">Gets the access control policy for a resource.</p>
     80 <p class="toc_element">
     81   <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
     82 <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
     83 <p class="toc_element">
     84   <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
     85 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
     86 <h3>Method Details</h3>
     87 <div class="method">
     88     <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
     89   <pre>Gets the access control policy for a resource.
     90 Returns an empty policy if the resource exists and does not have a policy
     91 set.
     92 
     93 Args:
     94   resource: string, REQUIRED: The resource for which the policy is being requested.
     95 See the operation documentation for the appropriate value for this field. (required)
     96   x__xgafv: string, V1 error format.
     97     Allowed values
     98       1 - v1 error format
     99       2 - v2 error format
    100 
    101 Returns:
    102   An object of the form:
    103 
    104     { # Defines an Identity and Access Management (IAM) policy. It is used to
    105       # specify access control policies for Cloud Platform resources.
    106       #
    107       #
    108       # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
    109       # `members` to a `role`, where the members can be user accounts, Google groups,
    110       # Google domains, and service accounts. A `role` is a named list of permissions
    111       # defined by IAM.
    112       #
    113       # **Example**
    114       #
    115       #     {
    116       #       "bindings": [
    117       #         {
    118       #           "role": "roles/owner",
    119       #           "members": [
    120       #             "user:mike (a] example.com",
    121       #             "group:admins (a] example.com",
    122       #             "domain:google.com",
    123       #             "serviceAccount:my-other-app (a] appspot.gserviceaccount.com",
    124       #           ]
    125       #         },
    126       #         {
    127       #           "role": "roles/viewer",
    128       #           "members": ["user:sean (a] example.com"]
    129       #         }
    130       #       ]
    131       #     }
    132       #
    133       # For a description of IAM and its features, see the
    134       # [IAM developer's guide](https://cloud.google.com/iam).
    135     "bindings": [ # Associates a list of `members` to a `role`.
    136         # Multiple `bindings` must not be specified for the same `role`.
    137         # `bindings` with no members will result in an error.
    138       { # Associates `members` with a `role`.
    139         "role": "A String", # Role that is assigned to `members`.
    140             # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
    141             # Required
    142         "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
    143             # `members` can have the following values:
    144             #
    145             # * `allUsers`: A special identifier that represents anyone who is
    146             #    on the internet; with or without a Google account.
    147             #
    148             # * `allAuthenticatedUsers`: A special identifier that represents anyone
    149             #    who is authenticated with a Google account or a service account.
    150             #
    151             # * `user:{emailid}`: An email address that represents a specific Google
    152             #    account. For example, `alice (a] gmail.com` or `joe (a] example.com`.
    153             #
    154             #
    155             # * `serviceAccount:{emailid}`: An email address that represents a service
    156             #    account. For example, `my-other-app (a] appspot.gserviceaccount.com`.
    157             #
    158             # * `group:{emailid}`: An email address that represents a Google group.
    159             #    For example, `admins (a] example.com`.
    160             #
    161             # * `domain:{domain}`: A Google Apps domain name that represents all the
    162             #    users of that domain. For example, `google.com` or `example.com`.
    163             #
    164           "A String",
    165         ],
    166       },
    167     ],
    168     "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
    169         # prevent simultaneous updates of a policy from overwriting each other.
    170         # It is strongly suggested that systems make use of the `etag` in the
    171         # read-modify-write cycle to perform policy updates in order to avoid race
    172         # conditions: An `etag` is returned in the response to `getIamPolicy`, and
    173         # systems are expected to put that etag in the request to `setIamPolicy` to
    174         # ensure that their change will be applied to the same version of the policy.
    175         #
    176         # If no `etag` is provided in the call to `setIamPolicy`, then the existing
    177         # policy is overwritten blindly.
    178     "version": 42, # Version of the `Policy`. The default version is 0.
    179   }</pre>
    180 </div>
    181 
    182 <div class="method">
    183     <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
    184   <pre>Sets the access control policy on the specified resource. Replaces any
    185 existing policy.
    186 
    187 Args:
    188   resource: string, REQUIRED: The resource for which the policy is being specified.
    189 See the operation documentation for the appropriate value for this field. (required)
    190   body: object, The request body. (required)
    191     The object takes the form of:
    192 
    193 { # Request message for `SetIamPolicy` method.
    194     "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of
    195         # the policy is limited to a few 10s of KB. An empty policy is a
    196         # valid policy but certain Cloud Platform services (such as Projects)
    197         # might reject them.
    198         # specify access control policies for Cloud Platform resources.
    199         #
    200         #
    201         # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
    202         # `members` to a `role`, where the members can be user accounts, Google groups,
    203         # Google domains, and service accounts. A `role` is a named list of permissions
    204         # defined by IAM.
    205         #
    206         # **Example**
    207         #
    208         #     {
    209         #       "bindings": [
    210         #         {
    211         #           "role": "roles/owner",
    212         #           "members": [
    213         #             "user:mike (a] example.com",
    214         #             "group:admins (a] example.com",
    215         #             "domain:google.com",
    216         #             "serviceAccount:my-other-app (a] appspot.gserviceaccount.com",
    217         #           ]
    218         #         },
    219         #         {
    220         #           "role": "roles/viewer",
    221         #           "members": ["user:sean (a] example.com"]
    222         #         }
    223         #       ]
    224         #     }
    225         #
    226         # For a description of IAM and its features, see the
    227         # [IAM developer's guide](https://cloud.google.com/iam).
    228       "bindings": [ # Associates a list of `members` to a `role`.
    229           # Multiple `bindings` must not be specified for the same `role`.
    230           # `bindings` with no members will result in an error.
    231         { # Associates `members` with a `role`.
    232           "role": "A String", # Role that is assigned to `members`.
    233               # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
    234               # Required
    235           "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
    236               # `members` can have the following values:
    237               #
    238               # * `allUsers`: A special identifier that represents anyone who is
    239               #    on the internet; with or without a Google account.
    240               #
    241               # * `allAuthenticatedUsers`: A special identifier that represents anyone
    242               #    who is authenticated with a Google account or a service account.
    243               #
    244               # * `user:{emailid}`: An email address that represents a specific Google
    245               #    account. For example, `alice (a] gmail.com` or `joe (a] example.com`.
    246               #
    247               #
    248               # * `serviceAccount:{emailid}`: An email address that represents a service
    249               #    account. For example, `my-other-app (a] appspot.gserviceaccount.com`.
    250               #
    251               # * `group:{emailid}`: An email address that represents a Google group.
    252               #    For example, `admins (a] example.com`.
    253               #
    254               # * `domain:{domain}`: A Google Apps domain name that represents all the
    255               #    users of that domain. For example, `google.com` or `example.com`.
    256               #
    257             "A String",
    258           ],
    259         },
    260       ],
    261       "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
    262           # prevent simultaneous updates of a policy from overwriting each other.
    263           # It is strongly suggested that systems make use of the `etag` in the
    264           # read-modify-write cycle to perform policy updates in order to avoid race
    265           # conditions: An `etag` is returned in the response to `getIamPolicy`, and
    266           # systems are expected to put that etag in the request to `setIamPolicy` to
    267           # ensure that their change will be applied to the same version of the policy.
    268           #
    269           # If no `etag` is provided in the call to `setIamPolicy`, then the existing
    270           # policy is overwritten blindly.
    271       "version": 42, # Version of the `Policy`. The default version is 0.
    272     },
    273   }
    274 
    275   x__xgafv: string, V1 error format.
    276     Allowed values
    277       1 - v1 error format
    278       2 - v2 error format
    279 
    280 Returns:
    281   An object of the form:
    282 
    283     { # Defines an Identity and Access Management (IAM) policy. It is used to
    284       # specify access control policies for Cloud Platform resources.
    285       #
    286       #
    287       # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
    288       # `members` to a `role`, where the members can be user accounts, Google groups,
    289       # Google domains, and service accounts. A `role` is a named list of permissions
    290       # defined by IAM.
    291       #
    292       # **Example**
    293       #
    294       #     {
    295       #       "bindings": [
    296       #         {
    297       #           "role": "roles/owner",
    298       #           "members": [
    299       #             "user:mike (a] example.com",
    300       #             "group:admins (a] example.com",
    301       #             "domain:google.com",
    302       #             "serviceAccount:my-other-app (a] appspot.gserviceaccount.com",
    303       #           ]
    304       #         },
    305       #         {
    306       #           "role": "roles/viewer",
    307       #           "members": ["user:sean (a] example.com"]
    308       #         }
    309       #       ]
    310       #     }
    311       #
    312       # For a description of IAM and its features, see the
    313       # [IAM developer's guide](https://cloud.google.com/iam).
    314     "bindings": [ # Associates a list of `members` to a `role`.
    315         # Multiple `bindings` must not be specified for the same `role`.
    316         # `bindings` with no members will result in an error.
    317       { # Associates `members` with a `role`.
    318         "role": "A String", # Role that is assigned to `members`.
    319             # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
    320             # Required
    321         "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
    322             # `members` can have the following values:
    323             #
    324             # * `allUsers`: A special identifier that represents anyone who is
    325             #    on the internet; with or without a Google account.
    326             #
    327             # * `allAuthenticatedUsers`: A special identifier that represents anyone
    328             #    who is authenticated with a Google account or a service account.
    329             #
    330             # * `user:{emailid}`: An email address that represents a specific Google
    331             #    account. For example, `alice (a] gmail.com` or `joe (a] example.com`.
    332             #
    333             #
    334             # * `serviceAccount:{emailid}`: An email address that represents a service
    335             #    account. For example, `my-other-app (a] appspot.gserviceaccount.com`.
    336             #
    337             # * `group:{emailid}`: An email address that represents a Google group.
    338             #    For example, `admins (a] example.com`.
    339             #
    340             # * `domain:{domain}`: A Google Apps domain name that represents all the
    341             #    users of that domain. For example, `google.com` or `example.com`.
    342             #
    343           "A String",
    344         ],
    345       },
    346     ],
    347     "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
    348         # prevent simultaneous updates of a policy from overwriting each other.
    349         # It is strongly suggested that systems make use of the `etag` in the
    350         # read-modify-write cycle to perform policy updates in order to avoid race
    351         # conditions: An `etag` is returned in the response to `getIamPolicy`, and
    352         # systems are expected to put that etag in the request to `setIamPolicy` to
    353         # ensure that their change will be applied to the same version of the policy.
    354         #
    355         # If no `etag` is provided in the call to `setIamPolicy`, then the existing
    356         # policy is overwritten blindly.
    357     "version": 42, # Version of the `Policy`. The default version is 0.
    358   }</pre>
    359 </div>
    360 
    361 <div class="method">
    362     <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
    363   <pre>Returns permissions that a caller has on the specified resource.
    364 If the resource does not exist, this will return an empty set of
    365 permissions, not a NOT_FOUND error.
    366 
    367 Note: This operation is designed to be used for building permission-aware
    368 UIs and command-line tools, not for authorization checking. This operation
    369 may "fail open" without warning.
    370 
    371 Args:
    372   resource: string, REQUIRED: The resource for which the policy detail is being requested.
    373 See the operation documentation for the appropriate value for this field. (required)
    374   body: object, The request body. (required)
    375     The object takes the form of:
    376 
    377 { # Request message for `TestIamPermissions` method.
    378     "permissions": [ # The set of permissions to check for the `resource`. Permissions with
    379         # wildcards (such as '*' or 'storage.*') are not allowed. For more
    380         # information see
    381         # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
    382       "A String",
    383     ],
    384   }
    385 
    386   x__xgafv: string, V1 error format.
    387     Allowed values
    388       1 - v1 error format
    389       2 - v2 error format
    390 
    391 Returns:
    392   An object of the form:
    393 
    394     { # Response message for `TestIamPermissions` method.
    395     "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
    396         # allowed.
    397       "A String",
    398     ],
    399   }</pre>
    400 </div>
    401 
    402 </body></html>