Пример #1
0
def create_service_principal_profile_instance(spnprofile):
    '''
    Helper method to serialize a dict to a ContainerServiceServicePrincipalProfile
    :param: spnprofile: dict with the parameters to setup the ContainerServiceServicePrincipalProfile
    :return: ContainerServiceServicePrincipalProfile
    '''
    return ContainerServiceServicePrincipalProfile(
        client_id=spnprofile['client_id'], secret=spnprofile['client_secret'])
Пример #2
0
 def with_cluster_sp(self, cluster_service_principal_connection_info):
     client_id = cluster_service_principal_connection_info["clientId"]
     client_secret = cluster_service_principal_connection_info["password"]
     service_principal_profile = ContainerServiceServicePrincipalProfile(
         client_id=client_id,
         secret=client_secret,
         key_vault_secret_ref=None)
     self.cluster_sp = service_principal_profile
     return self