@@ -13,7 +13,6 @@ allows you to send and receive messages between independent applications.
13
13
* [ Samples] ( #samples )
14
14
* [ Topics] ( #topics )
15
15
* [ Subscriptions] ( #subscriptions )
16
- * [ IAM] ( #iam )
17
16
18
17
## Setup
19
18
@@ -35,19 +34,26 @@ __Usage:__ `node topics --help`
35
34
36
35
```
37
36
Commands:
37
+ list Lists all topics in the current project.
38
38
create <topicName> Creates a new topic.
39
- list Lists topics.
40
- publish <topicName> <message> Publish a message to the specified topic.
41
- delete <topicName> Deletes the specified topic.
39
+ delete <topicName> Deletes the a topic.
40
+ publish <topicName> <message> Publishes a message.
41
+ getPolicy <topicName> Gets the IAM policy for a topic.
42
+ setPolicy <topicName> Sets the IAM policy for a topic.
43
+ testPermissions <topicName> Tests the permissions for a topic.
42
44
43
45
Options:
44
46
--help Show help [boolean]
45
47
46
48
Examples:
47
- node topics create greetings Creates a new topic named "greetings".
48
- node topics list Lists all topics.
49
- node topics publish greetings '{"data":"Hello world!"}' Publishes a message to "greetings".
50
- node topics delete greetings Deletes a topic named "greetings".
49
+ node topics.js list Lists all topics in the current project.
50
+ node topics.js create greetings Creates a new topic named "greetings".
51
+ node topics.js delete greetings Deletes a topic named "greetings".
52
+ node topics.js publish greetings "Hello, world!" Publishes a simple message.
53
+ node topics.js publish greetings '{"data":"Hello, world!"}' Publishes a JSON message.
54
+ node topics.js getPolicy greetings Gets the IAM policy for a topic named "greetings".
55
+ node topics.js setPolicy greetings Sets the IAM policy for a topic named "greetings".
56
+ node topics.js testPermissions greetings Tests the permissions for a topic named "greetings".
51
57
52
58
For more information, see https://cloud.google.com/pubsub/docs
53
59
```
@@ -63,58 +69,41 @@ __Usage:__ `node subscriptions --help`
63
69
64
70
```
65
71
Commands:
66
- create <topicName> <subscriptionName> Creates a new subscription.
67
- list [topicName] Lists subscriptions, optionally filtering by a topic.
68
- get <subscriptionName> Gets the metadata the metadata for the specified subscription.
69
- pull <subscriptionName> Pulls messages for the specified subscription.
70
- delete <subscriptionName> Deletes the specified subscription.
72
+ list [topicName] Lists all subscriptions in the current project, optionally filtering by a
73
+ topic.
74
+ create <topicName> <subscriptionName> Creates a new subscription.
75
+ create-push <topicName> <subscriptionName> Creates a new push subscription.
76
+ delete <subscriptionName> Deletes a subscription.
77
+ get <subscriptionName> Gets the metadata for a subscription.
78
+ pull <subscriptionName> Pulls messages for a subscription.
79
+ get-policy <subscriptionName> Gets the IAM policy for a subscription.
80
+ set-policy <subscriptionName> Sets the IAM policy for a subscription.
81
+ test-permissions <subscriptionName> Tests the permissions for a subscription.
71
82
72
83
Options:
73
84
--help Show help [boolean]
74
85
75
86
Examples:
76
- node subscriptions create greetings greetings-worker-1 Creates a subscription named "greetings-worker-1" to a topic
77
- named "greetings".
78
- node subscriptions delete greetings-worker-1 Deletes a subscription named "greetings-worker-1".
79
- node subscriptions pull greetings-worker-1 Pulls messages for a subscription named "greetings-worker-1".
80
- node subscriptions list Lists all subscriptions.
81
- node subscriptions list greetings Lists subscriptions for a topic named "greetings".
87
+ node subscriptions.js list Lists all subscriptions in the current project.
88
+ node subscriptions.js list greetings Lists all subscriptions for a topic named "greetings".
89
+ node subscriptions.js create greetings greetings-worker-1 Creates a subscription named "greetings-worker-1" to a
90
+ topic named "greetings".
91
+ node subscriptions.js create-push greetings Creates a push subscription named "greetings-worker-1"
92
+ greetings-worker-1 to a topic named "greetings".
93
+ node subscriptions.js get greetings-worker-1 Gets the metadata for a subscription named
94
+ "greetings-worker-1".
95
+ node subscriptions.js delete greetings-worker-1 Deletes a subscription named "greetings-worker-1".
96
+ node subscriptions.js pull greetings-worker-1 Pulls messages for a subscription named
97
+ "greetings-worker-1".
98
+ node subscriptions.js get-policy greetings-worker-1 Gets the IAM policy for a subscription named
99
+ "greetings-worker-1".
100
+ node subscriptions.js set-policy greetings-worker-1 Sets the IAM policy for a subscription named
101
+ "greetings-worker-1".
102
+ node subscriptions.js test-permissions greetings-worker-1 Tests the permissions for a subscription named
103
+ "greetings-worker-1".
82
104
83
105
For more information, see https://cloud.google.com/pubsub/docs
84
106
```
85
107
86
108
[ subscriptions_docs ] : https://cloud.google.com/pubsub/subscriber
87
109
[ subscriptions_code ] : subscriptions.js
88
-
89
- ### IAM
90
-
91
- View the [ documentation] [ iam_docs ] or the [ source code] [ iam_code ] .
92
-
93
- __ Usage:__ ` node iam --help `
94
-
95
- ```
96
- Usage: node iam RESOURCE COMMAND [ARGS...]
97
-
98
- Resources:
99
-
100
- topics
101
- subscriptions
102
-
103
- Commands:
104
-
105
- get NAME
106
- set NAME
107
- test NAME
108
-
109
- Examples:
110
-
111
- node iam topics get my-topic
112
- node iam topics set my-topic
113
- node iam topics test my-topic
114
- node iam subscriptions get my-subscription
115
- node iam subscriptions set my-subscription
116
- node iam subscriptions test my-subscription
117
- ```
118
-
119
- [ iam_docs ] : https://cloud.google.com/pubsub/access_control
120
- [ iam_code ] : iam.js
0 commit comments