Set the Governed Assets for this Authority.
rpc SetGovernedAssets
SetGovernedAssets
authority_api.v1.SetGovernedAssets
authority_api.v1.SetGovernedAssets
Set the Governed Assets for this Authority.
requests SetGovernedAssetsRequest
SetGovernedAssetsRequest
authority_api.v1.SetGovernedAssetsRequest
authority_api.v1.SetGovernedAssetsRequest
Field | Type | Description |
---|---|---|
asset_data | AssetDataEntry repeated | List of requested Governed Assets. |
resp, _ := authority.SetGovernedAssets(ctx, &v1.SetGovernedAssetsRequest{})
fmt.Println(resp)
const setgovernedassetsrequest = new SetGovernedAssetsRequest();
service.setGovernedAssets(setgovernedassetsrequest, (err, value:SetGovernedAssetsResponse|null) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
using System;
using Grpc.Core;
using AuthorityApi.V1;
namespace main
{
class Program
{
static void Main(string[] args)
{
Channel channel = new Channel("authority.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure);
var client = new Authority.AuthorityClient(channel);
var headers = new Metadata();
var setGovernedAssetsRequest = new SetGovernedAssetsRequest{};
var reply = client.SetGovernedAssets(setGovernedAssetsRequest, headers);
Console.WriteLine("Response: " + reply);
channel.ShutdownAsync().Wait();
}
}
}
package demo;
import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import authority_api.v1.Authority.SetGovernedAssetsRequest;
import authority_api.v1.Authority.SetGovernedAssetsResponse;
import authority_api.v1.AuthorityGrpc;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("authority.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build();
AuthorityGrpc.AuthorityBlockingStub blockStub =
AuthorityGrpc.newBlockingStub(channel);
SetGovernedAssetsRequest req_SetGovernedAssetsRequest =
SetGovernedAssetsRequest.newBuilder()
.build();
SetGovernedAssetsResponse resp = blockStub.setGovernedAssets(req_SetGovernedAssetsRequest);
System.out.println(resp);
channel.shutdown();
}
}
const setgovernedassetsrequest = new SetGovernedAssetsRequest();
service.setGovernedAssets(setgovernedassetsrequest, (err, value) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;
use grpc-sdks::authority_api::v1::authority_service_client::AuthorityClient;
use grpc-sdks::authority_api::v1::SetGovernedAssetsRequest;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Channel::from_static("authority.YOUR_SANDBOX_ID.knoxnetworks.io")
.connect()
.await?;
let mut client = AuthorityClient::new(channel);
let request = tonic::Request::new(
SetGovernedAssetsRequest{
asset_data: Vec::from([])
});
// sending request and waiting for response
let response = client.set_governed_assets(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import authority_api.v1.Authority.SetGovernedAssetsRequest
import authority_api.v1.Authority.SetGovernedAssetsResponse
import authority_api.v1.AuthorityGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("authority.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build()
var blockStub = AuthorityGrpc.newBlockingStub(channel)
val req_SetGovernedAssetsRequest = SetGovernedAssetsRequest.newBuilder()
.build()
val resp = blockStub.setGovernedAssets(req_SetGovernedAssetsRequest)
println(resp)
channel.shutdown()
}
returns SetGovernedAssetsResponse
SetGovernedAssetsResponse
authority_api.v1.SetGovernedAssetsResponse
authority_api.v1.SetGovernedAssetsResponse
{}