How to use the paconn.settings.settingsbuilder.SettingsBuilder function in paconn

To help you get started, we’ve selected a few paconn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / update.py View on Github external
def update(
        environment,
        api_properties,
        api_definition,
        icon,
        connector_id,
        powerapps_url,
        powerapps_version,
        client_secret,
        settings_file):
    """
    Update command.
    """
    # Get settings
    settings = SettingsBuilder.get_settings(
        environment=environment,
        settings_file=settings_file,
        api_properties=api_properties,
        api_definition=api_definition,
        icon=icon,
        connector_id=connector_id,
        powerapps_url=powerapps_url,
        powerapps_version=powerapps_version)

    powerapps_rp, _ = load_powerapps_and_flow_rp(
        settings=settings,
        command_context=_UPDATE)

    connector_id = upsert(
        powerapps_rp=powerapps_rp,
        settings=settings,
github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / create.py View on Github external
def create(
        environment,
        api_properties,
        api_definition,
        icon,
        powerapps_url,
        powerapps_version,
        client_secret,
        settings_file,
        overwrite_settings):
    """
    Create command.
    """
    # Get settings
    settings = SettingsBuilder.get_settings(
        environment=environment,
        settings_file=settings_file,
        api_properties=api_properties,
        api_definition=api_definition,
        icon=icon,
        connector_id=None,
        powerapps_url=powerapps_url,
        powerapps_version=powerapps_version)

    powerapps_rp, _ = load_powerapps_and_flow_rp(
        settings=settings,
        command_context=_CREATE)

    connector_id = upsert(
        powerapps_rp=powerapps_rp,
        settings=settings,
github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / validate.py View on Github external
def validate(
        api_definition,
        powerapps_url,
        powerapps_version,
        settings_file):
    """
    Validate command.
    """
    # Get settings
    settings = SettingsBuilder.get_settings(
        environment=None,
        settings_file=settings_file,
        api_properties=None,
        api_definition=api_definition,
        icon=None,
        connector_id=None,
        powerapps_url=powerapps_url,
        powerapps_version=powerapps_version)

    powerapps_rp, _ = load_powerapps_and_flow_rp(
        settings=settings,
        command_context=_VALIDATE)

    result = paconn.operations.validate.validate(
        powerapps_rp=powerapps_rp,
        settings=settings)
github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / download.py View on Github external
def download(
        environment,
        connector_id,
        destination,
        powerapps_url,
        powerapps_version,
        settings_file,
        overwrite):
    """
    Download command.
    """
    # Get settings
    settings = SettingsBuilder.get_settings(
        environment=environment,
        settings_file=settings_file,
        api_properties=None,
        api_definition=None,
        icon=None,
        connector_id=None,
        powerapps_url=powerapps_url,
        powerapps_version=powerapps_version)

    powerapps_rp, _ = load_powerapps_and_flow_rp(
        settings=settings,
        command_context=_DOWNLOAD)

    directory = paconn.operations.download.download(
        powerapps_rp=powerapps_rp,
        settings=settings,
github microsoft / PowerPlatformConnectors / tools / paconn-cli / paconn / commands / login.py View on Github external
def login(client_id, tenant, authority_url, resource, settings_file, force):
    """
    Login command.
    """
    # Get settings
    settings = SettingsBuilder.get_authentication_settings(
        settings_file=settings_file,
        client_id=client_id,
        tenant=tenant,
        authority_url=authority_url,
        resource=resource)

    get_authentication(
        settings=settings,
        force_authenticate=force)
    display('Login successful.')