Skip to content

Commit 706628c

Browse files
authored
Merge pull request #104918 from tijoytom/css_doc_fix
Fixing CSS create secret, it was missing the Body part
2 parents eb5d668 + 95151ec commit 706628c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

articles/service-fabric/service-fabric-application-secret-store.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ Use the following template to use Resource Manager to create the secret resource
7272
To create a `supersecret` secret resource by using the REST API, make a PUT request to `https://<clusterfqdn>:19080/Resources/Secrets/supersecret?api-version=6.4-preview`. You need the cluster certificate or admin client certificate to create a secret resource.
7373

7474
```powershell
75-
Invoke-WebRequest -Uri https://<clusterfqdn>:19080/Resources/Secrets/supersecret?api-version=6.4-preview -Method PUT -CertificateThumbprint <CertThumbprint>
75+
$json = '{"properties": {"kind": "inlinedValue", "contentType": "text/plain", "description": "supersecret"}}'
76+
Invoke-WebRequest -Uri https://<clusterfqdn>:19080/Resources/Secrets/supersecret?api-version=6.4-preview -Method PUT -CertificateThumbprint <CertThumbprint> -Body $json
7677
```
7778

7879
## Set the secret value
@@ -121,9 +122,13 @@ Use the following Resource Manager template to create and set the secret value.
121122

122123
Use the following script to use the REST API to set the secret value.
123124
```powershell
124-
$Params = @{"properties": {"value": "mysecretpassword"}}
125+
$Params = '{"properties": {"value": "mysecretpassword"}}'
125126
Invoke-WebRequest -Uri https://<clusterfqdn>:19080/Resources/Secrets/supersecret/values/ver1?api-version=6.4-preview -Method PUT -Body $Params -CertificateThumbprint <ClusterCertThumbprint>
126127
```
128+
### Examine the secret value
129+
```powershell
130+
Invoke-WebRequest -CertificateThumbprint <ClusterCertThumbprint> -Method POST -Uri "https:<clusterfqdn>/Resources/Secrets/supersecret/values/ver1/list_value?api-version=6.4-preview"
131+
```
127132
## Use the secret in your application
128133

129134
Follow these steps to use the secret in your Service Fabric application.

0 commit comments

Comments
 (0)