-
Notifications
You must be signed in to change notification settings - Fork 18
/
atlas.service.SasCredential.yml
79 lines (74 loc) · 2.41 KB
/
atlas.service.SasCredential.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
### YamlMime:TSType
name: SasCredential
uid: azure-maps-rest.atlas.service.SasCredential
package: azure-maps-rest
summary: |+
SasCredential is a Credential used to generate a SasCredentialPolicy.
Renew token by setting a new token string value to token property.
**Example**
const sasCredential = new SasCredential("token");
const pipeline = MapsURL.newPipeline(sasCredential);
const searchURL = new SearchURL(pipeline);
// Set up a timer to refresh the token
const timerID = setInterval(() => {
// Update token by accessing to public sasCredential.token
sasCredential.token = "updatedToken";
// WARNING: Timer must be manually stopped! It will forbid GC of sasCredential
if (shouldStop()) {
clearInterval(timerID);
}
}, 60 * 60 * 1000); // Set an interval time before your token expired
fullName: SasCredential
remarks: ''
isDeprecated: false
type: class
constructors:
- name: SasCredential(string)
uid: azure-maps-rest.atlas.service.SasCredential.constructor
package: azure-maps-rest
summary: Creates an instance of SasCredential.
remarks: ''
isDeprecated: false
syntax:
content: 'new SasCredential(token: string)'
parameters:
- id: token
type: string
description: ''
properties:
- name: token
uid: azure-maps-rest.atlas.service.SasCredential.token
package: azure-maps-rest
summary: |-
Mutable token value. You can set a renewed token value to this property,
for example, when a token is expired.
fullName: token
remarks: ''
isDeprecated: false
syntax:
content: 'token: string'
return:
description: ''
type: string
methods:
- name: 'create(RequestPolicy, RequestPolicyOptions)'
uid: azure-maps-rest.atlas.service.SasCredential.create
package: azure-maps-rest
summary: Creates a SasCredentialPolicy object.
remarks: ''
isDeprecated: false
syntax:
content: >-
function create(nextPolicy: RequestPolicy, options:
RequestPolicyOptions): SasCredentialPolicy
parameters:
- id: nextPolicy
type: RequestPolicy
description: ''
- id: options
type: RequestPolicyOptions
description: ''
return:
description: ''
type: <xref uid="azure-maps-rest.atlas.service.SasCredentialPolicy" />
extends: <xref uid="azure-maps-rest.atlas.service.Credential" />