blob: 5e53e659af2d5368acdbef5c5dec0a8fbdc5811e (
plain) (
blame)
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.aws;
import com.yahoo.config.provision.TenantName;
import com.yahoo.vespa.hosted.controller.tenant.Tenant;
import java.util.List;
import java.util.Optional;
/**
* @author mortent
*/
public interface RoleService {
Optional<TenantRoles> createTenantRole(Tenant tenant);
/** Retrieve the names of the tenant roles (host and container). Does not guarantee these roles exist */
TenantRoles getTenantRole(TenantName tenant);
void deleteTenantRole(TenantName tenant);
String createTenantPolicy(TenantName tenant, String policyName, String awsId, String role);
void deleteTenantPolicy(TenantName tenant, String policyName, String role);
/*
* Maintain roles for the tenants in the system. Create missing roles, update trust.
*/
double maintainRoles(List<TenantName> tenants);
void cleanupRoles(List<TenantName> deletedTenants);
}
|