예제 #1
0
        private async Task And_a_single_service_account()
        {
            using var client             = LocalhostRestClient.Create();
            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);
        }
예제 #2
0
        private async Task And_a_single_apiKey()
        {
            using var client = LocalhostRestClient.Create();

            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            _serviceAccount = await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);

            _apiKeyCreate = new ApiKeyCreate()
            {
                ServiceAccountId = _serviceAccount.Id,
                Description      = "GetAllScenario"
            };

            _apiKey = await client.ApiKeys.CreateAsync(_apiKeyCreate);
        }
예제 #3
0
        private async Task And_a_single_acl()
        {
            using var client             = LocalhostRestClient.Create();
            _serviceAccountCreateCommand = ServiceAccountCreateCommandFactory.CreateForIntegrationTest();

            _serviceAccount = await client.ServiceAccounts.CreateAsync(_serviceAccountCreateCommand);

            _aclCreateDelete = new AclCreateDelete
            {
                ServiceAccountId = Convert.ToInt64(_serviceAccount.Id),
                Allow            = true,
                Operation        = "WRITE",
                TopicPrefix      = "itsAThing"
            };

            await client.Acls.CreateAsync(_aclCreateDelete);
        }